Non-contact water flow speed measurement method and device, electronic equipment and storage medium

CN122814939APending Publication Date: 2026-09-25CHINA INST OF WATER RESOURCES & HYDROPOWER RES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610871799.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-16
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0005]本发明提供一种非接触式水流测速方法、装置、电子设备及存储介质,用以解决现有技术中基于深度学习的非接触式水流表面流速测量方法在复杂水域环境下,因水流状态的不确定性而导致测速精度有限的缺陷

Benefits of technology

[0018]本发明提供的非接触式水流测速方法、装置、电子设备及存储介质,通过在水流测速模型的编码器中设置时序融合模块,对连续多帧视频图像中相邻视频帧对应的相邻帧特征在通道维度进行拼接和卷积处理,由此使得水流测速模型能够在卷积操作中同时处理多个时间节点的特征信息,进而能够深度捕捉和融合水体运动的时序依赖关系,突破传统方法难以有效利用视频时序信息的局限,解决在复杂水域环境下因水流状态不确定性导致的测速精度有限的问题,显著提升了非接触式水流测速的准确性与鲁棒性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122814939A_ABST
    Figure CN122814939A_ABST
Patent Text Reader

Abstract

The application provides a non-contact water flow speed measurement method and device, electronic equipment and storage medium, wherein the method comprises: inputting continuous multiple frames of video images into a water flow speed measurement model to obtain pixel displacement scalars and dense flow field heat maps of a water area to be measured. The water flow speed measurement model comprises an encoder and a decoder, the encoder comprises a time sequence fusion module, which is used for splicing and convolution processing of adjacent frame features corresponding to adjacent video frames in the continuous multiple frames of video images in the channel dimension, to generate fusion features with fusion time sequence information. By setting the time sequence fusion module in the encoder of the water flow speed measurement model, the adjacent frame features corresponding to the adjacent video frames in the continuous multiple frames of video images are spliced and convolution processed in the channel dimension, so that the water flow speed measurement model can process feature information of multiple time nodes at the same time in the convolution operation, can deeply capture and fuse the time sequence dependence of water body movement, and significantly improves the accuracy and robustness of the non-contact water flow speed measurement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water flow velocity measurement technology, and in particular to a non-contact water flow velocity measurement method, device, electronic equipment, and storage medium. Background Technology

[0002] Hydropower, with its large reserves, wide distribution, and high renewability, has become an important component of new energy power generation. Water flow velocity, as a key parameter for assessing the potential of hydropower resources, is crucial for the accurate measurement of hydropower station design, operation optimization, and dispatch management.

[0003] With continuous technological advancements, water flow velocity measurement technology has made significant progress. Currently, commonly used methods for water flow velocity measurement include differential pressure measurement, Doppler velocity measurement, and radar velocity measurement. Each of these methods has its own advantages and disadvantages and is suitable for different application scenarios. In recent years, machine learning methods have achieved good results in various engineering and technical problems, attracting more attention and experimentation from researchers.

[0004] Through the research and development efforts of a series of researchers, a non-contact water flow surface velocity measurement method based on deep learning has achieved certain results. However, in complex water environments, the measurement accuracy is limited due to the uncertainty of water flow conditions. Summary of the Invention

[0005] This invention provides a non-contact water flow velocity measurement method, device, electronic device, and storage medium to solve the problem that the existing deep learning-based non-contact water flow surface velocity measurement method has limited measurement accuracy in complex water environments due to the uncertainty of water flow conditions.

[0006] This invention provides a non-contact water flow velocity measurement method, comprising the following steps.

[0007] Acquire continuous multi-frame video images of the water area to be measured; The continuous multi-frame video images are input into the water flow velocity model to obtain the pixel displacement scalar and dense flow field heat map of the water area to be measured output by the water flow velocity model. The water flow velocity measurement model includes an encoder and a decoder; The encoder is used to extract features from the continuous multi-frame video images to obtain fused features. The encoder includes at least one temporal fusion module, which is used to stitch adjacent frame features corresponding to adjacent video frames in the continuous multi-frame video images along the channel dimension to obtain temporal stitched features, and to perform convolution processing on each temporal stitched feature to obtain each fused feature. The decoder is used to upsample each fused feature to restore spatial resolution and generate pixel displacement scalar and dense flow field heat map of the water area to be measured.

[0008] According to a non-contact water flow velocity measurement method provided by the present invention, the pixel displacement scalar is used to characterize the global maximum value of the surface flow velocity of the water body to be measured; The dense flow field thermogram is used to characterize the distribution pattern of the surface flow velocity.

[0009] According to the non-contact water flow velocity measurement method provided by the present invention, the dense flow field thermogram is obtained by normalizing the surface flow velocity based on the pixel displacement scalar.

[0010] According to the non-contact water flow velocity measurement method provided by the present invention, the step of upsampling each of the fused features to restore spatial resolution and generate pixel displacement scalars and dense flow field heatmaps of the water body to be measured includes: Determine the current decoding stage of the decoder: If the current decoding stage is the first-level decoding stage, then each of the fused features is used as the feature to be upsampled; if the current decoding stage is not the first-level decoding stage, then the intermediate fused features output by the previous level decoding stage are used as the feature to be upsampled. The upsampled features in the current decoding stage are subjected to transposed convolution to obtain the upsampled features; The shallow adjacent frame features transmitted from the encoder via skip connections are obtained, and the shallow adjacent frame features in the current decoding stage are reorganized from the batch dimension to the channel dimension to obtain shallow temporal splicing features. The upsampled features are fused with the shallow temporal splicing features to obtain the intermediate fused features of the current decoding stage; If the current decoding stage is not the last decoding stage, then the next level decoding stage of the current decoding stage is updated to the new current decoding stage, and the process returns to the step of determining the current decoding stage of the decoder. If the current decoding stage is the last decoding stage, the intermediate fusion features of the last decoding stage are decoded to generate the pixel displacement scalar and the dense flow field heat map.

[0011] According to the non-contact water flow velocity measurement method provided by the present invention, the step of stitching together the adjacent frame features corresponding to adjacent video frames in the channel dimension in the continuous multi-frame video images to obtain each temporal stitched feature includes: The adjacent frame features are grouped to obtain adjacent frame feature groups; wherein, the adjacent frame feature groups include adjacent frame features that correspond to two adjacent video frames in time. The channel dimensions of adjacent frame features within the adjacent frame feature group are concatenated to obtain each of the temporal concatenation features.

