River water diameter automatic measurement method and system based on water gauge scale identification

By using water level gauge recognition and image processing technology, water level gauge images are automatically acquired, data quality is optimized, and missing data is filled in. This solves the problems of low efficiency and inaccurate data in traditional water level measurement, and enables efficient and accurate water flow calculation.

CN121661536APending Publication Date: 2026-03-13湖北亿立能科技股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Traditional water level measurement methods are inefficient, labor-intensive, and susceptible to weather, complex terrain, and environmental factors. Furthermore, the quality of image measurement data varies, leading to large errors in water runoff calculation.

Method used

An automatic river flow measurement method based on water gauge scale recognition is proposed. Water gauge scale images are acquired by a camera, and the data is optimized by using a water gauge image enhancement neural network. Image quality assessment and auxiliary data are combined to fill in invalid data to generate water level time series data. The flow rate is calculated based on the water level-flow relationship curve.

Benefits of technology

It improves the efficiency and accuracy of water runoff measurement, reduces labor costs, overcomes the limitations of severe weather and complex terrain, ensures data continuity and integrity, and reduces the interference of missing data on analysis results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121661536A_ABST
    Figure CN121661536A_ABST
Patent Text Reader

Abstract

The invention provides a river water diameter automatic measurement method and system based on water gauge scale identification, and belongs to the technical field of water conservancy, and the method comprises the steps: inputting original measurement data into a water gauge image enhancement neural network, and obtaining standard measurement data; performing image quality evaluation on the standard measurement data, and generating an image quality score set; comparing the image quality score set with a preset image quality threshold to obtain a comparison result; dividing the standard measurement data into valid measurement data and invalid measurement data based on the comparison result; inputting the effective measurement data into an image processing algorithm to obtain a water level value; filling missing water level information corresponding to the invalid measurement data based on a preprocessing result of the auxiliary data to obtain a water level estimation value; integrating the water level value and the water level estimation value to obtain water level time sequence data; and determining the water runoff based on a pre-generated water level-flow relation curve and the water level time sequence data. According to the invention, the measurement accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of water conservancy technology, and in particular to an automatic method and system for measuring river flow based on water gauge scale recognition. Background Technology

[0002] In the field of hydrological monitoring, accurate measurement of water level and runoff is the core foundation for flood control scheduling, water resource management, and ecological protection. Traditional water level measurement relies on manual reading of water gauges at regular intervals, which is not only inefficient and costly, but also limited by weather, complex terrain, and nighttime conditions, making it difficult to achieve continuous dynamic monitoring.

[0003] With the development of automation technology, although ultrasonic and radar water level measurement devices have emerged, these devices are easily affected by environmental factors such as water flow disturbances, floating debris, and changes in temperature and humidity, leading to deviations in the measurement data. Meanwhile, image-based water level measurement methods, after acquiring water level images, suffer from inconsistent raw measurement data quality due to insufficient lighting, image blurring, and water reflection. If directly used for water level calculations, this can easily produce invalid measurement results, resulting in missing data. Furthermore, traditional data processing methods for filling in invalid data are simplistic and fail to accurately represent the actual water level change patterns, thus affecting the accuracy of the water level-flow relationship curve and leading to errors in water runoff calculations.

[0004] Therefore, there is an urgent need for an automatic method and system for measuring river flow based on water gauge scale recognition, in order to improve the accuracy and reliability of hydrological monitoring. Summary of the Invention

[0005] To address the aforementioned technical problems, this application provides an automatic river flow diameter measurement method and system based on water gauge scale recognition.

[0006] A first aspect of this application provides an automatic method for measuring river flow diameter based on water level gauge identification, comprising: A water gauge is installed at the downstream section of the area to be measured, and a camera is installed on the upright facing the water gauge. Raw measurement data, including images of the water gauge scale, is acquired based on the camera. The original measurement data is input into the water level gauge image enhancement neural network to obtain standard measurement data; The standard measurement data is used to evaluate image quality, and the quality score of each frame is calculated to generate an image quality score set. Each image score in the image quality score set is compared with a preset image quality threshold. Standard measurement data with an image score greater than or equal to the image quality threshold are marked as valid measurement data; standard measurement data with an image score less than the image quality threshold are marked as invalid measurement data. The effective measurement data is input into the image processing algorithm, and after water level area positioning, water level line recognition and scale line intersection point coordinate extraction processing, the corresponding water level value is obtained; When the standard measurement data is invalid measurement data, auxiliary data is obtained, and the missing water level information is filled in based on the preprocessing results of the auxiliary data to obtain the water level estimate. The water level value is integrated with the water level estimate to obtain water level time series data; Based on the pre-generated water level-flow relationship curve and the water level time series data, the water flow rate of the area to be measured is determined.

[0007] A second aspect of this application provides an automatic river flow measurement system based on water gauge scale recognition, comprising: The data acquisition module is used to install a water gauge on the downstream section of the area to be measured, and to install a camera on the upright facing the water gauge, so as to acquire raw measurement data including the water gauge scale image through the camera. The data processing module is used to input the raw measurement data into the water gauge image enhancement neural network to obtain standard measurement data; The data evaluation module is used to evaluate the image quality of the standard measurement data, calculate the quality score of each frame of the image, and generate an image quality score set. Each image score in the image quality score set is compared with a preset image quality threshold. Standard measurement data with an image score greater than or equal to the image quality threshold are marked as valid measurement data; standard measurement data with an image score less than the image quality threshold are marked as invalid measurement data. The water level identification module is used to input the valid measurement data into the image processing algorithm. After water level area positioning, water level line identification and scale line intersection point coordinate extraction processing, the corresponding water level value is obtained. When the standard measurement data is invalid measurement data, auxiliary data is obtained. Based on the preprocessing results of the auxiliary data, the missing water level information is filled in to obtain the water level estimate. The flow output module is used to integrate the water level value with the water level estimate to obtain water level time series data; based on the pre-generated water level-flow relationship curve and the water level time series data, the flow rate of the area to be measured is determined.

[0008] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the above-described automatic river flow measurement method based on water gauge scale recognition.

[0009] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described automatic river flow measurement system based on water gauge scale recognition.

