Method and camera for periodically monitoring river

By configuring camera-based water level monitoring points and flow velocity preset points, efficient monitoring of river water level and flow velocity is achieved, solving the problems of complex equipment deployment and high cost in existing technologies, and realizing efficient water conservancy monitoring and alarm functions.

CN122067378APending Publication Date: 2026-05-19HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
Filing Date
2026-02-10
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In existing technologies, river water level and flow velocity monitoring equipment is complex to deploy and costly, and different equipment needs to be deployed separately, making it difficult to achieve efficient and automated monitoring.

Method used

A camera is used, configured with water level monitoring points and multiple flow velocity preset points. The camera is moved to different monitoring points by time-division control to realize periodic monitoring of water level and flow velocity, and output alarm messages when abnormalities occur.

Benefits of technology

By using a single camera to monitor river water level and flow velocity, the complexity and cost of equipment deployment are reduced, alarms can be output in a timely manner, and monitoring efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122067378A_ABST
    Figure CN122067378A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method for periodically monitoring a river and a camera, and the method comprises the steps: configuring a water level monitoring point and a plurality of flow velocity preset points, and enabling the camera shooting positions corresponding to the plurality of flow velocity preset points to be different positions in the width direction of the river; selecting one preset point from a plurality of flow velocity preset points, and configuring the selected preset point as an idle stay point; the camera has different PT coordinates at a water level monitoring point and a plurality of flow velocity preset points; in response to a preset alarm period of the camera, the camera is controlled in a time-sharing manner; the camera moves to an idle stay point to execute flow velocity monitoring; moving to a water level monitoring point to execute water level monitoring; sequentially moving to at least one flow velocity preset point to execute flow velocity monitoring; and when a water level alarm event or a flow rate alarm event is detected, outputting an alarm message. The water level and the flow velocity of the river can be monitored only by installing one camera, and the complexity and difficulty of equipment deployment and the cost of water conservancy monitoring equipment are greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of water conservancy monitoring technology, and in particular to a method and camera for periodic monitoring of rivers. Background Technology

[0002] The core water flow information of rivers, such as water level and flow velocity, plays a vital role in water resource management, flood warning, soil and water conservation, and ecological research. Therefore, it is essential to automatically monitor the core water flow information of rivers, such as water level and flow velocity.

[0003] However, current automated monitoring solutions use different equipment for water level monitoring and flow velocity monitoring. For example, water level monitoring relies on pressure sensors or ultrasonic radar, while flow velocity monitoring requires the deployment of facilities such as acoustic Doppler current profilers or electromagnetic current meters. In practical scenarios, the equipment deployment of this solution is complex and difficult, and the cost of water conservancy monitoring equipment is very high. Summary of the Invention

[0004] The purpose of this application is to provide a method and camera for periodically monitoring rivers, thereby reducing the complexity and difficulty of equipment deployment and the cost of water conservancy monitoring equipment. The specific technical solution is as follows:

[0005] In a first aspect, embodiments of this application provide a method for periodically monitoring rivers, including:

[0006] Configure water level monitoring points and multiple flow velocity preset points, wherein the camera shooting positions corresponding to the multiple flow velocity preset points are different positions along the width direction of the river;

[0007] Select one preset point from the plurality of flow velocity preset points and configure it as an idle dwell point; wherein the camera has different PT coordinates at the water level monitoring point and the plurality of flow velocity preset points;

[0008] In response to the camera's preset alarm cycle, the camera is controlled in a time-division manner to: move to the idle stopping point to perform flow rate monitoring; move to the water level monitoring point to perform water level monitoring; and sequentially move to at least one of the preset flow rate points to perform flow rate monitoring;

[0009] When a water level alarm event or a flow rate alarm event is detected, an alarm message is output.

[0010] Optionally, during the alarm cycle, the camera's movement state sequentially includes: first moving to the idle stopping point, then moving to the water level monitoring point, and then sequentially moving to the plurality of flow velocity preset points; or,

[0011] First, it moves to the water level monitoring point, then sequentially moves to the multiple flow velocity preset points, and finally moves to the idle dwell point.

[0012] Optionally, the operating duration of the camera at the idle dwell point is determined by a function calculation between the camera's alarm cycle, the operating duration at the water level monitoring point, and the operating duration at the plurality of flow velocity preset points.

[0013] Optionally, the working time of the camera at the water level monitoring point is a preset first duration, and the working time at each of the flow velocity preset points is a preset second duration; then, within the alarm cycle, the working time of the camera at the idle dwell point is determined by subtracting the first duration and the second duration from the alarm cycle and multiplying by the number of the plurality of flow velocity preset points.

[0014] Optionally, the plurality of flow velocity preset points are configured such that any one of the flow velocity preset points corresponds to a different PT coordinate of the camera, wherein the plurality of flow velocity preset points have the same P coordinate.

[0015] Optionally, the method further includes:

[0016] The camera captures a water level calibration image at the water level monitoring point, wherein the water level calibration image includes at least two water level calibration points, which are used to construct a first mapping function so that the water level monitoring image captured by the camera at the water level monitoring point is processed by the first mapping function to generate the water level physical information of the river.

[0017] Optionally, the water level calibration image includes four water level calibration points, two of which are used to construct the first mapping function associated with the first water level depth interval, and the remaining two water level calibration points are used to construct the second mapping function associated with the second water level depth interval, wherein the first water level depth interval and the second water level depth interval partially overlap.

[0018] Optionally, the process of controlling the camera to move to the water level monitoring point includes:

[0019] When the water level at the water level monitoring point is detected to be in the overlapping part of the first water level depth range and the second water level depth range, the camera is automatically controlled to switch between generating the water level information based on the first mapping function and generating the water level information based on the second mapping function.

[0020] Optionally, controlling the camera to switch between generating the water level information based on the first mapping function and generating the water level information based on the second mapping function includes:

[0021] If the water level at the monitoring point is detected to be within the first water level depth range and the difference between the water level at the monitoring point and the lower limit of the first water level depth range is not greater than a first threshold, the generation of the water level information based on the first mapping function is switched to the generation of the water level information based on the second mapping function; or,

[0022] If the water level at the water level monitoring point is detected to be within the second water level depth range and the difference between the water level at the monitoring point and the upper limit of the second water level depth range is not less than the second threshold, the water level information generated based on the second mapping function is switched to the water level information generated based on the first mapping function.

[0023] The upper limit of the first water level depth range is higher than the upper limit of the second water level depth range.

[0024] Optionally, during the alarm period, the flow rate output by the camera is determined based on the product of the cross-sectional area of ​​the river channel and the monitored flow velocity of the river channel, wherein the cross-sectional area of ​​the river channel is determined by the water level information of the river output by the camera during the alarm period.

[0025] Optionally, the camera performs flow rate monitoring, including:

[0026] The camera calculates the flow velocity of the river using a first intelligent algorithm model or a second intelligent algorithm model. The first intelligent algorithm model is used for scenarios without floating objects, and the second intelligent algorithm model is used for scenarios with floating objects. The first intelligent algorithm model and the second intelligent algorithm model are different algorithm models or the same algorithm model with different parameter configurations.

[0027] Optionally, the configuration of multiple flow rate preset points includes:

[0028] Based on the river width, configure the initial flow velocity preset point and the termination flow velocity preset point;

[0029] Based on the initial velocity preset point, the final velocity preset point, and the preset preset point spacing, at least one intermediate velocity preset point is determined.

[0030] Secondly, embodiments of this application provide a camera, including a processor, the processor comprising a first configuration unit, a second configuration unit, a third configuration unit, a control unit, and an output unit, wherein:

[0031] The first configuration unit is configured to: configure a water level monitoring point, acquire a water level calibration image captured by the camera at the water level monitoring point, the water level calibration image including 4 water level calibration points, wherein 2 of the water level calibration points are used to construct a first mapping function associated with a first water level depth interval, and the remaining 2 of the water level calibration points are used to construct a second mapping function associated with a second water level depth interval, wherein the first water level depth interval and the second water level depth interval partially overlap;