[0012] According to the non-contact water flow velocity measurement method provided by the present invention, the water flow velocity measurement model is obtained by iteratively executing the following steps until a preset iteration termination condition is met: Determine the initial water flow velocity model, and acquire sample multi-frame video images, as well as sample pixel displacement scalars and sample dense flow field thermograms corresponding to the sample multi-frame video images; The sample consists of multiple consecutive frames of video images, which are input into the initial water flow velocity model to obtain the predicted pixel displacement scalar and the predicted dense flow field heat map output by the initial water flow velocity model. Based on the predicted pixel displacement scalar and the sample pixel displacement scalar, as well as the predicted dense flow field heatmap and the sample dense flow field heatmap, the target loss is determined, and the model parameters of the initial water flow velocity model are updated based on the target loss.

[0013] According to the non-contact water flow velocity measurement method provided by the present invention, the step of obtaining the thermal map of the dense flow field of the sample includes: Generate sparse surface velocity distribution based on prior velocity parameters; Interpolation processing is performed on the sparse surface velocity distribution to obtain the dense surface velocity distribution; The maximum value of the flow velocity distribution on the dense surface is extracted and used as the sample pixel displacement scalar. The dense surface velocity distribution is normalized based on the sample pixel displacement scalar to obtain the sample dense flow field thermogram.

[0014] The present invention also provides a non-contact water flow velocity measuring device, comprising the following units: The acquisition unit is used to acquire multiple consecutive frames of video images of the water area to be measured. The input unit is used to input the continuous multi-frame video images into the water flow velocity model to obtain the pixel displacement scalar and dense flow field heat map of the water area to be measured output by the water flow velocity model. The water flow velocity measurement model includes an encoder and a decoder; The encoder is used to extract features from the continuous multi-frame video images to obtain fused features. The encoder includes at least one temporal fusion module, which is used to stitch adjacent frame features corresponding to adjacent video frames in the continuous multi-frame video images along the channel dimension to obtain temporal stitched features, and to perform convolution processing on each temporal stitched feature to obtain each fused feature. The decoder is used to upsample each fused feature to restore spatial resolution and generate pixel displacement scalar and dense flow field heat map of the water area to be measured.

[0015] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the non-contact water flow velocity measurement method as described above.

[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the non-contact water flow velocity measurement method as described above.

[0017] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements any of the non-contact water flow velocity measurement methods described above.

[0018] The non-contact water flow velocity measurement method, device, electronic equipment, and storage medium provided by this invention, by setting a temporal fusion module in the encoder of the water flow velocity measurement model, performs splicing and convolution processing on the adjacent frame features corresponding to adjacent video frames in the channel dimension of consecutive multi-frame video images. This enables the water flow velocity measurement model to process feature information of multiple time nodes simultaneously in the convolution operation, thereby deeply capturing and fusing the temporal dependencies of water movement. It overcomes the limitations of traditional methods in effectively utilizing video temporal information, solves the problem of limited velocity measurement accuracy caused by the uncertainty of water flow state in complex water environments, and significantly improves the accuracy and robustness of non-contact water flow velocity measurement. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0020] Figure 1 This is a flowchart illustrating the non-contact water flow velocity measurement method provided by the present invention.

[0021] Figure 2 This is a schematic diagram of the water flow velocity measurement model provided by the present invention.

[0022] Figure 3 This is a schematic diagram of the timing fusion module in the encoder provided by the present invention.

[0023] Figure 4 This is a schematic diagram of the upsampling module in the decoder provided by the present invention.

[0024] Figure 5 This is a schematic diagram of the non-contact water flow velocity measuring device provided by the present invention.

[0025] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0027] This invention provides a non-contact water flow velocity measurement method, which can be applied to water flow velocity monitoring scenarios in natural water bodies such as rivers, canals, lakes, and oceans, or in artificial environments such as experimental water tanks in water conservancy projects. Figure 1 This is a schematic flowchart of the non-contact water flow velocity measurement method provided by the present invention, as shown below. Figure 1 As shown, the method includes the following: Step 110: Acquire multiple consecutive video images of the water area to be tested.

[0028] Specifically, firstly, multiple consecutive video frames of the water body to be measured can be acquired. The water body to be measured refers to any body of water whose surface flow velocity needs to be measured. The water body to be measured can be a river, lake, ocean, stream, canal, etc., in a natural environment; or it can be a water tank in a hydraulic model experiment, a pipe in an industrial circulating water system, etc., in an artificial environment. This embodiment of the invention does not specifically limit the specific type of water body.

[0029] Among them, continuous multi-frame video images refer to a series of image frames that are continuously acquired in time. The continuous multi-frame video images together constitute a video, which can capture the dynamic information of the surface of the water body under test, such as water ripples, floating objects, water textures, etc., as they change over time.

[0030] Acquiring continuous multi-frame video images of the water area to be measured can be achieved through various image acquisition devices. For example, a camera can be fixedly installed on the shore, bridge, or above the water area to capture images from a fixed perspective; alternatively, a mobile platform such as a drone can be used to carry the camera for aerial photography. In practical implementation, to ensure the accuracy of speed measurement, the acquisition device can be calibrated to establish a mapping relationship between image pixel coordinates and actual coordinates in the physical world. The number of frames in the continuous multi-frame video images can be set according to the actual speed measurement requirements and computing resources. For example, in a specific embodiment, 32 consecutive video images can be acquired as input data for a single speed measurement task.

[0031] Step 120: Input the continuous multi-frame video images into the water flow velocity model to obtain the pixel displacement scalar and dense flow field heat map of the water area to be measured output by the water flow velocity model. The water flow velocity measurement model includes an encoder and a decoder; The encoder is used to extract features from the continuous multi-frame video images to obtain fused features. The encoder includes at least one temporal fusion module, which is used to stitch adjacent frame features corresponding to adjacent video frames in the continuous multi-frame video images along the channel dimension to obtain temporal stitched features, and to perform convolution processing on each temporal stitched feature to obtain each fused feature. The decoder is used to upsample each fused feature to restore spatial resolution and generate pixel displacement scalar and dense flow field heat map of the water area to be measured.

[0032] Specifically, after acquiring multiple consecutive video images of the water body to be measured, these images can be input into the water flow velocity model to obtain the pixel displacement scalar and dense flow field heat map of the water body to be measured, which are output by the water flow velocity model.