[0010] The beneficial effects of the automatic river flow measurement method and system based on water gauge scale recognition provided in this application are as follows: Firstly, this application automatically acquires water gauge scale images via a camera, replacing the manual timed reading method. This overcomes the limitations of inclement weather and complex terrain, thereby reducing labor costs and improving the efficiency and continuity of flow measurement. Secondly, it optimizes the original measurement data using a water gauge image enhancement neural network, and then filters valid data through image quality assessment, improving the poor quality of the original measurement data caused by insufficient light and image blurring, thus solving the problem of inconsistent image measurement data in existing systems. Thirdly, it fills in the missing water level information of invalid data through auxiliary data preprocessing, replacing the traditional simple interpolation method. This ensures the integrity of the water level data while avoiding interference from missing data in subsequent analysis results. Finally, this application calculates the flow rate based on complete water level time series data and a pre-generated water level-flow relationship curve, improving the accuracy and reliability of the flow rate measurement results. Attached Figure Description

[0011] Figure 1 A flowchart illustrating an embodiment of the automatic river flow measurement method based on water gauge scale recognition provided in this application; Figure 2 A structural block diagram of an automatic river flow measurement system based on water gauge scale recognition provided in an embodiment of this application; Figure 3 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0012] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0013] To make the purpose, technical solution, and advantages of this application clearer, the following will be described in conjunction with the appendix. Figure 1-3 The following is an explanation using specific examples.

[0014] Please refer to Figure 1 , Figure 1This is a flowchart illustrating an embodiment of an automatic river flow path measurement method based on water gauge scale recognition provided in this application. The method includes: S101: Install a water gauge on the downstream section of the area to be measured, and install a camera on the pole directly opposite the water gauge to acquire raw measurement data including images of the water gauge scale. In this embodiment, at the downstream section of the area to be measured, a flat and unobstructed location is first selected to fix the water gauge based on the water level variation range and measurement accuracy requirements. The water gauge scale is clearly marked, and its minimum division value meets the measurement needs. The water gauge is also set perpendicular to the horizontal plane to avoid reading errors due to tilting. Next, a pole is set up directly opposite the water gauge. The height of the pole needs to be determined according to the camera's shooting angle to ensure that the camera lens can completely cover the measurement range of the water gauge, and that the center of the lens is aligned with the midpoint of the water gauge's scale area, thus reducing the impact of shooting angle deviation on the image. The camera is fixed in the preset position on the pole, and a dedicated bracket is used to stabilize the camera, preventing it from shifting due to wind or vibration. After adjusting the camera parameters, multiple test shots are taken to check for obstructions in the image and whether the water gauge is fully visible in the frame. If any problems are found, the position of the pole or the camera angle is adjusted promptly until the test images meet the measurement requirements.

[0015] During the formal measurement, the camera is activated at preset time intervals to take pictures. The image measurement data obtained from each picture, including the complete water level scale, is used as the raw measurement data.

[0016] S102: Input the raw measurement data into the water level gauge image enhancement neural network to obtain standard measurement data; In this embodiment, the raw measurement data is preprocessed, including grayscale conversion, which transforms the color image into a grayscale image to reduce the data dimensionality. Next, noise removal is performed using Gaussian filtering or median filtering algorithms to eliminate noise in the original image caused by camera shake and lighting fluctuations.

[0017] The preprocessed raw measurement data is converted into a matrix format recognizable by the neural network and input into a water level gauge image enhancement neural network. Through feature extraction, enhancement optimization, and scale localization, the network ultimately outputs standard measurement data. Feature extraction uses convolutional and pooling layers to automatically capture effective features such as the water level gauge outline, scale lines, and numerical markings in the image, while simultaneously filtering out irrelevant interference features such as water surface ripples and dirt obscuring the surface. Enhancement optimization precisely optimizes areas with blurred scale edges, local overexposure, or underexposure, and uses contrast enhancement algorithms to increase the color difference between the scale and the background, while sharpening algorithms enhance the detail clarity of the scale lines. Scale localization, based on the preset size of the water level gauge and the scale distribution pattern, assists in calibrating the enhancement effect of the scale area, ensuring that the measurement area containing the water level line is clearly identifiable. Finally, a clear water level gauge image with complete enhancement processing is output, which serves as the standard measurement data.

[0018] S103: Evaluate the image quality of the standard measurement data and calculate the quality score of each frame to generate an image quality score set; compare each image score in the image quality score set with a preset image quality threshold; mark standard measurement data with image scores greater than or equal to the image quality threshold as valid measurement data; mark standard measurement data with image scores less than the image quality threshold as invalid measurement data. In this embodiment, an evaluation system constructed using multi-dimensional evaluation indicators is used to evaluate standard measurement data. These multi-dimensional evaluation indicators include scale sharpness, regional integrity, and interference suppression effect. Scale sharpness is evaluated by calculating the sharpness of the scale lines using an edge gradient algorithm; regional integrity is evaluated by detecting whether the water level gauge scale completely covers the preset measurement range; and interference suppression effect is evaluated by statistically analyzing the proportion of residual water surface reflections, stains, and other interfering areas in the image. These multi-dimensional evaluation values ​​are then weighted and integrated into a quality score for each frame, resulting in an image quality score set. The quality score ranges from 0 to 100, with higher scores indicating better quality.

[0019] Next, each image score in the image quality score set is compared with a preset image quality threshold. Based on the comparison results, the image quality score set is classified into valid and invalid measurement data. Specifically, according to the accuracy requirements of the area to be measured, an image quality threshold is set, and the score of each frame in the quality score set is compared with the image quality threshold one by one. Standard measurement data with scores greater than or equal to the image quality threshold are determined to meet the requirements of subsequent reading analysis and are marked as valid measurement data. Images with scores less than the image quality threshold are marked as invalid measurement data because problems such as blurred scales and missing key areas may lead to reading errors.