[0032] The second configuration unit is configured to: configure multiple flow velocity preset points, wherein the camera shooting positions corresponding to the flow velocity preset points are different positions along the width direction of the river, and the multiple flow velocity preset points are configured such that: any one of the flow velocity preset points corresponds to different PT coordinates of the camera, and the multiple flow velocity preset points have the same P coordinate;

[0033] The third configuration unit is configured to select one preset point from the plurality of flow velocity preset points and configure it as an idle dwell point; wherein the camera has different PT coordinates at the water level monitoring point and the plurality of flow velocity preset points;

[0034] The control unit is configured to: in response to a preset alarm cycle of the camera, control the camera in a time-division manner to: move to the idle stopping point to perform flow rate monitoring; move to the water level monitoring point to perform water level monitoring; and sequentially move to the plurality of preset flow rate points to perform flow rate monitoring;

[0035] The output unit is configured to output an alarm message when a water level alarm event or a flow rate alarm event is detected.

[0036] Optionally, the control unit is configured to: when it is detected that the water level at the water level monitoring point is within the first water level depth range and the difference between the water level at the monitoring point and the lower limit of the first water level depth range is not greater than a first threshold, switch from generating the water level information based on the first mapping function to generating the water level information based on the second mapping function; or, when it is detected that the water level at the water level monitoring point is within the second water level depth range and the difference between the water level at the monitoring point and the upper limit of the second water level depth range is not less than a second threshold, switch from generating the water level information based on the second mapping function to generating the water level information based on the first mapping function.

[0037] The upper limit of the first water level depth range is higher than the upper limit of the second water level depth range.

[0038] Optionally, the camera's motion states may sequentially include: first moving to the idle stopping point, then moving to the water level monitoring point, and then sequentially moving to the plurality of flow velocity preset points; or, first moving to the water level monitoring point, then sequentially moving to the plurality of flow velocity preset points, and then moving to the idle stopping point;

[0039] The operating duration of the camera at the idle dwell point is determined by a function calculation between the camera's alarm cycle, the operating duration at the water level monitoring point, and the operating duration at the multiple flow velocity preset points.

[0040] Beneficial effects of the embodiments in this application:

[0041] The solution provided in this application embodiment can configure water level monitoring points and multiple flow velocity preset points. The camera shooting positions corresponding to the multiple flow velocity preset points are different locations along the width of the river. One of the flow velocity preset points is selected and configured as an idle dwell point. The camera has different PT coordinates at the water level monitoring point and the multiple flow velocity preset points. Furthermore, in response to the camera's preset alarm cycle, the camera is controlled in a time-division manner: moving to an idle dwell point to perform flow velocity monitoring; moving to a water level monitoring point to perform water level monitoring; and sequentially moving to at least one flow velocity preset point to perform flow velocity monitoring. When a water level alarm event or a flow velocity alarm event is detected, an alarm message is output. In this way, by configuring the camera's water level monitoring point, multiple flow velocity preset points, and idle monitoring points, the camera can be controlled in a time-division manner to move to different monitoring points within each alarm cycle to monitor the river's water level and flow velocity. This achieves the goal of monitoring the river's water level and flow velocity with a single camera, and can output alarm messages when the water level or flow velocity is abnormal. Only one camera needs to be installed, greatly reducing the complexity and difficulty of equipment deployment and the cost of water conservancy monitoring equipment. Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.

[0043] Figure 1 A flowchart illustrating a method for periodically monitoring rivers, provided as an embodiment of this application;

[0044] Figure 2 Based on Figure 1 The illustration shows a time-division diagram within an alarm cycle according to an embodiment.

[0045] Figure 3(a) shows the results based on Figure 1 The diagram illustrates a camera calibration method according to an embodiment shown.

[0046] Figure 3(b) is a schematic diagram of a camera shooting area based on the embodiment shown in Figure 3(a);

[0047] Figure 4 Based on Figure 1 A schematic diagram of a basic configuration interface of the embodiment shown;

[0048] Figure 5 Based on Figure 1 A schematic diagram of a flow rate preset point configuration interface in the embodiment shown.

[0049] Figure 6 Based on Figure 5 A schematic diagram of a flow velocity preset position in the embodiment shown;

[0050] Figure 7 Based on Figure 1 A flowchart illustrating a configuration method for multiple flow rate preset points in the embodiment shown;

[0051] Figure 8 Based on Figure 1 A flowchart of a water level monitoring method according to the embodiment shown;

[0052] Figure 9 Based on Figure 1 A schematic diagram of a water level gauge calibration interface in the embodiment shown;

[0053] Figure 10 Based on Figure 1 The diagram shows a multi-scenario configuration interface of an embodiment.

[0054] Figure 11 Based on Figure 1 The diagram shows a traffic monitoring configuration interface of an embodiment.

[0055] Figure 12 Based on Figure 1 A flowchart of a flow rate monitoring method according to the embodiment shown;

[0056] Figure 13 This is a schematic diagram of the structure of a camera provided in an embodiment of this application;

[0057] Figure 14 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0058] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.

[0059] To reduce the complexity and difficulty of equipment deployment and the cost of water conservancy monitoring equipment, embodiments of this application provide a method, camera, computer-readable storage medium, and computer program product for periodic river monitoring. The method for periodic river monitoring provided in this application embodiment is described below.

[0060] The method for periodically monitoring rivers provided in this application can be applied to a camera or a processing platform connected to the camera. No specific limitations are made here; for clarity, it will be referred to as an electronic device. The camera is one that can rotate to change its shooting area, meaning that the P (Pan, horizontal rotation angle), T (Tilt, vertical rotation angle), and Z (Zoom, zoom level) coordinates can be changed.

[0061] like Figure 1 As shown, a method for periodically monitoring rivers, the method comprising:

[0062] S101, configured with water level monitoring points and multiple flow velocity preset points;

[0063] The camera positions corresponding to the multiple flow velocity preset points are different locations along the width of the river.

[0064] S102, Select one preset point from the plurality of flow rate preset points and configure it as an idle dwell point;

[0065] The camera has different PT coordinates at the water level monitoring point and the multiple flow velocity preset points.

[0066] S103, in response to the camera's preset alarm cycle, the camera is controlled in a time-division manner to: move to the idle stopping point to perform flow rate monitoring; move to the water level monitoring point to perform water level monitoring; and sequentially move to at least one of the preset flow rate points to perform flow rate monitoring;

[0067] S104 outputs an alarm message when a water level alarm event or a flow rate alarm event is detected.

[0068] The solution provided in this application, by configuring a camera with water level monitoring points, multiple preset flow velocity points, and idle monitoring points, allows for time-sharing control of the camera to move to different monitoring points within each alarm cycle to monitor the river's water level and flow velocity. This achieves the goal of monitoring river water level and flow velocity with a single camera and can output alarm messages when water level or flow velocity is abnormal. Only one camera needs to be installed, significantly reducing the complexity and difficulty of equipment deployment and the cost of water conservancy monitoring equipment.

[0069] In this embodiment, the camera is mounted on the riverbank of the river where water monitoring is required, and its field of view includes the opposite bank of the river and a certain area on the river surface. To monitor water level, flow velocity, and other water-related information, the camera can be configured with water level monitoring points and multiple preset flow velocity points.

[0070] Among them, the camera shooting positions corresponding to multiple flow velocity preset points are different positions along the width of the river. That is, when the camera moves to different flow velocity preset points, it can capture images of different areas along the width of the river, and then calculate the flow velocity of different areas of the river based on the images.

[0071] The camera has different PT coordinates at the water level monitoring point and multiple flow velocity preset points. In this way, when the camera moves to the water level monitoring point, it can capture an image of the water level on the opposite bank of the river, and then calculate the current water level information based on the image.

[0072] One of the aforementioned flow velocity preset points can be selected and configured as an idle stop point. In addition to moving to the water level monitoring point and the flow velocity preset point for flow velocity monitoring, the camera can also move to an idle stop point. At the idle stop point, the camera can perform flow velocity monitoring to provide real-time monitoring of the river's flow velocity and ensure continuous output of monitoring results. Users can perceive that the camera is continuously working, resulting in a better user experience.

