Methods, devices, and software products for identifying river current velocity in tidal zones

CN122989788APending Publication Date: 2026-10-27CHINA TOWER CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611121712.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-27
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0005]本申请的主要目的在于提供一种用于河流潮汐区的流速识别方法、装置及程序产品,以解决相关技术中采用视频识别算法对河口潮汐区的水面流速进行识别,由于存在潮汐反转情况,导致水面流速的误判率高的问题

Benefits of technology

[0025]在本申请中,采用以下方式:获取目标河段的多个视频帧和当前潮位,其中,目标河段包括:河口潮汐区,当前潮位包括:基于目标河段的天文潮位和实测潮位确定的当前时刻的潮位;基于当前潮位,确定当前潮汐阶段,其中,当前潮汐阶段包括下述其中之一:涨潮阶段、落潮阶段、潮汐反转阶段;确定第一映射关系,其中,第一映射关系包括:视频帧中的像素与该像素在真实世界中的实际尺寸之间的比例关系;基于多个视频帧、当前潮汐阶段以及第一映射关系,对目标河段进行水面流速识别,得到目标流速识别结果,进而解决了相关技术中采用视频识别算法对河口潮汐区的水面流速进行识别,由于存在潮汐反转情况,导致水面流速的误判率高的技术问题。在本申请中,结合天文潮与实测潮位数据,基于潮汐阶段、特征点像素和实际尺寸的映射关系,识别河口潮汐区的表层流速,避免了相关技术中直接采用视频识别算法进行潮汐区水面流速识别,识别结果不准确的情况,从而实现了提高河口潮汐区水面流速识别结果的精准度的技术效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122989788A_ABST
    Figure CN122989788A_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, and program product for identifying flow velocity in river tidal zones. Relating to the field of hydrological monitoring, the method includes: acquiring multiple video frames and the current tidal level of a target river segment, wherein the target river segment includes a river estuary tidal zone; determining the current tidal stage based on the current tidal level, wherein the current tidal stage includes one of the following: high tide stage, low tide stage, or tidal reversal stage; determining a first mapping relationship, wherein the first mapping relationship includes the proportional relationship between a pixel in a video frame and the actual size of that pixel in the real world; and identifying the surface flow velocity of the target river segment based on multiple video frames, the current tidal stage, and the first mapping relationship to obtain the target flow velocity identification result. This application solves the problem in related technologies where video recognition algorithms are used to identify surface flow velocity in river estuary tidal zones, resulting in a high misjudgment rate due to tidal reversal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of hydrological monitoring, and more specifically, to a method, device, and program product for identifying flow velocity in river tidal zones. Background Technology

[0002] Currently, the commonly used flow velocity measurement methods in the field of hydrological monitoring mainly include contact observation technologies such as acoustic Doppler current profilers (ADCP), electromagnetic current meters, and buoy methods. However, these methods directly measure the velocity distribution or cross-sectional average flow velocity of water by deploying physical sensors in the river channel or estuary. But in tidal environments, the equipment requires frequent disassembly and maintenance, and is greatly affected by factors such as siltation, surge interference, and changes in equipment attitude. Long-term continuous monitoring is difficult, costly, and risky.

[0003] With the development of water conservancy informatization and video monitoring technology, non-contact flow velocity measurement methods have become a new research direction. These methods rely on video image data, using image processing and feature tracking algorithms to identify water surface movement characteristics and indirectly retrieve flow velocity information. However, they still have significant shortcomings in the tidal environment of estuaries. For example, during video recognition, firstly, the periodic changes in tidal levels alter the camera's imaging ratio, rendering the original calibration parameters ineffective and reducing the accuracy of the flow measurement results; secondly, the frequent switching of flow direction during tidal reversal phases makes the video recognition algorithm prone to directional jitter or misjudgment. Furthermore, most methods require manual intervention for periodic calibration or parameter correction, making unattended automatic recognition impossible and failing to meet the needs of continuous monitoring, real-time early warning, and digital supervision of estuaries.

[0004] There is currently no effective solution to the problem of high misjudgment rate of water surface velocity in estuarine tidal zones due to tidal reversal when using video recognition algorithms in related technologies. Summary of the Invention

[0005] The main objective of this application is to provide a method, device, and program product for identifying the flow velocity in river tidal zones, in order to solve the problem in related technologies where video recognition algorithms are used to identify the surface flow velocity in estuary tidal zones, resulting in a high misjudgment rate due to tidal reversal.

[0006] To achieve the above objectives, according to one aspect of this application, a method for identifying flow velocity in a river tidal zone is provided. The method includes: acquiring multiple video frames and the current tide level of a target river segment, wherein the target river segment includes a estuary tidal zone, and the current tide level includes the tide level at the current moment determined based on the astronomical tide level and the measured tide level of the target river segment; determining the current tidal stage based on the current tide level, wherein the current tidal stage includes one of the following: a rising tide stage, a falling tide stage, or a tidal reversal stage; determining a first mapping relationship, wherein the first mapping relationship includes the proportional relationship between a pixel in the video frame and the actual size of that pixel in the real world; and identifying the surface flow velocity of the target river segment based on the multiple video frames, the current tidal stage, and the first mapping relationship to obtain a target flow velocity identification result.

[0007] Further, based on multiple video frames, the current tidal phase, and the first mapping relationship, the surface flow velocity of the target river section is identified to obtain a target flow velocity identification result, including: determining a target water surface mask based on multiple video frames, and extracting feature points from the target water surface mask to obtain multiple feature points, wherein the target water surface mask is used to characterize the water surface region in the video frames; determining the flow velocity data and surface flow velocity direction associated with each feature point based on the first mapping relationship and the pixel data of each feature point, wherein the flow velocity data associated with each feature point includes: the surface flow velocity of that feature point; determining the confidence level of multiple surface flow velocities based on the current tidal phase and the surface flow velocity direction of each feature point, and determining the target flow velocity identification result based on the confidence level of multiple surface flow velocities and the surface flow velocity associated with each feature point.

[0008] Furthermore, the flow velocity data associated with each feature point also includes: the pixel velocity of the feature point, where the pixel velocity represents the movement speed of the corresponding pixel in the video frame. Based on the first mapping relationship and the pixel data of each feature point, determining the flow velocity data associated with each feature point and the direction of the water surface flow velocity includes: for adjacent video frames in the plurality of video frames, using a sparse optical flow strategy to determine the pixel displacement of each feature point and the time difference between adjacent video frames, wherein the pixel displacement of each feature point refers to the movement displacement of the pixel in the adjacent video frames; based on the first mapping relationship, converting the pixel displacement of each feature point to obtain the water surface displacement of each feature point, wherein the water surface displacement of each feature point refers to the actual displacement of the pixel displacement in the real world; based on the pixel displacement of each feature point and the time difference between adjacent video frames, determining the pixel velocity of each feature point; and based on the water surface displacement of each feature point and the time difference between adjacent video frames, determining the water surface flow velocity and the direction of the water surface flow velocity of the feature point.

[0009] Further, the first mapping relationship includes: a mapping relationship between pixels and actual size determined based on the target video frame, wherein the target video frame includes: a video frame in which the water surface and M reference objects can be seen simultaneously before the current time, wherein the reference objects include: objects that do not move with the water surface, and M is a positive integer; after determining the water surface velocity and direction of the feature point based on the water surface displacement of each feature point and the time difference between adjacent video frames, the method further includes: under the condition of satisfying a preset calibration triggering condition, detecting whether there are reference objects in the video frame at the current time that satisfy a preset quality condition, and obtaining a target detection result, wherein the preset calibration triggering condition is satisfied. The calibration triggering conditions include: a triggering condition for updating the first mapping relationship; when the target detection result indicates that there is a reference object in the video frame at the current time that meets the preset quality condition, calculating the mapping relationship between pixels and actual size in the video frame at the current time to obtain a second mapping relationship; storing the second mapping relationship, the current time, the current tide level, and the current tide stage in a calibration table, and marking the tide level interval to which the second mapping relationship applies in the calibration table based on the current tide level, wherein the calibration table is used to store the mapping relationship between pixels and actual size associated with different tide level intervals.

[0010] Further, determining the target flow velocity identification result based on the confidence levels of multiple water surface flow velocities and the water surface flow velocity associated with each feature point includes: when the confidence levels of multiple water surface flow velocities are at a first confidence level, determining the target flow velocity identification result based on the water surface flow velocities associated with multiple feature points; when the confidence levels of multiple water surface flow velocities are at a second confidence level, determining the target flow velocity identification result based on the water surface flow velocities associated with multiple feature points, and marking that the target river segment has local backflow or local non-uniform flow direction, wherein the confidence level of the second confidence level is lower than that of the first confidence level; when the confidence levels of multiple water surface flow velocities are at a third confidence level, performing time-domain compensation on the water surface flow velocity at the current moment to obtain the target flow velocity identification result, wherein the time-domain compensation includes: determining the target flow velocity identification result based on the water surface flow velocity identification result at a moment adjacent to the current moment, wherein the third confidence level is lower than that of the second confidence level.

[0011] Furthermore, when the confidence levels of multiple water surface flow velocities are the second confidence level or the third confidence level, and the preset calibration triggering condition is met, the method further includes: updating the water surface flow velocity of each feature point based on the second mapping relationship and the pixel velocity of each feature point to obtain the updated water surface flow velocity; and updating the target flow velocity identification result based on the updated water surface flow velocity.