[0033] The pixel displacement scalar is a single numerical value used to reflect a key global indicator of the surface velocity of the water body being measured. For example, the pixel displacement scalar can be a quantitative representation of the maximum or average value of the surface velocity of the water body across the entire field of view.

[0034] Dense flow field heatmaps are two-dimensional graphical representations used to reflect the distribution pattern and detailed information of surface flow velocity in a measured water body across the entire spatial range. The term "dense" refers to the fact that dense flow field heatmaps provide a corresponding flow velocity value for every pixel or high-density grid node within the field of view, rather than describing only a few discrete points. As a visualization tool, heatmaps typically use different colors or brightness levels to identify the flow velocity magnitude at various locations, thus intuitively displaying the spatial distribution characteristics of the flow field.

[0035] Here, the water flow velocity measurement model includes an encoder and a decoder, with a network architecture similar to U-Net. The encoder's main function is to perform hierarchical feature extraction from a series of consecutive frames of input video images. During processing, the encoder gradually reduces the spatial resolution of the feature map through a series of downsampling operations, while increasing the number of channels in the feature map. The decoder's function is the opposite of the encoder. The decoder receives the low-resolution high-order features output by the encoder, gradually restores the spatial resolution of the feature map through a series of upsampling operations, such as transposed convolution, and fuses the shallow features extracted by the encoder at different stages, ultimately reconstructing an output result with a resolution comparable to the input image, i.e., generating a pixel displacement scalar y and a dense flow field heatmap M.

[0036] The encoder is used to extract features from multiple consecutive video frames to obtain fused features. The encoder includes at least one temporal fusion module, which concatenates the features of adjacent video frames in the channel dimension to obtain temporal concatenated features, and then performs convolution processing on these temporal concatenated features to obtain fused features.

[0037] Here, the temporal fusion module is specifically designed to process and fuse video frame information from different time points to capture the movement and change patterns of the water body. In a specific embodiment, the temporal fusion module may be referred to as the FusionLayer module.

[0038] Among them, the adjacent frame features corresponding to adjacent video frames refer to the intermediate feature maps extracted from two or more temporally adjacent video images by operations such as convolutional layers during the feature extraction process of the encoder.

[0039] In one specific embodiment, firstly, the features of adjacent frames are concatenated along the channel dimension, which is a feature recombination process. For batch data consisting of multiple consecutive video frames as input, which contains multiple temporally consecutive video frames, the temporal fusion module first groups the features of adjacent frames corresponding to two adjacent frames into one group. Then, without changing the spatial dimensions (height H and width W) of the feature map, the channel dimensions of these two groups of feature maps are concatenated. Specifically, if the dimension of each group of adjacent frame features is [B / 2, C, H, W], where B is the batch size and C is the number of channels, the concatenation operation merges the two samples within the group along the channel dimension, making the dimension of the concatenated temporal features [B / 2, 2C, H, W]. In this way, information that was originally separated along the temporal dimension is effectively integrated into the channel dimension, enabling subsequent convolutional operations to process feature information from adjacent time points simultaneously.

[0040] After obtaining the temporal stitching features, the temporal fusion module can use convolutional operations, such as standard convolution, grouped convolution, or depthwise separable convolution, to process each temporal stitching feature. Since each temporal stitching feature has already fused information from adjacent frames in the channel dimension, the convolutional kernel can naturally learn and extract correlated features and motion patterns across the time dimension during computation. After convolution processing, the fused features are output. Each fused feature contains both rich spatial information and crucial temporal dynamic information.

[0041] Here, the decoder upsamples each fused feature to restore spatial resolution and generate pixel displacement scalars and dense flow field heatmaps of the water area under test. The purpose of upsampling is to progressively enlarge the spatial size of the feature maps of each fused feature, restoring the detailed information of the image. Upsampling can be achieved in various ways, such as transposed convolution or interpolation followed by convolutional layers. Through step-by-step upsampling, the decoder finally generates feature maps with a resolution similar to or the desired output resolution of the input image, and further decodes them through the final output layer, such as a convolutional layer or a fully connected layer, to generate the final pixel displacement scalars and dense flow field heatmaps.

[0042] The method provided in this invention sets a temporal fusion module in the encoder of the water flow velocity measurement model, and performs convolution processing on the adjacent frame features corresponding to adjacent video frames in the channel dimension in multiple consecutive video images. This enables the water flow velocity measurement model to process feature information of multiple time nodes simultaneously in the convolution operation, thereby deeply capturing and fusing the temporal dependencies of water movement. This overcomes the limitations of traditional methods in effectively utilizing video temporal information, solves the problem of limited velocity measurement accuracy caused by the uncertainty of water flow state in complex water environments, and significantly improves the accuracy and robustness of non-contact water flow velocity measurement.

[0043] Based on the above embodiments, the pixel displacement scalar is used to characterize the global maximum value of the surface flow velocity of the water body under test; The dense flow field thermogram is used to characterize the distribution pattern of the surface flow velocity.

[0044] Specifically, the pixel displacement scalar y corresponds to the output component 1. The pixel displacement scalar is used to reflect the global maximum value of the surface flow velocity in the water body being measured. When constructing the water flow velocity measurement model or creating labels, the pixel displacement scalar is obtained by extracting the maximum value in the original dense flow field distribution as a representative index, reflecting the overall kinetic energy intensity of the water flow.

[0045] Here, the dense flow field heatmap M corresponds to output component 2. The dense flow field heatmap reflects the distribution pattern of surface velocity. This distribution pattern reflects the relative strength of velocities, flow direction trends, and morphological structure of the flow field at different points in two-dimensional space, such as the presence of vortices and the shift of the main flow zone. The distribution values ​​of the dense flow field heatmap are typically concentrated between 0 and 1, providing a high-resolution visual representation of the spatial distribution characteristics of the flow field.

[0046] The method provided in this invention deconstructs water flow features into a global pixel displacement scalar and a local dense flow field heatmap, enabling the water flow velocity measurement model to simultaneously consider macroscopic displacement constraints and microscopic flow field details during training and inference. This design of splitting the output component in two allows global displacement constraints and local flow field details to complement each other, not only improving the accuracy of physical representation but also better guiding the water flow velocity measurement model's learning and exhibiting better generalization ability.

[0047] Based on the above embodiments, the dense flow field thermogram is obtained by normalizing the surface flow velocity based on the pixel displacement scalar.