[0020] S104: Input the valid measurement data into the image processing algorithm. After water level area positioning, water level line recognition and scale line intersection point coordinate extraction, the corresponding water level value is obtained. When the standard measurement data is invalid, auxiliary data is obtained. Based on the preprocessing results of the auxiliary data, the missing water level information is filled in to obtain the water level estimate. In this embodiment, the processing of valid measurement data includes: First, locating the water gauge area and performing image geometric correction, eliminating shooting angle deviations through edge detection and perspective transformation algorithms to obtain a corrected water gauge image; Second, identifying the scale information and water level information in the corrected image, wherein the scale information includes the pixel coordinates of each scale line and the corresponding actual physical height value; Subsequently, establishing a mapping relationship between the image pixel coordinate system and the actual physical height coordinate system based on the scale information; and calculating the instantaneous water level reading based on the pixel coordinates and mapping relationship of the water level information; Finally, aggregating multiple instantaneous readings within a preset period to eliminate random errors, and finally outputting the water level value.

[0021] When the standard measurement data is invalid, auxiliary data is acquired and preprocessed to obtain the processing results. Based on the processing results, the missing water level information corresponding to the invalid processed data is filled in to obtain the water level estimate.

[0022] S105: Integrate the water level value with the water level estimate to obtain water level time series data; determine the water runoff in the area to be measured based on the pre-generated water level-flow relationship curve and water level time series data.

[0023] In this embodiment, water level time series data is obtained by integrating water level values ​​and water level estimates. For example, water level values ​​generated from valid measurement data and water level estimates obtained by filling in invalid data are uniformly collected in timestamp order to form a water level dataset covering the entire monitoring period. Time series calibration is performed during the integration process to ensure that the time intervals of all data are consistent with the preset monitoring frequency. If there are duplicate or missing timestamps, data gaps are filled by interpolation to finally generate continuous water level time series data.

[0024] The water level time series data is substituted point by point into the pre-generated water level-discharge relationship curve. Based on the water level value at each time point, the corresponding instantaneous flow rate is queried or calculated. Continuous instantaneous flow rate data are summarized on the required time scale to finally determine the flow rate changes in the area under test within the target monitoring period, generating a flow rate time series report. The water level-discharge relationship curve is generated by establishing a functional relationship between water level and flow rate based on the hydraulic characteristics of the river cross-section in the area under test, obtained through cross-sectional measurements and parameter calibration, or by using a large amount of historical synchronous measured data.

[0025] In this embodiment, the water level-flow relationship curve is periodically verified and corrected. Typical water level periods are selected each quarter, such as high, medium, and low water levels, for on-site flow measurements in the area to be measured. The measured flow values ​​are compared with the flow values ​​calculated from the curve. If the deviation exceeds the allowable range, the curve parameters are refitted based on the new measured data to ensure that the correspondence between water level and flow always conforms to the actual hydrological conditions of the area to be measured. The allowable deviation range is set comprehensively based on industry standards, instrument accuracy, and historical error analysis.

[0026] As can be seen from the above, this application automatically acquires water level scale images via camera, replacing the manual timed reading method, thus overcoming the limitations of inclement weather and complex terrain, thereby reducing labor costs and improving the efficiency and continuity of water runoff measurement. Secondly, by using a water level scale image enhancement neural network to optimize the original measurement data, and then filtering valid data through image quality assessment, it improves the problem of poor quality original measurement data caused by insufficient light and image blurring, solving the problem of inconsistent image measurement data in existing systems. Furthermore, invalid data is filled with missing water level information through auxiliary data preprocessing, replacing the traditional simple interpolation method, ensuring the integrity of water level data while avoiding interference from missing data in subsequent analysis results. This application also calculates water runoff based on complete water level time series data and a pre-generated water level-flow relationship curve, improving the accuracy and reliability of water runoff measurement results.

[0027] In one embodiment of this application, valid measurement data is input into an image processing algorithm. After processing including water level gauge area localization, water level line identification, and extraction of the coordinates of the intersection of scale lines, the corresponding water level value is obtained, including: The corrected water gauge image is obtained by locating the water gauge region and performing geometric correction on the water gauge image corresponding to the valid measurement data. Identify and correct the scale information and water level information in the water level gauge image. The scale information includes the pixel coordinates of each scale line in the image and its corresponding actual physical height value. Based on the scale information, a mapping relationship is established from the image pixel coordinate system to the actual physical height coordinate system; The instantaneous water level reading is determined based on the pixel coordinates and mapping relationship of the water level information; Multiple instantaneous water level readings within a preset period are aggregated to obtain the water level value.

[0028] In this embodiment, the approximate area of ​​the water gauge is defined in the image of the valid measurement data using a target detection algorithm, resulting in a water gauge area image. A perspective transformation technique based on feature point matching is used for image geometric correction, for example, by identifying the four corner points of the water gauge and mapping them to a standard rectangle, thereby obtaining a corrected water gauge image with no perspective distortion and a frontal viewing angle.

[0029] Secondly, the scale information is obtained by detecting the calibrated water level gauge image through edge detection and Hough line transform, and the spacing pattern of the water level gauge scale is filtered to obtain the pixel coordinates of each scale line in the image. At the same time, according to the physical scale of the water level gauge, each identified scale line is assigned its corresponding actual physical height value. Specifically, for the water level line information, it is identified based on the obvious color or texture difference between the water level line and the background. For example, threshold segmentation or color space analysis is used to highlight the water surface boundary line, and then edge detection or contour finding methods are used to determine the pixel position of the water level line in the image to obtain the water level line information.

[0030] Subsequently, a mapping relationship from the image pixel coordinate system to the actual physical height coordinate system is established based on the scale information. Specifically, since the water gauge can be approximated as a one-dimensional height measuring tool in the calibrated image, a univariate linear regression method is used, with the pixel ordinate of the scale line as the independent variable and the corresponding actual physical height value as the dependent variable, to fit a straight line, i.e., H=a. Y+b, where H is the physical height and Y is the pixel's ordinate. The coefficients a and b are determined using methods such as least squares, which yields a mathematical relationship—a mapping relationship—that converts the ordinate of any pixel in the image into its actual physical height.

[0031] Next, based on the pixel coordinates and mapping relationship of the water level information, the instantaneous water level reading is determined. For example, the vertical coordinate of the water level line in the image, i.e., the Y coordinate of a representative point, such as the Y coordinate of the midpoint or the point intersecting with the central axis of the water gauge, is substituted into the aforementioned fitted linear relationship to obtain the instantaneous water level reading.

