Water level monitoring system based on OCR technology
By adopting an embedded edge IoT proxy server and self-correcting device based on OCR technology in the water level monitoring system, combining digital symbol detection and OCR algorithm, the problem of time-consuming, labor-consuming and errors of traditional water level monitoring methods is solved, and high Accurate water level monitoring reduces costs and improves system response speed.
Patent Information
- Application Number
- CN202411024749.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-12-27
AI Technical Summary
Traditional water level monitoring methods have problems such as time-consuming, labor-intensive, and large errors, and inability to view in real time. Water level monitoring based on visual images requires additional algorithms to detect water level lines, which has a large error, especially when the camera installation angle is deformed.
Adopting a water level monitoring system based on OCR technology, including an embedded edge IoT proxy server and self-correction device, video image data is collected and analyzed in real time through the image acquisition module, image recognition module and network communication module, combining digital symbol detection algorithm and OCR algorithm Water level recognition is carried out, vertical text is detected using EAST and CRNN models, and a new water level sensor is constructed through a turntable and floating platform to perform data cross-verification to improve accuracy.
There is no need to renovate old equipment, reduce investment costs, improve water level identification accuracy, reduce manpower measurement and recording time, realize front-end real-time monitoring and rapid response, and enhance the stability and accuracy of the system.
Smart Images