[0048] Specifically, the dense flow field heatmap is obtained by normalizing the surface flow velocity using pixel displacement scalars, as shown in the following formula: ; in, This represents a thermal map of a dense flow field, i.e., the normalized flow field distribution. Indicates the location in the original dense flow field distribution field Surface flow rate; This represents the maximum surface velocity in the original dense flow field distribution, which corresponds to the pixel displacement scalar.

[0049] In practical applications, the original dense flow field distribution field of the water body to be measured is first obtained, which is the original data field reflecting the absolute value of the actual flow velocity of each pixel. Then, the maximum value is extracted as the pixel displacement scalar. Finally, the maximum value is used as a scaling factor to perform pixel-by-pixel division on the entire flow field, thereby generating a normalized dense flow field heat map.

[0050] Based on the above embodiments, the upsampling process performed on each of the fused features to restore spatial resolution and generate pixel displacement scalars and dense flow field heatmaps of the water body under test includes: Step 21: Determine the current decoding stage of the decoder: Step 22: If the current decoding stage is the first-level decoding stage, then each of the fused features is used as the feature to be upsampled; if the current decoding stage is not the first-level decoding stage, then the intermediate fused features output by the previous level decoding stage are used as the feature to be upsampled. Step 23: Perform transposed convolution processing on the features to be upsampled in the current decoding stage to obtain upsampled features; Step 24: Obtain the shallow adjacent frame features transmitted from the encoder through skip connections, and reorganize the shallow adjacent frame features in the current decoding stage from batch dimension to channel dimension to obtain shallow temporal splicing features. Step 25: Fuse the upsampled features with the shallow temporal splicing features to obtain the intermediate fused features of the current decoding stage; Step 26: If the current decoding stage is not the last decoding stage, then update the next decoding stage of the current decoding stage to the new current decoding stage, and return to the step of determining the current decoding stage of the decoder. Step 27: If the current decoding stage is the last decoding stage, decode the intermediate fusion features of the last decoding stage to generate the pixel displacement scalar and the dense flow field heat map.

[0051] Specifically, in one particular embodiment, the process of the decoder upsampling each fused feature involves multi-level decoding and feature recombination.

[0052] The decoder, such as the FusionUpSample structure, comprises multiple consecutive decoding stages. During processing, the current decoding stage of the decoder must first be determined. Here, the current decoding stage reflects which resolution of feature recovery the current flow velocity model is performing.

[0053] If the current decoding stage is the first-level decoding stage, i.e., the deepest decoding stage, such as FusionUpSample1, then the fused features (from the output of the last layer of the encoder) are used as the features to be upsampled. If the current decoding stage is not the first-level decoding stage, such as the second to fifth-level decoding stages, then the intermediate fused features output from the previous level of the current decoding stage are used as the features to be upsampled. The features to be upsampled are used to reflect the deep semantic information for which spatial resolution needs to be further recovered.

[0054] Then, the features to be upsampled in the current decoding stage are transposed and convolved to obtain upsampled features. These upsampled features are used to reflect the initial recovery features, which reflect the increased spatial resolution but still lack of detail.

[0055] Simultaneously, shallow adjacent frame features transmitted through the autoencoder via skip connections are acquired. These shallow adjacent frame features in the current decoding stage are then reassembled from the batch dimension to the channel dimension to obtain shallow temporal stitching features. Here, shallow adjacent frame features refer to intermediate feature maps obtained by performing shallow convolutions on each frame of a series of consecutive video images in the encoder. These are typically output from shallower network modules in the encoder, such as the first convolutional layer, and passed to the decoding stage corresponding to the resolution in the decoder via skip connections. Multiple sets of feature maps output in the same stage correspond to temporally adjacent video frames. Shallow temporal stitching features are feature representations with the same batch size as the upsampled features, obtained by reassembling adjacent frame samples from the shallow adjacent frame features in the batch dimension to the channel dimension.

[0056] Furthermore, the upsampled features are fused with the shallow temporal concatenation features to obtain the intermediate fused features for the current decoding stage. This fusion is typically achieved by concatenating channels followed by double convolution (DoubleConv) for refinement. The intermediate fused features reflect the mixed features resulting from the fusion of deep semantics and shallow details at the current resolution.

[0057] If the current decoding stage is not the last decoding stage, then the next decoding stage is updated to the new current decoding stage, and the process returns to the step of determining the current decoding stage of the decoder. Finally, if the current decoding stage is the last decoding stage, the intermediate fusion features of the last decoding stage are decoded to generate pixel displacement scalars and dense flow field heatmaps.

[0058] The method provided in this invention introduces a temporal reorganization mechanism for skip connection features during the decoding stage, and combines transposed convolution with multi-level fusion, enabling the decoder to simultaneously integrate shallow detail information and deep motion semantics from multiple time points, thereby enhancing the expressive power of multi-scale features and ensuring the spatial precision and temporal coherence of the output flow field.

[0059] Based on the above embodiments, the step of concatenating the adjacent frame features corresponding to adjacent video frames in the continuous multi-frame video images along the channel dimension to obtain each temporal concatenation feature includes: Step 31: Group the adjacent frame features to obtain adjacent frame feature groups; wherein, the adjacent frame feature groups include adjacent frame features corresponding to two temporally adjacent video frames respectively; Step 32: Concatenate the channel dimensions of adjacent frame features within the adjacent frame feature group to obtain each temporal concatenation feature.

[0060] Specifically, firstly, the features of adjacent frames are grouped to obtain adjacent frame feature groups. Each adjacent frame feature group includes adjacent frame features corresponding to two temporally adjacent video frames. In implementation, the batch dimension B of the adjacent frame features output by the encoder is reshaped to (B / 2,2), so that the adjacent frame feature maps corresponding to two temporally adjacent frames are grouped into the same group, forming adjacent frame feature groups with dimensions [B / 2,2,C,H,W].

[0061] Then, the feature maps of two adjacent frames within the same adjacent frame feature group are concatenated along the channel dimension to obtain the temporal concatenated feature. Specifically, while keeping the spatial size H×W unchanged, the feature maps of two adjacent frames with shapes [C,H,W] within the adjacent frame feature group are merged along the channel axis, making the output temporal concatenated feature dimension [B / 2,2C,H,W]. Thus, the feature information of adjacent frames at adjacent time points is explicitly fused into the channel dimension, allowing the convolutional layers to perform joint processing.