[0032] This embodiment aggregates multiple instantaneous water level readings acquired within a preset period to obtain the water level value. For example, 60 instantaneous readings are continuously collected within 5 minutes, and then a statistical method is used to calculate the median of these readings to obtain the water level value.

[0033] As can be seen from the above, this embodiment eliminates the angular deviation of the captured image through water level gauge area positioning and geometric correction. Then, based on the mapping relationship between pixel coordinates and physical height, the image information is accurately converted into water level data. Furthermore, random errors are reduced through multi-instantaneous reading aggregation processing. Therefore, this embodiment solves the problems of inaccurate readings caused by image angular deviation and large random errors in single-frame data in traditional image recognition, thus improving the accuracy of water level value calculation.

[0034] In one embodiment of this application, missing water level information is filled in based on the preprocessing results of auxiliary data to obtain an estimated water level value, specifically including: The auxiliary data includes instantaneous water level data output by radar water level gauges deployed next to the water gauge and correlation data of water level and flow rate from upstream hydrological stations; The temporal correlation weights of auxiliary data are calculated based on historical normal water level data. Based on the correlation weights, auxiliary data are weighted and fused to generate water level estimates.

[0035] In this embodiment, the sources and locations of the two types of core auxiliary data are as follows: the instantaneous water level data output in real time by the radar water level gauge deployed next to the water gauge. This instantaneous water level data directly represents the immediate water level situation around the water gauge and has a strong spatial correlation with the water gauge monitoring point; the water level-flow correlation data provided by the hydrological station upstream of the area to be detected. This data is based on the watershed hydrological cycle law and can represent the current water level change trend of the water gauge monitoring point from the perspective of macro-hydrological process.

[0036] Secondly, based on the water level data recorded during normal operation of the historical water gauge, the correlation weight between the two types of auxiliary data and the historical normal water level data in time series is calculated through data analysis. The auxiliary data with higher correlation has a greater weight, so that the weight allocation can fit the reference value of each data in the actual hydrological scenario of the area to be monitored.

[0037] Finally, based on the correlation weights, the preprocessed instantaneous water level data from the radar water level gauge and the water level-flow correlation data from the upstream hydrological station are weighted and fused to complement the advantages of the two types of data and generate a water level estimate that can fill in the missing water level information.

[0038] As can be seen from the above, this embodiment uses dual-dimensional auxiliary data obtained from radar level gauges and upstream hydrological stations, and performs weighted fusion of the dual-dimensional auxiliary data based on time-series correlation weights to generate a water level estimate. On the one hand, using auxiliary data can address the problem of interruption in runoff measurement when a single data source fails; on the other hand, obtaining the water level estimate through weighted fusion calculation improves both the timeliness and accuracy of the water level estimate.

[0039] In one embodiment of this application, calculating the temporal correlation weight of auxiliary data based on historical normal water level data includes: Based on the historical measurement error variance of the radar level gauge, weights are assigned to the instantaneous water level data of the radar level gauge to obtain the first correlation weight; Based on the historical correlation strength of water levels at upstream hydrological stations in the area to be measured and the hydraulic response time of the river channel in the area to be measured, weights are assigned to the water level data calculated based on the water level-discharge relationship at upstream hydrological stations, resulting in the second correlation weight. Calculate the Pearson correlation coefficient between the auxiliary data and the historical normal water level data of the area to be measured over time, and use it as the correlation score; The initial association weights of the auxiliary data are adjusted based on the relevance scores to obtain the association weights, where the initial association weights include the first association weight and the second association weight.

[0040] In this embodiment, the instantaneous water level data from the radar level gauge is weighted according to the historical periodic measurement error variance of the radar level gauge to obtain the first correlation weight. The smaller the error variance, the stronger the measurement stability of the radar equipment, and the larger the corresponding weight is assigned, thus directly reflecting the direct impact of the equipment's measurement performance on data reliability. Secondly, water level data is obtained by extrapolating the water level-flow relationship of the upstream hydrological station for the area to be measured, and weights are assigned to this water level data based on two core factors to obtain the second correlation weight. For example, firstly, the correlation strength is obtained based on the historical water level data of the area to be measured and the upstream hydrological station; the closer the correlation, the stronger the hydrological linkage between the two, and the higher the basic weight. Secondly, the river hydraulic response time of the area to be measured is obtained; the shorter the response time, the larger the weight coefficient. Finally, a comprehensive calculation is performed to obtain the second correlation weight that represents the hydrological correlation of the basin, where the hydraulic response time represents the ability of upstream water level changes to transmit their influence to the current area.

[0041] Next, the Pearson correlation coefficients between the two types of auxiliary data and the historical normal water level data of the area to be measured are calculated in the time series dimension, and these coefficients are used as correlation scores. This score quantifies the degree of agreement between the auxiliary data and the actual water level change trend. The higher the score, the closer the correlation between the auxiliary data and the actual water level, and the higher its reference value.

[0042] Finally, the first and second association weights are used as the initial association weights, and then adjusted according to the relevance scores to obtain the association weights.

[0043] As can be seen from the above, this embodiment calculates the initial correlation weights using the historical measurement error variance of the radar water level gauge and the hydraulic response time of the river channel in the area to be measured, and then adjusts the weights of the auxiliary data using the Pearson correlation coefficient. This makes the weight allocation more closely match the actual area to be detected, thus improving the accuracy of the water level estimate.

[0044] In one embodiment of this application, the initial association weights of each auxiliary data are adjusted based on the relevance score to obtain the association weights, including: The correlation score is compared with a preset correlation threshold: For auxiliary data whose relevance scores are greater than the relevance threshold, increase the fusion weight of the auxiliary data. For auxiliary data whose relevance scores are lower than the relevance threshold, reduce the fusion weight of the auxiliary data. The fusion weights of the adjusted auxiliary data are normalized to obtain the correlation weights.

[0045] In this embodiment, firstly, a correlation threshold is set based on the characteristics of historical hydrological data of the area to be measured and the accuracy requirements of water level monitoring. The correlation scores of the calculated auxiliary data are then compared with the preset threshold to determine whether the correlation of each type of data meets the benchmark requirements. For example, if the correlation score of the radar water level gauge data is greater than the correlation threshold, it is determined that its correlation with the historical normal water level is strong; if the correlation score of the data estimated by the upstream hydrological station is less than the correlation threshold, it is determined that its correlation is weak.