[0012] Further, based on the current tidal phase and the direction of water surface velocity at each feature point, the confidence levels of multiple water surface velocities are determined, including: based on the current tidal phase, determining the main direction of the water surface velocity in the target river section to obtain the target velocity direction; detecting the consistency between each feature point and the target velocity direction to obtain a consistency detection result; based on the consistency detection result, determining the proportion of multiple feature points that are consistent with the target velocity direction to obtain a consistency ratio; and based on the consistency ratio, determining the confidence levels of multiple water surface velocities.

[0013] Further, feature points are extracted from the target water surface mask to obtain multiple feature points, including: extracting feature points from the target water surface mask using a corner detection strategy to obtain extraction results; if the number of extracted feature points indicated by the extraction results is less than a preset threshold, the feature points in the extraction results are supplemented to obtain multiple feature points.

[0014] To achieve the above objectives, according to another aspect of this application, a flow velocity identification device for a river tidal zone is provided. The device includes: an acquisition unit for acquiring multiple video frames of a target river segment and the current tide level, wherein the target river segment includes a river mouth tidal zone, and the current tide level includes the tide level at the current moment determined based on the astronomical tide level and the measured tide level of the target river segment; a first determination unit for determining the current tidal stage based on the current tide level, wherein the current tidal stage includes one of the following: a rising tide stage, a falling tide stage, or a tidal reversal stage; a second determination unit for determining a first mapping relationship, wherein the first mapping relationship includes the proportional relationship between a pixel in the video frame and the actual size of that pixel in the real world; and an identification unit for identifying the surface flow velocity of the target river segment based on the multiple video frames, the current tidal stage, and the first mapping relationship, to obtain a target flow velocity identification result.

[0015] Further, the identification unit includes: a processing subunit, configured to determine a target water surface mask based on multiple video frames, and extract feature points from the target water surface mask to obtain multiple feature points, wherein the target water surface mask is used to characterize the water surface region in the video frames; a first determining subunit, configured to determine the flow velocity data associated with each feature point and the water surface flow velocity direction based on the first mapping relationship and the pixel data of each feature point, wherein the flow velocity data associated with each feature point includes: the water surface flow velocity of the feature point; and a second determining subunit, configured to determine the confidence level of multiple water surface flow velocities based on the current tidal stage and the water surface flow velocity direction of each feature point, and determine the target flow velocity identification result based on the confidence level of multiple water surface flow velocities and the water surface flow velocity associated with each feature point.

[0016] Furthermore, the flow velocity data associated with each feature point also includes: the pixel velocity of the feature point, where the pixel velocity represents the movement speed of the corresponding pixel in the video frame. The first determining subunit includes: a first determining module, used to determine the pixel displacement of each feature point and the time difference between adjacent video frames in the plurality of video frames by adopting a sparse optical flow strategy, wherein the pixel displacement of each feature point refers to the movement displacement of the pixel in the adjacent video frames; a conversion module, used to convert the pixel displacement of each feature point based on the first mapping relationship to obtain the water surface displacement of each feature point, wherein the water surface displacement of each feature point refers to the actual displacement of the pixel displacement in the real world; a second determining module, used to determine the pixel velocity of each feature point based on the pixel displacement of each feature point and the time difference between the adjacent video frames; and a third determining module, used to determine the water surface flow velocity and the direction of the water surface flow velocity of the feature point based on the water surface displacement of each feature point and the time difference between the adjacent video frames.

[0017] Further, the first mapping relationship includes: a mapping relationship between pixels and actual size determined based on the target video frame, wherein the target video frame includes: a video frame in which the water surface and M reference objects can be seen simultaneously before the current time, wherein the reference objects include: objects that do not move with the water surface, and M is a positive integer. The first determining subunit further includes: a first detection module, used to determine the water surface velocity and direction of the feature point based on the water surface displacement of each feature point and the time difference between adjacent video frames, and then, under the condition of satisfying a preset calibration triggering condition, detect whether there are reference objects in the video frame at the current time that meet preset quality conditions, thereby obtaining a target detection result, wherein the... The preset calibration trigger conditions include: a trigger condition for updating the first mapping relationship; a calculation module, used to calculate the mapping relationship between pixels and actual size in the video frame at the current time when the target detection result indicates that there is a reference object in the video frame at the current time that meets the preset quality conditions, to obtain a second mapping relationship; a first processing module, used to store the second mapping relationship, the current time, the current tide level, and the current tidal stage into a calibration table, and mark the tide level interval to which the second mapping relationship applies in the calibration table based on the current tide level, wherein the calibration table is used to store the mapping relationship between pixels and actual size associated with different tide level intervals.

[0018] Further, the second determining subunit includes: a fourth determining module, used to determine a target flow velocity identification result based on the water surface flow velocities associated with multiple feature points when the confidence level of multiple water surface flow velocities is a first confidence level; a second processing module, used to determine a target flow velocity identification result based on the water surface flow velocities associated with multiple feature points when the confidence level of multiple water surface flow velocities is a second confidence level, and to mark the target river segment as having local backflow or local non-uniform flow direction, wherein the confidence level of the second confidence level is lower than the first confidence level; and a compensation module, used to perform time-domain compensation on the water surface flow velocity at the current moment when the confidence level of multiple water surface flow velocities is a third confidence level, to obtain the target flow velocity identification result, wherein the time-domain compensation includes: determining the target flow velocity identification result based on the water surface flow velocity identification result at a moment adjacent to the current moment, wherein the third confidence level is lower than the second confidence level.

[0019] Furthermore, the second determining subunit further includes: a first updating module, configured to update the water surface velocity of each feature point based on the second mapping relationship and the pixel velocity of each feature point, when the confidence levels of multiple water surface velocities are the second confidence level or the third confidence level, and the preset calibration triggering condition is met, to obtain the updated water surface velocity; and a second updating module, configured to update the target velocity identification result based on the updated water surface velocity.

[0020] Further, the second determining subunit includes: a fifth determining module, used to determine the main direction of the surface flow velocity of the target river section based on the current tidal stage, to obtain the target flow velocity direction; a second detection module, used to detect the consistency between each feature point and the target flow velocity direction, to obtain a consistency detection result; a sixth determining module, used to determine the proportion of multiple feature points that are consistent with the target flow velocity direction based on the consistency detection result, to obtain a consistency ratio; and a seventh determining module, used to determine the confidence level of multiple surface flow velocities based on the consistency ratio.

[0021] Furthermore, the processing subunit includes: an extraction module, used to extract feature points in the target water surface mask using a corner detection strategy to obtain an extraction result; and a supplementation module, used to supplement the feature points in the extraction result when the number of extracted feature points is less than a preset threshold, to obtain multiple feature points.

[0022] According to another aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is executed, it controls the device where the computer-readable storage medium is located to perform the described flow velocity identification method for river tidal zones.

[0023] According to another aspect of this application, an electronic device is provided, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the described method for identifying flow velocity in river tidal zones.

[0024] According to another aspect of this application, a computer program product is provided, including computer instructions that, when executed by a processor, implement the steps of the method for identifying flow velocity in a river tidal zone.

[0025] In this application, the following method is adopted: acquiring multiple video frames and the current tide level of the target river segment, wherein the target river segment includes the estuary tidal zone, and the current tide level includes the tide level at the current moment determined based on the astronomical tide level and the measured tide level of the target river segment; determining the current tidal stage based on the current tide level, wherein the current tidal stage includes one of the following: high tide stage, low tide stage, and tidal reversal stage; determining a first mapping relationship, wherein the first mapping relationship includes the proportional relationship between the pixels in the video frame and the actual size of the pixel in the real world; and identifying the water surface velocity of the target river segment based on multiple video frames, the current tidal stage, and the first mapping relationship to obtain the target flow velocity identification result, thereby solving the technical problem in related technologies where the use of video recognition algorithms to identify the water surface velocity in the estuary tidal zone results in a high misjudgment rate due to the existence of tidal reversal. In this application, by combining astronomical tide and measured tide level data, and based on the mapping relationship between tidal phase, feature point pixels and actual size, the surface flow velocity of the estuary tidal zone is identified. This avoids the inaccurate identification results caused by directly using video recognition algorithms to identify the surface flow velocity of the estuary tidal zone in related technologies, thereby achieving the technical effect of improving the accuracy of the surface flow velocity identification results of the estuary tidal zone. Attached Figure Description

[0026] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0027] Figure 1 A hardware block diagram of a computer terminal for implementing a method for identifying flow velocity in tidal zones of rivers is shown.

[0028] Figure 2This is a flowchart of a method for identifying flow velocity in a river tidal zone according to an embodiment of this application;

[0029] Figure 3 This is a schematic diagram of a flow velocity identification device for river tidal zones provided according to an embodiment of this application;

[0030] Figure 4 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0031] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0032] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0033] For ease of understanding, the main symbols involved in the various embodiments of the present invention are defined as follows:

[0034] t: Video frame timestamp (s); Δt: Time interval between two adjacent frames (s).

[0035] η(t): Current tide level (m). The measured tide level η_obs(t) is preferred. If the measured tide level is unavailable, the astronomical tide level η_astro(t) can be used.

