Open channel flow detection method and open channel flow meter
By using Parshall flume and image recognition technology in river environments, water levels can be monitored in real time and pseudo-normal flow patterns can be identified. This solves the problems of low measurement accuracy and high maintenance costs in traditional methods, achieving high-precision flow detection and low maintenance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FOSHAN ZHIMENG ENVIRONMENTAL TECH CO LTD
- Filing Date
- 2025-08-15
- Publication Date
- 2026-04-28
AI Technical Summary
Traditional open channel flow measurement methods suffer from low measurement accuracy and high manual maintenance costs in natural environments such as rivers. Ultrasonic flow meters are difficult to apply and maintain in such environments.
By employing a Parshall flume structure and combining camera and image recognition technology, the system monitors water levels in real time and identifies pseudo-normal flow patterns through dual-benchmark scissor difference time-series curves. It also uses a lightweight image recognition network and time-series image recognition model to calculate flow rate, reducing the need for manual cleaning and maintenance.
It improves the accuracy and reliability of flow detection, reduces manual maintenance costs, adapts to complex geometric deformations in river environments, and reduces measurement errors caused by pseudo-normal flow states in traditional methods.
Smart Images

Figure CN121026249B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent sensing system technology, and in particular to a method for detecting flow in open channels and an open channel flow meter. Background Technology
[0002] Open channel flow measurement is a crucial technical aspect of water conservancy projects, environmental monitoring, and industrial applications. Accurate flow data is of great significance for water resource management and pollutant discharge monitoring. Traditional open channel flow measurement mainly relies on manual reading of water level gauges combined with free flow or submerged flow formulas for calculation. However, this method suffers from problems such as low measurement accuracy, high labor costs, and poor real-time performance, making it difficult to meet the needs of modern monitoring.
[0003] With the development of sensor technology, ultrasonic flow monitoring technology has been widely applied in the field of open channel flow measurement. Ultrasonic flow meters measure the distance from the water surface to the sensor by emitting ultrasonic signals, thereby calculating the water level and, combined with a preset water level-flow curve, achieving automated flow measurement. Compared to traditional manual measurement, this technology offers advantages such as high automation and the ability to perform remote monitoring, and has achieved good application results in relatively stable environments such as wastewater treatment plants.
[0004] However, ultrasonic flow monitoring technology has significant limitations in practical applications. Ultrasonic flow meters typically assume that the geometry of the measuring cross-section remains standard, but in natural environments such as rivers, factors like siltation and debris accumulation can alter the cross-sectional shape, making ultrasonic flow monitoring technology difficult to apply in such environments. Finally, ultrasonic equipment requires regular cleaning and calibration, which incurs high maintenance costs at river monitoring points in remote areas.
[0005] Therefore, existing technologies still have some problems, resulting in high manpower maintenance costs to maintain the accuracy of traffic detection. Summary of the Invention
[0006] To solve the above-mentioned technical problems, or at least partially solve them, this application provides a method for detecting flow in an open channel and a flow meter, which can improve the accuracy of flow detection while reducing manual maintenance costs.
[0007] Firstly, this application proposes a method for detecting open channel flow, which includes the following steps:
[0008] A Parshall flume is constructed for the open channel to be measured, the Parshall flume comprising a contraction section, a throat section, and a diffusion section;
[0009] A first water gauge is set at a first predetermined position on the side wall of the contraction section of the Parshall flume, and a second water gauge is set at a second predetermined position on the side wall of the throat section.
[0010] The camera captures real-time images containing the first and second water gauges.
[0011] The first and second water gauge readings in the real-time image are identified to obtain the upstream and downstream water levels, respectively.
[0012] Based on the upstream and downstream water levels, the flow rate is calculated using a preset flow detection algorithm.
[0013] Optionally, based on the upstream and downstream water levels, flow rate is calculated using a preset flow rate detection algorithm, including the following steps:
[0014] The free-flow formula is used to calculate the flow rate value based on the upstream water level.
[0015] Calculate the flow rate value using the conservative inundation flow formula based on the upstream and downstream water levels;
[0016] Real-time calculation of free flow residuals and flooded flow residuals to construct dual-benchmark scissor difference time series curves;
[0017] Wherein, the free-flow residual is the difference between the current flow estimate and the free-flow formula flow value, and the flooding flow residual is the difference between the current flow estimate and the conservative flooding flow formula flow value;
[0018] When the dual-reference scissor difference time-series curve meets the abnormal triggering condition, the past image frame and the image frame corresponding to the current traffic are obtained.
[0019] The pre-set lightweight image recognition network is used to identify abnormal geometric features of past image frames. The matching degree between the position of each abnormal geometric feature identified in the image frame and the morphological features of the current dual-benchmark scissor difference time series curve is obtained. Based on the matching degree, the frame weight corresponding to each past image frame is calculated and output.
[0020] The frame weights are applied to the past image frames, and together with the image frames corresponding to the current traffic, they form a weighted image sequence.
[0021] The weighted image sequence is processed by a time-series image recognition model to identify abnormal geometric features in the image frame corresponding to the current traffic flow.
[0022] The pseudo-normal flow state is identified based on the abnormal geometric features and the scissor difference time series curve.
[0023] Optionally, determining whether the dual-benchmark scissor difference time series curve meets the anomaly triggering conditions includes the following steps:
[0024] Morphological analysis was performed on the dual-benchmark scissor difference time series curve to extract slope change rate, cross count and convergence features;
[0025] The morphological changes of the dual-benchmark scissor difference time series curve were detected;
[0026] Based on the morphological characteristics of the dual-benchmark scissor difference time series curve, the pseudo-normal flow state is classified into two types.
[0027] Among them, the sand and gravel accumulation type in the contraction section corresponds to the morphological characteristics of the shear difference opening; the step type in the diffusion section corresponds to the morphological characteristics of the shear difference jumping on one side.
[0028] When any of the aforementioned morphological changes is detected, it is determined that the abnormal triggering condition is met.
[0029] Optionally, the lightweight image recognition network is constructed through the following steps:
[0030] An input terminal is set up to receive the past image frames and the current scissor difference morphological features;
[0031] A feature extraction backbone network based on MobileNetV3 is constructed, which is connected to the input end and is used to extract visual features from the input past image frames;
[0032] An abnormal contour detection branch is constructed, which is connected to the feature extraction backbone network. The abnormal contour detection branch includes:
[0033] The contour extraction unit is used to extract the boundary contours of abnormal geometric shapes in the image;
[0034] A location positioning unit is used to determine the location information of the abnormal geometric shape in the image;
[0035] A matching degree calculation module is set up. The matching degree calculation module is connected to the position positioning unit and the input end. It receives the position information output by the abnormal contour detection branch and the current scissor difference morphology feature input through the input end. It is used to calculate the matching degree between the position of each abnormal simple geometric shape and the scissor difference morphology.
[0036] The weight calculation unit, which is composed of a fully connected neural network, is connected to the output of the contour extraction unit and the matching degree calculation module. It is used to calculate the frame weight value of each abnormal simple geometric shape according to the contour size and matching degree of each abnormal simple geometric shape, and to perform weighted fusion on the frame weight values of all abnormal simple geometric shapes to output the final frame weight value corresponding to each past image frame.
[0037] Optionally, the time-series image recognition model is constructed through the following steps:
[0038] An input terminal is configured to receive the weighted image sequence.
[0039] An encoder based on a temporal convolutional network is constructed. The encoder is connected to the input terminal and is used to extract temporal features from the weighted image sequence and output temporal encoded features.
[0040] A weight-aware attention module is set up, which is connected to the encoder. It receives the temporal coding features and the weight values corresponding to each image frame, dynamically allocates the attention intensity to each image frame according to the weight values, and outputs the weighted temporal features.
[0041] A temporal correlation fusion module is set up, which is connected to the weight-aware attention module. The module receives the weighted temporal features, learns the temporal correlation between past image frame sequences and image frames corresponding to the current traffic, and outputs the fused temporal correlation features.
[0042] An abnormal geometric feature regressor is constructed, which is connected to the temporal correlation fusion module. It receives the fused temporal correlation features and identifies and extracts the strongest abnormal geometric features in the image frame corresponding to the current traffic based on the evolution information of the past image frame sequence.
[0043] An output terminal is set up, which is connected to the abnormal geometric feature regressor, and is used to output the abnormal geometric feature that currently represents the strongest anomaly.
[0044] Optionally, the open channel flow detection method further includes the following steps:
[0045] The abnormal geometric features are input into a fully connected parameter mapping network, which processes the abnormal geometric features and outputs a parameter vector for a unified flow calculation formula. ;
[0046] The parameter vector is processed using an exponential smoothing update formula:
[0047]
[0048] in, Given the previous parameter vector, and α as the exponential smoothing coefficient, we obtain the parameter vector used for flow calculation. ;
[0049] The parameter vector Substitute the input into the preset unified flow calculation formula and output the corrected flow value.
[0050] Optionally, the parameter vector ,in:
[0051] This is the correction amount for the flow coefficient. This is the correction amount for the flow index. The amount of elevation at the bottom of the contraction segment; The rate of obstruction at the larynx;
[0052] The unified flow calculation formula is as follows:
[0053]
[0054] in:
[0055] Submersion correction function for:
[0056]
[0057] The corrected flow rate value. As the baseline free flow coefficient, As the benchmark free flow index, The blocking attenuation index, For the submersion ratio:
[0058]
[0059] in, The upstream water level, This refers to the downstream water level.
[0060] Linear attenuation coefficient:
[0061]
[0062] Critical submergence degree; Reduction factor for heavily flooded areas.
[0063] Optionally, the fully connected parameter mapping network is constructed through the following steps:
[0064] An input terminal is provided to receive the abnormal geometric features;
[0065] A feature encoding layer is constructed and connected to the input terminal. This layer is used to encode the abnormal geometric features of the input and output the encoded feature vector.
[0066] A first fully connected layer is set up, which is connected to the feature encoding layer. The first fully connected layer receives the encoded feature vector, performs non-linear transformation processing, and outputs the intermediate hidden features.
[0067] A second fully connected layer is set up, which is connected to the first fully connected layer. The second fully connected layer receives the intermediate hidden features, performs further nonlinear mapping, and outputs high-dimensional mapping features.
[0068] A parameter regression layer is constructed, which is connected to the second fully connected layer. This layer receives the high-dimensional mapping features and maps the features into parameter vectors required for the unified flow calculation formula. ;
[0069] An output terminal is configured and connected to the parameter regression layer to output the parameter vector. ,in .
[0070] Secondly, this application proposes an open channel flow meter, including a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set or instruction set, wherein the at least one instruction, the at least one program, the code set or instruction set is loaded and executed by the processor to implement the open channel flow detection method as described in any of the first aspects.
[0071] The technical solution provided in this application has the following advantages compared with the prior art:
[0072] One of its beneficial effects and its working principle is as follows:
[0073] Unlike ideal environments such as sewage treatment plants, which have good operating conditions, are free of debris, are easy to maintain, and usually only need to consider free flow conditions, Parshall flumes in river environments inevitably face the impact of debris such as sand, gravel, branches, and garbage carried by the river, and the structure of the Parshall flume itself will be altered by these debris.
[0074] At the same time, due to the influence of rainfall and runoff factors, Parshall flumes are required to have the ability to work under submerged flow conditions. Moreover, since the installation sites are usually in remote locations, manual inspection and maintenance are costly and infrequent. Traditional ultrasonic flow meters are prone to inaccurate measurements in such environments, and the construction of the Parshall flume must meet standard structures, so the maintenance workload is also very large.
[0075] In this river environment, the inherent hydraulic characteristics of the Parshall flume under free-flow conditions are both its technological advantage and the root of its problems. Under free-flow conditions, the water flow naturally accelerates in the contraction section of the Parshall flume and forms critical flow control at the throat. At this time, the fluid has strong inertial momentum and self-adaptive adjustment capabilities. The increase in flow velocity in the contraction section can partially compensate for head loss through the conversion of kinetic energy to potential energy, while the diffusion section has the ability to regulate the flow pattern. These characteristics mask the abnormal geometric deformation of the Parshall flume caused by debris, resulting in a pseudo-normal flow pattern.
[0076] These pseudo-normal flow states include:
[0077] When a sand and gravel triangular pile appears in the contraction section, although the effective cross-sectional area of water flow decreases, the inertial effect generated by the increased flow velocity in the contraction section just partially offsets the increased resistance caused by the sand pile, causing the upstream water level to rise and offset this part of the anomaly when calculating the flow rate.
[0078] When a step is formed at the outlet of the diffuser section due to sediment deposition, the flow regime characteristics of the diffuser section compensate for the additional energy loss in the free flow state.
[0079] This characteristic means that under free-flow conditions, the impact of this deformation on measurements is relatively small. However, once the water flow transitions from free flow to submerged flow, the original compensation balance of the free flow fails, leading to a sharp increase in measurement errors. Traditional monitoring methods rely entirely on manual inspection and cleaning of the Parshall flume to maintain its standard shape, thus avoiding this situation, which fails to meet the practical requirements of low maintenance and high reliability in river environments.
[0080] The working principle of this application is that, under normal operating conditions, the flow residual calculated by the standard free flow formula and the conservative submerged flow formula will form a stable scissor-like opening shape, while the pseudo-normal anomalies masked by the free flow characteristics will disrupt this stable relationship.
[0081] It produces a unique temporal variation pattern: the accumulation of sand and gravel in the contraction section leads to the gradual closing of the scissor shape, while the abnormal steps in the diffusion section create a unilateral opening feature of the scissor shape.
[0082] This application enables early detection and accurate identification of problem types when anomalies are still in the latent period of being masked by real-time monitoring of these characteristic scissor difference morphological changes. Combined with image analysis, it can further determine the specific geometric deformation parameters, thereby preparing in advance the flow correction required for flow calculation under flood flow conditions.
[0083] Therefore, the open channel flow detection method provided in this application can reduce the requirement for manual cleaning and maintenance of the standard geometry of the Parshall flume while improving the accuracy of flow detection.
[0084] Its second beneficial effect and its working principle are as follows:
[0085] In complex application scenarios in river environments, Parshall flumes often face the combined effects of multiple geometric deformations: the contraction section may have sand and gravel accumulation, while the diffusion section may have steps. This complex situation of multiple anomalies makes it difficult for traditional image recognition methods to accurately determine which geometric changes are the main causes of flow measurement errors. They are often interfered with by anomalies that are more visually obvious but have a smaller actual impact, leading to incorrect anomaly location and inappropriate correction strategies, which in turn affect the accuracy of flow calculation.
[0086] The working principle of this application is as follows: First, a lightweight image recognition network is used to identify the geometric features of past image frames within a period of time prior to the abnormal triggering of the scissor difference, extracting the specific location information of the abnormal geometric features in each frame. Then, based on the correspondence between the gradual convergence of the scissor difference and the unilateral opening of the scissor difference corresponding to the sand and gravel accumulation in the contraction section and the step anomaly in the diffusion section, the degree of matching between the identified abnormal geometric feature location in each image frame and the morphological features of the current dual-reference scissor difference time series curve is calculated. Higher weights are assigned to historical image frames with high matching degrees, and lower weights are assigned to image frames with low matching degrees or mismatched locations, thus creating a targeted frame weight sequence. Finally, these weighted past image frames are combined with the image frames corresponding to the current flow to form an image sequence that highlights key evolutionary information and suppresses irrelevant interference.
[0087] Then, by combining these weighted past image frames with the image frames corresponding to the current flow into an image sequence, and then processing this weighted image sequence through a preset temporal image recognition model, the key geometric change regions matching the scissor difference pattern receive stronger feature representation and attention allocation during the temporal recognition process. While the geometric changes in other regions have lower weights, they are still retained in the network's learning process. This soft weight guidance mechanism can highlight the real abnormal evolution path while maintaining the ability to perceive other potential abnormal regions, avoiding information loss that may be caused by hard filtering. Through this weighted temporal correlation learning, the model can accurately identify the geometric feature parameters in the image frames corresponding to the current flow that truly cause the scissor difference anomaly. While effectively suppressing the interference of secondary geometric changes, it retains the ability to detect abnormal situations in non-pseudo-normal flow states. Attached Figure Description
[0088] Figure 1 A schematic flowchart illustrating the open channel flow detection method provided in this application embodiment;
[0089] Figure 2 This is a schematic diagram of the shear difference shape provided in an embodiment of this application. Detailed Implementation
[0090] The technical solutions in this application will now be described with reference to the accompanying drawings.
[0091] Many specific details are set forth in the following description to provide a thorough understanding of this application, but this application may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some embodiments of this application, and not all embodiments. It should be noted that, unless otherwise specified, the embodiments of this application and the features in the embodiments can be combined with each other.
[0092] Firstly, referring to Figure 1As shown, this application proposes a method for detecting open channel flow, which includes the following steps:
[0093] S101: A Parshall flume is provided for the open channel to be measured. The Parshall flume includes a contraction section, a throat section, and a diffusion section.
[0094] Specifically, a Parshall flume of appropriate specifications should be selected based on the flow range of the open channel to be measured and the site conditions.
[0095] The selection of a Parshall flume can be referenced from the Parshall flume parameter table in the national standard HJ353. The throat width b is determined according to the expected maximum instantaneous flow rate. For example, when the expected flow rate range is 0.1-2.5 m³ / s, a standard Parshall flume with a throat width b=0.60m can be selected.
[0096] Furthermore, the installation of the Parshall flume should meet the following requirements:
[0097] First, select a relatively stable straight section in the channel for installation, ensuring that the length of the upstream straight section is no less than 10 times the width of the channel.
[0098] Secondly, the centerline of the Parshall flume should coincide with the centerline of the channel, and the flume should be level and stable after installation.
[0099] Then, the contraction section should be set upstream for smooth contraction and acceleration of the water flow, the throat section should serve as the flow control section, and the diffusion section should be set downstream for the diffusion of the water flow and energy recovery.
[0100] Finally, channel straightening sections of appropriate length are set up upstream of the Parshall flume inlet and downstream of the outlet to ensure a smooth transition of water flow.
[0101] The above are industry standards, but those skilled in the art can make adjustments based on actual circumstances.
[0102] S102: A first water gauge is set at a first preset position on the side wall of the contraction section of the Parshall flume, and a second water gauge is set at a second preset position on the side wall of the throat section.
[0103] The location of the first water gauge should comply with the requirements for upstream measuring points in national standard HJ353. For measuring points in the contraction section, the first water gauge should be installed on the side wall at a distance of 2 / 3 of the contraction section length L1 upstream of the throat inlet, ensuring that the measuring point can accurately reflect the upstream water level H. a It should be unaffected by local flow regime changes in the contraction section. The zero point elevation of the first water gauge should be flush with the bottom surface of the contraction section of the Parshall flume, with a scale accuracy of not less than 1 mm, and the measurement range should cover more than 1.2 times the expected maximum water level.
[0104] The second water gauge, used to measure the downstream water level Hb, should be installed on the side wall at the beginning of the diffuser section after the throat section outlet, at a distance from the throat outlet of not less than one throat width b. The installation of the second water gauge should avoid potential backflow and eddy current zones in the diffuser section to ensure that the measured downstream water level accurately reflects the tailrace conditions. The zero point elevation of the second water gauge should be on the same reference plane as the first water gauge, and the scale accuracy should also be not less than 1 mm.
[0105] The installation of the two water level gauges should also meet the following technical requirements:
[0106] First, the water level gauge should be made of corrosion-resistant and wear-resistant materials, such as stainless steel or weather-resistant plastic. The scale markings should be clear and durable, and be accurately identified by the camera under various lighting conditions.
[0107] Secondly, the water gauge should be installed perpendicular to the direction of water flow. The water gauge should be installed flush against the tank wall.
[0108] Then, considering the needs of subsequent image recognition, the two water gauges should be set on the same side wall of the tank to facilitate simultaneous observation by a single camera. The color of the water gauges and the background should form sufficient contrast, and it is recommended to use a scale design with alternating yellow and black or black and white.
[0109] Finally, the effective measurement range of the water gauge should take into account seasonal water level changes and extreme operating conditions. The upper limit of the first water gauge should be no less than 1.5 times the expected highest water level, and the second water gauge should be able to cover the possible range of tailwater changes.
[0110] S103: Acquire a real-time image containing the first and second water gauges via a camera;
[0111] The first and second water gauge readings in the real-time image are identified to obtain the upstream and downstream water levels, respectively.
[0112] Specifically, the selection and installation of the camera should meet the requirements of all-weather monitoring. Choose an industrial-grade network camera with a resolution of at least 1080P, featuring autofocus, automatic exposure, and infrared night vision. The camera should be installed in a position that allows for clear observation of both the first and second water gauges simultaneously, typically 3-5 meters from the tank wall on the side of the Parshall flume. The installation height should ensure that both water gauges are within the field of view and that the images are clear.
[0113] Real-time image acquisition employs a continuous acquisition mode, with an image acquisition frequency set to 1-2 frames per second to ensure timely capture of water level changes. Image data is transmitted to the data processing unit via network, while historical image frames are simultaneously stored locally for anomaly analysis.
[0114] The identification of water level readings is achieved using an image recognition algorithm based on the YOLOv5 target detection model. First, the acquired real-time images are preprocessed, including image enhancement, noise reduction, and geometric correction to eliminate the effects of lighting variations and lens distortion. Then, a pre-trained YOLOv5 model is used to detect and locate the positions of the first and second water level gauges in the image, and their respective regions of interest (ROIs) are extracted. Next, a detailed analysis of the ROI for each water level gauge is performed to identify the intersection of the water surface and the scale lines. The accurate water level reading is determined through character recognition and position calculation of the scale markings. Finally, the reading of the first water level gauge is taken as the upstream water level. The reading from the second water gauge is used as the downstream water level. .
[0115] S104: Calculate the flow rate based on the upstream and downstream water levels using a preset flow detection algorithm.
[0116] Specifically, it includes the following steps:
[0117] The free-flow formula is used to calculate the flow rate value based on the upstream water level.
[0118] Specifically, the free flow formula is:
[0119]
[0120] in, The baseline free flow coefficient; The baseline free-flow index.
[0121] and The throat width b of the Parshall flume is obtained from the standard parameter table of the Parshall flume.
[0122] For example, for a Parshall flume with a throat width b = 0.60 m, ==1403; =1.548.
[0123] Calculate the flow rate value using the conservative inundation flow formula based on the upstream and downstream water levels;
[0124] Specifically, the conservative flooding flow formula is:
[0125]
[0126] in, For conservative flooding correction function:
[0127]
[0128] For the submersion ratio:
[0129]
[0130] It is the industry-standard flooding correction function:
[0131]
[0132] The submersion correction value for a given throat width is obtained by searching the USBR.
[0133] To standardize the conservative coefficient, it is set slightly less than 1 and used to apply downward pressure to the standard curve, thus forming a conservative estimate.
[0134] Real-time calculation of free flow residuals and flooded flow residuals to construct dual-benchmark scissor difference time series curves;
[0135] Wherein, the free-flow residual is the difference between the current flow estimate and the free-flow formula flow value, and the flooding flow residual is the difference between the current flow estimate and the conservative flooding flow formula flow value.
[0136] During the initial operation phase of the system, the value calculated using the free-flow formula is used as the current flow estimate. During system operation, the previously corrected flow value is used as the current flow estimate.
[0137] Dual-benchmark scissor difference time series curve reference Figure 2 As shown, when the dual-reference scissor difference time-series curve meets the abnormal triggering condition, the past image frame and the image frame corresponding to the current traffic are obtained.
[0138] Specifically, determining whether the dual-benchmark scissor difference time series curve meets the anomaly triggering conditions includes the following steps:
[0139] Morphological analysis was performed on the dual-benchmark scissor difference time series curve to extract slope change rate, cross count and convergence features;
[0140] The morphological changes of the dual-benchmark scissor difference time series curve were detected;
[0141] Based on the morphological characteristics of the dual-benchmark scissor difference time series curve, the pseudo-normal flow state is classified into two types.
[0142] Among them, the sand and gravel accumulation type in the contraction section corresponds to the morphological characteristics of the shear difference opening; the step type in the diffusion section corresponds to the morphological characteristics of the shear difference jumping on one side.
[0143] When any of the aforementioned morphological changes is detected, it is determined that the abnormal triggering condition is met.
[0144] Specifically, the data flow for determining whether the dual-benchmark scissor difference time series curve meets the anomaly triggering conditions is as follows:
[0145] Step 1: Temporal Feature Extraction:
[0146] Extracting convergence features:
[0147] Calculate the scissor difference interval :
[0148]
[0149] Analyze the current scissor gap. Its comparison with the baseline value The trend of change: convergence_trend
[0150]
[0151] in, The baseline spacing is determined by statistically analyzing normal operating data.
[0152] Extracting jump features:
[0153] Monitoring free flow residuals Absolute change within a short time window (e.g., 10 minutes) It is used to identify mutation behavior.
[0154]
[0155] Step 2: Morphological Pattern Recognition
[0156] Based on the extracted temporal features, the system identifies two typical scissor gap patterns:
[0157] Identifying the gradual closing pattern: When convergence_trend < -0.3 (spacing reduction of more than 30%) and the duration exceeds 20 minutes, it is identified as a gradual closing pattern. This pattern is characterized by a continuous reduction in the scissor gap, showing a closing trend.
[0158] Single-jump pattern identification: When jump_amplitude > 0.08 L / s and maintains a new steady state for more than 15 minutes after the jump, it is identified as a single-jump pattern. This pattern is characterized by Δfree suddenly jumping to a new level and maintaining stability.
[0159] Step 3: Classification of pseudo-normal flow states:
[0160] Based on the identified morphological patterns, the system classifies pseudo-normal flow states into two types:
[0161] Shrinkage section gravel accumulation type: corresponds to the morphological characteristics of shear difference gradual convergence. When a gradual convergence pattern is detected, it is classified as gravel accumulation type.
[0162] Step-like diffusion segment: This corresponds to the morphological characteristics of a single-sided jump in the scissor difference pattern. When a single-jump pattern is detected, it is classified as a step-like pattern.
[0163] Step 4: Exception Trigger Determination
[0164] When any pattern is identified, it is determined that the abnormal triggering condition is met.
[0165] The pre-set lightweight image recognition network is used to identify abnormal geometric features of past image frames. The matching degree between the position of each abnormal geometric feature identified in the image frame and the morphological features of the current dual-benchmark scissor difference time series curve is obtained. Based on the matching degree, the frame weight corresponding to each past image frame is calculated and output.
[0166] Specifically, the lightweight image recognition network is constructed through the following steps:
[0167] An input terminal is set up to receive the past image frames and the current scissor difference morphological features;
[0168] A feature extraction backbone network based on MobileNetV3 is constructed, which is connected to the input end and is used to extract visual features from the input past image frames;
[0169] An abnormal contour detection branch is constructed, which is connected to the feature extraction backbone network. The abnormal contour detection branch includes:
[0170] The contour extraction unit is used to extract the boundary contours (i.e., abnormally simple geometric shapes) of abnormal geometric shapes in the image.
[0171] A location positioning unit is used to determine the location information of the abnormally simple geometric shape (outline) in the image;
[0172] A matching degree calculation module is set up. The matching degree calculation module is connected to the position positioning unit and the input end. It receives the position information output by the abnormal contour detection branch and the current scissor difference morphology feature input through the input end. It is used to calculate the matching degree between the position of each abnormal simple geometric shape and the scissor difference morphology.
[0173] The weight calculation unit, which is composed of a fully connected neural network, is connected to the output of the contour extraction unit and the matching degree calculation module. It is used to calculate the frame weight value of each abnormal simple geometric shape according to the contour size and matching degree of each abnormal simple geometric shape, and to perform weighted fusion on the frame weight values of all abnormal simple geometric shapes to output the final frame weight value corresponding to each past image frame.
[0174] Specifically, the framework of lightweight image recognition networks includes:
[0175] The MobileNetV3 feature extraction backbone network adopts the MobileNetV3-Large architecture.
[0176] Input dimensions: 224×224×3 (RGB image);
[0177] Number of feature extraction layers: 15 inverted residual blocks;
[0178] Output feature dimensions: 960.
[0179] The anomaly contour detection branch receives 960-dimensional features from the MobileNetV3 output as input.
[0180] The specific parameters are as follows:
[0181] Contour extraction unit: Input 960-dimensional features, pass through 3 convolutional layers (3×3 convolutional kernel, stride 1, padding 1), output 256-dimensional contour features (exceptionally simple geometric shape).
[0182] Location unit: Input 960-dimensional features, pass through 2 fully connected layers (1st layer 512-dimensional, 2nd layer 128-dimensional), and output 2-dimensional location coordinate information (x, y).
[0183] The matching degree calculation module receives the 2D position information output by the position positioning unit and the one-hot encoding of the 3D scissor difference morphological features from the input end. The specific parameters are as follows:
[0184] Feature concatenation: The 2D position coordinate information and the 3D scissor difference morphological features are concatenated one-hot encoded into a 5D input.
[0185] Fusion Network: A 5-dimensional input passes through a 2-layer fully connected network (64 dimensions from the input layer to the hidden layer, and 32 dimensions from the hidden layer to the output layer), and outputs a 1-dimensional matching score.
[0186] The weight calculation unit receives the 256-dimensional contour features output by the contour extraction unit and the 1-dimensional matching score output by the matching degree calculation module. The specific parameters are as follows:
[0187] Feature concatenation: The 256-dimensional contour features are concatenated with the 1-dimensional matching score to form a 257-dimensional input;
[0188] Hidden layer 1: 257-dimensional input, 128-dimensional output, ReLU activation function;
[0189] Hidden layer 2: 128-dimensional input, 64-dimensional output, ReLU activation function;
[0190] Output layer: 64-dimensional input, 1-dimensional output, activation function is Sigmoid;
[0191] The final output is a 1-dimensional weight value, with a range of [0,1].
[0192] Specifically, the lightweight image recognition network is trained through the following steps: collecting past image frames containing multiple different abnormal scenarios and their corresponding scissor gap morphological features and frame weight annotation data as the training set of the composite neural network, wherein each set of data contains past image frames, current scissor gap morphological features, and frame weight values annotated by domain experts according to the degree of correlation between abnormal geometric shape and scissor gap shape.
[0193] The lightweight image recognition network is trained by using past image frames and scissor difference morphological features from the training set as inputs and the corresponding frame weight annotation data as labels.
[0194] The frame weights are applied to the past image frames, and together with the image frames corresponding to the current traffic, they form a weighted image sequence.
[0195] The weighted image sequence is processed by a time-series image recognition model to identify abnormal geometric features in the image frame corresponding to the current traffic flow.
[0196] Specifically, the time-series image recognition model is constructed through the following steps:
[0197] An input terminal is configured to receive the weighted image sequence.
[0198] An encoder based on a temporal convolutional network is constructed. The encoder is connected to the input terminal and is used to extract temporal features from the weighted image sequence and output temporal encoded features.
[0199] A weight-aware attention module is set up, which is connected to the encoder. It receives the temporal coding features and the weight values corresponding to each image frame, dynamically allocates the attention intensity to each image frame according to the weight values, and outputs the weighted temporal features.
[0200] A temporal correlation fusion module is set up, which is connected to the weight-aware attention module. The module receives the weighted temporal features, learns the temporal correlation between past image frame sequences and image frames corresponding to the current traffic, and outputs the fused temporal correlation features.
[0201] An abnormal geometric feature regressor is constructed, which is connected to the temporal correlation fusion module. It receives the fused temporal correlation features and identifies and extracts the strongest abnormal geometric features in the image frame corresponding to the current traffic based on the evolution information of the past image frame sequence.
[0202] An output terminal is set up, which is connected to the abnormal geometric feature regressor, and is used to output the abnormal geometric feature that currently represents the strongest anomaly.
[0203] Specifically, the temporal image recognition model framework includes:
[0204] The temporal convolutional network encoder, employing the TCN architecture, receives a weighted image sequence as input. Specific parameters are as follows:
[0205] Input sequence length: Variable length image sequence (typically 10-30 frames);
[0206] Input image size: 224×224×3 (RGB image);
[0207] Number of TCN layers: 4 temporal convolutional layers;
[0208] Kernel size: 3×3;
[0209] Inflation factor: [1, 2, 4, 8] (increasing layer by layer);
[0210] Number of channels: [64, 128, 256, 512] (increasing layer by layer);
[0211] Output: 512-dimensional temporally encoded features are passed to the weight-aware attention module.
[0212] The weight-aware attention module receives the 512-dimensional temporal encoded features output by the TCN encoder and the weight values of each image frame from the input. Specific parameters are as follows:
[0213] Feature input: 512-dimensional temporal encoded features;
[0214] Weight input: a weight vector corresponding to the length of the image sequence (e.g., 30 frames correspond to 30 weight values).
[0215] Attention mechanism: Multi-head self-attention mechanism, with 8 heads;
[0216] Weighted fusion: The frame weight values are used as attention weights and fused with temporal features in a weighted manner;
[0217] Output: The 512-dimensional weighted temporal features are passed to the temporal correlation fusion module.
[0218] The temporal correlation fusion module receives the 512-dimensional weighted temporal features output by the weight-aware attention module. Specific parameters are as follows:
[0219] Input: 512-dimensional weighted time series features;
[0220] Fusion Network: Bidirectional LSTM structure, with 256 hidden layers;
[0221] Forward LSTM output: 256-dimensional features;
[0222] Backward LSTM output: 256-dimensional features;
[0223] Feature assembly: Forward 256 dimensions + Backward 256 dimensions = 512-dimensional fused features;
[0224] Output: The 512-dimensional fused temporal correlation features are passed to the anomaly geometric feature regressor.
[0225] The anomaly geometric feature regressor receives the 512-dimensional fused features output by the temporal correlation fusion module. Its specific parameters are as follows:
[0226] Input: 512-dimensional fused temporal correlation features;
[0227] Hidden layer 1: 512-dimensional input, 256-dimensional output, ReLU activation function;
[0228] Hidden layer 2: 256-dimensional input, 128-dimensional output, ReLU activation function;
[0229] Output layer: 128-dimensional input, outputs abnormal geometric feature parameters, activation function is Linear;
[0230] Final output: Abnormal geometric feature parameters are passed to the output terminal;
[0231] The time-series image recognition model is trained through the following steps:
[0232] Collect image sequences with weighted adjustments and their corresponding abnormal geometric feature parameter annotations as the training set for the temporal image recognition model. Each set of data includes the image sequence with weighted adjustments, the weight values of each frame, and abnormal geometric feature parameters (in this embodiment, these are sand and gravel thickness, step height, abnormal area area, and aspect ratio) annotated by domain experts based on the image content.
[0233] The time-series image recognition model is trained by using the weighted image sequences and frame weight values from the training set as inputs and the corresponding abnormal geometric feature parameter annotation data as labels.
[0234] The pseudo-normal flow state is identified based on the abnormal geometric features and the scissor difference time series curve.
[0235] Specifically, it includes the following steps:
[0236] Set a baseline threshold for judging abnormal geometric features:
[0237] Sand and gravel thickness benchmark threshold: When the identified sand and gravel thickness is ≥ 3cm, it is determined that there is abnormal sand and gravel accumulation in the contraction section;
[0238] Step height reference threshold: When the identified step height is ≥ 8cm, it is determined that there is an abnormal step in the diffusion section;
[0239] When the area of the abnormal region accounts for ≥ 25% or the aspect ratio of the shape deviates from the normal range (0.8-1.2), the above benchmark threshold will be reduced by 20% for judgment.
[0240] Reinforcement threshold for sand and gravel thickness: ≥ 2.4cm (3cm × 0.8);
[0241] Step height reinforcement threshold: ≥ 6.4cm (8cm × 0.8).
[0242] Geometric shape determination:
[0243] Determine the geometric morphology type based on abnormal geometric features:
[0244] When the thickness of the sand and gravel exceeds the set threshold, it is determined to be a sand and gravel accumulation type in the contraction section;
[0245] When the step height exceeds the set threshold, it is determined to be a diffusion section step type.
[0246] Comprehensive Judgment of Pseudo-Normal Flow Pattern
[0247] A pseudo-normal flow state is determined to exist when the following conditions are met simultaneously:
[0248] Condition 1: Abnormal geometric features exceed the set threshold (baseline threshold or reinforcement threshold).
[0249] Condition 2: The geometric feature type matches the scissor difference morphological pattern.
[0250] Specifically, when a pseudo-normal flow state is identified, the abnormal geometric features are input into a fully connected parameter mapping network. The fully connected parameter mapping network processes the abnormal geometric features and outputs a parameter vector for a unified flow calculation formula. ;
[0251] Specifically, the fully connected parameter mapping network is constructed through the following steps:
[0252] An input terminal is provided to receive the abnormal geometric features;
[0253] A feature encoding layer is constructed and connected to the input terminal. This layer is used to encode the abnormal geometric features of the input and output the encoded feature vector.
[0254] A first fully connected layer is set up, which is connected to the feature encoding layer. The first fully connected layer receives the encoded feature vector, performs non-linear transformation processing, and outputs the intermediate hidden features.
[0255] A second fully connected layer is set up, which is connected to the first fully connected layer. The second fully connected layer receives the intermediate hidden features, performs further nonlinear mapping, and outputs high-dimensional mapping features.
[0256] A parameter regression layer is constructed, which is connected to the second fully connected layer. This layer receives the high-dimensional mapping features and maps the features into parameter vectors required for the unified flow calculation formula. ;
[0257] An output terminal is configured and connected to the parameter regression layer to output the parameter vector. ,in .
[0258] Specifically, the fully connected parameter mapping network framework is as follows:
[0259] The feature encoding layer receives anomalous geometric features from the input as input, and its specific parameters are as follows:
[0260] Input: Anomaly geometric feature vector (in this embodiment, it includes sand and gravel thickness, step height, anomaly area, and aspect ratio, totaling 4 dimensions);
[0261] Encoding network: 1 fully connected layer, 4-dimensional input, 32-dimensional output, ReLU activation function;
[0262] Output: The 32-dimensional encoded feature vector is passed to the first fully connected layer;
[0263] The first fully connected layer receives the 32-dimensional encoded feature vector output from the feature encoding layer. Its specific parameters are as follows:
[0264] Input: 32-dimensional encoded feature vector;
[0265] Network structure: 1 fully connected layer, 32-dimensional input, 64-dimensional output, ReLU activation function;
[0266] Output: The 64-dimensional intermediate hidden features are passed to the second fully connected layer;
[0267] The second fully connected layer receives the 64-dimensional intermediate hidden features output from the first fully connected layer. Its specific parameters are as follows:
[0268] Input: 64-dimensional intermediate hidden features;
[0269] Network structure: 1 fully connected layer, 64-dimensional input, 128-dimensional output, ReLU activation function;
[0270] Output: 128-dimensional high-dimensional mapped features are passed to the parametric regression layer;
[0271] The parameter regression layer receives the 128-dimensional high-dimensional mapping features output from the second fully connected layer. The specific parameters are as follows:
[0272] Input: 128-dimensional high-dimensional mapping features;
[0273] Network structure: 1 fully connected layer, 128-dimensional input, 4-dimensional output, activation function is Tanh;
[0274] Output: 4-dimensional parameter vector Passed to the output, where This is the correction amount for the flow coefficient. This is the correction amount for the flow index. This refers to the amount of elevation at the bottom of the contraction segment. The rate of obstruction at the larynx;
[0275] The fully connected parameter mapping network is trained through the following steps:
[0276] A training set for a fully connected parameter mapping network was collected, containing anomalous geometric features and their corresponding parameter vector annotations under multiple different anomalous scenarios. Each set of data includes anomalous geometric feature vectors (sand and gravel thickness, step height, anomalous region area, and aspect ratio) and parameter vectors annotated by fluid mechanics experts based on on-site testing. .
[0277] The abnormal geometric feature vectors in the training set are used as the input to the fully connected parameter mapping network; the corresponding parameter vectors are used as the input to the network. The labeled data serves as the labels for the fully connected parameter mapping network, which is then used to train the fully connected parameter mapping network.
[0278] The parameter vector is updated using an exponential smoothing formula. Processing:
[0279]
[0280] in, Given the previous parameter vector, and α as the exponential smoothing coefficient, we obtain the parameter vector used for flow calculation. .
[0281] Specifically, the principles for setting the exponential smoothing coefficient α are as follows:
[0282] When a pseudo-normal flow pattern of sand and gravel accumulation is detected, set = 0.3;
[0283] When a pseudo-normal flow state, such as step formation, is detected, set... = 0.5;
[0284] During the initial operation phase of the system Set as the zero vector;
[0285] During normal operation, This is the parameter vector after the last update.
[0286] What should be known is that The size of the setting depends on how quickly these two forms affect the flow rate. Sand and gravel deposits form more slowly, so they can be set smaller; steps form more quickly, so they can be set larger.
[0287] Meanwhile, when the system does not detect a pseudo-normal flow state, the parameter vector Keep it as a zero vector.
[0288] The parameter vector Substitute the input into the preset unified flow calculation formula and output the corrected flow value.
[0289] Specifically, the parameter vector ,in:
[0290] The unified flow calculation formula is as follows:
[0291]
[0292] in:
[0293] Submersion correction function for:
[0294]
[0295] The corrected flow rate value. As the baseline free flow coefficient, As the benchmark free flow index, This is the blocking attenuation index, with a typical value of 1.2. The inundation ratio;
[0296] Linear attenuation coefficient:
[0297]
[0298] The critical submergence degree can be obtained by referring to the Parshall flume parameter table; The reduction factor for severely flooded areas is typically 0.8.
[0299] The technical solution provided in this application has the following advantages compared with the prior art:
[0300] One of its beneficial effects and its working principle is as follows:
[0301] Unlike ideal environments such as sewage treatment plants, which have good operating conditions, are free of debris, are easy to maintain, and usually only need to consider free flow conditions, Parshall flumes in river environments inevitably face the impact of debris such as sand, gravel, branches, and garbage carried by the river, and the structure of the Parshall flume itself will be altered by these debris.
[0302] At the same time, due to the influence of rainfall and runoff factors, Parshall flumes are required to have the ability to work under submerged flow conditions. Moreover, since the installation sites are usually in remote locations, manual inspection and maintenance are costly and infrequent. Traditional ultrasonic flow meters are prone to inaccurate measurements in such environments, and the construction of the Parshall flume must meet standard structures, so the maintenance workload is also very large.
[0303] In this river environment, the inherent hydraulic characteristics of the Parshall flume under free-flow conditions are both its advantages and a source of problems. Under free-flow conditions, the water flow naturally accelerates in the contraction section of the Parshall flume and forms critical flow control at the throat. At this time, the fluid has strong inertial momentum and self-adaptive regulation capabilities. The increased flow velocity in the contraction section can partially compensate for head loss through the conversion of kinetic energy to potential energy, while the diffusion section has the ability to regulate the flow pattern. These characteristics mask the abnormal geometric deformation of the Parshall flume caused by debris, resulting in a pseudo-normal flow pattern.
[0304] These pseudo-normal flow states include:
[0305] When a sand and gravel triangular pile appears in the contraction section, although the effective cross-sectional area of water flow decreases, the inertial effect generated by the increased flow velocity in the contraction section just partially offsets the increased resistance caused by the sand pile, causing the upstream water level to rise and offsetting the abnormality in this part of the flow calculation.
[0306] When a step is formed at the outlet of the diffuser section due to sediment deposition, the flow regime characteristics of the diffuser section compensate for the additional energy loss in the free flow state.
[0307] This characteristic means that under free-flow conditions, the impact of this deformation on measurements is relatively small. However, once the water flow transitions from free flow to submerged flow, the original compensation balance of the free flow fails, leading to a sharp increase in measurement errors. Traditional monitoring methods rely entirely on manual inspection and cleaning of the Parshall flume to maintain its standard shape, thus avoiding this situation, which fails to meet the practical requirements of low maintenance and high reliability in river environments.
[0308] The working principle of this application embodiment is that, under normal operating conditions, the flow residual calculated by the standard free flow formula and the conservative submerged flow formula will form a stable scissor-like opening shape, while the pseudo-normal anomalies masked by the free flow characteristics will disrupt this stable relationship.
[0309] It produces a unique temporal variation pattern: the accumulation of sand and gravel in the contraction section leads to the gradual closing of the scissor shape, while the abnormal steps in the diffusion section create a unilateral opening feature of the scissor shape.
[0310] This application enables early detection and accurate identification of problem types when anomalies are still in the latent period of being masked by real-time monitoring of these characteristic scissor difference morphological changes. Combined with image analysis, it can further determine the specific geometric deformation parameters, thereby preparing in advance the flow correction required for flow calculation under flood flow conditions.
[0311] Therefore, the open channel flow detection method provided in this application can reduce the requirement for manual cleaning and maintenance of the standard geometry of the Parshall flume while improving the accuracy of flow detection.
[0312] Its second beneficial effect and its working principle are as follows:
[0313] In complex application scenarios in river environments, Parshall flumes often face the combined effects of multiple geometric deformations: the contraction section may have sand and gravel accumulation, while the diffusion section may have steps or other anomalies. This complex situation of multiple anomalies makes it difficult for traditional image recognition methods to accurately determine which geometric changes are the main causes of flow measurement errors. They are often interfered with by secondary anomalies that are more visually obvious but have a smaller actual impact, leading to incorrect anomaly location and inappropriate correction strategies, which in turn affect the accuracy of flow calculation.
[0314] The working principle of this application embodiment is as follows: First, a lightweight image recognition network is used to identify the geometric features of past image frame sequences within a certain period before the abnormal triggering of the scissor difference. The specific location information of the abnormal geometric features in each frame is extracted. Then, based on the objective correspondence between the sand and gravel accumulation in the contraction section and the gradual convergence shape of the scissor difference, and the step anomaly in the diffusion section and the single-sided opening shape of the scissor difference, the matching degree between the identified abnormal geometric feature position in each frame and the current dual-reference scissor difference time series curve morphology features is calculated. Higher weights are assigned to historical image frames with high matching degrees, and lower weights are assigned to image frames with low matching degrees or mismatched positions, thus creating a targeted frame weight sequence. Then, these weighted past image frames are combined with the image frames corresponding to the current flow to form an image sequence that highlights key evolutionary information and suppresses irrelevant interference.
[0315] Then, by combining these weighted past image frames with the image frames corresponding to the current flow into an image sequence, and then processing this weighted image sequence through a preset temporal image recognition model, the key geometric change regions matching the scissor difference pattern receive stronger feature representation and attention allocation during the temporal recognition process. While the geometric changes in other regions have lower weights, they are still retained in the network's learning process. This soft weight guidance mechanism can highlight the true causal abnormal evolution path while maintaining the ability to perceive other potential abnormal regions, avoiding information loss that may be caused by hard filtering. Through this weighted temporal correlation learning, the model can accurately identify the geometric feature parameters in the image frames corresponding to the current flow that truly cause the scissor difference anomaly. While effectively suppressing the interference of secondary geometric changes, it retains the ability to detect abnormal situations in non-pseudo-normal flow states.
[0316] This application also proposes an open channel flow meter, including a processor and a memory. The memory stores at least one instruction, at least one program, code set, or instruction set. The at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the open channel flow detection method as described in any of the above embodiments.
[0317] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. Moreover, in the description of the embodiments of this application, unless otherwise stated, " / " signifies "or," for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist, for example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more.
[0318] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for detecting flow rate in open channels, characterized in that, The open channel flow detection method includes the following steps: A Parshall flume is constructed for the open channel to be measured, the Parshall flume comprising a contraction section, a throat section, and a diffusion section; A first water gauge is set at a first predetermined position on the side wall of the contraction section of the Parshall flume, and a second water gauge is set at a second predetermined position on the side wall of the throat section. The camera captures real-time images containing the first and second water gauges. The first and second water gauge readings in the real-time image are identified to obtain the upstream and downstream water levels, respectively. Based on the upstream and downstream water levels, the flow rate is calculated using a preset flow detection algorithm; Based on the upstream and downstream water levels, flow rate is calculated using a preset flow detection algorithm, including the following steps: The free-flow formula is used to calculate the flow rate value based on the upstream water level. Calculate the flow rate value using the conservative inundation flow formula based on the upstream and downstream water levels; Real-time calculation of free flow residuals and flooded flow residuals to construct dual-benchmark scissor difference time series curves; Wherein, the free-flow residual is the difference between the current flow estimate and the free-flow formula flow value, and the flooding flow residual is the difference between the current flow estimate and the conservative flooding flow formula flow value; When the dual-reference scissor difference time-series curve meets the abnormal triggering condition, the past image frame and the image frame corresponding to the current traffic are obtained. The pre-set lightweight image recognition network is used to identify abnormal geometric features of past image frames. The matching degree between the position of each abnormal geometric feature identified in the image frame and the morphological features of the current dual-benchmark scissor difference time series curve is obtained. Based on the matching degree, the frame weight corresponding to each past image frame is calculated and output. The frame weights are applied to the past image frames, and together with the image frames corresponding to the current traffic, they form a weighted image sequence. The weighted image sequence is processed by a time-series image recognition model to identify abnormal geometric features in the image frame corresponding to the current traffic flow. The pseudo-normal flow state is identified based on the abnormal geometric features and the scissor difference time series curve.
2. The open channel flow detection method according to claim 1, characterized in that, Determining whether the dual-benchmark scissor difference time series curve meets the anomaly triggering conditions includes the following steps: Morphological analysis was performed on the dual-benchmark scissor difference time series curve to extract slope change rate, cross count and convergence features; The morphological changes of the dual-benchmark scissor difference time series curve were detected; Based on the morphological characteristics of the dual-benchmark scissor difference time series curve, the pseudo-normal flow state is classified into two types. Among them, the sand and gravel accumulation type in the contraction section corresponds to the morphological characteristics of the shear difference opening; the step type in the diffusion section corresponds to the morphological characteristics of the shear difference jumping on one side. When any of the aforementioned morphological changes is detected, it is determined that the abnormal triggering condition is met.
3. The open channel flow detection method according to claim 1, characterized in that, The lightweight image recognition network is constructed through the following steps: An input terminal is set up to receive the past image frames and the current scissor difference morphological features; A feature extraction backbone network based on MobileNetV3 is constructed, which is connected to the input end and is used to extract visual features from the input past image frames; An abnormal contour detection branch is constructed, which is connected to the feature extraction backbone network. The abnormal contour detection branch includes: The contour extraction unit is used to extract the boundary contours of abnormal geometric shapes in the image; A location positioning unit is used to determine the location information of the abnormal geometric shape in the image; A matching degree calculation module is set up. The matching degree calculation module is connected to the position positioning unit and the input end. It receives the position information output by the abnormal contour detection branch and the current scissor difference morphology feature input through the input end. It is used to calculate the matching degree between the position of each abnormal simple geometric shape and the scissor difference morphology. The weight calculation unit, which is composed of a fully connected neural network, is connected to the output of the contour extraction unit and the matching degree calculation module. It is used to calculate the frame weight value of each abnormal simple geometric shape according to the contour size and matching degree of each abnormal simple geometric shape, and to perform weighted fusion on the frame weight values of all abnormal simple geometric shapes to output the final frame weight value corresponding to each past image frame.
4. The open channel flow detection method according to claim 1, characterized in that, The time-series image recognition model is constructed through the following steps: An input terminal is configured to receive the weighted image sequence. An encoder based on a temporal convolutional network is constructed. The encoder is connected to the input terminal and is used to extract temporal features from the weighted image sequence and output temporal encoded features. A weight-aware attention module is set up, which is connected to the encoder. It receives the temporal coding features and the weight values corresponding to each image frame, dynamically allocates the attention intensity to each image frame according to the weight values, and outputs the weighted temporal features. A temporal correlation fusion module is set up, which is connected to the weight-aware attention module. The module receives the weighted temporal features, learns the temporal correlation between past image frame sequences and image frames corresponding to the current traffic, and outputs the fused temporal correlation features. An abnormal geometric feature regressor is constructed, which is connected to the temporal correlation fusion module. It receives the fused temporal correlation features and identifies and extracts the strongest abnormal geometric features in the image frame corresponding to the current traffic based on the evolution information of the past image frame sequence. An output terminal is set up, which is connected to the abnormal geometric feature regressor and is used to output the abnormal geometric feature that currently represents the strongest anomaly.
5. The open channel flow detection method according to claim 1, characterized in that, The open channel flow detection method further includes the following steps: The abnormal geometric features are input into a fully connected parameter mapping network, which processes the abnormal geometric features and outputs a parameter vector for a unified flow calculation formula. ; The parameter vector is processed using an exponential smoothing update formula: in, Given the previous parameter vector, and α as the exponential smoothing coefficient, we obtain the parameter vector used for flow calculation. ; The parameter vector Substitute the input into the preset unified flow calculation formula and output the corrected flow value.
6. The open channel flow detection method according to claim 5, characterized in that, The parameter vector ,in: This is the correction amount for the flow coefficient. This is the correction amount for the flow index. The amount of elevation at the bottom of the contraction segment; The rate of obstruction at the larynx; The unified flow calculation formula is as follows: in: Submersion correction function for: The corrected flow rate value. As the baseline free flow coefficient, As the benchmark free flow index, The blocking attenuation index, For the submersion ratio: in, The upstream water level, This refers to the downstream water level. Linear attenuation coefficient: Critical submergence degree; Reduction factor for heavily flooded areas.
7. The method for detecting open channel flow according to claim 5, characterized in that, The fully connected parameter mapping network is constructed through the following steps: An input terminal is provided to receive the abnormal geometric features; A feature encoding layer is constructed and connected to the input terminal. This layer is used to encode the abnormal geometric features of the input and output the encoded feature vector. A first fully connected layer is set up, which is connected to the feature encoding layer. The first fully connected layer receives the encoded feature vector, performs non-linear transformation processing, and outputs the intermediate hidden features. A second fully connected layer is set up, which is connected to the first fully connected layer. The second fully connected layer receives the intermediate hidden features, performs further nonlinear mapping, and outputs high-dimensional mapping features. A parameter regression layer is constructed, which is connected to the second fully connected layer. This layer receives the high-dimensional mapping features and maps the features into parameter vectors required for the unified flow calculation formula. ; An output terminal is configured and connected to the parameter regression layer to output the parameter vector. ,in .
8. An open channel flow meter, characterized in that, The method includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the open channel flow detection method as described in any one of claims 1-7.
Citation Information
Patent Citations
Water quantity detection device and method based on Parshall measuring tank
CN117537871A
Remote visual Parshall groove automatic flow measuring device
CN219977468U