CN-121051350-B - Intelligent perception data processing method based on electronic water gauge
Abstract
The invention discloses an intelligent perception data processing method based on an electronic water gauge, which belongs to the field of water level sensors, and comprises the steps of obtaining visible light images, infrared thermal imaging, ultrasonic ranging and pressure type water level values to form multi-source data, constructing a Kalman filter based on the obtained multi-source data, defining a water level state vector, dynamically adjusting a weight factor and a noise covariance matrix of each sensor according to real-time confidence coefficient, outputting a preliminary water level estimated value and a corresponding confidence coefficient index after fusion calculation, fusing the obtained multi-source data into four-channel input data, inputting a pre-trained U-Net model for semantic segmentation, generating a water surface shelter segmentation mask, identifying shelter types based on the mask and calculating a shelter area occupation ratio, extracting a water level line edge point set of a non-shelter area from an original image by utilizing the generated shelter segmentation mask, reconstructing a continuous water level line through linear fitting, and carrying out interpolation filling on the shelter area.
Inventors
- ZHU NENGSHENG
- GAO LIN
- Lv Fushui
- LIN JIAWEI
Assignees
- 广东省水文局梅州水文分局
Dates
- Publication Date
- 20260508
- Application Date
- 20250721
Claims (9)
- 1. An intelligent perception data processing method based on an electronic water gauge is characterized by comprising the following steps: Step S1, obtaining visible light images, infrared thermal imaging, ultrasonic ranging and pressure type water level values to form multi-source data; Step S2, based on the multi-source data in the step S1, a Kalman filter is constructed, a water level state vector is defined, a weight factor and a noise covariance matrix of each sensor are dynamically adjusted according to real-time confidence coefficient, and a preliminary water level estimated value and a corresponding confidence coefficient index are output after fusion calculation, wherein the method comprises the following steps: S2.1, defining a state vector, wherein the state vector consists of a water level height and a water level change rate and is used for comprehensively describing the state of a water level system; Step S2.2, based on the state vector defined in the step S2.1, constructing a Kalman filter prediction model, wherein the Kalman filter prediction model is based on a state space model and consists of a state transition equation and an observation equation, the state transition equation is used for describing how a system state changes with time, and the observation equation is used for describing the relation between the system state and a sensor observation value, and the Kalman filter prediction model comprises the following components: step S2.21, calculating historical reliability weight factors of the sensors according to the sensors related to the observation equation in the step S2.2, wherein the historical reliability of the sensors is determined by calculating the deviation condition of measured values and true values of the sensors in a past period of time, the sensors with small deviation and stability are endowed with first weight factors, and the sensors with large deviation and large fluctuation are endowed with second weight factors; Step S2.22, updating an observation noise covariance matrix based on the weight factors calculated in the step S2.21, wherein the matrix describes the statistical characteristics of the observation noise, and diagonal elements of the matrix are inversely proportional to the weight factors so as to give different weights according to the reliability of the sensor in fusion calculation; S3, fusing the visible light image and the infrared thermal imaging obtained in the step S1 into four-channel input data, inputting a pre-trained U-Net model for semantic segmentation, generating a water surface shelter segmentation mask, identifying the shelter type based on the mask, and calculating the shelter area occupation ratio; s4, extracting a water line edge point set of a non-shielded area from an original image by using the shielding object segmentation mask generated in the step S3, reconstructing a continuous water line by linear fitting, interpolating and filling the shielded area, and evaluating a credibility evaluation value of a visual water level measurement result by combining the recognized shielding type; Step S5, dynamically adjusting the weight of a fusion strategy according to the mask and the area occupation ratio of the obstruction in step S3, carrying out weighted fusion calculation by combining the preliminary water level estimated value and the confidence index thereof output in step S2 and the visual water level reliability estimated value estimated in step S4, and outputting a final water level estimated value; And S6, based on the data quality score in the step S5 and the shielding area occupation ratio in the step S3, calling the actual measurement data of the standby mechanical water gauge to be compared with the current water level estimated value, updating the sensor calibration coefficient, carrying out grading early warning according to the shielding degree and the data quality deviation, and storing typical shielding scene data.
- 2. The intelligent perception data processing method based on the electronic water gauge according to claim 1, wherein step S2, based on the multi-source data of step S1, constructs a kalman filter and defines a water level state vector, dynamically adjusts a weight factor and a noise covariance matrix according to the real-time reliability of each sensor, and outputs a preliminary water level estimated value and a corresponding confidence index after fusion calculation, comprising: S2.3, carrying out Kalman filtering iteration based on the prediction model constructed in the step S2.2, wherein the step of predicting calculates prior state estimation at the current moment based on state estimation at the last moment and a state transition equation and calculates prior estimation covariance; Step S2.4, updating state estimation based on the Kalman filtering iteration result of the step S2.3, wherein the updating comprises updating posterior estimation covariance, and the covariance reflects uncertainty of the corrected state estimation and is used for iterative calculation at the next moment; And step S2.5, based on the updated state estimation in the step S2.4, outputting a fused water level estimation value which is a water level height estimation comprehensively considering the measurement information of a plurality of sensors and subjected to noise reduction treatment.
- 3. The intelligent perception data processing method based on the electronic water gauge according to claim 2, wherein the step S3 of fusing the multi-source data in the step S1 into four-channel input data, inputting a pre-trained U-Net model for semantic segmentation, generating a water surface occlusion segmentation mask, identifying an occlusion type based on the mask and calculating an occlusion area occupation ratio includes: S3.1, fusing an RGB image in the four-channel input data with an infrared gray scale image to obtain image input data, wherein the RGB image provides color and texture information of an object, and the infrared gray scale image reflects the temperature distribution condition of the object; S3.2, inputting the image input data in the step S3.1 into a U-Net model for processing, wherein the U-Net model consists of a contraction path and an expansion path, the contraction path is used for extracting deep features of the image, the expansion path is used for recovering space dimensions of a feature map and splicing features in the contraction path, and finally, a shelter probability map with the same size as the input image is output; s3.3, processing the occlusion probability map output in the step S3.2 according to a preset threshold value to generate a binary mask so as to divide an occlusion area and an unoccluded area; S3.4, extracting color and texture features from the shielding areas separated in the step S3.3; S3.5, inputting the features extracted in the step S3.4 into a lightweight classifier for classification to determine the type of the shielding object, wherein the lightweight classifier is an integrated learning method based on decision trees and consists of a plurality of decision trees, and voting is carried out on the prediction results of the decision trees to obtain a final classification result; and step S3.6, counting the number of pixels marked as a shielding object in the binary mask generated in the step S3.3, and calculating the ratio of the shielding area to the total area of the image to be used as a quantification basis for evaluating the shielding severity.
- 4. The intelligent perception data processing method based on the electronic water gauge according to claim 3, wherein the step S4 of extracting a water line edge point set of a non-occlusion area from an original image by using the occlusion segmentation mask generated in the step S3, reconstructing a continuous water line by linear fitting, interpolating and filling the occlusion area, and evaluating a credibility evaluation value of a visual water level measurement result by combining the identified occlusion type comprises: s4.1, using a segmentation mask M, wherein a pixel point with a value of 0 represents a non-shielding area, a pixel point with a value of 1 represents a shielding area, and extracting non-shielded water line edge points to form a point set P by performing operation on the mask M and a water level image so as to obtain reliable water line information; S4.2, taking the point set P in the step S4.1 as input, adopting a RANSAC algorithm to perform linear fitting, selecting a small number of points through random sampling to fit a straight line, calculating the distance between other points and the straight line, judging inner points according to a preset threshold, and selecting the straight line with the largest inner point number as a final fitting result through multiple iterations to obtain an accurate water line equation and describe the actual position trend of the water level; S4.3, acquiring the coverage area ratio S calculated in the step S3.6, and filling the coverage area by calculating the weighted average value of known pixel points around the coverage area based on the water line equation fitted in the step S4.2 when the S is smaller than a preset value, so as to smoothly fill the coverage area while keeping the fitting water line trend; and S4.4, marking the area as 'seriously blocked' when the blocking area ratio S in the step S4.3 is larger than or equal to a preset value, and disabling the visual data.
- 5. The intelligent perception data processing method based on the electronic water gauge according to claim 4, wherein step S5 dynamically adjusts the fusion strategy weight according to the mask of the occlusion partition and the area occupation ratio of step S3, performs weighted fusion calculation by combining the preliminary water level estimated value and the confidence index thereof output in step S2 and the visual water level reliability estimated value estimated in step S4, and outputs the final water level estimated value, and includes: s5.1, when the shielding of the water surface floating objects occurs and the shielding area occupation ratio S calculated in the step S3.6 is smaller than a preset occupation ratio, dynamically adjusting weights of the pressure type water level gauge, the ultrasonic sensor and visual data in a final water level estimated value according to the S, and fusing the data to obtain the final water level estimated value; S5.2, directly adopting data of a pressure type water level gauge as a final water level estimation value when the water surface floater shielding area occupation ratio S calculated in the step S3.6 is larger than or equal to a preset occupation ratio; s5.3, when it is judged that water level monitoring is affected due to underwater weed winding, combining the infrared temperature gradient and the ultrasonic echo complexity, and judging whether weeds affect the pressure type water level gauge; And step S5.4, if the step S5.3 judges that weeds have influence on the pressure type water level gauge, dynamically adjusting weights of the visual data and the ultrasonic data in the final water level estimated value according to the visual data credibility estimated value estimated in the step S4, and fusing the weights to obtain the final water level estimated value so as to correct errors caused by underwater weed winding.
- 6. The intelligent perception data processing method based on the electronic water gauge according to claim 5, wherein in step S5.4, if it is determined in step S5.3 that weeds have an influence on the pressure type water gauge, the weights of the visual data and the ultrasonic data in the final water level estimated value are dynamically adjusted according to the visual data credibility estimated value estimated in step S4, and the final water level estimated value is obtained by fusing the data, so as to correct errors caused by the winding of the underwater weeds, comprising: Step S5.41, storing water level data in a time sequence database, and storing the final water level data output in the step S5.4 in the database; and step S5.42, drawing a real-time water level curve by using a drawing tool based on the water level data stored in the database in step S5.41, displaying the dynamic change of the water level along with time, and attaching a data quality indicator to reflect the reliability of the data, and simultaneously, generating a shelter distribution thermodynamic diagram based on the shelter segmentation mask generated in step S3, and displaying the shelter distribution condition of the monitoring area.
- 7. The intelligent perception data processing method based on the electronic water gauge according to claim 6, wherein the step S6 is characterized by calling the actual measurement data of the standby mechanical water gauge to be compared with the current water level estimated value based on the data quality score of the step S5 and the shielding area occupation ratio of the step S3, updating the sensor calibration coefficient, carrying out grading early warning according to the shielding degree and the data quality deviation, and storing typical shielding scene data, and comprises the following steps: Step S6.1, judging whether to trigger automatic calibration according to the data quality score output in the step S5 and the coverage area occupation ratio of the step S3.6, starting a standby mechanical water gauge to acquire a reference water level when the data quality score in the preset time is lower than the preset score, and calculating a calibration coefficient to update the water level value; Step S6.2, classifying the early warning based on the shielding area occupation ratio of the step S3.6: If the coverage area occupation ratio is smaller than a first preset threshold value, recording a log; if the shielding area ratio is between the first preset threshold value and the second preset threshold value, sending a short message to remind operation and maintenance personnel; If the coverage area ratio is larger than a second preset threshold value, triggering an audible and visual alarm and generating a work order to push to the operation and maintenance APP; And S6.3, storing the image, the sensor data and the processing result of the current shielding scene into a sample library, automatically acquiring new data every week based on the sample library, and updating the U-Net model and the Kalman filtering parameters to improve the accuracy of shielding object detection and segmentation and the accuracy of multi-sensor data fusion.
- 8. The intelligent perception data processing method based on the electronic water gauge according to claim 7, wherein the step S6.2 of grading the early warning based on the shielding area occupation ratio of the step S3.6 includes: step S6.21, sorting the early warning information classified in the step S6.2 according to severity, and displaying the early warning information in a scrolling list form on a visual interface; Step S6.22, providing a history inquiry function, allowing a user to specify a time range and the shielding type condition identified in step S3.5 to conduct data screening, and displaying an original image and a processing process of screening data, wherein the processing process comprises the step of acquiring an intermediate result and a processing parameter of a final decision by multi-sensor data.
- 9. A computing device, comprising: One or more processors; storage means for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the method of claim 8.
Description
Intelligent perception data processing method based on electronic water gauge Technical Field The invention relates to the field of water level sensors, in particular to an intelligent perception data processing method based on an electronic water gauge. Background The electronic water gauge is used as an advanced measuring device, and the core of the electronic water gauge is that the sensor technology is used for accurately sensing the change of the water level and converting the change into an electric signal so as to realize digital measurement and visual display of the water level. The technology not only endows the electronic water gauge with high-precision measurement capability, but also has the advantages of high response speed, easiness in integration into an automatic monitoring system and the like. Therefore, the electronic water gauge is widely applied to water level monitoring of various water areas such as rivers, lakes, reservoirs, channels and the like, and provides important data support for water resource management, flood control, disaster reduction and other works. In the actual use process of the electronic water gauge, when the local surface of the electronic water gauge is covered by natural objects such as leaves and weeds or attached by floaters such as plastic bags, the covers can seriously obstruct the normal contact between the sensor and the water body. The water level sensing component of the electronic water gauge relies on direct contact with the water body, and the contact is blocked by the cover, so that the water level sensing component cannot accurately sense the change of the water level, and thus measurement errors are generated, and the errors may be expressed as that the measured value is higher or lower than the actual water level, and depend on the position and the degree of the cover. The cover is often not stationary and floats such as leaves, weeds and plastic bags may move with the wind or water flow, which may cause fluctuations in the water level value measured by the sensor at different points in time. Such fluctuations increase the uncertainty of the measured data and may also mislead subsequent data analysis and decision making. For example, in a flood control warning system, if the water level rises in a trend due to measurement fluctuation caused by a cover, unnecessary panic and resource waste may be caused. Besides the cover on the water surface, the electronic water gauge also encounters the problem of underwater weed winding, when the electronic water gauge is wound by underwater weeds, the weeds can change the water flow state around the water gauge to form vortex or turbulence, and the vortex or turbulence can influence the accurate perception of the water level change by the water level perception component. Weeds can also exert physical pressure on the water gauge itself, causing the water gauge measuring section to deviate from the normal position, which not only causes measurement deviations, but can also be exacerbated as the weed continues to wind, eventually leading to wear of the water gauge surface or damage to internal structures. Once the water gauge is damaged, its measurement accuracy and service life will be severely affected and may even fail entirely. Disclosure of Invention Aiming at the problems existing in the prior art, the invention aims to provide an intelligent perception data processing method based on an electronic water gauge, which can realize that a multisource data fusion mechanism is constructed by integrating various sensor data such as visible light images, infrared thermal imaging, ultrasonic ranging, pressure type water level values and the like, realize data mutual correction and abnormal fault tolerance by dynamically adjusting the weight of each sensor through a Kalman filter, still output accurate and reliable water level estimation values even when part of sensors fail or data are abnormal, and greatly improve the robustness of water level monitoring. In order to solve the problems, the invention adopts the following technical scheme. In a first aspect, an intelligent perception data processing method based on an electronic water gauge includes: Step S1, obtaining visible light images, infrared thermal imaging, ultrasonic ranging and pressure type water level values to form multi-source data; Step S2, based on the multi-source data in the step S1, a Kalman filter is constructed, a water level state vector is defined, a weight factor and a noise covariance matrix of each sensor are dynamically adjusted according to the real-time confidence coefficient of each sensor, and a preliminary water level estimated value and a corresponding confidence coefficient index are output after fusion calculation; S3, fusing the multi-source data in the step S1 into four-channel input data, inputting a pre-trained U-Net model for semantic segmentation, generating a water surface shelter segmentation mask, identifying the shelter