[0062] The method provided in this invention grouped the features of adjacent frames and performed batch-to-channel conversion and splicing, enabling the convolutional layer to directly learn the pixel displacement relationship between adjacent time points in the channel dimension, thereby significantly improving the ability of the water flow velocity model to capture the subtle motion features of fluids.

[0063] Based on the above embodiments, the water flow velocity measurement model is obtained by iteratively executing the following steps until a preset iteration termination condition is met: Step 41: Determine the initial water flow velocity model and acquire sample multi-frame video images, as well as sample pixel displacement scalars and sample dense flow field thermograms corresponding to the sample multi-frame video images. Step 42: Input the sample of multiple consecutive video frames into the initial water flow velocity model to obtain the predicted pixel displacement scalar and the predicted dense flow field heat map output by the initial water flow velocity model; Step 43: Based on the predicted pixel displacement scalar and the sample pixel displacement scalar, as well as the predicted dense flow field heat map and the sample dense flow field heat map, determine the target loss, and update the model parameters of the initial water flow velocity model based on the target loss.

[0064] Specifically, firstly, an initial water flow velocity model can be determined, and multiple consecutive frames of video images of the sample can be obtained, along with the sample pixel displacement scalar and sample dense flow field thermogram corresponding to the multiple consecutive frames of video images of the sample.

[0065] The initial water flow velocity measurement model refers to a model whose structure is determined but whose internal parameters, such as convolutional kernel weights and biases, have not been optimized or are in a random state. The architecture of the initial water flow velocity measurement model adopts an improved U-Net fully convolutional semantic segmentation network, which includes 6 encoder stages and 5 decoder stages.

[0066] Here, consecutive multi-frame video images are used to reflect the dynamic visual characteristics of water flow under known flow velocity conditions, serving as input data for training. The sample pixel displacement scalar, i.e., label component 1, is used to reflect the true global maximum value of the surface flow velocity in the consecutive multi-frame video images; the sample dense flow field heatmap, i.e., label component 2, is used to reflect the true distribution pattern of the surface flow velocity in the consecutive multi-frame video images.

[0067] Then, multiple consecutive frames of video images from the sample can be input into the initial flow velocity model to obtain the predicted pixel displacement scalar and the predicted dense flow field thermogram output by the initial flow velocity model.

[0068] Among them, the predicted pixel displacement scalar is used to reflect the estimated value of the global maximum flow velocity under the model parameters of the initial flow velocity model; the predicted dense flow field heat map is used to reflect the prediction result of the flow field distribution pattern under the model parameters of the initial flow velocity model.

[0069] Furthermore, based on the predicted pixel displacement scalar and the sample pixel displacement scalar, as well as the predicted dense flow field heat map and the sample dense flow field heat map, the target loss is determined, and the model parameters of the initial water flow velocity model are updated based on the target loss.

[0070] It is understandable that the greater the difference between the predicted pixel displacement scalar and the sample pixel displacement scalar, the greater the target loss; the smaller the difference between the predicted pixel displacement scalar and the sample pixel displacement scalar, the smaller the target loss.

[0071] Understandably, the greater the difference between the predicted dense flow field heatmap and the sample dense flow field heatmap, the greater the target loss; conversely, the smaller the difference between the predicted dense flow field heatmap and the sample dense flow field heatmap, the smaller the target loss.

[0072] Here, the bias is fed back to each layer of the network through the backpropagation algorithm, and the optimizer updates the parameters in the encoder (Conv0-FusionLayer5) and decoder (FusionUpSample1-FusionUpSample5).

[0073] The preset iteration termination condition can be that the target loss converges to a preset threshold, or that a preset number of training rounds is reached.

[0074] Unlike traditional models that directly use the original flow field distribution as training labels, this embodiment decouples the labels using pixel displacement scalars and dense flow field heatmaps. This improved label processing method significantly accelerates the convergence speed of the flow velocity measurement model, enabling it to quickly lock the global motion magnitude of the flow in the early stages of training and focus on refining the spatial distribution details of the flow field in the mid-to-late stages, thereby effectively improving the overall accuracy of non-contact flow velocity measurement.

[0075] The method provided in this embodiment of the invention uses iterative training to provide global motion constraints using pixel displacement scalars and local motion details using dense flow field heatmaps. This dual supervision mechanism enables the model to learn a deep mapping relationship from complex video features to the physical properties of the flow field, significantly improving the prediction accuracy and robustness of the model when dealing with non-stationary water flow.

[0076] Based on the above embodiments, the step of obtaining the sample dense flow field thermogram includes: Step 51: Generate a sparse surface velocity distribution based on prior velocity parameters; Step 52: Interpolate the sparse surface velocity distribution to obtain the dense surface velocity distribution; Step 53: Extract the maximum value of the dense surface velocity distribution as a sample pixel displacement scalar; Step 54: Normalize the flow velocity distribution on the dense surface based on the sample pixel displacement scalar to obtain the sample dense flow field thermogram.

[0077] Specifically, firstly, a sparse surface velocity distribution is generated based on prior velocity parameters. Here, the prior velocity parameters reflect the actual velocity reference values ​​collected in the experiment using contact devices, such as flowmeters. The prior velocity parameters can be input into processing software based on large-scale particle image velocimetry technology to perform a preliminary estimation without disturbing the flow field, thus obtaining the sparse surface velocity distribution.

[0078] Among them, the sparse surface velocity distribution is used to reflect the velocity value only at a specific grid point, which is spatially discontinuous.

[0079] Secondly, interpolation processing is performed on the sparse surface velocity distribution to obtain a dense surface velocity distribution. Since the original velocity values ​​generated by the processing software based on large-scale particle image velocimetry are sparse, this embodiment employs bilinear interpolation to sample and fill the sparse grid point velocities for end-to-end deep learning training, thereby generating a dense surface velocity distribution. This dense surface velocity distribution reflects the continuous velocity information corresponding to each pixel within the measurement area, providing pixel-level supervision signals for the initial water flow velocity measurement model.

[0080] Then, the maximum value of the velocity distribution on the dense surface is extracted as a scalar of the sample pixel displacement. This step extracts global features from the spatially continuous flow field, condensing the complex flow field distribution into a single component representing the maximum motion intensity.