[0046] Secondly, for auxiliary data with strong correlation, their fusion weight is increased according to a preset adjustment ratio. For example, radar water level gauge data has strong correlation, so its initial weight is increased by 10%, from 0.6 to 0.66. For auxiliary data with weak correlation, their fusion weight is decreased according to a preset ratio. For example, upstream hydrological station extrapolation data has low correlation, so its initial weight is reduced to 0.36 from 0.4. The adjustment ratio is set based on the difference between the correlation score and the correlation threshold; the larger the difference, the larger the adjustment ratio.

[0047] Calculate the total weight of the auxiliary data after adjustment, divide the adjusted weight of each type of auxiliary data by the total weight, and use the normalized weight value as the correlation weight. For example, if the total weight is 0.66 + 0.36 = 1.02, then the correlation weight of the radar water level gauge data is 0.66 / 1.02 ≈ 0.65, and the correlation weight of the upstream hydrological station's estimated data is 0.36 / 1.02 ≈ 0.35.

[0048] As can be seen from the above, this embodiment achieves dynamic adjustment and normalization of auxiliary data weights by comparing the correlation score with a preset threshold. When the correlation between a certain type of auxiliary data and the historical normal water level is less than the correlation threshold, the fusion weight of the auxiliary data is reduced, thereby reducing the interference of the auxiliary data on the water level estimate. When the correlation is greater than the correlation threshold, the fusion weight of the auxiliary data is increased, thereby increasing the influence of the auxiliary data on the water level estimate. At the same time, through normalization, the adjusted weight differences are preserved, while the constraint requirements of the weighted fusion calculation on the total weight are met.

[0049] In one embodiment of this application, after weighted fusion of auxiliary data to generate a water level estimate, the method further includes: Compare the estimated water level with the benchmark water level reference value; When the comparison error is less than the preset first error threshold, the water level estimate is used as the fill value for the missing water level. When the comparison error is greater than or equal to the first error threshold, the hierarchical processing sub-method is executed; The tiered treatment sub-methods include: When the comparison error is greater than or equal to the first error threshold and less than the preset second error threshold, the frequency of data acquisition by the radar level gauge is increased based on the first adjustment amount, wherein the second error threshold is greater than the first error threshold. When the comparison error is greater than or equal to the second error threshold, it is determined whether the equipment used to obtain the original measurement data is faulty or whether there is a hydrological anomaly, triggering an alarm signal. A drone is then used to obtain inspection data, and the water level and equipment status are determined based on the inspection data.

[0050] In this embodiment, if valid water level data successfully identified by a high-definition camera exists within a preset time window before and after the invalid measurement data point, it is used as the reference water level value; if no such data exists, the data collected simultaneously by the backup pressure level gauge next to the water gauge is used as the reference water level value; if both types of data are missing, the verified water level and flow data of the upstream and downstream of the area to be measured are input into the river hydraulic model to obtain the estimated water level value of the current monitoring point as the reference water level value.

[0051] This embodiment compares the estimated water level with the reference water level and calculates the comparison error. When the comparison error is less than the first error threshold, the estimated water level is used as the filler value for the missing water level. When the comparison error is greater than or equal to the first error threshold, a graded handling sub-method is initiated. For example, if the comparison error is greater than or equal to the first error threshold and less than the second error threshold, it indicates that the estimated water level has a certain deviation but has not reached a serious level. At this time, the data acquisition frequency of the radar water level gauge is adjusted according to the first adjustment amount, and the accuracy of subsequent data fusion is improved through dense sampling. If the error is greater than or equal to the second error threshold, it means that the water level value has reached a serious level or the equipment acquiring the measurement data is faulty. An alarm signal is immediately triggered, and a drone is dispatched to the site to acquire inspection data. Based on the inspection image, the water level value is re-identified and the equipment operating status is checked. Finally, the cause of the problem is identified and a solution strategy is determined.

[0052] As can be seen from the above, this embodiment compares the estimated water level with the benchmark water level and sets up a tiered handling process based on the comparison results. It uses dual error thresholds to classify the handling levels for normal use, increased data frequency, and equipment inspection alarms. This not only promptly detects deviations in the estimated water level but also allows for appropriate measures to be taken based on the degree of deviation, ensuring data reliability while reducing measurement risks caused by equipment failure or hydrological anomalies.

[0053] In one embodiment of this application, determining the water level and equipment status based on inspection data includes: Inspection data includes: water level gauge image data, radar water level gauge image data, and images of the camera and its mounting pole. The water level gauge image data is processed and the water level line is identified; If the identification is successful, the water level value is calculated based on the water level line, and the water flow rate is calculated based on the water level-flow rate relationship curve. If the identification fails, the reasons for the failure will be analyzed. The reasons for failure include obstructions to the water gauge and tilting of the water gauge. When the failure is due to an obstruction on the water level gauge, a device cleaning prompt message is generated. When the failure is due to the water gauge tilting, the refraction correction sub-process is executed to obtain the water level value; The status of the diagnostic equipment is based on radar level gauge image data and the appearance images of the camera and its mounting pole.

[0054] In this embodiment, the inspection data includes: first, water level gauge image data, used to identify water level lines and calculate water level values; second, radar water level gauge image data, representing the appearance and installation status of the radar equipment; and third, appearance images of the camera and its mounting pole, used to determine the physical status of the visual acquisition equipment.

[0055] After preprocessing and extracting image features from the water gauge scale image data, an image recognition algorithm is used to locate the position of the water level line on the water gauge scale. If the water level line is successfully identified, the current water level value is directly calculated based on the scale correspondence, and the water flow rate is deduced by combining it with the preset water level-flow relationship curve to form complete hydrological monitoring data; if the identification fails, the reasons for the failure are analyzed.