[0036] η0: Tide level (m) corresponding to the initial calibration time.

[0037] η_astro(t): Astronomical tide forecast sequence; η_obs(t): Measured tide level sequence.

[0038] Δη1, Δη2: Thresholds (m) for tidal level changes as the water surface ROI expands upward and contracts downward. In the example, these thresholds can be 0.15m and 0.10m, respectively.

[0039] k1, k2: The number of pixel rows for ROI expansion / contraction, which can be 12 rows and 8 rows in the example.

[0040] N_min: Minimum number of feature points per frame, which can be set to 80 in the example.

[0041] V_max: Physical upper limit of surface flow velocity (m / s), which can be taken as 3.0m / s in the example.

[0042] θ1: The threshold angle (°) between the video direction and the mainstream direction. In this example, it can be 30°.

[0043] α1, α2: Consistent proportion stratification thresholds, which can be 0.7 and 0.3 in the example.

[0044] H_init: Initial homography matrix; H_new: Homography matrix to be recalculated; H_curr(t): Homography matrix currently in effect.

[0045] S: pixel → scale bar of real scale (m / pixel), in simple scenes S=L_real / L_pixel.

[0046] L_real: Actual length of the reference object (m); L_pixel: Pixel length of the same reference object in the current frame (pixel).

[0047] P: Consistency ratio (the proportion of feature point video flow direction that is consistent with the mainstream direction, 0~1).

[0048] Calib_k: The k-th version of the calibration parameter set, which records the applicable tidal range [η_min, k, η_max, k] and tidal phase (rise / fall).

[0049] h_thr: The threshold (m) for tidal level change that triggers geometric / proportional updates, which can be 5% to 10% of the design tidal range.

[0050] t_rev: The confirmed moment of tidal reversal.

[0051] flag_low: Low confidence level indicator.

[0052] It should be noted that the information collected in this application (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of this data all comply with relevant laws and standards, have taken necessary security measures, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse. For example, this system has interfaces with relevant users or organizations, providing users with corresponding operation entry points for users to choose to agree to or refuse automated decision results; if the user chooses to refuse, the process proceeds to the expert decision-making stage.

[0053] Example 1

[0054] According to an embodiment of this application, a method embodiment for identifying the flow velocity in a river tidal zone is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0055] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing a method for identifying flow velocity in river tidal zones is shown. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0056] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).

[0057] The memory 104 can be used to store software programs and modules for application software, such as the program instructions / data storage device corresponding to the flow velocity identification method for river tidal zones in this embodiment of the application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned flow velocity identification method for river tidal zones. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0058] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0059] The display can be, for example, a touchscreen liquid crystal display (LCD), which allows the user to interact with the user interface of the computer terminal 10 (or mobile device).

[0060] Under the aforementioned operating environment, this application provides the following: Figure 2 The method shown is for identifying flow velocity in the tidal zone of a river. Figure 2 This is a flowchart of a flow velocity identification method for river tidal zones according to Embodiment 1 of this application.

[0061] Step S201: Acquire multiple video frames and the current tide level of the target river segment. The target river segment includes the estuary tidal zone, and the current tide level includes the tide level at the current moment determined based on the astronomical tide level and the measured tide level of the target river segment.

[0062] The target river section mentioned above can be the tidal section of the estuary. In this embodiment, timestamped video frames can be acquired from a camera. This yields the aforementioned multiple video frames.

[0063] The aforementioned current tide level can include: the tide level at the current moment determined based on the astronomical tide level (η_astro(t)) and the measured tide level (η_obs(t)) of the target river segment. For example, if a measured tide level exists at the current moment, it can be determined as the current tide level η(t); if the measured tide level is missing at the current moment, the tide level at the current moment in the astronomical tide sequence can be determined as the current tide level η(t). In an optional example, Kalman filtering, weighted averaging, or Bayesian optimal estimation can also be used to fuse the astronomical and measured tide levels to obtain the aforementioned current tide level.

[0064] In an alternative embodiment, if there is a fixed deviation between the video frame time and the tide time... Then time alignment is performed: t = TV +Δ t This is to align the same video frame with the tide level at the same time in time.

[0065] Step S202: Based on the current tide level, determine the current tidal stage, wherein the current tidal stage includes one of the following: high tide stage, low tide stage, and tidal reversal stage.

[0066] In this embodiment, the tide level η(t-Δt) of the previous time step can be taken and a first-order difference can be performed:

[0067]

[0068] like It is determined to be the high tide period; if Determined to be the ebb tide period; if (e.g., 0.01m / 5min), (If the threshold is set to a preset threshold), it indicates that the tide is in the buffer period of reversal and is marked as "reversal transition segment".

[0069] Optionally, for video frames, the coordinates and elevation of the camera mounting point can also be recorded. Hc Pitch / azimuth angle, focal length fThe resolution is W×H. For gimbals or zoom cameras, the attitude parameters for each frame also need to be recorded for later geometric calculations. The applications of these parameters are as follows: ① Mounting point coordinates (X, Y) and elevation Z: These can be used as camera extrinsic parameters when solving the first mapping relationship H_init, defining the camera's position in the world coordinate system; ② Pitch / azimuth angles: These are used as rotation matrix parameters when constructing the homography matrix H, and also as initial values ​​when recalculating H_new; ③ Focal length f With resolution (W, H): used for initial value calculation of pixel scale and reused when recalculating mapping relationship; ④ Gimbal attitude parameters: when the gimbal or zoom moves (attitude change angle is greater than the threshold, such as 0.5°), the mapping relationship update process can be triggered (that is, in addition to tide level change trigger, gimbal attitude change is also one of the trigger conditions).

[0070] Step S203: Determine the first mapping relationship, wherein the first mapping relationship includes: the proportional relationship between a pixel in a video frame and the actual size of that pixel in the real world.

[0071] The first mapping relationship mentioned above can refer to the proportional relationship between a pixel in a video frame and the actual size of that pixel in the real world.

[0072] In one alternative example, reference points can be selected first. For example, objects that do not move with the water, such as the outer edge of the bridge, the lower edge of the guardrail, the water level gauge line, and the inflection point of the shoreline, can be designated as reference points, and a set of pixel coordinates can be saved. And a reference object ID, requiring "at least a certain number of points to be visible for it to be usable". Select one frame from multiple video frames where both the water surface and the reference object are visible simultaneously. Use camera parameters plus the actual size of the reference object to solve for the initial pixel-to-water surface plane mapping, denoted as: In this case, a simple scenario can be a scale. Complex scenarios involve homography matrices. When the tidal range widens, it is used as a comparison benchmark. The distinction between simple and complex scenes is based on the "uniformity of the imaging scale within the frame." For example: ① Simple scene – the camera is nearly directly overhead (tilt angle greater than 60°), the water area is close to the camera, and the difference in pixel scale between the far and near ends within the field of view is less than 5%; in this case, a single scale S=L_real / L_pixel is sufficient to meet the accuracy requirements. ② Complex scene – the camera is at an angle (tilt angle less than 60°), the water surface exhibits a clear trapezoidal perspective in the frame, and the difference in scale between the far and near ends within the field of view is greater than or equal to 5%; in this case, a 3×3 homography matrix H must be used to complete the full-frame mapping from pixel to water surface. In engineering implementation, the "5% difference in pixel scale between the far and near ends within the field of view" is used as the dividing line; when the difference is less than 5%, S is used; when the difference is greater than or equal to 5%, H is used.

[0073] In one alternative example, in addition to a single homography matrix H, a segmented scale (divided into several segments along the direction of water flow, each segment having an independent scale), a quadratic polynomial mapping, or a nonlinear mapping based on a neural network can be used to replace matrix H.

[0074] Step S204: Based on multiple video frames, the current tidal stage, and the first mapping relationship, the surface flow velocity of the target river section is identified to obtain the target flow velocity identification result.

[0075] In this embodiment, water surface features in multiple video frames can be dynamically extracted and motion recognized to determine the pixel movement speed, pixel displacement, and velocity direction of feature points in adjacent video frames. Based on the first mapping relationship, the pixel displacement is used to determine the water surface velocity of the feature points in the real world (for example, the pixel displacement can be converted into the water surface displacement in the real scene using the first mapping relationship, and the water surface velocity can be determined based on the time difference between the water surface displacement and adjacent video frames). Furthermore, the main direction of the water surface velocity of the target river section can be determined based on the current tidal stage, and the credibility of the water surface velocity in the real world can be determined based on whether the direction of pixel movement is consistent with the main direction.

[0076] In this embodiment, the feature points can refer to local image points on the water surface that can be stably identified by the algorithm and tracked between adjacent frames. Physically, they correspond to observable tracers on the water surface, including but not limited to: floating objects, ripple inflection points, specular reflections, oil film edges, and water splashes.

[0077] In an alternative example, the decision to update the first mapping relationship can also be based on changes in tide levels, for example, when... When this occurs, the geometry / scale update process is triggered, where, The threshold for tidal level changes can be set to 5% to 10% of the design tidal range in typical estuary scenarios. If the first mapping relationship is updated, the water surface velocity can be updated according to the updated mapping relationship (second mapping relationship). For example, the new water surface velocity can be determined based on the already determined pixel movement speed using the second mapping relationship, thus achieving the technical effect of improving the accuracy of the water surface velocity recognition results.