[0081] Finally, the velocity distribution on the dense surface is normalized based on the sample pixel displacement scalar to obtain the sample dense flow field thermogram, as shown in the following formula: ; in, This represents the thermal map of the dense flow field of the sample, i.e., the normalized flow field distribution; Indicates the location of the dense flow field distribution in the original sample. Surface flow rate; This represents the maximum surface velocity in the dense flow field of the original sample, which corresponds to the sample pixel displacement scalar.

[0082] Based on any of the above embodiments Figure 2This is a schematic diagram of the water flow velocity measurement model provided by the present invention, as shown below. Figure 2 As shown, the input to the water flow velocity measurement model is a series of consecutive video images with dimensions [32, 3, H, W]. In the encoder stage, the input is first processed by a Conv0 basic convolutional layer to obtain features with dimensions [32, 16, H / 2, W / 2]. Then, it is sequentially extracted hierarchically through five temporal fusion modules: FusionLayer1 (output dimensions [16, 32, H / 4, W / 4]), FusionLayer2 (output dimensions [8, 64, H / 8, W / 8]), FusionLayer3 (output dimensions [4, 128, H / 16, W / 16]), FusionLayer4 (output dimensions [2, 256, H / 32, W / 32]), and FusionLayer5 (output dimensions [1, 512, H / 64, W / 64]). At the end of the encoder, the features... Figure 1 On the one hand, global decoding is performed through the Classify branch, outputting a pixel displacement scalar y; on the other hand, it serves as the starting point for the decoder input. The decoder stage consists of five upsampling modules, from deep to shallow: FusionUpSample5, FusionUpSample4, FusionUpSample3, FusionUpSample2, and finally FusionUpSample1. Among them, FusionUpSample5 processes the features of FusionLayer4 and FusionLayer5. Each module receives shallow features from the corresponding encoder stage through skip connections. Finally, FusionUpSample1 outputs a refined feature map with dimensions [32, 16, H / 2, W / 2], and decodes it to generate a dense flow field heatmap.

[0083] Figure 3 This is a schematic diagram of the timing fusion module in the encoder provided by the present invention, as shown below. Figure 3As shown, when a feature map of dimension [B, C, H, W] is input into the temporal fusion module (FusionLayer), the first step, map_fusion, is executed. This step concatenates the features of adjacent video frames in the batch dimension along the channel dimension through feature recombination, transforming the feature dimension from [B, C, H, W] to [B / 2, 2C, H, W]. Next, the GroupConv step performs grouped convolution processing. This convolutional layer uses a 3x3 kernel and sets the number of groups to C to achieve cross-temporal feature fusion under independent convolution of each input channel. Then, advanced feature extraction is performed, specifically including sequentially executing Batch Normalization (BN) + Rectified Linear Unit (ReLU) + Conv2d operations, where the convolutional kernel size is 3x3 and padding is used to maintain the feature map space size. Finally, the temporal fusion module outputs fused features of dimension [B / 2, C, H, W], by compressing temporal information into a new feature representation.

[0084] Figure 4 This is a schematic diagram of the upsampling module in the decoder provided by the present invention, as shown below. Figure 4 As shown, the upsampling module (FusionUpSample) achieves the collaboration between deep semantics and shallow details. The upsampling module receives two input signals: one is the feature to be upsampled, with dimensions denoted as [B, C1, H, W]; the other is the shallow neighboring frame feature from the skip connections, with dimensions denoted as [B, C2, 2H, 2W]. For the deep features, ConvTranspose is performed to perform a quadratic upsampling, restoring the spatial resolution to [B, C2, 2H, 2W]. For the shallow neighboring frame features, map_fusion is performed synchronously to reconstruct the features, resulting in a shallow temporal concatenation feature with dimensions [B, NxC2, 2H, 2W]. Subsequently, the Concatenate operation is performed to fuse the upsampled deep features and the shallow temporal concatenation feature along the channel dimension, resulting in a mixed feature map with dimensions [B, (N+1)xC2, 2H, 2W]. Finally, double convolution processing is performed using DoubleConv to perform nonlinear mapping and channel compression on the stitched high-dimensional features, and the final output is an intermediate fused feature with dimensions [B, C2, 2H, 2W], which ensures that the water flow velocity model can accurately align motion details at different scales while restoring resolution.

[0085] It should be noted that, unlike the traditional U-Net architecture designed for processing single images, which limits the encoder layers to feature extraction from the current input image and prevents them from capturing motion information over time, this embodiment introduces a FusionLayer module in the encoder. The FusionLayer module overcomes the limitations of single-frame processing by recombining, fusing, and extracting features from adjacent frames in the batch dimension. This allows the entire network to simultaneously acquire visual features from multiple time points, thereby accurately capturing the temporal dependencies of fluid motion and significantly improving the perception depth of dynamic water flow changes. The decoder exhibits powerful multi-scale feature fusion capabilities through the FusionUpSample structure. Traditional U-Net decoders typically simply concatenate encoder features with upsampled features, which fails to fully utilize the redundancy and complementary information across multiple frames in the video stream. In contrast, the FusionUpSample module in this embodiment recombines shallow adjacent frame features obtained from skip connections, enabling the decoder to simultaneously fuse skip connection features from multiple time points. This deep integration of deep semantics with shallow details at multiple time points not only enhances the expressive power of multi-scale features but also ensures the temporal consistency of prediction results in the spatiotemporal dimension, making the generated flow field distribution more in line with physical laws.

[0086] In terms of output module design, this embodiment of the invention achieves stronger constraint convergence capability through a dual-branch structure. Compared to the traditional U-Net, which typically designs only a single output branch for generating segmentation masks or regression results, this embodiment improves upon this design by designing two output branches: a classification branch that predicts pixel displacement scalars from encoded features, and a flow field branch that outputs a dense flow field heatmap from the decoder. This dual-output design allows the network to simultaneously obtain global motion information and local motion details. In this architecture, pixel displacement scalars can serve as macroscopic constraints for flow field prediction, while the dense flow field heatmap provides more refined spatial motion information. The two complement and validate each other, thereby better guiding the training of the initial flow velocity model. This significantly accelerates the convergence process of the initial flow velocity model while allowing global displacement constraints and local flow field details to complement each other, giving the flow velocity model better generalization ability.

[0087] The non-contact water flow velocity measuring device provided by the present invention is described below. The non-contact water flow velocity measuring device described below can be referred to in correspondence with the non-contact water flow velocity measuring method described above.