[0073] After all the above monitoring points are configured, in step S103, the electronic device can control the camera in a time-division manner according to a preset alarm cycle: move to an idle dwell point to perform flow velocity monitoring; move to a water level monitoring point to perform water level monitoring; and move sequentially to at least one preset flow velocity point to perform flow velocity monitoring. The monitoring points mentioned in this document include the above-mentioned water level monitoring point, preset flow velocity point, and idle dwell point.

[0074] The preset alarm cycle can be determined based on the actual time required for water level and flow velocity monitoring, or based on the real-time requirements of river monitoring. For example, it can be 10 minutes, 20 minutes, 1 hour, etc., without specific limitations.

[0075] Within each alarm cycle, the camera can be controlled in a time-sharing manner, that is, the camera can be controlled to move to the water level monitoring point, at least one preset flow velocity point, and an idle dwell point at different times. The camera performs different monitoring tasks at different monitoring points, so as to achieve the purpose of obtaining water level information and flow velocity information through one camera in a time-sharing manner within each alarm cycle.

[0076] like Figure 2 The diagram illustrates the time-sharing within an alarm cycle. An alarm cycle consists of three periods: a water level monitoring period 210, a flow velocity monitoring period 220, and an idle monitoring period 230. During the water level monitoring period 210, the camera moves to a water level monitoring point to monitor the water level. During the flow velocity monitoring period 220, the camera moves to at least one preset flow velocity point to monitor the flow velocity. During the idle monitoring period 230, the camera moves to an idle stopping point to monitor the flow velocity.

[0077] In one implementation, flow velocity monitoring can include both a rotating mode and a fixed mode. In the rotating mode, there are at least two preset flow velocity points, so that the camera performs rotating monitoring of the river flow velocity at at least two preset flow velocity points during each alarm cycle. In the fixed mode, there can be one preset flow velocity point, so that the camera monitors the river flow velocity at that preset flow velocity point during each alarm cycle.

[0078] Upon detecting a water level alarm or a flow velocity alarm, the electronic device can output an alarm message to inform staff that an emergency has occurred in the river, allowing them to take appropriate action. As one implementation, if the water level is detected to be higher than a preset water level threshold, it indicates that the current river water level is too high, potentially leading to flooding, levee breaches, or other problems; in this case, a water level alarm event can be confirmed. Similarly, if the flow velocity is detected to be higher than a preset flow velocity threshold, it indicates that the current river flow is too fast, potentially threatening navigation safety, levee breaches, or other problems; in this case, a flow velocity alarm event can be confirmed.

[0079] To facilitate the configuration of the aforementioned water level monitoring points and flow velocity preset points, cameras can be calibrated after installation on the riverbank to determine the mapping relationship between the camera's PTZ coordinates and the actual shooting range. As shown in Figure 3(a), after the camera is set up, given the camera's elevation H and the river's water level h, the lengths of ab and ad can be obtained through measurement. As shown in Figure 3(b), assuming the final imaging area of ​​the camera shown in Figure 3(a) is quadrilateral ABCD, the length of fa is a fixed value, such as 3 meters, triangles aBC, afg, and aAD are pairwise similar, and points a, e, b, and c are collinear. Combining the length of ab, the horizontal field of view of the camera can be calculated. Then, based on the camera's magnification table, the required magnification to capture the quadrilateral ABCD area can be determined by looking up the table.

[0080] After determining the camera's magnification, the camera's vertical field of view can be determined, and then the camera's pitch angle can be determined based on the camera's PTZ parameter range. Combining the camera's pitch angle, field of view, H, h, and L, the length of bc can be calculated, and thus the lengths of each side of quadrilateral ABCD can be estimated, where L is the length of db in Figure 3(a). This completes the calibration of the mapping relationship between the camera's PTZ coordinates and the actual shooting range.

[0081] Once the mapping relationship between the camera's PTZ coordinates and the actual shooting range is determined, water level monitoring points and multiple flow velocity preset points can be set according to the required shooting area. This means configuring the camera's PTZ coordinates at the water level monitoring points and multiple flow velocity preset points. When monitoring is needed, the camera is controlled to move to the corresponding PTZ coordinates to capture images. As one implementation method, since the distance between the locations to be shot may not be particularly far, the camera's Z coordinate can remain constant, and only the PT coordinates need to be changed to achieve water level and flow velocity monitoring. In other words, the camera can have different PT coordinates at the water level monitoring points and multiple flow velocity preset points, while its Z coordinates can be the same.

[0082] In one implementation, the basic configuration interface for the camera to detect water flow can be as follows: Figure 4 As shown, users can configure the camera through the processing platform. The right side of the interface displays a schematic diagram of the camera installation scene. The left side allows for basic configuration of the camera's installation location, including: equipment installation elevation, riverbank distance, installation location, and water level data settings. Users can enter corresponding parameters in the input boxes, such as 5 meters for the equipment installation elevation, 1 meter for the riverbank distance, selecting the left or right bank of the river for the installation location, and choosing the device's water level gauge algorithm or manual input for the water level data source. Clicking the "Save," "Save and Next," or "Previous" buttons at the bottom of the interface allows for corresponding operations. Clicking the navigation buttons at the top of the interface—"Detection Mode," "Water Level Gauge Calibration," "Flow Measurement Area Configuration," or "Rule Settings"—allows switching to the corresponding interface. The equipment installation elevation is the altitude of the equipment installation location (referring to the PTZ camera lens); the riverbank distance is the horizontal distance from the equipment to the starting point of the river channel; positive distance indicates installation on the bank, and negative distance indicates installation on the water.

[0083] As one embodiment of this application, during the alarm cycle, the camera's movement states sequentially include: first moving to an idle stopping point, then moving to a water level monitoring point, and then sequentially moving to multiple flow velocity preset points; or, first moving to a water level monitoring point, then sequentially moving to multiple flow velocity preset points, and then moving to an idle stopping point.

[0084] Within each alarm cycle, the camera moves to an idle stop point, a water level monitoring point, and multiple preset flow velocity points in a time-sharing manner. The order in which the camera moves to these three different monitoring points is not limited. In one embodiment, the camera may first move to an idle stop point, then to a water level monitoring point, and then sequentially to multiple preset flow velocity points. In this case, the working time of the camera at the idle stop point, the water level monitoring point, and each preset flow velocity point can be preset to ensure that the camera can accurately complete monitoring at different monitoring points in each alarm cycle.

[0085] In another implementation, the camera can first move to the water level monitoring point, then sequentially move to multiple preset flow velocity points, and finally move to an idle stop point. In this case, the working time of the camera at the water level monitoring point and each preset flow velocity point can be preset. After the camera monitors the water level monitoring point and each preset flow velocity point, it starts timing and moves to the idle stop point to monitor the flow velocity until the end of the current alarm cycle, at which point it enters the monitoring of the next alarm cycle.

[0086] In this embodiment of the application, regardless of which of the above implementation methods is adopted, the camera can move to different monitoring points in time during each alarm cycle, so as to realize the monitoring of water level and flow rate through a single camera.

[0087] In one embodiment of this application, the working time of the camera at an idle stop point is determined by a function calculation between the camera's alarm cycle, the working time at the water level monitoring point, and the working time at multiple preset flow velocity points. Specifically, the working time of the camera at each monitoring point includes the time it takes for the camera to acquire images after moving to that monitoring point and the time it takes to move from that monitoring point to the next monitoring point.

[0088] Within each alarm cycle, it is necessary to monitor the water level and the flow velocity at multiple preset points. Therefore, we can first determine the working time of the camera at the water level monitoring point and the working time at multiple flow velocity preset points. Then, based on the functional relationship between the two and the duration of the alarm cycle, we can determine the working time of the camera at the idle dwell point.