[0078] In an alternative example, the second mapping relationship can also be based on the current frame tide position η(t) and tidal phase; a search is conducted in the calibration table to see if there exists a Calib_k that simultaneously satisfies η(t) ∈ [η_min,k, η_max,k] and has the same tidal phase; if a unique match is found, the mapping H_k of that Calib_k is taken as H_curr(t) (i.e., the second mapping relationship); if multiple matches are found, the version with the construction time t_k closest to the current time is taken; if no match is found, then... Trigger the geometry / scale update process, recalculate H_new and add it to the calibration table, and simultaneously take H_new as H_curr(t); if it cannot be recalculated because there is no available reference in the current video frame, then use H_curr(t-Δt) from the previous moment and perform time-domain smoothing. In the calibration table, Calib_k can simultaneously record four metadata items: its construction time t_k, the tidal level η_k at the time of construction, the applicable tidal level interval [η_min, k, η_max, k], and the tidal stage (rise / fall).

[0079] Through the above steps, in this embodiment, by combining astronomical tide and measured tide level data, and based on the mapping relationship between tidal phase, feature point pixels, and actual size, the surface flow velocity in the estuary tidal zone is identified. This avoids the inaccurate identification results caused by directly using video recognition algorithms for tidal zone surface flow velocity identification in related technologies, thus achieving the technical effect of improving the accuracy of estuary tidal zone surface flow velocity identification results. Furthermore, it solves the technical problem in related technologies where using video recognition algorithms to identify estuary tidal zone surface flow velocity leads to a high misjudgment rate due to tidal reversal.

[0080] Optionally, in the flow velocity identification method for river tidal zones provided in this application embodiment, the surface flow velocity of the target river segment is identified based on multiple video frames, the current tidal stage, and a first mapping relationship to obtain the target flow velocity identification result. This includes: determining a target water surface mask based on multiple video frames, and extracting feature points from the target water surface mask to obtain multiple feature points, wherein the target water surface mask is used to characterize the water surface area in the video frames; determining the flow velocity data and water surface flow velocity direction associated with each feature point based on the first mapping relationship and the pixel data of each feature point, wherein the flow velocity data associated with each feature point includes the water surface flow velocity of that feature point; determining the confidence level of multiple water surface flow velocities based on the current tidal stage and the water surface flow velocity direction of each feature point, and determining the target flow velocity identification result based on the confidence level of multiple water surface flow velocities and the water surface flow velocity associated with each feature point.

[0081] The target water surface mask mentioned above may include: ① Binary water surface mask matrix M(u, v) - a 0 / 1 matrix of the same size as the video frame, where M(u, v) = 1 indicates that the pixel is water surface, and = 0 indicates that it is not water surface (sky, bank, bridge, ship, etc.); ② Water surface outer contour polygon - the set of pixel coordinates of the boundary points of the mask {(u_i, v_i)}, which facilitates subsequent boundary fine-tuning in conjunction with tide level; ③ Set of shoreline intersection points - the pixel coordinates of the intersection points of the water surface and the shoreline, which is the baseline for online expansion / contraction of the water surface mask (ROI); ④ Supporting metadata - the video frame timestamp t0 and the corresponding tide level η0 used when constructing the ROI, which serve as the basis for subsequent comparison and trigger judgment.

[0082] In this embodiment, multiple video frames (e.g., the initial 10 to 30 video frames) can be segmented to obtain an initial water surface mask ROI. Non-water surface areas such as the sky, banks, and ship hulls are then cleared. The initial water surface mask ROI can also be fine-tuned according to the tide level to obtain the target water surface mask. It should be noted that traditional thresholding, water surface color clustering, and semantic segmentation based on deep learning can also be used to achieve automatic recognition of feature points of water surface pixels.

[0083] For example, the current tide level η(t) can be taken and compared with the initial calibrated tide level η0;

[0084] When η(t)-η0≥Δη1, the initial water surface mask ROI is extended upwards by a preset number of pixel rows k1;

[0085] When η0-η(t)≥Δη2, the initial water surface mask ROI is shrunk / moved down by a preset number of pixel rows k2 to avoid including shoreline shadows in the ROI;

[0086] By updating the initial water surface mask ROI as described above, the target tracking area is always aligned with the current water surface range.

[0087] Here, Δη1 and Δη2 are preset values. Within the target water surface mask, corner detection algorithms can be prioritized to acquire feature points. When the number of detected feature points is lower than the preset lower limit N_min, a small-block matching method with a fixed grid can be used to supplement them. Each feature point stores at least four things: pixel coordinates (x, y), feature quality, etc. The last time it was successfully tracked The ROI region ID is used to determine if the animal has suddenly moved ashore.

[0088] In this embodiment, the pixel displacement and pixel velocity of each feature point in adjacent video frames can be determined based on the pixel data of each feature point in the video frame. According to the first mapping relationship, the pixel displacement and pixel velocity are converted into the actual flow velocity data and water surface flow velocity direction associated with each feature point. Based on the confidence level of multiple water surface flow velocities and the water surface flow velocity associated with each feature point, the target flow velocity identification result is determined, thereby improving the accuracy of water surface flow velocity identification in the tidal section of the estuary.

[0089] Optionally, in the flow velocity identification method for river tidal zones provided in this application embodiment, the flow velocity data associated with each feature point further includes: the pixel velocity of the feature point, where pixel velocity represents the movement speed of the corresponding pixel in a video frame; and determining the flow velocity data associated with each feature point and the direction of water surface flow velocity based on the first mapping relationship and the pixel data of each feature point, including: for adjacent video frames in multiple video frames, using a sparse optical flow strategy to determine the pixel displacement of each feature point and the time difference between adjacent video frames, wherein the pixel displacement of each feature point refers to the movement displacement of the pixel in adjacent video frames; converting the pixel displacement of each feature point based on the first mapping relationship to obtain the water surface displacement of each feature point, wherein the water surface displacement of each feature point refers to the actual displacement of the pixel displacement in the real world; determining the pixel velocity of each feature point based on the pixel displacement of each feature point and the time difference between adjacent video frames; and determining the water surface flow velocity and direction of the feature point based on the water surface displacement of each feature point and the time difference between adjacent video frames.

[0090] In this embodiment, the flow velocity data associated with each feature point also includes: pixel velocity, which represents the pixel movement speed of the feature point.

[0091] In an alternative example, dense optical flow, DIS (Discrete Optimization-Based Optical Flow) optical flow, or other alternatives to sparse optical flow strategies (i.e., sparse optical flow algorithms) can also be used.

[0092] In this embodiment, adjacent video frames and Sparse optical flow (LK) tracking can be used to determine the pixel displacement of each feature point. The time difference between frames can be calculated using timestamps. For example, a sparse optical flow algorithm (such as pyramid optical flow, or LK (Lucas-Kanade) optical flow) can be used to track feature points on adjacent video frames to obtain the pixel displacement of each feature point. Specifically: ① Sparse optical flow can solve for the optical flow only on a few pre-selected feature points, unlike dense optical flow which solves for all pixels, significantly reducing computational cost; ② The LK optical flow algorithm, based on the assumption that "pixels in the neighborhood have approximately uniform motion," solves for the displacement vector of the local window using least squares; ③ The time interval Δt between adjacent video frames can be directly calculated from the video timestamps. Based on pixel displacement and time interval, the velocity vector of the feature point in the pixel coordinate system can be obtained: The unit is pixels per second.

[0093] Then, the velocity vector of the pixel layer can be obtained directly: .

[0094] At this point, we obtain the pixel displacement based on the pixel coordinate system and the velocity vector of the pixel layer. .

[0095] The pixel velocity vectors mentioned above can be retained separately. For the following reasons: ① Quality control screening – Initial screening can be performed directly in the pixel domain using the “upper limit of pixel displacement corresponding to V_max”, saving the overhead of point-by-point mapping and conversion; ② Convenient calibration switching – When a calibration version switch is triggered (from H_curr_old to H_curr_new), it can be based on the existing calibration version. The ability to directly recalculate the actual flow rate v_real without replaying the video and rerunning the optical flow is crucial for correcting historical downweighted data.