[0088] Based on any of the above embodiments, the present invention provides a non-contact water flow velocity measuring device. Figure 5 This is a schematic diagram of the non-contact water flow velocity measuring device provided by the present invention, as shown below. Figure 5 As shown, the device includes: The acquisition unit 510 is used to acquire multiple consecutive frames of video images of the water area to be measured; The input unit 520 is used to input the continuous multi-frame video images into the water flow velocity model to obtain the pixel displacement scalar and dense flow field heat map of the water area to be measured output by the water flow velocity model. The water flow velocity measurement model includes an encoder and a decoder; The encoder is used to extract features from the continuous multi-frame video images to obtain fused features. The encoder includes at least one temporal fusion module, which is used to stitch adjacent frame features corresponding to adjacent video frames in the continuous multi-frame video images along the channel dimension to obtain temporal stitched features, and to perform convolution processing on each temporal stitched feature to obtain each fused feature. The decoder is used to upsample each fused feature to restore spatial resolution and generate pixel displacement scalar and dense flow field heat map of the water area to be measured.

[0089] The apparatus provided in this invention sets a temporal fusion module in the encoder of the water flow velocity measurement model, and performs splicing and convolution processing on the adjacent frame features corresponding to adjacent video frames in the channel dimension in multiple consecutive video images. This enables the water flow velocity measurement model to process feature information of multiple time nodes simultaneously in the convolution operation, thereby deeply capturing and fusing the temporal dependencies of water movement. This overcomes the limitations of traditional methods in effectively utilizing video temporal information, solves the problem of limited velocity measurement accuracy caused by the uncertainty of water flow state in complex water environments, and significantly improves the accuracy and robustness of non-contact water flow velocity measurement.

[0090] Based on any of the above embodiments, the pixel displacement scalar is used to characterize the global maximum value of the surface flow velocity of the water body under test; The dense flow field thermogram is used to characterize the distribution pattern of the surface flow velocity.

[0091] Based on any of the above embodiments, the dense flow field thermogram is obtained by normalizing the surface flow velocity based on the pixel displacement scalar.

[0092] Based on any of the above embodiments, the decoder is specifically used for: Determine the current decoding stage of the decoder: If the current decoding stage is the first-level decoding stage, then each of the fused features is used as the feature to be upsampled; if the current decoding stage is not the first-level decoding stage, then the intermediate fused features output by the previous level decoding stage are used as the feature to be upsampled. The upsampled features in the current decoding stage are subjected to transposed convolution to obtain the upsampled features; The shallow adjacent frame features transmitted from the encoder via skip connections are obtained, and the shallow adjacent frame features in the current decoding stage are reorganized from the batch dimension to the channel dimension to obtain shallow temporal splicing features. The upsampled features are fused with the shallow temporal splicing features to obtain the intermediate fused features of the current decoding stage; If the current decoding stage is not the last decoding stage, then the next level decoding stage of the current decoding stage is updated to the new current decoding stage, and the process returns to the step of determining the current decoding stage of the decoder. If the current decoding stage is the last decoding stage, the intermediate fusion features of the last decoding stage are decoded to generate the pixel displacement scalar and the dense flow field heat map.

[0093] Based on any of the above embodiments, the timing fusion module is specifically used for: The adjacent frame features are grouped to obtain adjacent frame feature groups; wherein, the adjacent frame feature groups include adjacent frame features that correspond to two adjacent video frames in time. The channel dimensions of adjacent frame features within the adjacent frame feature group are concatenated to obtain each of the temporal concatenation features.

[0094] Based on any of the above embodiments, a training unit is further included, wherein the training unit is specifically used for: Determine the initial water flow velocity model, and acquire sample multi-frame video images, as well as sample pixel displacement scalars and sample dense flow field thermograms corresponding to the sample multi-frame video images; The sample consists of multiple consecutive frames of video images, which are input into the initial water flow velocity model to obtain the predicted pixel displacement scalar and the predicted dense flow field heat map output by the initial water flow velocity model. Based on the predicted pixel displacement scalar and the sample pixel displacement scalar, as well as the predicted dense flow field heatmap and the sample dense flow field heatmap, the target loss is determined, and the model parameters of the initial water flow velocity model are updated based on the target loss.

[0095] Based on any of the above embodiments, a sample acquisition unit is further included, wherein the sample acquisition unit is specifically used for: Generate sparse surface velocity distribution based on prior velocity parameters; Interpolation processing is performed on the sparse surface velocity distribution to obtain the dense surface velocity distribution; The maximum value of the flow velocity distribution on the dense surface is extracted and used as the sample pixel displacement scalar. The dense surface velocity distribution is normalized based on the sample pixel displacement scalar to obtain the sample dense flow field thermogram.

[0096] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6 As shown, the electronic device may include: a processor 610, a communications interface 620, a memory 630, and a communications bus 640, wherein the processor 610, the communications interface 620, and the memory 630 communicate with each other through the communications bus 640. The processor 610 can call logic instructions in the memory 630 to execute a non-contact water flow velocity measurement method, which includes: acquiring continuous multi-frame video images of the water area to be measured; inputting the continuous multi-frame video images into a water flow velocity measurement model to obtain pixel displacement scalars and dense flow field heat maps of the water area to be measured output by the water flow velocity measurement model; the water flow velocity measurement model includes an encoder and a decoder; the encoder is used to extract features from the continuous multi-frame video images to obtain fused features; the encoder includes at least one temporal fusion module, which is used to stitch adjacent frame features corresponding to adjacent video frames in the continuous multi-frame video images along the channel dimension to obtain temporal stitched features, and to perform convolution processing on each temporal stitched feature to obtain each fused feature; the decoder is used to upsample each fused feature to restore spatial resolution and generate pixel displacement scalars and dense flow field heat maps of the water area to be measured.

[0097] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a 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 the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0098] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the non-contact water flow velocity measurement method provided by the above methods. The method includes: acquiring a series of video images of a water body to be measured; inputting the series of video images into a water flow velocity measurement model to obtain a pixel displacement scalar and a dense flow field heat map of the water body to be measured output by the water flow velocity measurement model; the water flow velocity measurement model includes an encoder and a decoder; the encoder is used to extract features from the series of video images to obtain various fused features; the encoder includes at least one temporal fusion module, which is used to stitch adjacent frame features corresponding to adjacent video frames in the series of video images in the channel dimension to obtain various temporal stitched features, and to perform convolution processing on each of the temporal stitched features to obtain various fused features; the decoder is used to upsample each of the fused features to restore spatial resolution and generate a pixel displacement scalar and a dense flow field heat map of the water body to be measured.