[0089] The working time of the camera at the water level monitoring point can be determined by the time required to capture water level monitoring images, the time required to calculate water level information based on the water level monitoring images, and the time required to move from the water level monitoring point to the next monitoring point. The working time at the water level monitoring point should not be less than the sum of the three times.

[0090] The working time of the camera at each flow velocity preset point can be determined by the time required to capture the flow velocity monitoring image, the time required to calculate the flow velocity based on the flow velocity monitoring image, and the time required to move from that flow velocity monitoring point to the next monitoring point. The working time at the flow velocity monitoring point should not be less than the sum of the three times.

[0091] In one implementation, the working time of the camera at the water level monitoring point is a preset first duration, and the working time at each flow velocity preset point is a preset second duration. Then, within the alarm cycle, the working time of the camera at the idle dwell point is determined by subtracting the first duration and the second duration from the alarm cycle and the product of the number of multiple flow velocity preset points.

[0092] For example, if the alarm cycle is 10 minutes, the camera's first duration at the water level monitoring point is 2 minutes, the camera's second duration at each flow velocity preset point is 1 minute, and the number of flow velocity preset points is 5, then the camera's working time at the idle dwell point is: 10 - 2 - 1 × 5 = 3 minutes.

[0093] For example, based on Figure 4 ,like Figure 5 The diagram shows the configuration interface for the flow measurement area of ​​the velocity preset points. The detection mode can be set to either a round-robin mode or a fixed scene. It is suitable for river scenarios. In the round-robin mode, the regional flow velocity of each velocity preset point is detected in a round-robin fashion within each alarm cycle, generating the average flow velocity of the cross-section. Detection points must be set first, followed by other parameters. Clicking the settings button in the detection point setting area allows you to set each velocity preset point according to the flow preset point diagram below. The residence time input box for each velocity preset point allows you to enter the residence time of each velocity preset point during the round-robin process, which is the working duration of each velocity preset point. For example, it can be 60 seconds. The round-robin mode detects the regional flow velocity of each monitoring point in a round-robin fashion, generating the average flow velocity of the cross-section, and is suitable for river scenarios. Detection point settings allow you to set detection points 1 to n, and set the starting detection point, the detection point spacing, and the ending detection point.

[0094] The total patrol time is determined by the number of detection points and the dwell time at each point. Assuming there are 4 preset flow velocity points, the total patrol time for flow velocity monitoring is 60 × 4 = 240 seconds. If the alarm cycle is 500 seconds, and the camera's initial dwell time at the water level monitoring point is 120 seconds, then the working time at the idle dwell point is 500 - 120 - 240 = 140 seconds.

[0095] exist Figure 5The interface shown allows configuration of non-cycle stopping points, i.e., idle stopping points. For example, it can be the starting detection point among multiple flow velocity preset points, which is the first flow velocity preset point for flow velocity cycle monitoring. Alternatively, it can be any one of multiple flow velocity preset points; no specific limitation is made here. The flow velocity direction can also be set. For example, the flow velocity direction can be set by adjusting the arrows on the screen using a drawing method, ensuring the arrow style aligns with the water flow direction. Clicking the "Save," "Save and Next," or "Previous" buttons at the bottom of the interface allows you to perform the corresponding operations. Clicking the navigation buttons at the top of the interface—Detection Mode, Basic Configuration, Water Specimen Calibration, or Rule Settings—allows you to switch to the corresponding interface.

[0096] In this embodiment, the electronic device can determine the working time of the camera at the idle dwell point based on the alarm cycle, the working time at the water level monitoring point, and the working time at multiple flow velocity preset points. This ensures that the camera can work stably according to the configured working time in each alarm cycle, monitor the water level information and flow velocity of the river, and continue to work in each alarm cycle. It can also perform stable flow velocity monitoring at the idle dwell point and continuously output monitoring results.

[0097] In one embodiment of this application, multiple flow velocity preset points are constructed such that each flow velocity preset point corresponds to different PT coordinates of the camera, wherein the multiple flow velocity preset points have the same P coordinate. That is, the P coordinate of the camera corresponding to each flow velocity preset point can be the same, but the T coordinates can be different.

[0098] In this implementation, based on Figure 3(a), when the camera moves to preset points with different flow velocities, the horizontal rotation angle can be the same, but the vertical rotation angle can be different. For example... Figure 6 As shown, for example, the flow velocity preset points include the starting flow velocity preset point, intermediate flow velocity preset points 1-4 and the ending flow velocity preset point. The P coordinates of these 6 flow velocity preset points are the same, but the T coordinates are different. Therefore, the shooting positions corresponding to these 6 flow velocity preset points on the river surface are the starting preset position, intermediate preset positions 1-4 and the ending preset position, respectively.

[0099] The camera's T-coordinates are different for the starting preset position, intermediate preset positions 1-4, and ending preset position, so the corresponding vertical rotation angle α is different. Therefore, the starting preset position, intermediate preset positions 1-4, and ending preset position are different river surface positions arranged along the width of the river.

[0100] In one implementation, such as Figure 7 As shown, the above configuration of multiple flow rate preset points can include:

[0101] S701, based on the river width, configure the starting velocity preset point and the ending velocity preset point;

[0102] S702, based on the initial flow velocity preset point, the final flow velocity preset point and the preset preset point spacing, determine at least one intermediate flow velocity preset point.

[0103] During the configuration of flow velocity preset points, the electronic device can configure a starting flow velocity preset point and a ending flow velocity preset point. Specifically, the electronic device can acquire and record the starting and ending flow velocity preset points manually calibrated by the user based on the river width. In order to comprehensively monitor the river flow velocity and obtain accurate flow velocity data, the starting and ending flow velocity preset points can be set within the range that the camera can capture, so that the range between the starting and ending preset points covers as much of the river width as possible.

[0104] Furthermore, the electronic device can determine the PTZ coordinates of the camera corresponding to the intermediate flow velocity preset point based on the PTZ coordinates of the cameras corresponding to the initial flow velocity preset point and the final flow velocity preset point, as well as the preset point spacing, i.e., the point step size, and complete the configuration of the flow velocity preset point.

[0105] Based on the mapping relationship between the PTZ coordinates of the calibrated cameras and the actual shooting range, the electronic equipment can determine the actual quadrilateral flow measurement area captured by the camera for each flow velocity preset point, as well as the true distance between the lower edge of the captured flow velocity monitoring image and the camera. The electronic equipment can record this information, thus determining the actual shooting area range and location corresponding to each flow velocity preset point, and completing the calibration of the correspondence between the PTZ coordinates of the flow velocity preset point and the actual area location.

[0106] In this embodiment, the electronic device can configure a starting velocity preset point and an ending velocity preset point based on the river width. Based on the starting velocity preset point, the ending velocity preset point, and the preset point spacing, at least one intermediate velocity preset point is determined. Each velocity preset point corresponds to a different PT coordinate of the camera, and multiple velocity preset points have the same P coordinate. This method allows for the configuration of multiple velocity preset points, enabling the camera to capture velocity monitoring images at multiple different locations along the river's width direction after moving to these points. This allows for the calculation of the velocity at multiple different locations along the river's width direction, providing comprehensive and accurate monitoring of the river's flow velocity.

[0107] As one embodiment of this application, the above method may further include:

[0108] Obtain the water level calibration image captured by the camera at the water level monitoring point.

[0109] To accurately calculate river water level information, water level calibration can be performed beforehand. Electronic equipment can acquire water level calibration images captured by cameras at water level monitoring points. Each water level calibration image includes at least two water level calibration points, which together form a virtual water level gauge. These calibration points are used to construct a first mapping function. After the camera acquires the water level monitoring images at the monitoring points, the first mapping function is used to generate the river's physical water level information, i.e., the river's actual water level value.

[0110] In one implementation, such as Figure 8 As shown in the embodiments of this application, a water level monitoring method based on a virtual water gauge may include:

[0111] S801, acquire the water level calibration image captured by the camera at the water level monitoring point;

[0112] Electronic equipment can control a camera to move to a water level monitoring point, and the camera will capture images to obtain a water level calibration image. This water level calibration image is generally obtained by taking a picture of the opposite bank of the river, and the position of the river surface can be seen in the water level calibration image.