[0096] In this embodiment, the currently active mapping can be used based on the pixel displacement from the previous step. (Initially for (Corresponding to the first mapping relationship), if it has been updated, use the latest one (i.e., the second mapping relationship):

[0097] The selection rule for the currently effective mapping H_curr(t) is as follows: If no update is triggered before time t, then H_curr(t) = H_init; if an update has been triggered, and the tide level η(t) at time t falls within the applicable tide level interval [η_min,k, η_max,k] of a certain Calib_k, and the tidal phase is consistent with this version, then H_curr(t) = H_new,k (i.e., the k-th version recalculates the mapping). Conversion formulas: ① Simple scenario (using scale S): v_real(t) = S_curr(t)·v_pix(t); ② Complex scenario (using homography matrix H): [X_w, Y_w, 1] T =H_curr(t)·[u, v, 1] T Then, the water surface coordinates (X_w, Y_w) of adjacent frames are subtracted and divided by Δt to obtain v_real. At the same time, its magnitude |v_real|=sqrt(v_x²+v_y²) and direction angle Φ=arctan2(v_y, v_x) are calculated for use in tidal prior fusion.

[0098]

[0099] Divide by the time difference to obtain the initial value of the surface velocity on the water surface: .

[0100] Simultaneously calculate the modulus:

[0101] and flow direction This facilitates the consistency between the surface flow velocity and the main direction of the surface flow.

[0102] Feature points whose velocity modulus exceeds a preset physical upper limit V_max are removed. V_max is determined based on historical monitoring or hydrodynamic calculations of the target river segment. The remaining feature points can be used to obtain the initial set of surface velocity values ​​for the current moment. ,in, Let represent the initial value of the water surface velocity at the i-th feature point, and represent the direction of the water surface velocity at the i-th feature point.

[0103] The reason for removing feature points whose velocity modulus exceeds the preset physical upper limit V_max is that the actual surface velocity of the estuary has a clear physical upper limit (generally less than 3 m / s, and less than 5 m / s in extreme cases). Feature points exceeding V_max almost all originate from abnormal situations: ① Tracking mismatch—the algorithm mismatches point A in the current video frame to point B in the next video frame (texture jumps such as distant shore shadows and splashing waves); ② Non-water body motion—ships, floating garbage, water birds, etc., have their own propulsion, and their motion does not represent water flow; ③ Large-scale reflection jumps—sudden appearance / disappearance of reflection spots caused by oblique sunlight are misidentified as large displacements; ④ Wave splashing—the instantaneous high-speed motion of splashing waves does not represent the flow field velocity. If not removed, a small number of "false high values" will significantly increase the mean and pollute the time series. Therefore, in this embodiment, a hard upper limit of V_max is used for removal. The value of V_max can be determined based on the historical ADCP measured maximum velocity of the target river section or the hydrodynamic numerical simulation results.

[0104] In this embodiment, if the preset calibration triggering condition is met, the first mapping relationship can be updated to obtain the second mapping relationship. Based on the second mapping relationship and the pixel velocity of each feature point, the surface flow velocity is updated, and the updated surface flow velocity is used as the final surface flow velocity. If the preset calibration triggering condition is not met, the surface flow velocity can be initially calculated based on the current time-based initial set. This yields the surface velocity and direction of the water flow at each feature point.

[0105] Optionally, in the flow velocity identification method for river tidal zones provided in this application embodiment, the first mapping relationship includes: a mapping relationship between pixels and actual sizes determined based on a target video frame. The target video frame includes: a video frame in which the water surface and M reference objects can be seen simultaneously before the current time. The reference objects include: objects that do not move with the water surface, where M is a positive integer. After determining the water surface velocity and direction of the feature point based on the water surface displacement of each feature point and the time difference between adjacent video frames, the method further includes: under the condition of satisfying a preset calibration triggering condition, detecting whether there is a preset quality condition in the video frame at the current time. The reference object is used to obtain the target detection result. The preset calibration trigger conditions include: the trigger condition for updating the first mapping relationship; when the target detection result indicates that there is a reference object in the video frame at the current time that meets the preset quality conditions, the mapping relationship between the pixels and the actual size in the video frame at the current time is calculated to obtain the second mapping relationship; the second mapping relationship, the current time, the current tide level and the current tide stage are stored in the calibration table, and the tide level interval to which the second mapping relationship applies is marked in the calibration table based on the current tide level. The calibration table is used to store the mapping relationship between pixels and the actual size associated with different tide level intervals.

[0106] The aforementioned preset calibration trigger condition can be a trigger condition for updating the first mapping relationship. In an optional example, this trigger condition can be: That is, the difference between the current tide level and the tide level corresponding to the initial calibration time associated with the first mapping relationship is greater than the tide level change threshold h. thr For example, 5% to 10%. In another optional example, a fixed time interval trigger (such as every 30 minutes), a reference pixel position change threshold trigger, or an OR logic combination of multiple trigger conditions can also be used as the preset calibration trigger condition.

[0107] According to the recorded reference object IDs, the system searches each current video frame to see if a reference object that meets the quality requirements exists. For example, it checks if the reference object still exists in the current video frame, whether its edges are clear, and adds the matching reference objects to the "currently available reference object set" R(t). If no reference object that meets the quality requirements is detected in the current video frame, geometric / mapping updates can be skipped, and only temporal smoothing of the previous version's mapping parameters can be performed to maintain the continuity of the results. Specifically, the "temporal smoothing of the previous version's mapping parameters" can be performed as follows: if no qualified reference object is detected at the current moment, and no mapping relationship update is performed, the previous version's mapping H_prev can be used as H_curr at this moment, and a moving average can be performed on the elements of the H matrix of the most recent M frames (typically M=5): H_smoothed(t)=(1 / M)·ΣH_curr(tj·Δt) (j=0,1,…,M-1), and H_smoothed can be used as the final effective mapping at this moment. This achieves a smooth transition between using the same calibration version and switching between them, avoiding step-like jumps in the flow rate time series caused by switching between different calibration versions.

[0108] When there is at least one set (typically no less than 4 pairs) of reference objects in R(t) that meet the quality requirements (i.e., meet the preset quality conditions), the pixel coordinates (u_i, v_i) in the current video frame and the known actual size (X_w, i, Y_w, i) can be used to recalculate the pixel-to-water surface mapping through direct linear transformation (DLT) or least squares method to obtain the recalculated mapping H_new, and record its construction time t, corresponding tide level η(t) and tide stage (rise / fall), i.e. H_new=H_new(η(t), stage, t).

[0109] In one optional scenario, it may be necessary to simply recalculate the scale: S_new = L_real / L_pixel, where L_real represents the actual length of the reference object in the real world (in meters), obtained from design drawings or on-site measurements, such as the spacing between bridge piers, the length of a section of guardrail, or the length of a water gauge scale; L_pixel represents the pixel length (in pixels) occupied by the reference object in the current video frame, obtained from image measurements, i.e., the Euclidean distance between the pixel coordinates of the two endpoints of the reference object. The unit of S_new is m / pixel, and its physical meaning is "the actual length represented by one pixel in the image under the current conditions".

[0110] The recalculated mapping relationship (i.e., the second mapping relationship) is stored in the calibration table, and its applicable tidal range [η(t)-Δ, η(t)+Δ] is specified (Δ is taken as 5% of the design tidal range, which can be 0.05~0.10m in the example). In subsequent runs, the "same tidal range" determination rule is: if the real-time tidal level η(t) falls within the tidal range [η_min, k, η_max, k] of a certain Calib_k and the tidal phase (rise / fall) is consistent with that version, it is considered as the "same tidal range", and Calib_k can be reused directly without recalculation.

[0111] It should be noted that in this embodiment, each recalculated H_new can be numbered in chronological order as Calib_1, Calib_2, ..., Calib_k. At the same time, four metadata items are recorded: the construction time t_k, the tide level η_k at the time of construction, the applicable tide level interval [η_min, k, η_max, k], and the tidal stage (rise / fall), and are uniformly stored in the calibration table.

[0112] Optionally, in the flow velocity identification method for river tidal zones provided in this application embodiment, the target flow velocity identification result is determined based on the confidence levels of multiple water surface flow velocities and the water surface flow velocity associated with each feature point. This includes: when the confidence level of multiple water surface flow velocities is a first confidence level, determining the target flow velocity identification result based on the water surface flow velocity associated with multiple feature points; when the confidence level of multiple water surface flow velocities is a second confidence level, determining the target flow velocity identification result based on the water surface flow velocity associated with multiple feature points, and marking the presence of local backflow or local non-uniform flow direction in the target river segment, wherein the confidence level of the second confidence level is lower than that of the first confidence level; when the confidence level of multiple water surface flow velocities is a third confidence level, performing time-domain compensation on the water surface flow velocity at the current moment to obtain the target flow velocity identification result, wherein the time-domain compensation includes: determining the target flow velocity identification result based on the water surface flow velocity identification result at a moment adjacent to the current moment, wherein the third confidence level is lower than that of the second confidence level.

[0113] In this embodiment, the "initial video calculation (i.e., surface velocity)," the "tidal-approved direction (velocity direction)," and the "latest proportion (the proportion of surface velocity directions at multiple feature points that align with the main direction of surface velocity during the current tidal phase)" can be combined into a time series that can be input to the platform / model, and unstable data segments are labeled. The final velocity synthesis uses all retained feature points at the current moment, for example: ① the displacement result used; ② the currently effective mapping Hcur replaced with the actual displacement; ③ the velocity direction is used to determine the sign / direction label, finally obtaining the final surface velocity vector at this moment: Then, the result at the current moment can be written as a structured result record, with fields including at least: timestamp t, surface water velocity magnitude. Surface water velocity dir (rising / falling / local backflow), tidal phase (rising tide, falling tide, reverse tide), calibration version number Calib_k used, and confidence level (high / medium / low).

[0114] In one optional example, the structured results can be output to three paths simultaneously: one for real-time display on the front end / platform (drawing arrows and curves); one for statistical analysis and review in the historical database; and one for exporting a "time-velocity (including direction)" boundary file that the model can directly read for use in numerical tide / drainage / sedimentation models.

[0115] In this embodiment, the target flow velocity identification result can be directly output for the first confidence level. For the second confidence level, it can be noted that "there is local backflow or local non-uniform flow direction". For the third confidence level, the effective results of the previous time or the nearest time can be used for time domain compensation to maintain the continuity of the results.

[0116] Optionally, in the flow velocity identification method for river tidal zones provided in this application embodiment, when the confidence level of multiple water surface flow velocities is a second confidence level or a third confidence level, and a preset calibration triggering condition is met, the method further includes: updating the water surface flow velocity of each feature point based on a second mapping relationship and the pixel velocity of each feature point to obtain an updated water surface flow velocity; and updating the target flow velocity identification result based on the updated water surface flow velocity.

[0117] For historical flow velocity points generated under the condition |η(t)-η0|>h_thr and determined to be at the second or third confidence level (i.e., weighted down due to consistency ratio P<α1), the following correction steps can be performed sequentially: ① Based on the existing pixel velocity v_pix, recalculate the real flow velocity v_real_new using the current recalculation mapping H_new (i.e., the second mapping relationship), compare the angle between the direction of v_real_new and the main direction of the water surface flow velocity at that moment. If it is less than θ1, then the confidence level of the point is increased by one level (e.g., from the third level to the second level) and the original value is replaced with v_real_new. ② For the flow velocity time series of each W frames (typically W=5) before and after the calibration version switch, a sliding window weighted average is used: v_smoothed(t)=Σw_j·v(tj·Δt) (j=-W,…,W), with the weight decaying according to the time distance, so that the time series near the switching point changes from a step-like jump to a smooth transition.

[0118] It should be noted that the physical meaning of the "sliding window" here is as follows: when the calibration version switches from Calib_k to Calib_{k+1}, the same pixel displacement will be converted into different true flow velocities under the two mappings (for example, a sudden change from 0.5m / s to 0.58m / s), forming a step in the time series at the moment of switching. By taking a window before and after the switching point and performing a weighted average, the step is smoothed into a gradually changing slope, thereby avoiding the observer's misjudgment of a sudden change in flow velocity.

[0119] In one alternative example, in addition to the included angle threshold θ1 criterion, statistics such as the cosine similarity of the direction vectors or the KL divergence of the direction histogram can be used.

[0120] Optionally, in the flow velocity identification method for river tidal zones provided in this application embodiment, the confidence level of multiple water surface flow velocities is determined based on the current tidal stage and the water surface flow velocity direction of each feature point, including: determining the main direction of the water surface flow velocity in the target river section based on the current tidal stage to obtain the target flow velocity direction; detecting the consistency between each feature point and the target flow velocity direction to obtain a consistency detection result; determining the proportion of multiple feature points that are consistent with the target flow velocity direction based on the consistency detection result to obtain a consistency ratio; and determining the confidence level of multiple water surface flow velocities based on the consistency ratio.

[0121] For the target river segment, a coordinate direction can be pre-specified, such as "+X towards the sea mouth and -X towards the inland." Then: the main direction of the high tide segment is set to -X (upstream, towards the inland river), the main direction of the low tide segment is set to +X (downstream, towards the open sea), and the main direction of the tidal reversal transition segment is set to empty. The moment in the tidal reversal transition stage is marked as a low confidence result flag_low and output with low weight in subsequent processing.

[0122] In this embodiment, the direction of water surface velocity at all feature points can be... Each and the target flow direction (i.e., the main direction) Make an included angle: ,set up Specifically, when the included angle of a feature point is less than θ1, the video flow direction of that feature point is determined to be consistent with the main direction. The consistency ratio is obtained by calculating the number of feature points with consistent directions at the current time (N_consistent) and the total number of valid feature points participating in the statistics at that time (N_total): P = N_consistent / N_total, where P ∈ [0, 1]. The consistency ratio P can be used as a criterion for credibility stratification.

[0123] After obtaining the consistency ratio P at the current moment, the video stream velocity recognition results are processed in layers according to a preset consistency threshold, as follows:

[0124] When P≥α1, the surface velocity result at that moment is marked as the first confidence level and output directly;

[0125] When α2≤P<α1, the surface velocity result at that moment is marked as the second confidence level, and "local backflow or local non-uniform flow direction exists" is noted in the result;

[0126] When P < α2, the surface velocity result at that moment is marked as the third confidence level, and the valid results from the previous moment or the nearest moment are used for time domain compensation to maintain the continuity of the results.

[0127] Wherein, α1 and α2 are preset consistency thresholds. In the embodiment, α1 can be 0.7 and α2 can be 0.3.

[0128] The specific methods for the aforementioned "time domain compensation" can include one of the following two: ① Direct reuse method: Let v(t) = v(t-Δt) (i.e., directly use the final flow velocity of the previous valid moment as the output of the current moment), and set the flag field to "compensation" in the result record. For example: if v = 0.5 m / s is measured at t = 10:00 and is of high confidence, and P = 0.2 is measured at t = 10:01 and is of the third confidence level, then v = 0.5 m / s is output at t = 10:01 and marked as "compensation". ② Time window weighted interpolation method: Take the flow velocities of N valid moments before and after the current moment (e.g., N = 3, corresponding to 3 sampling points before and after) and make a weighted average: v(t) = Σw_i·v(t_i), where the weight w_i decays with time distance (typically using Gaussian weight w_i = exp(-|t_i-t|² / 2σ²)), and σ is 1 / 2 of the window width. For example, if t=10:01 is unreliable, while t=10:00=0.5m / s and t=10:02=0.55m / s are both highly reliable, then the output for t=10:01 would be (0.5+0.55) / 2=0.525m / s. The purpose of both methods is to maintain the continuity of the time series and avoid data gaps caused by low-reliability moments.

[0129] In one alternative example, when determining that the tide is rising and falling (or vice versa), and simultaneously observing that P first decreases and then rises again after two or three video frames, it can be determined that this is a true tidal reversal, and this moment is recorded as... Write it into the results and give the business side an indicator of "when will this wave turn over".

[0130] In one alternative example, for video frames with a low consistency ratio P, which are undergoing forced recalibration, a "requires manual review / low confidence" label can be added, along with the corresponding video frame number and time, to facilitate manual retrieval and review of the video frame later.

[0131] It should be noted that, in another optional example, in addition to the hard thresholds α1 and α2 for the consistency ratio P, fuzzy inference, Bayesian belief networks, or machine learning classifiers can also be used to output continuous confidence scores.

[0132] Optionally, in the flow velocity identification method for river tidal zones provided in this application embodiment, feature points are extracted from the target water surface mask to obtain multiple feature points, including: extracting feature points from the target water surface mask using a corner detection strategy to obtain extraction results; and supplementing the feature points in the extraction results to obtain multiple feature points when the number of extracted feature points is less than a preset threshold.

[0133] In one optional example, a corner detection algorithm can be used to obtain feature points within the target water surface mask. When the number of detected feature points is lower than a preset lower limit N_min, a small-block matching method with a fixed grid is used to supplement them, resulting in multiple feature points. Each feature point stores at least four pieces of information: pixel coordinates (x, y), feature quality q, the time of the last successful tracking tlast, and the ID of the ROI region it belongs to, in order to determine whether it has suddenly moved to the bank of the target river section.

[0134] It should be noted that the feature points in this embodiment refer to local image points on the water surface that can be stably identified by the algorithm and tracked between adjacent frames. Physically, these correspond to observable tracers on the water surface, including but not limited to: floating objects, ripple inflection points, specular reflections, oil film edges, and water splashes. Their pixel displacement between adjacent frames is considered a two-dimensional motion indicator of the water surface at that location, used to calculate the surface flow velocity v_real. Successful tracking can be defined as a feature point simultaneously meeting the following four conditions between two adjacent frames: ① Pairing exists – the optical flow algorithm finds the corresponding position of the feature point in the next frame; ② Pairing residual is acceptable – the back projection error of the LK optical flow is less than a threshold (typically 0.5~1 pixel); ③ Similarity is acceptable – the normalized cross-correlation coefficient (NCC) of the pairing window is greater than or equal to 0.8; ④ Physically reasonable – the calculated true flow velocity does not exceed V_max. When a feature point meets all four conditions for three consecutive frames, it is considered "successfully tracked".

[0135] In one alternative example, other feature point algorithms can also be used, such as ORB (Oriented FAST and Rotated BRIEF), SIFT (Scale-Invariant Feature Transform), SURF (Speeded Up Robust Features), and FAST (Features from Accelerated Segment Test); or the output feature points of a pre-trained water surface feature extraction network can be used.

[0136] In this embodiment, existing video surveillance infrastructure can be utilized, eliminating the need to construct new ADCP measurement points or buoy facilities in the estuary. Based on an estimated construction cost of approximately 300,000 to 500,000 yuan per ADCP measurement point and an annual maintenance cost of 80,000 to 120,000 yuan, a single point can save more than 300,000 yuan in initial investment and more than 80,000 yuan in annual maintenance costs.

[0137] This embodiment utilizes a camera to automatically acquire video images of the tidal zone in the estuary. Combined with astronomical tide data and measured tide levels, and through dynamic calibration and tidal phase identification, it enables intelligent recognition of surface flow velocity and direction. This solves the problems of flow direction instability and proportional inaccuracies in video flow measurement technology under tidal conditions. It features non-contact operation, low cost, and high reliability, continuously acquiring flow velocity information throughout the entire rising and falling tide process, providing high-precision input for estuary flow velocity monitoring, estuary vessel navigation, and hydrodynamic models. This embodiment can also expand its application in hydrological monitoring and smart estuary supervision, improving system intelligence, reducing manual inspection and deployment costs, and enhancing monitoring efficiency and data service value.

[0138] This invention utilizes real-time tide data to trigger geometric relationship updates, establishing a dynamic mapping mechanism between tide level changes and pixel ratios. This enables the video flow measurement system to automatically correct the imaging ratio during tide rises and falls, ensuring the spatial accuracy and temporal continuity of the measurement results. It overcomes the problem of inaccuracy in traditional methods under fluctuating tide conditions, and achieves automatic calibration and ratio updates under changing tide conditions.

[0139] By combining astronomical tide and measured tide level data, a tidal phase discrimination algorithm is introduced, and the video recognition results are statistically analyzed for directional consistency and classified for reliability. This algorithm can effectively determine the change in flow direction during the tidal reversal phase, avoiding the jitter, misjudgment, or interruption of flow direction recognition that occurs in traditional video algorithms. It achieves smooth and continuous recognition of flow velocity direction, improving the accuracy and stability of flow direction recognition.

[0140] This invention incorporates a reference object detection and tide level triggering mechanism, enabling automatic updates of calibration parameters during long-term operation without manual intervention. It is suitable for deployment in unattended monitoring scenarios such as river estuaries and sea mouths, reducing maintenance costs, improving the system's continuous operation capability, and enhancing its intelligence and automation level.

[0141] This invention fully utilizes existing high-level video surveillance resources, enabling non-contact automatic identification of surface flow velocity without the need for additional professional flow measurement equipment. This provides a new technical approach for expanding the application of video surveillance systems in hydrological monitoring, tidal analysis, and smart estuary supervision, thereby increasing the application value of video surveillance equipment.

[0142] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0143] Example 2