[0056] The reasons for recognition failures are determined by analyzing the extracted image features: if there are objects such as tree branches or floating objects obstructing the water level gauge scale in the image, the reason for failure is determined to be obstruction of the water level gauge. At this time, a device cleaning prompt message is generated, which includes the location of the obstruction and the suggested cleaning method, and is pushed to the maintenance personnel's terminal; if the image shows that the water level gauge is tilted due to loose installation or water flow impact, the reason for failure is determined to be tilt of the water level gauge. Then, the refraction correction subprocess is initiated. Specifically, the tilt angle is calculated based on the multi-angle water level gauge images, and the visual displacement is compensated by Snell's law and geometric transformation to obtain the corrected water level value.

[0057] This embodiment analyzes radar level gauge image data to check for damage to the equipment casing, cleanliness of the sensor probe, and stability of the mounting bracket, determining if there are any physical faults in the radar equipment. Simultaneously, it analyzes the appearance images of the camera and its mounting pole to identify whether the camera lens is contaminated, the pole is tilted or corroded, and fixed components are loose, assessing the operational status of the visual acquisition equipment. Combining the appearance characteristics of both types of equipment, an equipment status diagnostic report is generated, clearly identifying whether it is normal, abnormal, or faulty.

[0058] As can be seen from the above, this embodiment achieves the goals of water level recalculation and equipment status diagnosis by processing the inspection data acquired by the UAV. Transforming inspection data into problems and solutions not only allows for analysis of causes and generation of cleaning prompts or execution of corrections when water level gauge recognition fails, but also diagnoses equipment status, avoiding the limitation of inspections merely identifying problems without resolving them, and improving the ability to respond to water level gauge recognition failures.

[0059] In one embodiment of this application, when the failure is due to water level gauge tilt, a refraction correction sub-process is executed to obtain the water level value, including: Based on multi-angle water gauge images with water gauge scale data, calculate the tilt angle and direction of the water gauge; The tilt angle and direction are input into the optical refraction model. After processing through Snell's law calculation and geometric relationship transformation, the visual displacement produced when light passes through the air-water interface is calculated. The water level readings identified from the image are compensated and corrected based on the visual displacement to obtain the water level value.

[0060] In this embodiment, feature lines of the water level gauge edge are extracted from multi-angle water level gauge images, and edge features are enhanced using an edge detection algorithm. The linear equations of the edge lines are then detected based on the Hough transform. Next, the association information of the multi-angle images, the linear equations, and the camera's intrinsic and extrinsic parameters are input into a spatial geometric model to obtain the tilt angle and tilt direction of the water level gauge in three-dimensional space. Then, based on the tilt angle and tilt direction of the water level gauge in three-dimensional space and the camera's shooting angle, an optical refraction model of light propagating from water to air is constructed. According to Snell's law in the optical refraction model, the change in the refraction angle of light passing through the air-water interface is calculated. Snell's law is calculated as follows: n1sinθ1=n2sinθ2 n1 is the refractive index of water, n2 is the refractive index of air, θ1 is the angle of incidence of light in water, and θ2 is the angle of refraction in air. Finally, based on the geometric relationships under the tilted state of the water level, such as the spatial distance and angular relationship between the actual position of the water level and the camera's imaging plane, the aforementioned changes in refraction angle are converted into pixel displacement on the image plane as visual displacement, whereby the visual displacement represents the magnitude of the deviation of the water level in the image caused by refraction.

[0061] This embodiment compensates for and corrects water level readings based on visual displacement. Specifically, first, the pixel position corresponding to the original water level reading identified in the multi-angle water gauge image is determined. Then, based on the calculated visual displacement, including direction and magnitude, the pixel position is adjusted inversely in the multi-angle water gauge image coordinate system. For example, if refraction causes the water level to shift upwards in the image, the reading is corrected downwards by the corresponding pixel distance, and vice versa. Subsequently, the corrected pixel position is converted into the corresponding actual water level value through the established mapping relationship between pixel coordinates and actual physical height. Finally, the difference between the readings before and after correction is compared, and the rationality is verified by combining the water gauge tilt degree, so that the corrected water level value conforms to actual physical laws.

[0062] As can be seen from the above, this embodiment analyzes multi-angle water level gauge images, calculates the tilt angle and direction of the water level gauge, inputs it into an optical refraction model, and, based on Snell's law and geometric transformations, calculates the visual displacement caused by light passing through the air-water interface. On this basis, the water level readings obtained from image recognition are compensated and corrected, thereby eliminating refraction errors caused by the tilt of the water level gauge, thus improving the accuracy and reliability of water level monitoring under tilted conditions.

[0063] In one embodiment of this application, the status of the diagnostic device based on radar level gauge image data and the appearance image of the camera and its mounting pole includes: The radar water level gauge image data is fused with the appearance image data of the camera and its mounting pole to obtain comprehensive image data; The integrated image data is input into a pre-trained equipment status diagnosis model to obtain an integrated equipment status diagnosis report. The integrated equipment status diagnosis report includes the working status determination results of the radar level gauge and the structural status determination results of the camera and its mounting pole.

[0064] In this embodiment, the radar level gauge image data is fused with the appearance image data of the camera and its mounting pole. Specifically, the two types of image data need to be preprocessed, including unifying the image resolution, correcting shooting angle deviations, and aligning timestamps, so that images from different sources have consistency in the spatiotemporal dimension. Subsequently, an image fusion algorithm is used to integrate the detailed features of the radar level gauge with the structural features of the camera and the pole into the same image space, forming comprehensive image data that includes overall equipment status information. The detailed features of the radar level gauge include the sensor probe status and display screen data; the structural features of the camera and the pole include the pole's verticality, the tightness of the connections, and the surface corrosion condition.

[0065] The integrated image data is input into a pre-trained equipment condition diagnostic model using a large number of labeled samples, including images of equipment in both normal and various abnormal states. The integrated image data processing involves: first, extracting key features from the integrated images using a convolutional neural network, such as the indicator light color of the radar level gauge, lens cleanliness, and the degree of deformation of the mast; second, analyzing these features using a classifier to output the operational status assessment results for the radar level gauge and the structural status assessment results for the camera and its mounting mast. The operational status assessment results for the radar level gauge include normal operation, abnormal signal, and hardware failure; the structural status assessment results for the camera and its mounting mast include mast stability, loose connectors, and surface corrosion. Finally, the two types of operational status assessment results are integrated into a comprehensive equipment condition diagnostic report, clearly presenting the status assessment of each piece of equipment and any existing problems.