[0113] S802, perform digital scale detection on the water level calibration image, determine the water level calibration point, and obtain a virtual water gauge;

[0114] After acquiring the water level calibration image, the electronic device can perform digital scale detection on the water level calibration image to determine the water level calibration point. Specifically, the electronic device can determine the correspondence between the digital scale distance in the image and the water level height of the river in the actual scene based on the pre-calibrated mapping relationship between the camera PTZ coordinates and the actual shooting range position, which is the first mapping function mentioned above, and then calibrate the water level calibration point, which constitutes a virtual water gauge.

[0115] based on Figure 4 ,like Figure 9 The water level calibration interface shown displays a water level calibration image on the right, including calibration points 1 and 2 (#1 and #2 in the image). The drawn scene areas must overlap, but the overlap cannot be too large. Detection line #1 represents the highest scale, and #2 represents the lowest scale. A maximum of 20 detection scenes can be configured. The water level calibration image also displays the scene and water level, including high and low water level warning values. The flow velocity monitoring image can include time and velocity information, such as a time of 00:01:40, and the velocity can be adjusted.

[0116] The electronic device can determine the actual water level value of one of the water level calibration points 1 and 2 based on the pre-defined mapping relationship between the camera's PTZ coordinates and the actual shooting range location. For example... Figure 9The calibration line scale value (in meters) displayed in the input box of the scale line configuration is as follows: the water level value corresponding to water level calibration point 1 is 0.300 meters, the water level value corresponding to water level calibration point 2 is 0.200 meters, the #1 detection line is the highest water level that can be identified in the current scene, and the detection lines decrease sequentially.

[0117] The water level calibration interface allows users to set information such as water level correction value, water level baseline value, sensitivity, and illumination influence. It also displays a list of virtual water level scenarios, allowing users to add and insert scenarios, and select the current detection scenario from scenario 1 (highest water level scenario) to scenario 4 displayed in the list. This setting method will be introduced later. Clicking the save, save and next, or previous button at the bottom of the interface allows for corresponding operations. The water level (real-time value + water level baseline value + water level correction value) ranges from -999.999 to 9999.999.

[0118] S803, acquire water level monitoring images captured by the camera at the water level monitoring point during the alarm cycle;

[0119] S804, reposition the water gauge in the water level monitoring image and segment the water surface of the water gauge;

[0120] During each alarm cycle, when monitoring the water level, the camera moves to the monitoring point and captures an image of the river, i.e., the water level monitoring image. Because the camera may experience some interference when capturing the image, the water level monitoring image and the water level calibration image may not be perfectly aligned. To obtain accurate water level information, the water level gauge in the monitoring image can be repositioned to determine the precise location of the virtual water level gauge within the monitoring image.

[0121] This allows for water surface segmentation of the water level monitoring image. In one implementation, an intelligent detection model can be used for water surface segmentation to determine the water surface location in the monitoring image. Large models can be used for water surface segmentation; these are intelligent detection models with more complex structures and parameters. Compared to smaller models with simpler structures and fewer parameters, large models provide more accurate detection results. Large models also segment the water surface continuously and evenly, leading to more accurate water level identification. Small models tend to segment the water surface fragmentarily, resulting in poor accuracy in water level identification.

[0122] S805 calculates the current river water level information.

[0123] After locating the water gauge and segmenting the water surface, the current river water level information can be calculated based on the first mapping function and the water gauge scale corresponding to the water surface in the water level monitoring image. Of course, to improve the accuracy of the water level information, water surface area correction and other processing can also be performed, which are not specifically limited here.

[0124] For example, the first mapping function represents that each division of the virtual water gauge corresponds to an actual water level of 0.01 meters, such as... Figure 9 The water level calibration point 1 and water level calibration point 2 shown have 10 graduations. The water surface is currently detected to be at the 4th graduation above water level calibration point 2. Therefore, the current water level of the river can be determined to be 0.24 meters.

[0125] In this embodiment of the application, the electronic device can determine the water level information corresponding to the water level monitoring image based on the pre-calibrated water level calibration point and the first mapping function, and can obtain accurate river water level information in each alarm cycle.

[0126] As one embodiment of this application, the water level calibration image may include four water level calibration points, of which two water level calibration points are used to construct a first mapping function associated with a first water level depth interval, and the other two water level calibration points are used to construct a second mapping function associated with a second water level depth interval, wherein the first water level depth interval and the second water level depth interval partially overlap.

[0127] In this embodiment of the application, water level monitoring can be configured with multiple scenarios, each scenario corresponding to a water level depth range. There is partial overlap between adjacent water level depth ranges corresponding to different scenarios, so as to ensure that during water level monitoring, it can stably transition from one water level depth range to another.

[0128] Taking two scenarios of water level monitoring as an example, the above water level calibration image includes at least 4 water level calibration points. Two of these water level calibration points are used to construct a first mapping function associated with the first water level depth interval, and the other two water level calibration points are used to construct a second mapping function associated with the second water level depth interval. The specific method has been described in detail in the previous embodiment and will not be repeated here.

[0129] For example, such as Figure 10 The diagram showing the multi-scene configuration interface illustrates the configuration of a single scene's virtual water level gauge on the left. It's evident that a single scene's virtual water level gauge can include two water level calibration points. The diagram on the right shows partial overlap between adjacent water level depth intervals in multi-scene configurations. Specifically, the overlap between the water level depth intervals corresponding to Scene 1 and Scene 2 is greater than or equal to 0.2 meters, and the overlap between the water level depth intervals corresponding to Scene 2 and Scene 3 is also greater than or equal to 0.2 meters. Of course, Figure 10 The three scenarios shown are just examples; more water level monitoring scenarios can be configured, and the specific configuration method is the same.

[0130] The right-hand interface displays the detection area, correction matching area, and calibration auxiliary lines, as well as the highest and lowest water levels. The text displayed at the bottom of the interface provides prompts for scene settings, including: 1. Single Scene: Adjust the blue detection area (area 1001) and ensure the yellow calibration lines (calibration lines #1 and #2) are within the detection area; the detection range for a single scene is 5m; adjust the green box (area 1002) to ensure there are clear background features within the scene; 2. Multiple Scenes: When configuring multiple scenes, the overlap between scenes should be ≥0.2m. Clicking the close button will close the current multi-scene configuration interface.

[0131] In this embodiment, multiple water level monitoring scenarios are supported, each corresponding to a water level depth range. This allows for water level monitoring of rivers with significant water level fluctuations, such as those experiencing large changes during high and low tides. Furthermore, there is partial overlap between adjacent water level depth ranges corresponding to different scenarios, ensuring a stable transition from one water level depth range to another during monitoring and guaranteeing accurate water level monitoring results.

[0132] As one embodiment of this application, the process of controlling the camera to move to the water level monitoring point may include:

[0133] When the water level at the water level monitoring point is detected to be in the overlapping part of the first water level depth range and the second water level depth range, the camera is automatically controlled to switch between generating the water level information based on the first mapping function and generating the water level information based on the second mapping function.

[0134] During the camera's movement to the water level monitoring point, if the water level at the monitoring point is detected to be in the overlapping part of the first and second water level depth intervals, it indicates that the current water level is at the edge of the first and second water level depth intervals. In order to ensure accurate detection of river water level information, when calculating water level information, the camera can be controlled to switch between generating water level information based on the first mapping function and generating water level information based on the second mapping function, depending on the actual situation.

[0135] As one implementation, when the upper limit of the first water level depth range is higher than the upper limit of the second water level depth range, if the water level at the monitoring point is detected to be within the first water level depth range and the difference between it and the lower limit of the first water level depth range is not greater than a first threshold, the generation of the water level information based on the first mapping function is switched to the generation of the water level information based on the second mapping function; or, if the water level at the monitoring point is detected to be within the second water level depth range and the difference between it and the upper limit of the second water level depth range is not less than a second threshold, the generation of the water level information based on the second mapping function is switched to the generation of the water level information based on the first mapping function.

[0136] The upper limit of the first water level depth range is higher than the upper limit of the second water level depth range. Since the first and second water level depth ranges partially overlap, the lower limit of the first range is lower than the upper limit of the second range. For example, the first water level depth range is 1 meter to 0.5 meters, and the second water level depth range is 0.7 meters to 0.2 meters.

[0137] If the water level at the monitoring point is detected to be in the first water level depth range and the difference between it and the lower limit of the first water level depth range is not greater than the first threshold, it indicates that the current water level is very close to the lower limit of the first water level depth range and has entered the second water level depth range. The current water level has a downward trend. In order to ensure accurate determination of water level information and facilitate determination of water level information in subsequent alarm cycles, the camera can be controlled to switch from generating water level information based on the first mapping function to generating water level information based on the second mapping function.

[0138] The first threshold can be a relatively small value, ensuring that the water level is within the first water level depth range and the difference between the water level and the lower limit of the first water level depth range is not greater than the first threshold, while the water level is in the overlapping part between the first and second water level depth ranges. For example, if the first water level depth range is 1 meter - 0.5 meters, the second water level depth range is 0.7 meters - 0.2 meters, and the overlapping part is 0.2 meters, then the first threshold should be less than 0.2 meters, for example, it can be 0.05 meters, 0.03 meters, 0.06 meters, etc.

[0139] If the water level at the monitoring point is detected to be in the second water level depth range and the difference between it and the upper limit of the second water level depth range is not less than the second threshold, it indicates that the current water level is very close to the upper limit of the second water level depth range and has entered the first water level depth range. The current water level has an upward trend. In order to ensure accurate determination of water level information and facilitate determination of water level information in subsequent alarm cycles, the camera can be controlled to switch from generating water level information based on the second mapping function to generating water level information based on the first mapping function.

[0140] The second threshold can be a small value, ensuring that the water level is within the second water level depth range and the difference between the second water level depth range and its upper limit is not greater than the second threshold, while the water level is in the overlapping portion between the first and second water level depth ranges. For example, if the first water level depth range is 1 meter - 0.5 meters, the second water level depth range is 0.7 meters - 0.2 meters, and the overlapping portion is 0.2 meters, then the second threshold should be less than 0.2 meters, for example, it could be 0.05 meters, 0.03 meters, 0.06 meters, etc.

[0141] In this embodiment, the electronic device can control the camera to switch from generating water level information based on a first mapping function to generating water level information based on a second mapping function, or vice versa, based on actual water level monitoring. This enables switching between high-water-level and low-water-level scenarios, and accurately determining the river's water level information based on the corresponding mapping function in both scenarios.

[0142] As one embodiment of this application, during the alarm period, the flow rate output by the camera is determined based on the product of the cross-sectional area of ​​the river and the monitored flow velocity of the river. The cross-sectional area of ​​the river is determined by the water level information of the river output by the camera during the alarm period.

[0143] The solution provided in this application embodiment can also monitor river flow. Within each alarm cycle, the river flow is the product of the river channel's cross-sectional area and the monitored river velocity. The river channel's cross-sectional area can be determined by the river's water level information output by the camera within that alarm cycle.

[0144] Specifically, the cross-sectional area of ​​the river channel is calculated from the river's water level information output by the camera during the alarm period, along with the predetermined base length and cross-sectional shape of the river channel. For example, if the cross-sectional shape is rectangular, then the cross-sectional area of ​​the river channel is the product of the river's water level output by the camera during the alarm period and the base length of the river channel.

[0145] In one implementation, relevant information for traffic monitoring can be configured based on... Figure 4 The configuration interface can be like Figure 11As shown, the left side of the interface allows users to enable or disable the flow monitoring function, and configure cross-sectional information, including cross-sectional type and bottom edge length. Users can also set the river velocity used for flow calculation, specifically selecting the coefficient used for velocity conversion in the coefficient mode. Options include an average coefficient (the same conversion coefficient for each velocity preset point) or a measurement point coefficient (different conversion coefficients can be set for different velocity preset points). Configuration options include the vertical average velocity coefficient, riverbed baseline value, and other settings, as well as calculating the initial cumulative flow value. Cross-sectional types include trapezoidal, rectangular, and irregular shapes.

[0146] The right side of the interface displays the monitoring images captured by the camera, which can be water level monitoring images or flow velocity monitoring images. In the lower left area of ​​the interface, you can also set the content to be overlaid on the monitoring images, namely OSD (On-Screen Display) overlay content, which can include: displaying water level information, instantaneous flow rate, cumulative flow rate, surface flow velocity, cross-sectional flow velocity, water flow area, and regional flow velocity, etc. Save the settings after configuration.

[0147] In this embodiment of the application, within each alarm cycle, the camera can not only monitor the water level and flow velocity of the river, but also calculate the river's flow rate based on the water level and flow velocity monitored within the alarm cycle, thus obtaining more comprehensive river monitoring information.

[0148] As one embodiment of this application, the camera performing flow rate monitoring may include:

[0149] The camera calculates the flow rate of the river using either a first intelligent algorithm model or a second intelligent algorithm model.

[0150] The first intelligent algorithm model is used for scenarios without floating objects, and the second intelligent algorithm model is used for scenarios with floating objects. The first intelligent algorithm model and the second intelligent algorithm model are different algorithm models or the same algorithm model with different parameter configurations.

[0151] When calculating the river's flow velocity, the camera can use either a first intelligent algorithm model or a second intelligent algorithm model. Since the flow velocity calculation method differs between scenes with and without floating objects, different intelligent algorithm models can be pre-trained for calculating river flow velocity in different scenarios. Therefore, the first and second intelligent algorithm models can be different algorithm models, or they can be the same algorithm model with different parameter configurations.

[0152] There are many ways to calculate river flow velocity based on flow velocity monitoring images captured by cameras. For example, it can include at least one of the following methods:

[0153] The first method is optical flow, which calculates horizontal and / or vertical velocity components by analyzing pixel displacements between continuous velocity monitoring images. This can be used to calculate velocities in laminar and turbulent flow scenarios. The second method is floating object tracking, which identifies the coordinates of floating objects in velocity monitoring images using a target detection network, then calculates the average velocity and derives the water flow velocity. The third method is the lead-line method, which overlays pre-defined leads into velocity monitoring images and calculates the velocity by analyzing the flow time of the lead-line intersection trajectories. This can be used for structured flow analysis. The fourth method is deep learning, which uses deep learning models such as convolutional neural networks to directly learn the velocity distribution from image features, and can be used for velocity estimation under complex flow conditions. The fifth method is spatiotemporal image analysis, which synthesizes the main texture direction of a spatiotemporal image from velocity monitoring images and combines it with cross-sectional data to calculate a one-dimensional time-averaged velocity, which can be used for cross-sectional flow monitoring.

[0154] For optical flow methods, such as Figure 12 As shown, the following steps may be included:

[0155] S1201, acquire flow rate monitoring images continuously captured by the camera;

[0156] After moving to each flow velocity monitoring point, the camera can continuously capture multiple flow velocity monitoring images;

[0157] S1202, identify feature points in each flow rate monitoring image;

[0158] S1203, Match feature points in each flow velocity monitoring image to obtain feature point matching results;

[0159] After acquiring multiple flow velocity monitoring images, image feature point detection methods from related technologies can be used to identify feature points in each flow velocity monitoring image. These feature points are then matched to obtain the feature point matching results. Matched feature points indicate that their corresponding target points in the actual scene are the same.

[0160] S1204. Based on the feature point matching results, determine the pixel displacements corresponding to multiple flow velocity monitoring images, and determine the river flow velocity based on the pixel displacements, the shooting duration of multiple flow velocity monitoring images, and the mapping relationship between the pre-calibrated image distance and the actual distance.

[0161] After determining the feature point matching results, the pixel displacements corresponding to multiple flow velocity monitoring images can be determined based on the pixel coordinates of the matched feature points in the flow velocity monitoring images. Furthermore, based on the pixel displacements and the pre-calibrated mapping relationship between image distance and actual distance, the actual displacement of the target point in the actual scene corresponding to the feature points can be determined. Since the shooting duration of multiple flow velocity monitoring images is known, the river's flow velocity, i.e., the ratio of actual displacement to shooting duration, can also be calculated.

[0162] In one implementation, after calculating the flow velocity corresponding to each preset flow velocity point, the multiple flow velocities can be averaged to obtain the final flow velocity value, which is then used as the flow velocity of the river corresponding to the current alarm period. This method obtains the flow velocity determined based on multiple monitoring points, further improving the accuracy of the flow velocity measurement.

[0163] Corresponding to the above-described method for periodically monitoring rivers, this application also provides a camera, which will be described below.

[0164] like Figure 13 As shown, a camera includes a processor, which comprises a first configuration unit 1310, a second configuration unit 1320, a third configuration unit 1330, a control unit 1340, and an output unit 1350, wherein:

[0165] The first configuration unit 1310 is configured to: configure water level monitoring points;

[0166] The second configuration unit 1320 is configured to: configure multiple flow velocity preset points, wherein the camera shooting positions corresponding to the flow velocity preset points are different positions along the width direction of the river;

[0167] The third configuration unit 1330 is configured to select one preset point from the plurality of flow rate preset points and configure it as an idle dwell point;

[0168] The camera has different PT coordinates at the water level monitoring point and the multiple flow velocity preset points;

[0169] The control unit 1340 is configured to: in response to a preset alarm cycle of the camera, control the camera in a time-division manner to: move to the idle stopping point to perform flow rate monitoring; move to the water level monitoring point to perform water level monitoring; and sequentially move to the plurality of preset flow rate points to perform flow rate monitoring;

[0170] The output unit 1350 is configured to output an alarm message when a water level alarm event or a flow rate alarm event is detected.

[0171] The solution provided in this application embodiment allows the camera to be configured with a water level monitoring point and multiple flow velocity preset points. The camera's shooting position corresponding to the multiple flow velocity preset points is at different locations along the width of the river. One of the flow velocity preset points is selected and configured as an idle dwell point. The camera has different PT coordinates at the water level monitoring point and the multiple flow velocity preset points. Furthermore, in response to the camera's preset alarm cycle, the camera is controlled in a time-division manner: moving to an idle dwell point to perform flow velocity monitoring; moving to a water level monitoring point to perform water level monitoring; and sequentially moving to at least one flow velocity preset point to perform flow velocity monitoring. When a water level alarm event or a flow velocity alarm event is detected, an alarm message is output. In this way, by configuring the camera's water level monitoring point, multiple flow velocity preset points, and idle monitoring points, the camera can be controlled in a time-division manner to move to different monitoring points within each alarm cycle to monitor the river's water level and flow velocity. This achieves the goal of monitoring the river's water level and flow velocity with a single camera, and can output alarm messages when the water level or flow velocity is abnormal. Only one camera needs to be installed, greatly reducing the complexity and difficulty of equipment deployment and the cost of water conservancy monitoring equipment.

[0172] As one embodiment of this application, during the alarm cycle, the camera's movement state sequentially includes: first moving to the idle stopping point, then moving to the water level monitoring point, and then sequentially moving to the plurality of flow velocity preset points; or,

[0173] First, it moves to the water level monitoring point, then sequentially moves to the multiple flow velocity preset points, and finally moves to the idle dwell point.

[0174] As one embodiment of this application, the working time of the camera at the idle dwell point is determined by a function calculation between the camera's alarm cycle, the working time at the water level monitoring point, and the working time at the plurality of flow velocity preset points.

[0175] As one embodiment of this application, the working time of the camera at the water level monitoring point is a preset first time, and the working time at each of the flow velocity preset points is a preset second time; then, within the alarm cycle, the working time of the camera at the idle dwell point is determined by subtracting the first time and the second time from the alarm cycle and the product of the number of the plurality of flow velocity preset points.

[0176] As one embodiment of this application, the plurality of flow velocity preset points are constructed such that each of the flow velocity preset points corresponds to a different PT coordinate of the camera, wherein the plurality of flow velocity preset points have the same P coordinate.

[0177] As one embodiment of this application, the control unit 1340 is configured as follows:

[0178] It can also acquire water level calibration images captured by the camera at the water level monitoring point, wherein the water level calibration image includes at least two water level calibration points, which are used to construct a first mapping function so that the water level monitoring image acquired by the camera at the water level monitoring point is processed by the first mapping function to generate the water level physical information of the river.

[0179] As one embodiment of this application, the water level calibration image includes four water level calibration points, wherein two of the water level calibration points are used to construct the first mapping function associated with the first water level depth interval, and the remaining two water level calibration points are used to construct the second mapping function associated with the second water level depth interval, wherein the first water level depth interval and the second water level depth interval partially overlap.

[0180] As one embodiment of this application, the control unit 1340 is configured as follows:

[0181] When the water level at the water level monitoring point is detected to be in the overlapping part of the first water level depth range and the second water level depth range, the camera is automatically controlled to switch between generating the water level information based on the first mapping function and generating the water level information based on the second mapping function.

[0182] As one embodiment of this application, the control unit 1340 is configured as follows:

[0183] If the water level at the monitoring point is detected to be within the first water level depth range and the difference between the water level at the monitoring point and the lower limit of the first water level depth range is not greater than a first threshold, the generation of the water level information based on the first mapping function is switched to the generation of the water level information based on the second mapping function; or,

[0184] If the water level at the water level monitoring point is detected to be within the second water level depth range and the difference between the water level at the monitoring point and the upper limit of the second water level depth range is not less than the second threshold, the water level information generated based on the second mapping function is switched to the water level information generated based on the first mapping function.

[0185] The upper limit of the first water level depth range is higher than the upper limit of the second water level depth range.

[0186] As one embodiment of this application, during the alarm period, the flow rate output by the camera is determined based on the product of the cross-sectional area of ​​the river channel and the monitored flow velocity of the river channel, and the cross-sectional area of ​​the river channel is determined by the water level information of the river output by the camera during the alarm period.

[0187] As one embodiment of this application, the control unit 1340 is configured as follows:

[0188] The flow velocity of the river is calculated using a first intelligent algorithm model or a second intelligent algorithm model. The first intelligent algorithm model is used for scenarios without floating objects, and the second intelligent algorithm model is used for scenarios with floating objects. The first intelligent algorithm model and the second intelligent algorithm model are different algorithm models or the same algorithm model with different parameter configurations.

[0189] As one embodiment of this application, the second configuration unit 1320 is configured as follows:

[0190] Based on the river width, configure the initial flow velocity preset point and the termination flow velocity preset point; based on the initial flow velocity preset point, the termination flow velocity preset point and the preset preset point spacing, determine at least one intermediate flow velocity preset point.

[0191] Corresponding to the above-described method for periodically monitoring rivers, embodiments of this application also provide an electronic device, such as... Figure 14 As shown, it includes:

[0192] Memory 1410 is used to store computer programs;

[0193] When the processor 1420 executes the program stored in the memory 1410, it implements the steps of any of the above-described method embodiments for periodically monitoring rivers.

[0194] The solution provided in this application embodiment allows the electronic device to be configured with a water level monitoring point and multiple flow velocity preset points. The camera shooting positions corresponding to the multiple flow velocity preset points are different locations along the width of the river. One of the flow velocity preset points is selected and configured as an idle dwell point. The camera has different PT coordinates at the water level monitoring point and the multiple flow velocity preset points. Furthermore, in response to the camera's preset alarm cycle, the camera is controlled in a time-division manner: moving to an idle dwell point to perform flow velocity monitoring; moving to a water level monitoring point to perform water level monitoring; and sequentially moving to at least one flow velocity preset point to perform flow velocity monitoring. When a water level alarm event or a flow velocity alarm event is detected, an alarm message is output. In this way, by configuring the camera's water level monitoring point, multiple flow velocity preset points, and idle monitoring points, the camera can be controlled in a time-division manner to move to different monitoring points within each alarm cycle to monitor the river's water level and flow velocity. This achieves the goal of monitoring the river's water level and flow velocity with a single camera, and can output alarm messages when the water level or flow velocity is abnormal. Only one camera needs to be installed, greatly reducing the complexity and difficulty of equipment deployment and the cost of water conservancy monitoring equipment.

[0195] The aforementioned electronic device may also include a communication bus and / or a communication interface, wherein the processor 1420, the communication interface, and the memory 1410 communicate with each other through the communication bus.

[0196] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.

[0197] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0198] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0199] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be 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, or discrete hardware components.