[0099] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the non-contact water flow velocity measurement method provided by the above methods. This method includes: acquiring a series of consecutive video images of a water body to be measured; inputting the consecutive video images into a water flow velocity measurement model to obtain pixel displacement scalars and dense flow field heatmaps of the water body to be measured, output by the water flow velocity measurement model; the water flow velocity measurement model includes an encoder and a decoder; the encoder is used to extract features from the consecutive video images to obtain fused features; the encoder includes at least one temporal fusion module, which is used to stitch adjacent frame features corresponding to adjacent video frames in the consecutive video images along the channel dimension to obtain temporal stitched features, and to perform convolution processing on each temporal stitched feature to obtain each fused feature; the decoder is used to upsample each fused feature to restore spatial resolution and generate pixel displacement scalars and dense flow field heatmaps of the water body to be measured.

[0100] The device embodiments described above are merely illustrative. 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 modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0101] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A non-contact water flow velocity measurement method, characterized in that, include: Acquire continuous multi-frame video images of the water area to be measured; The continuous multi-frame video images are input into the water flow velocity model to obtain the pixel displacement scalar and dense flow field heat map of the water area to be measured output by the water flow velocity model. The water flow velocity measurement model includes an encoder and a decoder; The encoder is used to extract features from the continuous multi-frame video images to obtain fused features. The encoder includes at least one temporal fusion module, which is used to stitch adjacent frame features corresponding to adjacent video frames in the continuous multi-frame video images along the channel dimension to obtain temporal stitched features, and to perform convolution processing on each temporal stitched feature to obtain each fused feature. The decoder is used to upsample each fused feature to restore spatial resolution and generate pixel displacement scalar and dense flow field heat map of the water area to be measured.

2. The non-contact water flow velocity measurement method according to claim 1, characterized in that, The pixel displacement scalar is used to characterize the global maximum value of the surface flow velocity of the water body under test; The dense flow field thermogram is used to characterize the distribution pattern of the surface flow velocity.

3. The non-contact water flow velocity measurement method according to claim 2, characterized in that, The dense flow field thermogram is obtained by normalizing the surface flow velocity based on the pixel displacement scalar.

4. The non-contact water flow velocity measurement method according to any one of claims 1 to 3, characterized in that, The upsampling process for each of the fused features to restore spatial resolution and generate pixel displacement scalars and dense flow field heatmaps for the water area under test includes: Determine the current decoding stage of the decoder: If the current decoding stage is the first-level decoding stage, then each of the fused features is used as the feature to be upsampled; if the current decoding stage is not the first-level decoding stage, then the intermediate fused features output by the previous level decoding stage are used as the feature to be upsampled. The upsampled features in the current decoding stage are subjected to transposed convolution to obtain the upsampled features; The shallow adjacent frame features transmitted from the encoder via skip connections are obtained, and the shallow adjacent frame features in the current decoding stage are reorganized from the batch dimension to the channel dimension to obtain shallow temporal splicing features. The upsampled features are fused with the shallow temporal splicing features to obtain the intermediate fused features of the current decoding stage; If the current decoding stage is not the last decoding stage, then the next level decoding stage of the current decoding stage is updated to the new current decoding stage, and the process returns to the step of determining the current decoding stage of the decoder. If the current decoding stage is the last decoding stage, the intermediate fusion features of the last decoding stage are decoded to generate the pixel displacement scalar and the dense flow field heat map.

5. The non-contact water flow velocity measurement method according to any one of claims 1 to 3, characterized in that, The step of concatenating the adjacent frame features corresponding to adjacent video frames in the continuous multi-frame video images along the channel dimension to obtain each temporal concatenation feature includes: The adjacent frame features are grouped to obtain adjacent frame feature groups; wherein, the adjacent frame feature groups include adjacent frame features that correspond to two adjacent video frames in time. The channel dimensions of adjacent frame features within the adjacent frame feature group are concatenated to obtain each of the temporal concatenation features.

6. The non-contact water flow velocity measurement method according to any one of claims 1 to 3, characterized in that, The water flow velocity measurement model is obtained by iteratively executing the following steps until a preset iteration termination condition is met: Determine the initial water flow velocity model, and acquire sample multi-frame video images, as well as sample pixel displacement scalars and sample dense flow field thermograms corresponding to the sample multi-frame video images; The sample consists of multiple consecutive frames of video images, which are input into the initial water flow velocity model to obtain the predicted pixel displacement scalar and the predicted dense flow field heat map output by the initial water flow velocity model. Based on the predicted pixel displacement scalar and the sample pixel displacement scalar, as well as the predicted dense flow field heatmap and the sample dense flow field heatmap, the target loss is determined, and the model parameters of the initial water flow velocity model are updated based on the target loss.

7. The non-contact water flow velocity measurement method according to claim 6, characterized in that, The steps for obtaining the dense flow field thermogram of the sample include: Generate sparse surface velocity distribution based on prior velocity parameters; Interpolation processing is performed on the sparse surface velocity distribution to obtain the dense surface velocity distribution; The maximum value of the flow velocity distribution on the dense surface is extracted and used as the sample pixel displacement scalar. The dense surface velocity distribution is normalized based on the sample pixel displacement scalar to obtain the sample dense flow field thermogram.

8. A non-contact water flow velocity measuring device, characterized in that, include: The acquisition unit is used to acquire multiple consecutive frames of video images of the water area to be measured. The input unit is used to input the continuous multi-frame video images into the water flow velocity model to obtain the pixel displacement scalar and dense flow field heat map of the water area to be measured output by the water flow velocity model. The water flow velocity measurement model includes an encoder and a decoder; The encoder is used to extract features from the continuous multi-frame video images to obtain fused features. The encoder includes at least one temporal fusion module, which is used to stitch adjacent frame features corresponding to adjacent video frames in the continuous multi-frame video images along the channel dimension to obtain temporal stitched features, and to perform convolution processing on each temporal stitched feature to obtain each fused feature. The decoder is used to upsample each fused feature to restore spatial resolution and generate pixel displacement scalar and dense flow field heat map of the water area to be measured.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the non-contact water flow velocity measurement method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the non-contact water flow velocity measurement method as described in any one of claims 1 to 7.