[0066] As can be seen from the above, this embodiment achieves comprehensive status diagnosis of hydrological monitoring equipment by fusing radar level gauge images and camera pole appearance images, and using a pre-trained model for integrated analysis. This method can simultaneously output the working status of the radar level gauge and the structural status of the camera pole, improving the automation level and diagnostic efficiency of equipment operation and maintenance, and providing comprehensive technical support for timely detection of equipment faults and prevention of structural risks.

[0067] Corresponding to the automatic river flow measurement method based on water gauge scale recognition in the above embodiment, Figure 2 This is a structural block diagram of an automatic river flow path measurement system based on water gauge scale recognition, provided as an embodiment of this application. For ease of explanation, only the parts relevant to the embodiment of this application are shown. References Figure 2 The automatic river flow measurement system 20 based on water level scale recognition includes: a data acquisition module 21, a data processing module 22, a data evaluation module 23, a water level recognition module 24, and a flow output module 25.

[0068] in, The data acquisition module 21 is used to install a water gauge at the downstream section of the area to be measured, and to install a camera on the upright facing the water gauge, and to acquire raw measurement data including the water gauge scale image through the camera. Data processing module 22 is used to input the raw measurement data into the water gauge image enhancement neural network to obtain standard measurement data; The data evaluation module 23 is used to evaluate the image quality of the standard measurement data, calculate the quality score of each frame image, and generate an image quality score set; compare each image score in the image quality score set with a preset image quality threshold; mark standard measurement data with an image score greater than or equal to the image quality threshold as valid measurement data; and mark standard measurement data with an image score less than the image quality threshold as invalid measurement data. The water level identification module 24 is used to input the valid measurement data into the image processing algorithm, and after water level area positioning, water level line identification and scale line intersection point coordinate extraction processing, the corresponding water level value is obtained; when the standard measurement data is the invalid measurement data, auxiliary data is obtained, and the missing water level information is filled in based on the preprocessing result of the auxiliary data to obtain the water level estimate. The flow output module 25 is used to integrate the water level value with the water level estimate to obtain water level time series data; and to determine the water flow rate of the area to be measured based on the pre-generated water level-flow relationship curve and the water level time series data.

[0069] See Figure 3 , Figure 3 This is a schematic block diagram of an electronic device provided according to an embodiment of this application. Figure 3 The electronic device 300 in this embodiment may include one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The processors 301, input devices 302, output devices 303, and memories 304 communicate with each other via a communication bus 305. The memories 304 store computer programs, including program instructions. The processors 301 execute the program instructions stored in the memories 304. Specifically, the processors 301 are configured to invoke the program instructions to perform the functions of the modules in the aforementioned device embodiments, for example... Figure 2 The functions of the data acquisition module 21, data processing module 22, data evaluation module 23, water level identification module 24, and flow output module 25 are shown.

[0070] It should be understood that, in the embodiments of this application, the processor 301 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0071] Input device 302 may include a touchpad, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint orientation information), a microphone, etc., and output device 303 may include a display (LCD, etc.), a speaker, etc.

[0072] The memory 304 may include read-only memory and random access memory, and provides instructions and data to the processor 301. A portion of the memory 304 may also include non-volatile random access memory. For example, the memory 304 may also store device type information.

[0073] In specific implementations, the processor 301, input device 302, and output device 303 described in the embodiments of this application can execute the implementation methods described in any embodiment of the automatic river flow diameter measurement method based on water level scale recognition provided in the embodiments of this application, or they can execute the implementation methods of the electronic devices described in the embodiments of this application, which will not be repeated here.

[0074] In another embodiment of this application, a computer-readable storage medium is provided. This computer-readable storage medium stores a computer program, which includes program instructions. When executed by a processor, the program instructions implement all or part of the processes in the methods described above. Alternatively, the computer program can instruct related hardware to complete the process. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0075] The computer-readable storage medium can be an internal storage unit of the electronic device in any of the foregoing embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device. Furthermore, the computer-readable storage medium can include both internal and external storage units of the electronic device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.

[0076] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0077] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the electronic devices and units described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0078] In the several embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces or units, or it may be an electrical, mechanical, or other form of connection.

[0079] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.

[0080] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0081] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. An automatic method for measuring river flow diameter based on water gauge scale recognition, characterized in that, include: A water gauge is installed at the downstream section of the area to be measured, and a camera is installed on the upright facing the water gauge. Raw measurement data, including images of the water gauge scale, is acquired based on the camera. The original measurement data is input into the water level gauge image enhancement neural network to obtain standard measurement data; The standard measurement data is used to evaluate image quality, and the quality score of each frame is calculated to generate an image quality score set. Each image score in the image quality score set is compared with a preset image quality threshold. Standard measurement data with an image score greater than or equal to the image quality threshold are marked as valid measurement data; standard measurement data with an image score less than the image quality threshold are marked as invalid measurement data. The effective measurement data is input into the image processing algorithm, and after water level area positioning, water level line identification and scale line intersection point coordinate extraction processing, the corresponding water level value is obtained; When the standard measurement data is invalid measurement data, auxiliary data is obtained, and the missing water level information is filled in based on the preprocessing results of the auxiliary data to obtain the water level estimate. The water level value is integrated with the water level estimate to obtain water level time series data; Based on the pre-generated water level-flow relationship curve and the water level time series data, the water flow rate of the area to be measured is determined.

2. The automatic river flow measurement method based on water gauge scale recognition according to claim 1, characterized in that, The step of inputting the effective measurement data into the image processing algorithm, and processing it through water level gauge area localization, water level line identification, and extraction of the coordinates of the intersection point of the scale lines, to obtain the corresponding water level value includes: Perform water gauge region localization and image geometric correction on the water gauge image corresponding to the valid measurement data to obtain a corrected water gauge image; Identify the scale information and water level information in the corrected water level image, wherein the scale information includes the pixel coordinates of each scale line in the image and its corresponding actual physical height value; Based on the scale information, a mapping relationship is established from the image pixel coordinate system to the actual physical height coordinate system; The instantaneous water level reading is determined based on the pixel coordinates of the water level information and the mapping relationship. The water level value is obtained by aggregating multiple instantaneous water level readings within a preset period.