[0200] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the methods described above for periodically monitoring rivers.

[0201] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the methods for periodically monitoring rivers described in the above embodiments.

[0202] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a solid-state drive (SSD), etc.

[0203] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0204] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for cameras, electronic devices, computer-readable storage media, and computer program products are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0205] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A method for periodically monitoring rivers, comprising: Configure water level monitoring points and multiple flow velocity preset points, wherein the camera shooting positions corresponding to the multiple flow velocity preset points are different positions along the width direction of the river; Select one preset point from the plurality of flow velocity preset points and configure it as an idle dwell point; wherein the camera has different PT coordinates at the water level monitoring point and the plurality of flow velocity preset points; In response to the camera's preset alarm cycle, the camera is controlled in a time-division manner to: move to the idle stopping point to perform flow rate monitoring; move to the water level monitoring point to perform water level monitoring; and sequentially move to at least one of the preset flow rate points to perform flow rate monitoring; When a water level alarm event or a flow rate alarm event is detected, an alarm message is output.

2. The method according to claim 1, wherein, During the alarm cycle, the camera's movement sequentially includes: first moving to the idle stopping point, then moving to the water level monitoring point, and then sequentially moving to the plurality of preset flow velocity points; or, First, it moves to the water level monitoring point, then sequentially moves to the multiple flow velocity preset points, and finally moves to the idle dwell point.