[0144] This application also provides a flow velocity identification device for river tidal zones. It should be noted that the flow velocity identification device for river tidal zones in this application can be used to execute the flow velocity identification method for river tidal zones provided in this application. The flow velocity identification device for river tidal zones provided in this application will be described below.

[0145] According to an embodiment of this application, an apparatus for implementing the above-described method for identifying flow velocity in river tidal zones is also provided, such as... Figure 3 As shown, the device includes: an acquisition unit 31, a first determination unit 32, a second determination unit 33, and an identification unit 34.

[0146] The acquisition unit 31 is used to acquire multiple video frames and the current tide level of the target river segment. The target river segment includes the estuary tidal zone, and the current tide level includes the tide level at the current moment determined based on the astronomical tide level and the measured tide level of the target river segment.

[0147] The first determining unit 32 is used to determine the current tidal stage based on the current tide level, wherein the current tidal stage includes one of the following: high tide stage, low tide stage, and tidal reversal stage;

[0148] The second determining unit 33 is used to determine the first mapping relationship, wherein the first mapping relationship includes: the proportional relationship between a pixel in a video frame and the actual size of the pixel in the real world;

[0149] The identification unit 34 is used to identify the surface flow velocity of the target river section based on multiple video frames, the current tidal stage, and the first mapping relationship, and obtain the target flow velocity identification result.