3. The automatic river flow measurement method based on water gauge scale recognition according to claim 1, characterized in that, The preprocessing results based on the auxiliary data are used to fill in the missing water level information to obtain an estimated water level value, specifically including: The auxiliary data includes instantaneous water level data output by radar water level gauges deployed next to the water gauge and correlation data of water level and flow rate from upstream hydrological stations; The correlation weight of the auxiliary data in time series is calculated based on historical normal water level data; Based on the aforementioned correlation weights, the auxiliary data is weighted and fused to generate the estimated water level.

4. The automatic river flow measurement method based on water gauge scale recognition according to claim 3, characterized in that, The calculation of the temporal correlation weight of the auxiliary data based on historical normal water level data includes: Based on the historical measurement error variance of the radar level gauge, weights are assigned to the instantaneous water level data of the radar level gauge to obtain the first correlation weight; Based on the historical correlation strength of water levels at upstream hydrological stations in the area to be measured and the hydraulic response time of the river channel in the area to be measured, weights are assigned to the water level data calculated based on the water level-discharge relationship at upstream hydrological stations, resulting in a second correlation weight. Calculate the Pearson correlation coefficient between the auxiliary data and the historical normal water level data of the area to be measured over time, and use it as the correlation score; The initial association weights of the auxiliary data are adjusted based on the relevance scores to obtain the association weights, wherein the initial association weights include the first association weight and the second association weight.

5. The automatic river flow measurement method based on water gauge scale recognition according to claim 4, characterized in that, The adjustment of the initial association weights of each auxiliary data based on the correlation score to obtain the association weights includes: The correlation score is compared with a preset correlation threshold: For auxiliary data whose correlation score is greater than the correlation threshold, increase the fusion weight of the auxiliary data. For auxiliary data whose relevance scores are lower than the relevance threshold, the fusion weight of the auxiliary data will be reduced. The fusion weights of the adjusted auxiliary data are normalized to obtain the correlation weights.

6. The automatic river flow measurement method based on water gauge scale recognition according to claim 3, characterized in that, After weighting and fusing the auxiliary data to generate the water level estimate, the method further includes: The estimated water level is compared with the benchmark water level reference value; When the comparison error is less than the preset first error threshold, the estimated water level is used as the fill value for the missing water level. When the comparison error is greater than or equal to the first error threshold, the hierarchical processing sub-method is executed; The graded treatment sub-method includes: When the comparison error is greater than or equal to the first error threshold and less than the preset second error threshold, the frequency of data acquisition by the radar level gauge is increased based on the first adjustment amount, wherein the second error threshold is greater than the first error threshold. When the comparison error is greater than or equal to the second error threshold, it is determined whether the equipment used to obtain the original measurement data is faulty or whether there is a hydrological anomaly, triggering an alarm signal. A drone is used to obtain inspection data, and the water level value and the status of the equipment are determined based on the inspection data.

7. The automatic river flow measurement method based on water gauge scale recognition according to claim 6, characterized in that, The step of determining the water level and the status of the equipment based on the inspection data includes: The inspection data includes: water level gauge image data, radar water level gauge image data, and the appearance image of the camera and its mounting pole. The water level scale image data is processed, and the water level line is identified; If the identification is successful, the water level value is calculated based on the water level line, and the water flow rate is calculated based on the water level-flow rate relationship curve; If the identification fails, the reasons for the failure are analyzed, including the presence of obstructions on the water gauge and the tilting of the water gauge. When the failure is due to an obstruction on the water gauge, a device cleaning prompt message is generated; When the failure is due to the tilt of the water gauge, the refraction correction sub-process is executed to obtain the water level value; The status of the equipment is diagnosed based on radar level gauge image data and the appearance images of the camera and its mounting pole.

8. The automatic river flow measurement method based on water gauge scale recognition according to claim 7, characterized in that, When the failure is due to the tilt of the water gauge, a refraction correction sub-process is executed to obtain the water level value, including: Based on the multi-angle water gauge images of the water gauge scale image data, calculate the tilt angle and direction of the water gauge; The tilt angle and direction are input into the optical refraction model. After processing by Snell's law calculation and geometric relationship transformation, the visual displacement generated when light passes through the air-water interface is calculated. The water level readings identified from the image are compensated and corrected based on the visual displacement to obtain the water level value.

9. The automatic river flow measurement method based on water gauge scale recognition according to claim 7, characterized in that, The diagnostic method for the status of the equipment based on radar level gauge image data and the appearance images of the camera and its mounting pole includes: The radar water level gauge image data is fused with the appearance image data of the camera and its mounting pole to obtain comprehensive image data; The integrated image data is input into a pre-trained equipment status diagnostic model to obtain an integrated equipment status diagnostic report, wherein the integrated equipment status diagnostic report includes the working status determination result of the radar water level gauge and the structural status determination result of the camera and its mounting pole.

10. An automatic river flow measurement system based on water gauge scale recognition, characterized in that, include: The data acquisition module is used to install a water gauge on the downstream section of the area to be measured, and to install a camera on the upright facing the water gauge, so as to acquire raw measurement data including the water gauge scale image through the camera. The data processing module is used to input the raw measurement data into the water gauge image enhancement neural network to obtain standard measurement data; The data evaluation module is used to evaluate the image quality of the standard measurement data, calculate the quality score of each frame of the image, and generate an image quality score set. Each image score in the image quality score set is compared with a preset image quality threshold. Standard measurement data with an image score greater than or equal to the image quality threshold are marked as valid measurement data; standard measurement data with an image score less than the image quality threshold are marked as invalid measurement data. The water level identification module is used to input the valid measurement data into the image processing algorithm. After water level area positioning, water level line identification and scale line intersection point coordinate extraction processing, the corresponding water level value is obtained. When the standard measurement data is invalid measurement data, auxiliary data is obtained. Based on the preprocessing results of the auxiliary data, the missing water level information is filled in to obtain the water level estimate. The flow output module is used to integrate the water level value with the water level estimate to obtain water level time series data; based on the pre-generated water level-flow relationship curve and the water level time series data, the flow rate of the area to be measured is determined.