3. The method according to claim 1, wherein, The operating duration of the camera at the idle dwell point is determined by a function calculation between the camera's alarm cycle, the operating duration at the water level monitoring point, and the operating duration at the multiple flow velocity preset points.

4. The method according to claim 1, wherein, The camera's working time at the water level monitoring point is a preset first duration, and its working time at each of the flow velocity preset points is a preset second duration; then, within the alarm cycle, the camera's working time at the idle dwell point is determined by subtracting the first duration and the second duration from the alarm cycle and multiplying by the number of the plurality of flow velocity preset points.

5. The method according to claim 1, wherein, The plurality of flow velocity preset points are constructed such that each of the flow velocity preset points corresponds to a different PT coordinate of the camera, wherein the plurality of flow velocity preset points have the same P coordinate.

6. The method according to claim 1, wherein, The method further includes: The camera captures a water level calibration image at the water level monitoring point, wherein the water level calibration image includes at least two water level calibration points, which are used to construct a first mapping function so that the water level monitoring image captured by the camera at the water level monitoring point is processed by the first mapping function to generate the water level physical information of the river.

7. The method according to claim 6, wherein, The water level calibration image includes four water level calibration points, two of which are used to construct the first mapping function associated with the first water level depth interval, and the other two water level calibration points are used to construct the second mapping function associated with the second water level depth interval, wherein the first water level depth interval and the second water level depth interval partially overlap.