Figure CN119206694A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water level monitoring, and in particular to a water level monitoring system based on OCR technology. Background Art
[0002] The hydrological online monitoring system can provide real-time hydrological data so as to grasp the status of water resources in a timely manner. Traditional hydrological monitoring methods usually require manual data collection and processing, and require manual inspection of the scale on the benchmark, which is time-consuming and labor-intensive, inconvenient to operate, has large errors, and cannot be viewed in real time. The hydrological online monitoring system can realize automatic data collection and transmission, which improves the efficiency and accuracy of monitoring. It is generally based on sensor detection or visual image detection. Among them, sensor-based water level monitoring technologies include acoustic method, capacitance method, piezoresistance method, etc. These technologies are widely used in the field of water level monitoring, but there are also some shortcomings. The acoustic method is greatly affected by environmental noise and water quality; the capacitance method and piezoresistance method are greatly affected by weather conditions and changes in water quality. In addition, the accuracy and stability of these traditional technologies also have certain limitations.
[0003] Most of the current water level monitoring based on visual images requires the video images to be transmitted to the background server by wireless or wired means, and then the background server computer performs water level recognition. Prior art CN202211209402.3 discloses a water gauge recognition method based on OCR, which requires an additional algorithm to detect the position of the water level line, and then interpolates the specific water level result by calculating the pixel distance between the last reading and the water level line. The error is large, especially when the camera installation angle causes the image to be deformed, the result error is even greater. Summary of the invention
[0004] The purpose of the present invention is to provide a water level monitoring system based on OCR technology, which does not require the modification of the old water level monitoring system equipment, reduces the investment cost, and improves the accuracy of water level recognition by traditional visual image methods.
[0005] In order to achieve the above object, a water level monitoring system based on OCR technology is provided, including an embedded edge IoT proxy server, wherein the embedded edge IoT proxy server includes the following modules:
[0006] Image acquisition module: used to collect video image data of the water level gauge in real time through a camera;
[0007] Image recognition module: used to perform real-time analysis of video image data and obtain water level detection and analysis data based on a water level recognition algorithm based on an artificial intelligence neural network model; the water level recognition algorithm is based on a digital symbol detection algorithm and an OCR algorithm to detect and recognize digital symbols and scale lines on the water level gauge respectively;
[0008] Network communication module: used to communicate with the cloud information management platform and transmit water level detection and analysis data.
[0009] Furthermore, it also includes a self-correction device, which includes a bracket arranged on the shore and a floating platform arranged on the water surface, the floating platform is provided with a support frame, a turntable and a first controller, the turntable is rotatably connected to the support frame and is provided with a reset torsion spring inside, the support frame is provided with a potentiometer module for detecting the rotation data of the turntable, the potentiometer module is electrically connected to the first controller, the bracket is provided with a stepper motor and a second controller, the second controller is electrically connected to the stepper motor; the first controller and the second controller are both communicatively connected to the embedded edge IoT proxy server; the output shaft of the stepper motor is provided with a collection disk, and a connecting rope is provided between the collection disk and the turntable; the embedded edge IoT proxy server also includes:
[0010] Water level calculation and analysis module: used to analyze and process water level calculation data based on the turntable rotation data detected by the potentiometer module;
[0011] Comparison and analysis module: used to compare and analyze water level detection and analysis data with water level calculation data. If the comparison result is within the set allowable error range, the water level detection and analysis data and the water level calculation data are output; if the comparison result is outside the set allowable error range, debugging information is generated;
[0012] Debugging and analysis module: used to enable the second controller to control the stepper motor to rotate a set number of circles, and re-collect the turntable rotation data detected by the potentiometer module, and recalculate the water level calculation data through the water level calculation and analysis module; and calculate the theoretical rotation data of the turntable according to the set number of circles, and calculate the theoretical water level calculation data through the water level calculation and analysis module; it is also used to compare and analyze the theoretical water level calculation data with the recalculated water level calculation data. If they are consistent, the self-correction device works normally and outputs the water level calculation data. If they are inconsistent, the self-correction device works abnormally and outputs the water level detection and analysis data.
[0013] Furthermore, the floating platform is mounted on a square column-shaped vertical pole and can move up and down with the water surface. A water level gauge is provided on the vertical pole.
[0014] Furthermore, the image acquisition module is also used to collect video image data of the floating platform and the water level gauge on the vertical benchmark in real time through a camera, and the image recognition module is also used to analyze the video image data in real time according to a water level recognition algorithm based on an artificial intelligence neural network model, obtain the floating platform water level detection and analysis data, and then calculate the real water level detection and analysis data according to the floating platform water level detection and analysis data and the floating platform height analysis.
[0015] The comparison and analysis module is also used to compare the water level detection and analysis data with the actual water level detection and analysis data. If the comparison result is within the set allowable error range, the water level detection and analysis data and the actual water level detection and analysis data are output; if the comparison result is outside the set allowable error range, debugging information is generated and sent to the debugging and analysis module.
[0016] Furthermore, the digital symbol detection algorithm uses the EAST model to detect the numbers and scale symbols of the water level gauge.
[0017] Furthermore, the OCR algorithm adopts a CRNN text recognition algorithm.
[0018] Principles and advantages:
[0019] 1. The edge proxy server can access the existing water level monitoring cameras and information management system through wired or wireless networks. Real-time video analysis can be performed locally without modifying the old water level monitoring system equipment. It has the advantages of low cost, convenient and flexible deployment, front-end real-time monitoring, and fast response.
[0020] 2. On the water level gauge, not every scale is marked with a corresponding digital reading. The existing OCR algorithm requires an additional algorithm to detect the position of the water level line, and then interpolate the specific water level result by calculating the pixel distance between the last reading and the water level line. The error is large, especially when the camera installation angle causes the image to be deformed. The error is even greater. The water level recognition algorithm of this solution is based on the digital symbol detection algorithm and the OCR algorithm. It can detect the position of each number and scale symbol exposed above the water surface on the image. Even if the image has parallax deformation, the specific sub-scale value can be directly obtained from the position of the scale symbol without interpolation calculation, which can improve the accuracy of the result.
[0021] 3. Digital symbol detection algorithm The most widely used text detection algorithm is the CTPN model. The CTPN model works well in detecting horizontal text, but it performs poorly for vertical text or multi-directional text. Since the readings and scales of the water level gauge are vertically distributed, the EAST model works better for vertical text and can accurately detect the numbers and scale symbols of the water level gauge. The OCR algorithm uses the CRNN text recognition algorithm, which has the advantages of easy training, easy model convergence, high robustness, easy deployment, simple model structure, fast inference speed and support for variable-length input. After combining, each number and scale exposed above the water level gauge can be accurately detected.
[0022] 4. The camera may be located relatively far from the water level gauge. Since it is not a close-up shot, the excessive tilt of the shooting angle leads to low image quality, reflection and other problems, resulting in the water level detection analysis data obtained by identification analysis may not be accurate. This solution sets up a self-correction device combined with the water level detection analysis of the camera. The reset torsion spring inside the turntable can straighten the connecting rope between the hub and the turntable, and the fixed length of the connecting rope can represent the water level information. Therefore, a new type of water level sensor can be constructed through components such as the turntable and the floating platform. The rise or fall of the water level will be converted into turntable rotation data. Therefore, the water level calculation data can be indirectly obtained and obtained through the analysis of the turntable rotation data. Due to the influence of weather, the water level calculation data may not be very accurate. On this basis, this solution cross-validates and analyzes the data, and then adjusts the self-correction device according to the feedback of the analysis results to obtain the most accurate water level data and output it, which can further improve the accuracy of water level detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a logic block diagram of a water level monitoring system based on OCR technology according to an embodiment of the present invention;
[0024] Figure 2 Schematic diagram of the structure of the self-correcting device. DETAILED DESCRIPTION
[0025] The following is further described in detail through specific implementation methods:
[0026] Embodiment 1
[0027] A water level monitoring system based on OCR technology is basically as follows Figure 1 As shown, it includes an embedded edge IoT proxy server and a self-correction device, the embedded edge IoT proxy server is remotely connected to the self-correction device, and the system motherboard of the embedded edge IoT proxy server is RK3568, which includes a neural network acceleration chip with 1T computing power. The edge proxy server is connected to the existing water level monitoring camera and information management system through a wired or wireless network.
[0028] like Figure 2As shown, the self-correction device includes a bracket arranged on the shore and a floating platform arranged on the water surface, the floating platform is provided with a support frame, a turntable and a first controller, the turntable is rotatably connected to the rotating shaft of the support frame (the rotating shaft is inserted into the internal space of the turntable) and is provided with a reset torsion spring inside (the central end of the reset torsion spring is fixed to the rotating shaft of the support frame, and the outer end is fixed to the inner wall of the turntable), the support frame is provided with a potentiometer module for detecting the rotation data of the turntable, and the potentiometer module is electrically connected to the first controller. The bracket is provided with a stepper motor and a second controller, and the second controller is electrically connected to the stepper motor; the first controller and the second controller are both connected to the embedded edge IoT proxy server for communication; the output shaft of the stepper motor is provided with a cable collection disk, and a connecting rope is provided between the cable collection disk and the turntable, and the connecting rope can be wound around the cable collection disk and / or the turntable; the floating platform is sleeved and installed on a square column-shaped vertical pole and can move up and down with the water surface, the vertical pole is provided with a water level gauge, and the camera can collect the water level gauge on the vertical pole, or collect the water level gauge on the building wall, or set together.
[0029] The embedded edge IoT proxy server includes the following modules:
[0030] Image acquisition module: used to collect video image data of the water level gauge in real time through the camera; also used to collect video image data of the vertical benchmark floating platform and the water level gauge in real time through the camera;
[0031] Image recognition module: used to analyze video image data in real time and obtain water level detection analysis data according to the water level recognition algorithm based on the artificial intelligence neural network model; the water level recognition algorithm is based on the digital symbol detection algorithm and the OCR algorithm to detect and recognize the digital symbols and scale lines on the water level gauge respectively; the text detection algorithm widely used for digital symbol detection is the CTPN model. The CTPN model has a better effect in detecting horizontal text, but for vertical text or multi-directional text, the CTPN model detection is very poor. Since the readings and scales of the water level gauge are vertically distributed, this scheme uses the EAST model, which has a better effect on vertical text, to detect the numbers and scale symbols of the water level gauge. The OCR algorithm uses the CRNN text recognition algorithm, which has the advantages of easy training, easy model convergence, high robustness, easy deployment, simple model structure, fast inference speed and support for variable length input. The algorithm structure consists of a convolutional layer, a loop layer and a transcription layer. Convolutional layer: extracts feature sequences from the input image; loop layer: predicts the label distribution of each frame; transcription layer: converts the prediction of each frame into the final label sequence. The model training adopts the transfer learning method. Based on the pre-trained model of the original CRNN, the data set of digits 0 to 9 and various scale symbols on the water level gauge is trained to obtain the water level recognition algorithm model for water level monitoring. In the training process of the digit and scale symbol detection model, the reflection of the digit and scale symbol can be used as a negative sample, so that the model detection result only includes the scale exposed on the water surface, avoiding the error caused by the reflection in the existing algorithm. On the water level gauge, not every scale is marked with a corresponding digital reading. The existing OCR algorithm requires an additional algorithm to detect the position of the water level line, and then interpolate the specific water level result by calculating the pixel distance between the last reading and the water level line. The error is large, especially when the camera installation angle causes the image to be deformed, the result error is even greater. However, this scheme can detect the position of each digit and scale symbol exposed above the water surface on the image. Even if the image has parallax deformation, the specific sub-scale value can be directly obtained from the position of the scale symbol, without interpolation calculation, which can improve the accuracy of the result.
[0032] The image recognition module is also used to perform real-time analysis on the video image data according to a water level recognition algorithm based on an artificial intelligence neural network model, obtain the floating platform water level detection and analysis data, and then calculate the real water level detection and analysis data according to the floating platform water level detection and analysis data and the floating platform height analysis;
[0033] Network communication module: used to communicate with the cloud information management platform and transmit water level detection and analysis data.
[0034] Water level calculation and analysis module: used to analyze and process water level calculation data based on the turntable rotation data detected by the potentiometer module;
[0035] Comparison and analysis module: used to compare and analyze the water level detection and analysis data with the water level calculation data. If the comparison result is within the set allowable error range, the water level detection and analysis data and the water level calculation data are output; if the comparison result is outside the set allowable error range, debugging information is generated; it is also used to compare the water level detection and analysis data with the actual water level detection and analysis data. If the comparison result is within the set allowable error range, the water level detection and analysis data and the actual water level detection and analysis data are output; if the comparison result is outside the set allowable error range, debugging information is generated and sent to the debugging and analysis module.
[0036] Debugging and analysis module: used to enable the second controller to control the stepper motor to rotate a set number of circles, and re-collect the turntable rotation data detected by the potentiometer module, and recalculate the water level calculation data through the water level calculation and analysis module; and calculate the theoretical rotation data of the turntable according to the set number of circles, and calculate the theoretical water level calculation data through the water level calculation and analysis module; it is also used to compare and analyze the theoretical water level calculation data with the recalculated water level calculation data. If they are consistent, the self-correction device works normally and outputs the water level calculation data and uploads the set number of rotations of the stepper motor (which can be pushed to other self-correction devices, radiating to several detection points, for the convenience of guiding application). If they are inconsistent, the self-correction device works abnormally and outputs water level detection and analysis data.
[0037] This solution is based on an embedded edge IoT proxy server, using artificial intelligence visual analysis technology (through an algorithm that combines a text detection model with OCR), taking images of water level gauges through on-site cameras, and processing image information in real time at the edge to identify and output water level information, thereby improving the accuracy of water level monitoring. In addition, the edge proxy server performs real-time video analysis locally, without the need to modify the old water level monitoring system equipment, and has the advantages of low cost, convenient and flexible deployment, front-end real-time monitoring, and fast response. At the same time, it reduces the time, manpower, and material costs of manual measurement and recording.
[0038] The above is only an embodiment of the present invention. The common sense such as the known specific structure and characteristics in the scheme is not described in detail here. The ordinary technicians in the relevant field know all the common technical knowledge in the technical field of the invention before the application date or priority date, can obtain all the existing technologies in the field, and have the ability to apply the conventional experimental means before that date. The ordinary technicians in the relevant field can improve and implement this scheme in combination with their own abilities under the enlightenment given by this application. Some typical known structures or known methods should not become obstacles for ordinary technicians in the relevant field to implement this application. It should be pointed out that for those skilled in the art, without departing from the structure of the present invention, several deformations and improvements can be made, which should also be regarded as the protection scope of the present invention, which will not affect the effect of the implementation of the present invention and the practicality of the patent. The protection scope required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.
Claims
1. The water level monitoring system based on OCR technology is characterized by: It includes an embedded edge IoT proxy server, and the embedded edge IoT proxy server includes the following modules: Image acquisition module: used to collect video image data of the water level gauge in real time through a camera; Image recognition module: used to perform real-time analysis of video image data and obtain water level detection and analysis data based on a water level recognition algorithm based on an artificial intelligence neural network model; the water level recognition algorithm is based on a digital symbol detection algorithm and an OCR algorithm to detect and recognize digital symbols and scale lines on the water level gauge respectively; Network communication module: used to communicate with the cloud information management platform and transmit water level detection and analysis data.
2. The water level monitoring system based on OCR technology according to claim 1, characterized in that: It also includes a self-correction device, which includes a bracket arranged on the shore and a floating platform arranged on the water surface, the floating platform is provided with a support frame, a turntable and a first controller, the turntable is rotatably connected to the support frame and is provided with a reset torsion spring inside, the support frame is provided with a potentiometer module for detecting the rotation data of the turntable, the potentiometer module is electrically connected to the first controller, the bracket is provided with a stepper motor and a second controller, the second controller is electrically connected to the stepper motor; the first controller and the second controller are both communicatively connected to the embedded edge IoT proxy server; the output shaft of the stepper motor is provided with a cable collection disk, and a connecting rope is provided between the cable collection disk and the turntable; The embedded edge IoT proxy server also includes: Water level calculation and analysis module: used to analyze and process water level calculation data based on the turntable rotation data detected by the potentiometer module; Comparison and analysis module: used to compare and analyze the water level detection and analysis data with the water level calculation data. If the comparison result is within the set allowable error range, the water level detection and analysis data and the water level calculation data are output; if the comparison result is outside the set allowable error range, debugging information is generated; Debugging and analysis module: used to enable the second controller to control the stepper motor to rotate a set number of circles, and re-collect the turntable rotation data detected by the potentiometer module, and recalculate the water level calculation data through the water level calculation and analysis module; and calculate the theoretical rotation data of the turntable according to the set number of circles, and calculate the theoretical water level calculation data through the water level calculation and analysis module; it is also used to compare and analyze the theoretical water level calculation data with the recalculated water level calculation data. If they are consistent, the self-correction device works normally and outputs the water level calculation data. If they are inconsistent, the self-correction device works abnormally and outputs the water level detection and analysis data.
3. The water level monitoring system based on OCR technology according to claim 2 is characterized in that: The floating platform is sleeved and installed on a square column-shaped vertical benchmark and can move up and down with the water surface. A water level gauge is arranged on the vertical benchmark.
4. The water level monitoring system based on OCR technology according to claim 3 is characterized in that: The image acquisition module is also used to collect video image data of the floating platform and the water level gauge on the vertical pole in real time through a camera. The image recognition module is also used to analyze the video image data in real time according to a water level recognition algorithm based on an artificial intelligence neural network model, obtain the floating platform water level detection and analysis data, and then calculate the real water level detection and analysis data according to the floating platform water level detection and analysis data and the floating platform height analysis. The comparison and analysis module is also used to compare the water level detection and analysis data with the actual water level detection and analysis data. If the comparison result is within the set allowable error range, the water level detection and analysis data and the actual water level detection and analysis data are output; if the comparison result is outside the set allowable error range, debugging information is generated and sent to the debugging and analysis module.
5. The water level monitoring system based on OCR technology according to claim 3 is characterized in that: The digital symbol detection algorithm uses the EAST model to detect the numbers and scale symbols of the water level gauge.
6. The water level monitoring system based on OCR technology according to claim 5, characterized in that: The OCR algorithm adopts the CRNN text recognition algorithm.
Citation Information
Patent Citations
Water gauge identification method based on OCR (Optical Character Recognition)
CN115439861A
Method, system and equipment for identifying water level with scale and storage medium
CN117011319A
Method for calculating water level of water gauge through real-time AI technology
CN118366168A
Automatic crop growth measurement system using artificial intelligence
KR102522341B1