[0150] In the flow velocity identification device for river tidal zones provided in this application embodiment, the acquisition unit 31 acquires multiple video frames of the target river segment and the current tide level. The target river segment includes the estuary tidal zone, and the current tide level includes the tide level at the current moment determined based on the astronomical tide level and the measured tide level of the target river segment. The first determination unit 32 determines the current tidal stage based on the current tide level. The current tidal stage includes one of the following: high tide, low tide, or tidal reversal. The second determination unit 33 determines a first mapping relationship, which includes the proportional relationship between pixels in the video frames and the actual size of those pixels in the real world. The identification unit 34 identifies the surface flow velocity of the target river segment based on multiple video frames, the current tidal stage, and the first mapping relationship, obtaining the target flow velocity identification result. This solves the technical problem in related technologies where video recognition algorithms are used to identify surface flow velocity in estuary tidal zones, leading to a high misjudgment rate due to tidal reversal. In this application, by combining astronomical tide and measured tide level data, and based on the mapping relationship between tidal phase, feature point pixels and actual size, the surface flow velocity of the estuary tidal zone is identified. This avoids the inaccurate identification results caused by directly using video recognition algorithms to identify the surface flow velocity of the estuary tidal zone in related technologies, thereby achieving the technical effect of improving the accuracy of the surface flow velocity identification results of the estuary tidal zone.

[0151] Optionally, in the flow velocity identification device for river tidal zones provided in this application embodiment, the identification unit includes: a processing subunit, configured to determine a target water surface mask based on multiple video frames, and extract feature points from the target water surface mask to obtain multiple feature points, wherein the water surface mask is used to characterize the water surface region in the video frames; a first determining subunit, configured to determine the flow velocity data associated with each feature point and the water surface flow velocity direction based on a first mapping relationship and the pixel data of each feature point, wherein the flow velocity data associated with each feature point includes: the water surface flow velocity of the feature point; and a second determining subunit, configured to determine the confidence level of multiple water surface flow velocities based on the current tidal stage and the water surface flow velocity direction of each feature point, and determine the target flow velocity identification result based on the confidence level of multiple water surface flow velocities and the water surface flow velocity associated with each feature point.

[0152] Optionally, in the flow velocity identification device for river tidal zones provided in this application embodiment, the flow velocity data associated with each feature point further includes: the pixel velocity of the feature point, where the pixel velocity represents the movement speed of the corresponding pixel in a video frame. The first determining subunit includes: a first determining module, used to determine the pixel displacement of each feature point and the time difference between adjacent video frames using a sparse optical flow strategy, wherein the pixel displacement of each feature point refers to the movement displacement of the pixel in adjacent video frames; a conversion module, used to convert the pixel displacement of each feature point based on a first mapping relationship to obtain the water surface displacement of each feature point, wherein the water surface displacement of each feature point refers to the actual displacement of the pixel displacement in the real world; a second determining module, used to determine the pixel velocity of each feature point based on the pixel displacement of each feature point and the time difference between adjacent video frames; and a third determining module, used to determine the water surface flow velocity and direction of the feature point based on the water surface displacement of each feature point and the time difference between adjacent video frames.

[0153] Optionally, in the flow velocity identification device for river tidal zones provided in this application embodiment, the first mapping relationship includes: a mapping relationship between pixels and actual sizes determined based on a target video frame. The target video frame includes: a video frame in which the water surface and M reference objects can be seen simultaneously before the current time. The reference objects include: objects that do not move with the water surface, where M is a positive integer. The first determining subunit further includes: a first detection module, used to, after determining the water surface velocity and direction of each feature point based on the water surface displacement of each feature point and the time difference between adjacent video frames, detect whether there is a preset quality condition in the video frame at the current time. The system uses a reference object to obtain the target detection result. The preset calibration trigger conditions include: a trigger condition for updating the first mapping relationship; a calculation module, used to calculate the mapping relationship between pixels and actual size in the video frame at the current moment when the target detection result indicates that there is a reference object in the video frame at the current moment that meets the preset quality conditions, to obtain a second mapping relationship; and a first processing module, used to store the second mapping relationship, the current moment, the current tide level, and the current tide stage into a calibration table, and mark the tide level interval to which the second mapping relationship applies in the calibration table based on the current tide level, wherein the calibration table is used to store the mapping relationship between pixels and actual size associated with different tide level intervals.

[0154] Optionally, in the flow velocity identification device for river tidal zones provided in this application embodiment, the second determining subunit includes: a fourth determining module, used to determine the target flow velocity identification result based on the water surface flow velocities associated with multiple feature points when the confidence level of multiple water surface flow velocities is a first confidence level; a second processing module, used to determine the target flow velocity identification result based on the water surface flow velocities associated with multiple feature points when the confidence level of multiple water surface flow velocities is a second confidence level, and to mark the target river section as having local backflow or local non-uniform flow direction, wherein the confidence level of the second confidence level is lower than the first confidence level; and a compensation module, used to perform time-domain compensation on the water surface flow velocity at the current moment when the confidence level of multiple water surface flow velocities is a third confidence level, to obtain the target flow velocity identification result, wherein the time-domain compensation includes: determining the target flow velocity identification result based on the water surface flow velocity identification result at a moment adjacent to the current moment, wherein the third confidence level is lower than the second confidence level.

[0155] Optionally, in the flow velocity identification device for river tidal zones provided in this application embodiment, the second determining subunit further includes: a first updating module, used to update the water surface flow velocity of each feature point based on the second mapping relationship and the pixel velocity of each feature point when the confidence level of multiple water surface flow velocities is the second confidence level or the third confidence level and the preset calibration triggering condition is met, to obtain the updated water surface flow velocity; and a second updating module, used to update the target flow velocity identification result based on the updated water surface flow velocity.

[0156] Optionally, in the flow velocity identification device for river tidal zones provided in this application embodiment, the second determining subunit includes: a fifth determining module, used to determine the main direction of the surface flow velocity of the target river section based on the current tidal stage, and obtain the target flow velocity direction; a second detection module, used to detect the consistency between each feature point and the target flow velocity direction, and obtain a consistency detection result; a sixth determining module, used to determine the proportion of multiple feature points that are consistent with the target flow velocity direction based on the consistency detection result, and obtain a consistency ratio; and a seventh determining module, used to determine the confidence level of multiple surface flow velocities based on the consistency ratio.