8. The method according to claim 7, wherein, The process of controlling the camera to move to the water level monitoring point includes: When the water level at the water level monitoring point is detected to be in the overlapping part of the first water level depth range and the second water level depth range, the camera is automatically controlled to switch between generating the water level information based on the first mapping function and generating the water level information based on the second mapping function.

9. The method according to claim 8, wherein, The control of the camera to switch between generating the water level information based on the first mapping function and generating the water level information based on the second mapping function includes: If the water level at the monitoring point is detected to be within the first water level depth range and the difference between the water level at the monitoring point and the lower limit of the first water level depth range is not greater than a first threshold, the generation of the water level information based on the first mapping function is switched to the generation of the water level information based on the second mapping function; or, If the water level at the water level monitoring point is detected to be within the second water level depth range and the difference between the water level at the monitoring point and the upper limit of the second water level depth range is not less than the second threshold, the water level information generated based on the second mapping function is switched to the water level information generated based on the first mapping function. The upper limit of the first water level depth range is higher than the upper limit of the second water level depth range.

10. The method according to any one of claims 1-9, wherein, During the alarm period, the flow rate output by the camera is determined based on the product of the cross-sectional area of ​​the river channel and the monitored flow velocity of the river channel. The cross-sectional area of ​​the river channel is determined by the water level information of the river output by the camera during the alarm period.

11. The method according to any one of claims 1-9, wherein, The camera performs flow rate monitoring, including: The camera calculates the flow velocity of the river using a first intelligent algorithm model or a second intelligent algorithm model. The first intelligent algorithm model is used for scenarios without floating objects, and the second intelligent algorithm model is used for scenarios with floating objects. The first intelligent algorithm model and the second intelligent algorithm model are different algorithm models or the same algorithm model with different parameter configurations.

12. The method according to any one of claims 1-9, wherein, The configuration of multiple flow rate preset points includes: Based on the river width, configure the initial flow velocity preset point and the termination flow velocity preset point; Based on the initial velocity preset point, the final velocity preset point, and the preset preset point spacing, at least one intermediate velocity preset point is determined.

13. A camera, comprising a processor, the processor including a first configuration unit, a second configuration unit, a third configuration unit, a control unit, and an output unit, wherein: The first configuration unit is configured to: configure a water level monitoring point, acquire a water level calibration image captured by the camera at the water level monitoring point, the water level calibration image including 4 water level calibration points, wherein 2 of the water level calibration points are used to construct a first mapping function associated with a first water level depth interval, and the remaining 2 of the water level calibration points are used to construct a second mapping function associated with a second water level depth interval, wherein the first water level depth interval and the second water level depth interval partially overlap; The second configuration unit is configured to: configure multiple flow velocity preset points, wherein the camera shooting positions corresponding to the flow velocity preset points are different positions along the width direction of the river, and the multiple flow velocity preset points are configured such that: any one of the flow velocity preset points corresponds to different PT coordinates of the camera, and the multiple flow velocity preset points have the same P coordinate; The third configuration unit is configured to select one preset point from the plurality of flow velocity preset points and configure it as an idle dwell point; wherein the camera has different PT coordinates at the water level monitoring point and the plurality of flow velocity preset points; The control unit is configured to: in response to a preset alarm cycle of the camera, control the camera in a time-division manner to: move to the idle stopping point to perform flow rate monitoring; move to the water level monitoring point to perform water level monitoring; and sequentially move to the plurality of preset flow rate points to perform flow rate monitoring; The output unit is configured to output an alarm message when a water level alarm event or a flow rate alarm event is detected.

14. The camera according to claim 13, wherein, The control unit is configured to: when it is detected that the water level at the water level monitoring point is within the first water level depth range and the difference between the water level at the monitoring point and the lower limit of the first water level depth range is not greater than a first threshold, switch from generating the water level information based on the first mapping function to generating the water level information based on the second mapping function; or, when it is detected that the water level at the water level monitoring point is within the second water level depth range and the difference between the water level at the monitoring point and the upper limit of the second water level depth range is not less than a second threshold, switch from generating the water level information based on the second mapping function to generating the water level information based on the first mapping function. The upper limit of the first water level depth range is higher than the upper limit of the second water level depth range.

15. The camera according to claim 13, wherein, The camera's motion states sequentially include: first moving to the idle stopping point, then moving to the water level monitoring point, and then sequentially moving to the multiple flow velocity preset points; or, first moving to the water level monitoring point, then sequentially moving to the multiple flow velocity preset points, and then moving to the idle stopping point; The operating duration of the camera at the idle dwell point is determined by a function calculation between the camera's alarm cycle, the operating duration at the water level monitoring point, and the operating duration at the multiple flow velocity preset points.