[0157] Optionally, in the flow velocity identification device for river tidal zones provided in this application embodiment, the processing subunit includes: an extraction module, used to extract feature points in the target water surface mask using a corner detection strategy to obtain an extraction result; and a supplementation module, used to supplement the feature points in the extraction result to obtain multiple feature points when the number of extracted feature points is less than a preset threshold.

[0158] It should be noted that the acquisition unit 31, the first determination unit 32, the second determination unit 33, and the identification unit 34 mentioned above correspond to steps S201 to S204 in Embodiment 1. Each unit and the corresponding step implement the same instance and application scenario, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules or units can be hardware components or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules can also be part of a device and can run in the computer terminal 10 provided in Embodiment 1.

[0159] Example 3

[0160] Embodiments of this application may provide an electronic device. Figure 4 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 4 As shown, the electronic device may include: one or more ( Figure 4 (Only one is shown) Processor 402, memory 404, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0161] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the above-described methods. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0162] The processor can call the information and application program stored in the memory through the transmission device to execute the flow velocity identification method for river tidal zones provided in Embodiment 1 of the present invention.

[0163] By employing the embodiments of this application, combining astronomical tide and measured tide level data, and based on the mapping relationship between tidal phase, feature point pixels, and actual size, the surface flow velocity of the estuary tidal zone is identified. This avoids the situation in related technologies where video recognition algorithms are directly used to identify the surface flow velocity of the tidal zone, resulting in inaccurate identification results. Thus, the technical effect of improving the accuracy of the surface flow velocity identification results in the estuary tidal zone is achieved.

[0164] Those skilled in the art will understand that Figure 4The structure shown is for illustrative purposes only. Electronic devices can also be smartphones, tablets, handheld computers, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 4 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 4 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 4 The different configurations shown.

[0165] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0166] Example 4

[0167] Embodiments of this application also provide a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the flow velocity identification method for river tidal zones provided in Embodiment 1.

[0168] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.

[0169] This application also provides a computer program product that, when executed on a data processing device, is adapted to perform steps of a method for identifying flow velocity in a river tidal zone.

[0170] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0171] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0172] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

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

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

[0175] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0176] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for identifying flow velocity in river tidal zones, characterized in that, include: Acquire multiple video frames and the current tide level of the target river segment, wherein the target river segment includes: the estuary tidal zone, and the current tide level includes: the tide level at the current moment determined based on the astronomical tide level and the measured tide level of the target river segment; Based on the current tide level, the current tidal phase is determined, wherein the current tidal phase includes one of the following: high tide phase, low tide phase, and tidal reversal phase; A first mapping relationship is determined, wherein the first mapping relationship includes: the proportional relationship between a pixel in the video frame and the actual size of the pixel in the real world; Based on multiple video frames, the current tidal phase, and the first mapping relationship, the surface flow velocity of the target river section is identified to obtain the target flow velocity identification result.

2. The flow velocity identification method according to claim 1, characterized in that, Based on multiple video frames, the current tidal phase, and the first mapping relationship, the surface flow velocity of the target river section is identified to obtain the target flow velocity identification result, including: Based on multiple video frames, a target water surface mask is determined, and feature points in the target water surface mask are extracted to obtain multiple feature points, wherein the target water surface mask is used to characterize the water surface region in the video frames; Based on the first mapping relationship and the pixel data of each feature point, the flow velocity data and water surface flow velocity direction associated with each feature point are determined, wherein the flow velocity data associated with each feature point includes: the water surface flow velocity of the feature point; Based on the current tidal phase and the direction of water surface velocity at each feature point, a confidence level of multiple water surface velocities is determined, and based on the confidence level of multiple water surface velocities and the water surface velocity associated with each feature point, the target velocity identification result is determined.

3. The flow velocity identification method according to claim 2, characterized in that, The flow velocity data associated with each feature point further includes: the pixel velocity of the feature point, where the pixel velocity represents the movement speed of the corresponding pixel in the video frame. Based on the first mapping relationship and the pixel data of each feature point, the flow velocity data associated with each feature point and the direction of water surface flow velocity are determined, including: For adjacent video frames in the multiple video frames, a sparse optical flow strategy is adopted to determine the pixel displacement of each feature point and the time difference between adjacent video frames, wherein the pixel displacement of each feature point refers to the movement displacement of the pixel in the adjacent video frames. Based on the first mapping relationship, the pixel displacement of each feature point is transformed to obtain the water surface displacement of each feature point, wherein the water surface displacement of each feature point refers to the actual displacement of the pixel displacement in the real world. The pixel velocity of each feature point is determined based on the pixel displacement of each feature point and the time difference between adjacent video frames; Based on the water surface displacement of each feature point and the time difference between adjacent video frames, the water surface velocity and direction of the water surface velocity at that feature point are determined.

4. The flow velocity identification method according to claim 3, characterized in that, The first mapping relationship includes: a mapping relationship between pixels and actual sizes determined based on a target video frame, wherein the target video frame includes: a video frame in which the water surface and M reference objects can be seen simultaneously before the current time, wherein the reference objects include: objects that do not move with the water surface, and M is a positive integer; after determining the water surface velocity and direction of the feature point based on the water surface displacement of each feature point and the time difference between adjacent video frames, it further includes: Under the condition of satisfying the preset calibration triggering condition, it is detected whether there is a reference object that satisfies the preset quality condition in the video frame at the current time, and the target detection result is obtained. The preset calibration triggering condition includes: the triggering condition for updating the first mapping relationship. If the target detection result indicates that there is a reference object that meets the preset quality condition in the video frame at the current time, calculate the mapping relationship between the pixels and the actual size in the video frame at the current time to obtain a second mapping relationship; The second mapping relationship, the current time, the current tide level, and the current tide stage are stored in a calibration table. Based on the current tide level, the tide level interval to which the second mapping relationship applies is marked in the calibration table. The calibration table is used to store the mapping relationship between pixels and actual size associated with different tide level intervals.

5. The flow velocity identification method according to claim 4, characterized in that, Based on the confidence levels of multiple water surface velocities and the water surface velocity associated with each feature point, the target velocity identification result is determined, including: When the confidence level of multiple water surface velocities is the first confidence level, the target flow velocity identification result is determined based on the water surface flow velocities associated with multiple feature points. When the confidence level of multiple water surface velocities is the second confidence level, the target flow velocity identification result is determined based on the water surface velocities associated with multiple feature points, and the target river section is marked as having local backflow or local non-uniform flow direction, wherein the confidence level of the second confidence level is lower than that of the first confidence level. When the confidence level of multiple water surface velocities is the third confidence level, time domain compensation is performed on the water surface velocities at the current moment to obtain the target velocities identification result. The time domain compensation includes: determining the target velocities identification result based on the water surface velocities identification results at moments adjacent to the current moment, wherein the third confidence level is lower than the second confidence level.

6. The flow velocity identification method according to claim 5, characterized in that, When the confidence levels of multiple water surface flow velocities are at the second confidence level or the third confidence level, and the preset calibration triggering condition is met, the method further includes: Based on the second mapping relationship and the pixel velocity of each feature point, the water surface flow velocity of each feature point is updated to obtain the updated water surface flow velocity. The target flow velocity identification result is updated based on the updated water surface flow velocity.

7. The flow velocity identification method according to claim 2, characterized in that, Based on the current tidal phase and the direction of water surface velocity at each of the aforementioned feature points, a number of confidence levels for the water surface velocity are determined, including: Based on the current tidal phase, the main direction of the water surface velocity in the target river section is determined, and the target velocity direction is obtained; The consistency between each feature point and the target flow velocity direction is detected to obtain a consistency detection result; Based on the consistency detection results, the proportion of multiple feature points that are consistent with the target flow velocity direction is determined to obtain the consistency ratio. Based on the consistency ratio, the confidence level of multiple water surface flow velocities is determined.

8. The flow velocity identification method according to claim 2, characterized in that, Feature points are extracted from the target water surface mask to obtain multiple feature points, including: Feature points in the target water surface mask are extracted using a corner detection strategy to obtain the extraction results; If the number of extracted feature points indicated by the extraction result is less than a preset threshold, the feature points in the extraction result are supplemented to obtain multiple feature points.

9. A flow velocity identification device for river tidal zones, characterized in that, include: The acquisition unit is used to acquire multiple video frames and the current tide level of the target river segment, wherein the target river segment includes: the estuary tidal zone, and the current tide level includes: the tide level at the current moment determined based on the astronomical tide level and the measured tide level of the target river segment; The first determining unit is configured to determine the current tidal stage based on the current tidal level, wherein the current tidal stage includes one of the following: high tide stage, low tide stage, and tidal reversal stage; The second determining unit is used to determine the first mapping relationship, wherein the first mapping relationship includes: the proportional relationship between the pixels in the video frame and the actual size of the pixels in the real world; The identification unit is used to identify the surface flow velocity of the target river section based on multiple video frames, the current tidal stage, and the first mapping relationship, and to obtain the target flow velocity identification result.

10. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the flow velocity identification method for river tidal zones as described in any one of claims 1 to 8.