Construction method of river network hydrodynamic condition visualization system based on digital twinning

By employing a dual-gradient dynamic perspective switching algorithm and semantic modeling technology, multi-scale visualization of the hydrodynamic conditions of river networks was achieved, solving the user experience gap problem when switching between two-dimensional and three-dimensional modes, improving the realism and interactivity of river network simulation, and supporting operation at multiple time scales and perspectives.

CN121147431APending Publication Date: 2025-12-16HOHAI UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511253317.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-03
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

The traditional switching between 2D maps and 3D scenes creates a gap in user experience in river network hydrodynamic simulation and visualization, failing to achieve smooth connection and intelligent transition, and making it difficult to meet the comprehensive visualization needs of hydrodynamic changes and multi-river network structures.

Method used

The system employs a dual gradient dynamic perspective switching algorithm (DGDVSA) to achieve seamless transition between 2D and 3D map scenes. Combined with semantic adjustment modeling mechanism and hydrodynamic simulation, it constructs water flow materials and flow animations through the Cesium platform, supporting multi-scale interactive operations.

Benefits of technology

It enables smooth switching between two-dimensional and three-dimensional perspectives, improves the user interaction experience, enhances the realism and operability of river network simulation, supports interactive operations at multiple time scales and perspectives, and strengthens the expressive power of hydrodynamic data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121147431A_ABST
    Figure CN121147431A_ABST
Patent Text Reader

Abstract

The invention discloses a construction method of a river network hydrodynamic condition visualization system based on digital twinning, and the method comprises the steps: employing a dual gradual change dynamic visual angle switching algorithm, and carrying out the smooth transition to a three-dimensional visualization environment through user interaction in a two-dimensional interface; a semantic deployment modeling mechanism and a three-dimensional river mechanism based on water level interpolation are utilized to automatically generate a building model and a river path in a river-side area, and a water flow material and a flow animation are constructed through a Cesium platform to realize flow effect rendering; water depth and flow velocity data under a continuous time sequence are dynamically acquired, real-time rendering is performed on a Cesium platform, continuity and smoothness of a visual effect are guaranteed by using a nonlinear response interpolation algorithm based on animation driving, and a simulation time step length is controlled through a timer mechanism, so that real-time simulation of the water depth and the flow velocity is realized. And accurate visual expression of the hydrodynamic force change process under different time scales is supported. And users are supported to carry out interactive operation under different visual angles and time dimensions, so that the visual expressive power of the river network hydrodynamic data and the system response efficiency are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for constructing a visualization system for river network hydrodynamic conditions based on digital twins. It integrates two-dimensional and three-dimensional visualization technologies and is suitable for urban river network simulation, watershed management, and dynamic display of hydrodynamic processes. It belongs to the interdisciplinary technical fields of digital twins, water conservancy informatization, and geographic information systems. Background Technology

[0002] With the rapid development of smart water management and urban information modeling, traditional two-dimensional map-based river network display methods are no longer sufficient to meet the comprehensive visualization needs for hydrodynamic changes, multi-river network structures, and multi-source data fusion. Current three-dimensional geographic information systems offer a more intuitive spatial representation, but due to their high requirements for real-time interactivity and data synchronization, they still face many challenges in river network hydrodynamic simulation and visualization.

[0003] Currently, the transition between 2D maps and 3D scenes often results in a user experience gap, failing to achieve smooth integration and intelligent transition when displaying multi-river structures, water level dynamics, and building spatial distribution. Therefore, there is an urgent need for a visualization system that integrates 2D and 3D technologies, possessing the capabilities for river network dynamic simulation, hydrodynamic expression, and multi-scene interaction, to meet the needs of digital twin watershed construction and urban water system management. Summary of the Invention

[0004] Purpose of the invention: To address the problems and shortcomings of existing technologies, this invention provides a method for constructing a visualization system for river network hydrodynamic conditions based on digital twins. By integrating 2D maps and 3D geographic information views, it enables dynamic expression of hydrodynamics in multi-river network scenarios, generation of architectural models, and multi-scale interactive operations, thereby improving the realism, operability, and visual expressiveness of river network simulation.

[0005] Technical Solution: A method for constructing a river network hydrodynamic visualization system based on digital twins. This method features a linkage mechanism combining two-dimensional maps and three-dimensional scenes, integrating digital twin modeling and hydrodynamic simulation to achieve multi-scale visualization of hydrodynamic processes in complex river networks. The method includes the following: This method employs a dual-gradient dynamic perspective switching algorithm, smoothly transitioning from a 2D map interface to a 3D visualization environment through user interaction, achieving seamless switching between 2D and 3D. Utilizing a semantic-based modeling mechanism and a 3D river path construction mechanism based on water level interpolation, it automatically generates building models along the river and the river path. Water flow materials and animations are constructed using the Cesium platform to achieve flow effect rendering. Integrating hydrodynamic simulation capabilities, it dynamically acquires water depth and velocity data over continuous time series, performs real-time rendering on the Cesium platform, dynamically calculates Cesium flow parameters based on simulation parameters, and uses an animation-driven nonlinear response interpolation algorithm to ensure the continuity and smoothness of the visual effects. A timer mechanism controls the simulation time step, supporting precise visualization of hydrodynamic changes at different time scales. This method allows users to interact with it from different perspectives and time dimensions, effectively improving the visualization expressiveness of river network hydrodynamic data and the system response efficiency. It is suitable for various application scenarios such as urban water system management, watershed modeling, and flood warning.

[0006] A two-dimensional map interface is constructed, which triggers smooth map zoom-in upon receiving user input. Within the two-dimensional map interface, a dynamic view path is constructed using Bézier curves based on the user's input and the target geographical location. The speed is then adaptively adjusted based on the path length and node spacing to ensure smooth and natural view animation.

[0007] Furthermore, by clicking on the river, the user triggers a change in the map perspective, calling the map.flyTo() method in Leaflet to smoothly zoom in on the Leaflet map and simulate entering the target area.

[0008] Furthermore, a dual-gradient dynamic perspective switching algorithm is employed to automatically generate spatial paths during the transition from 2D to 3D. This algorithm intelligently calculates the 3D perspective path based on user interaction, river network spatial layout, and geographical features, and dynamically adjusts the 3D perspective flight speed and direction. (10) The algorithm analyzes and generates the optimal viewpoint path in real time based on the user's operation behavior; this step generates a reasonable transition path by calculating the angle difference between the user's click position and the current viewpoint. This is used to mimic the camera's movement path and enhance the sense of immersion.

[0009] (11) Automatically adjust the transition speed and direction based on geographic information features and scene data to optimize the user's perspective experience; the adjustment of transition speed and direction is based on the following factors: the difference between the current perspective and the target perspective, the geographic complexity of the target area, and the occlusions in the scene.

[0010] After smooth zooming, the 3D view switching and scene loading are implemented through the Cesium platform. The `viewer.camera.flyTo()` method in Cesium is called to synchronize the 3D view, and the Leaflet is hidden by setting transparency animation, fading in the Cesium 3D scene to ensure a seamless transition between 2D and 3D. (20) When the user switches back to the two-dimensional map, the view is automatically reset and the view is smoothly restored to the two-dimensional view through a gradual change in transparency, so as to avoid abrupt switching or lag. (21) The intelligent computer mechanism dynamically adjusts the transition speed and direction during the reset process based on the current perspective and geographical features to ensure a smooth rollback.

[0011] The dual-gradient dynamic view switching algorithm adjusts geographic information and view changes in real time based on the current view and map zoom level, automatically optimizes the loading and unloading order of components, and improves system performance and response speed.

[0012] In the semantic dispatch modeling mechanism, OpenStreetMap building data and Rhino Grasshopper modeling tool are combined to automatically generate a 3D building model of the riverbank and output a lightweight glTF format for online rendering.

[0013] River spatial reconstruction was completed based on the Cesium platform: a three-dimensional river network model with clear spatial structure and strong realism was generated by using river latitude and longitude coordinates, river width parameters and water level data. A hydrodynamic simulation mechanism is introduced to dynamically load data such as water depth and velocity, and the hydrodynamic process is displayed through animation interpolation and color mapping; a unified interactive interface is built to support playback of hydrological status at any time step, mode switching and scene navigation.

[0014] The semantic dispatch modeling mechanism adopts a semantic-driven building construction mechanism, including the following steps: (31) Obtain relevant building data along the river. The building data comes from OpenStreetMap. Based on the OSM data provided by OpenStreetMap, extract the building information of the river area and the riverbank, and automatically label the building semantic type to obtain building semantic labels. (32) Based on the semantic tags of the buildings, semantic adjustment is performed to obtain the respective modeling parameters and modeling strategies. Then, modeling strategies based on morphological rules, component combination or program control are adopted respectively to automatically generate different types of three-dimensional building models. (33) Based on the analysis of the spatial distribution relationship of buildings in the river buffer zone, automatically construct waterfront platforms, transparent structures and building height gradients; (34) Use the Grasshopper plugin in Rhino to implement scripted batch modeling and output lightweight glTF format files; (35) Upload the exported glTF format file to Cesium and use the Cesium.Model.fromGltf API to load the model into the Cesium scene for rendering; create a rotation matrix using Cesium.Matrix3.fromRotation and apply it to the model's model position transformation property (modelMatrix) to adjust the model's angle and ensure that it is correctly displayed on the map.

[0015] The method for generating 3D rivers employs a 3D river path construction mechanism based on water level interpolation, and includes the following steps: (41) Obtain the longitude and latitude sequence of the river path, including the longitude array and latitude array of the river centerline. Convert the geographic coordinates to Cartesian3 spatial coordinates through the Cesium fromDegrees interface and construct the river centerline. (42) Calculate the cumulative distance between each path point according to the river path, and combine the water level information waterHeights along the river. Use the piecewise linear interpolation method to generate a continuous height change sequence, assign the interpolated height to the path point, and perform spatial reconstruction of the river path with height to generate river path points in three-dimensional space. (43) Based on the river centerline and the river width parameter, generate a polygon path PolygonHierarchy with width, and construct a planar structure with real river topology. (44) The Cesium Primitive interface is called to generate a 3D graphic entity, the material appearance is bound, and the built-in "Water" material type is used. The present invention further combines the hydrodynamic simulation results to dynamically control the material parameters and sets the following parameters: (a) normalMap: Water surface normal map, providing dynamic undulation effects; (b) frequency, amplitude, animation speed: These control the frequency, amplitude and flow speed of water surface ripples, respectively. In this invention, these parameters are dynamically adjusted according to the real-time water flow speed through a mapping function to achieve real visualization of the hydrodynamic state. (c) baseWaterColor and reflectionColor: Define the water color and reflection effect; (d) refractiveIndex: controls the refractive index of the water body to enhance realism.

[0016] The method of this invention further includes a three-dimensional construction step of the suspended river. By adding elevation values ​​to the coordinate points in the two-dimensional river network data or performing elevation difference analysis in combination with a digital elevation model (DEM), the Z coordinate of the suspended river section is raised as a whole in the Cesium three-dimensional scene, constructing a non-ground-hugging river model that is higher than the surrounding terrain. The three-dimensional suspended river is loaded using GeoJSON, Polyline, or Primitive primitives, and its perPositionHeight property is set to true to achieve a rendering effect that is detached from the terrain. At the same time, the non-suspended river section is rendered with the CLAMP_TO_GROUND property to keep it ground-hugging, thereby forming a spatial visual contrast between the ground-hugging and suspended river channels. Furthermore, by adding visual effects such as transparent materials, water flow animation, and water level floating markers, the recognizability of the suspended river structure and the user interaction experience are improved, intuitively reflecting the differences in river channel elevation and potential risk characteristics.

[0017] The method further includes a dynamic mapping algorithm for 3D rendering animation parameters driven by water flow velocity, used to display the dynamic flow of a river, the steps of which include: (51) Obtain the real-time water flow velocity data of the target river section, denoted as ν.

[0018] (52) Based on the absolute value of the water flow velocity, the speed change parameters frequency, amplitude, and animation speed of the rendered animation are calculated simultaneously using a nonlinear mapping function: The animation speed, frequency, and amplitude are calculated using the following formulas: animationSpeed ​​= ; α, β, γ are adjustable hyperparameters, ν0 is the activation threshold flow rate control nonlinear mapping intensity, and sign(ν) represents the flow rate direction; frequency = f0 is the base frequency, and k is the frequency amplification factor. amplitude = a0 is the minimum amplitude, and m is the amplitude response coefficient. (53) Based on the real-time frame refresh characteristics of the Cesium rendering mechanism and the sensitivity range of the human visual system to changes in the frequency and amplitude of dynamic fluctuations, combined with a large number of experimental tests and parameter fitting results, the hyperparameters configured for the system are: α = 4.29, β = 5.0, γ = 0.1. = 0.5, k = 40, = 1, m = 0.8. The above parameters all exhibit good controllability and physical consistency within the flow velocity range [0.01, 10] m / s, effectively balancing the smoothness of animation, visual comfort, and simulation realism.

[0019] (54) Pass the above parameters into the material uniforms in the 3D rendering system to control the water surface animation effect.

[0020] The hydrodynamic simulation steps include: (61) Obtain hydrodynamic data of the target area in a continuous time series, including water flow velocity and water depth; (62) Connect the hydrodynamic data with the three-dimensional geographic modeling platform Cesium and update the simulation time step through a timer; (63) Based on the real-time water flow velocity, dynamically calculate and update simulation parameters, including water surface ripple frequency, flow velocity animation speed and amplitude; (64) Map real-time water depth data to color variations, with deeper water appearing as darker in color; (65) Within each time step, an animation-driven nonlinear response interpolation algorithm is used to ensure the continuity and smoothness of the visual effects during the simulation. (66) When the simulation ends or the predetermined conditions are met, the dynamic update is terminated.

[0021] This method provides a unified user interface, allowing users to switch freely between two-dimensional and three-dimensional modes, and supports playback and simulation of hydrological and hydrodynamic states at any point in time.

[0022] The core technical features of the construction method of the river network hydrodynamic condition visualization system of the present invention include: (1) A dual gradient dynamic view switching algorithm (DGDVSA) is used to achieve seamless transition between 2D and 3D map scenes. Based on user click behavior and target geographical location, a dynamic view path is constructed through Bézier curve and the speed is adjusted. (2) Use Leaflet to build a two-dimensional map interface. When the user clicks on the river, the map is smoothly zoomed in. The three-dimensional view switching and scene loading are realized through the Cesium platform. (3) Construct a semantic-based building modeling mechanism, combine OpenStreetMap building data with RhinoGrasshopper modeling tool, automatically generate a three-dimensional building model of the riverbank and output a lightweight glTF format for online rendering; (4) Reconstructing river space based on the Cesium platform: Using river latitude and longitude coordinates, river width parameters and water level data, a three-dimensional river network model with clear spatial structure and strong sense of realism is generated; (5) Introduce a hydrodynamic simulation mechanism to dynamically load data such as water depth and water velocity, and display the hydrodynamic process through animation interpolation and color mapping; build a unified interactive interface to support playback of hydrological status at any time step, mode switching and scene navigation.

[0023] Beneficial effects: This invention achieves smooth switching between two-dimensional and three-dimensional perspectives, significantly improving the user's interactive experience; through semantic modeling and water level interpolation, it automatically generates river and riverside building models, improving modeling efficiency and scene realism; based on the Cesium platform, it dynamically renders water depth and flow velocity data, realizing real-time and continuous visualization of hydrodynamic processes; the use of nonlinear response interpolation algorithms and time step control mechanisms ensures the smoothness of animation and the efficient response of the system; at the same time, it supports interactive operations at multiple time scales and multiple perspectives, enhancing the expressive power of hydrodynamic data and the application flexibility of the system, and has good promotional value and practical significance. Attached Figure Description

[0024] Figure 1 A flowchart of an interactive perspective switching algorithm for 2D / 3D visualization. Detailed Implementation

[0025] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. After reading the present invention, any modifications of the present invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.

[0026] 1) Viewpoint switching and 2D / 3D scene transition like Figure 1 As shown, a method for constructing a river network hydrodynamic visualization system based on digital twins is presented. Specifically targeting the spatial structure and hydrodynamic process characteristics of complex river networks, a multi-scale perspective transition mechanism based on a dual-gradient dynamic perspective switching algorithm is designed to enhance the naturalness and immersive experience for users switching between 2D maps and 3D geographic scenes. This mechanism mainly includes the following steps: (1) Two-dimensional map view response and smooth focus: When a user double-clicks to draw a river in the 2D map interface built with Leaflet, the system first responds to the user's action by executing the `map.flyTo()` method. This method smoothly moves and zooms the map's center point within the 2D plane, allowing the user to focus on the specified target area. This process prepares for switching to 3D, ensuring the user has a preliminary spatial understanding of the target area from a 2D perspective.

[0027] (2) Design of dual-gradient dynamic viewpoint switching algorithm To achieve a seamless transition from 2D to 3D, a dual gradient dynamic viewpoint switching algorithm, or DGDVSA algorithm for short, is proposed. This algorithm intelligently calculates the viewpoint path and flight parameters, and includes two core sub-modules: path planning and speed adjustment. (a) 3D perspective path planning The algorithm analyzes and generates the optimal viewpoint path in real time based on user actions. This step generates a reasonable transition path by calculating the angle difference between the user's click position and the current viewpoint. A Bézier curve is used to generate the transition path. Let the current viewpoint be θ. cur =(θ x1 ,θ y1 ) and the target viewpoint is θ tar =(θ x2 ,θ y2, θ z2 If the transition path can be generated using the Bézier curve formula, then: Bézier curve formula:

[0028] Where B(t) represents the coordinates of the point on the Bézier curve corresponding to parameter t. As an intermediate control point, it is dynamically calculated and generated based on the spatial structure and interactive behavior, and is used to adjust the curvature and spatial height of the path. The parameter t takes a value range of [0,1], which is used to control the position of the point on the curve, where t=0 corresponds to the starting point and t=1 corresponds to the ending point. During the change of value, B(t) continuously draws a smooth curve.

[0029] This path generation mechanism avoids the "jump" problem during the 2D to 3D transition, and enhances the sense of spatial continuity and natural interaction through a smooth transition curve.

[0030] (b) Viewpoint, flight speed, and direction adjustment The transition speed and direction are automatically adjusted based on geographic information features and scene data to optimize the user's visual experience. The adjustment of transition speed and direction is based on factors such as the difference between the current viewpoint and the target viewpoint, the geographical complexity of the target area, and scene obstructions. To ensure a smooth visual transition, the transition speed ν(t) can be dynamically adjusted according to the viewpoint difference and scene complexity. (b1) Speed ​​adjustment formula:

[0031] Where ν0 is the initial velocity, α is the velocity adjustment constant, and Δθ is the deviation angle between the scene and the viewpoint, representing the degree of influence of the viewpoint difference on the velocity.

[0032] (b2) Adjust according to scene complexity: v(t) = v(t) * (1 + β * C) com ) Among them, Ccom β is the scene complexity factor, and β is the current map zoom level. If the target area is complex, the speed adjustment factor is increased.

[0033] (3) After the path flight is complete, call the Cesium's viewer.camera.flyTo() method to synchronously switch to the 3D target view. To avoid a visual disconnect when switching from 2D to 3D scenes, a gradient animation is used to handle the visibility between Leaflet and Cesium: (a) Gradually reduce the layer opacity α_map(t) of Leaflet; (b) Simultaneously increase the transparency of the Cesium scene α_cesium(t); (c) Ensure during the transition period Within, α_map(t) + α_cesium(t) ≈ 1, achieving visual hierarchy transition.

[0034] (4) When the user chooses to return to the 2D map interface, DGDVSA is also called to perform reverse path planning: based on the angle difference and spatial characteristics between the current 3D view and the original 2D view, the back path is automatically planned, using the same Bézier curve and smooth speed model to avoid visual discomfort caused by "instantaneous jump". This module also applies transparent gradient processing to ensure the naturalness and consistency of the transition from 3D to 2D.

[0035] (5) Based on the current viewpoint and map zoom level, the DGDVSA algorithm is used to adjust the geographic information and viewpoint changes in real time, automatically optimize the loading and unloading order of components, and improve the system performance and response speed.

[0036] 2) Semantic-driven architectural modeling In the process of constructing a three-dimensional scene for a river network hydrodynamic visualization system, this invention employs a method

[0037] This method combines open data, architectural semantic recognition, parametric modeling tools, and lightweight model standards to achieve automatic identification and efficient modeling of riverside buildings, enhancing the realism and interactivity of digital twin scenes. Its specific implementation is as follows: (1) First, the building data of the riverside area is obtained from the open-source geographic data platform OpenStreetMap. By setting the buffer zone of the target river, the building vector data within this zone is obtained using the OSM data interface. When parsing the OSM data, the system extracts the basic attribute fields of the buildings, including "building", "building:levels", and "name", and determines their semantic type based on the field content.

[0038] The semantic tag extraction algorithm uses a predefined building type-semantic mapping dictionary and supports user-defined extension rules. All buildings are automatically tagged with semantic tags during the data import phase, forming a unified building metadata structure that serves as the basis for subsequent modeling strategy selection.

[0039] (2) Differentiated 3D modeling strategies are adopted for buildings with different semantic types. During the modeling process, the height of the building is estimated using the "building:levels" attribute first. If it is missing, the average floor height in the geographical area is used to estimate it using the "building:height" attribute. The roof shape adopts the default flat roof design. Special shapes are controlled by manual intervention or semantic rules later.

[0040] (3) Further optimization modeling is performed based on the spatial relationship between the river and the buildings. Through buffer analysis, buildings with a distance of less than a certain threshold from the riverbank are identified, and waterfront platforms are automatically generated for them. A height gradient is constructed based on the distance between the buildings and the river, with the height of buildings closer to the river being appropriately reduced and the height of buildings farther from the river gradually increasing, in order to create a sense of spatial hierarchy.

[0041] (4) The Grasshopper plugin in Rhino modeling software is used for scripted modeling. The modeling parameters, including building height, number of floors, and facade style, are controlled through a graphical logic flow. This modeling process can process a large amount of building data in batches, greatly improving efficiency.

[0042] After completing the modeling, export all models in glTF binary format using the glTF export plugin. The glTF format offers advantages such as clear structure, lightweight compression, and support for PBR materials, making it suitable for browser-based 3D rendering scenarios.

[0043] (5) The exported glTF file is uploaded to the server and loaded into the Cesium platform. The loading method is Cesium.Model.fromGltf(), which supports glTF format. The Cesium.Model.fromGltf API is used to load the model into the Cesium scene for rendering. A rotation matrix is ​​created using Cesium.Matrix3.fromRotation and applied to the model's modelMatrix property to adjust the model's angle and ensure it is correctly displayed on the map.

[0044] 3) River 3D Modeling and Water Surface Rendering (1) First, the centerline path of the target river segment is extracted. The path data is represented in the form of a longitude and latitude sequence, which are longitude array [] and latitude array []. The two-dimensional geographic coordinates are converted into three-dimensional spatial coordinates through the Cesium.Cartesian3.fromDegreesArray() interface provided by Cesium, thereby forming the river centerline for spatial modeling.

[0045] (2) Based on the waterHeights data obtained from the hydrological monitoring points along the river, the water level value of each path point is calculated using piecewise linear interpolation according to the cumulative distance between each path point on the river section. The water level height information is assigned to the Z value of the corresponding spatial coordinates to realize the reconstruction of the river path with vertical variation, and finally generate a three-dimensional river path with height information.

[0046] (3) Determine the river width based on actual survey data or estimated parameters, and perform offset calculations on both sides of the river centerline in the normal direction to generate a set of boundary points on the left and right banks. By constructing a Cesium.PolygonHierarchy object, a river planar structure with the actual width is formed for subsequent geometry generation.

[0047] (4) Using Cesium's Primitive interface, the aforementioned river polygons are input as geometric primitives, and a water material is bound to them to achieve dynamic rendering effects. The "Water" material type provided by Cesium is used, and the following parameters are set: (a) normalMap: Water surface normal map, providing dynamic undulation effects; (b) frequency, amplitude, animation speed: These control the frequency, amplitude, and flow speed of water surface ripples, respectively, and can be dynamically adjusted according to the flow velocity; (c) baseWaterColor and reflectionColor: Define the water color and reflection effect; (d) refractiveIndex: Controls the refractive index of the water to enhance realism; By configuring the above parameters, the river surface can be made to have a dynamic sense of flow, reflection and ripple effects, thereby enhancing the visual realism of the three-dimensional scene.

[0048] (5) In a preferred embodiment of the present invention, real-time water flow velocity data (denoted as ν) of the target river section is acquired, and the parameters of the water body animation mentioned above—animation speed, frequency, and amplitude—are dynamically updated based on this data in the 3D rendering system. The main implementation steps include: (a) First, receive river flow velocity data (ν) from external sensors, simulation systems and historical reconstruction results. The absolute value of the velocity indicates the magnitude of the flow, and the sign of the velocity indicates the direction of the flow.

[0049] (b) To adapt to the sensitivity of human visual perception to dynamic effects and to achieve good coordination with the water surface material effects in the Cesium rendering system, the following mathematical expressions are used to map the water flow velocity to three core parameters controlling the dynamic animation of the water surface: The animation speed, frequency, and amplitude are calculated using the following formulas: animationSpeed ​​= ; α, β, γ: adjustable hyperparameters, ν0: activation threshold, flow rate control nonlinear mapping intensity, sign(ν) represents the flow rate direction; frequency = f0 is the base frequency, and k is the frequency amplification factor. amplitude = a0 is the minimum amplitude, and m is the amplitude response coefficient. (c) To balance rendering performance, physical realism, and visual stability, and considering the inter-frame update mechanism of the Cesium 3D rendering engine and the subjective perception of water wave frequency and amplitude by the human eye, experiments show that good performance can be achieved when the hyperparameters are set as follows: α = 4.29, β = 5.0, γ = 0.1, ν0 = 0.5, k = 40, a0 = 1, m = 0.8.

[0050] (d) The animationSpeed, frequency, and amplitude parameters obtained from the above calculations are input into the corresponding uniforms in the Cesium material system in real time to dynamically control the water surface flow effect and simulate the changes in the appearance of natural water bodies under different flow velocity conditions. This mechanism can realize the continuity and nonlinear response of water body animation in the time and space dimensions, and enhance the dynamic expression capability of the three-dimensional geographic system.

[0051] (6) Based on the above-mentioned water surface rendering, this invention provides a three-dimensional construction method for suspended rivers. This method first acquires two-dimensional river network data and terrain data, and calculates the elevation differences of the suspended river. The elevation of the suspended river section is adjusted to make it detach from the ground and form a floating effect. In a three-dimensional visualization platform, by setting the height reference of the river channel primitive to perPositionHeight: true, the river channel is made to float, and combined with dynamic water surface effects to simulate flow velocity and fluctuations, enhancing visual realism. This method can accurately reflect the geographical characteristics of suspended rivers and improve the expressiveness of rivers in complex terrain.

[0052] 4) Hydrodynamic simulation and dynamic update rendering (1) Obtain hydrodynamic data of the target area at different time points from the data source, including flow rate and water level. These data are based on actual measurements or model predictions and represent the dynamic changes of the river section at different time points.

[0053] (2) By setting the simulation time step Δt, the system automatically updates the hydrodynamic parameters of the current river section in each time interval. The update logic is implemented through the Cesium timer interface to maintain the consistency between the data and the screen.

[0054] (3) Within each time step, the animationSpeed, amplitude, and frequency parameters are dynamically adjusted based on the current water flow velocity value to control the frequency and speed of water surface fluctuations. A configurable mapping function ensures physical consistency between the flow velocity and the water surface animation.

[0055] (4) By normalizing the water depth data, the water depth is mapped to color changes. The greater the water depth, the darker the displayed color. In the specific implementation, the Cesium.Color.lerp() function is used to calculate the interpolation between the starting color and the target color based on the normalized value of the current water depth, thereby dynamically adjusting the color of the river section and enhancing the visual effect.

[0056] (5) Within each time step, an animation-driven nonlinear response interpolation algorithm is used to ensure the continuity and smoothness of the visual effects during the simulation. The specific steps of the animation-driven nonlinear response interpolation algorithm are as follows: Step 1: During the change of each parameter (animationSpeed, frequency, amplitude), the time progress is corrected using a function based on nonlinear response, thus constructing an interpolation function that better reflects the fluctuations of natural water flow.

[0057] Step Two: Introduce a response sensitivity factor α to simulate the response speed of the hydrodynamic system to changes. When α is small, it indicates that the system is slow to respond to changes; when α approaches 1, the system responds quickly to changes. The value of α can be adaptively adjusted according to the intensity of water flow fluctuations. Step Three: Based on the time progress t (0 ~ 1), where t=0 represents the starting position and t=1 represents the ending position, use the formula... The nonlinear progress value T(t) is calculated and used as an interpolation factor to drive parameter updates, thereby simulating the inertial characteristics of water flow that are “initially slow, then fast, and then slow again”.

[0058] Step 4: Perform interpolation calculations on multiple rendering parameters such as animationSpeed, frequency, and amplitude, allowing each parameter to change independently based on its different response amplitudes. This avoids animation conflicts or unnaturalness caused by simultaneous changes. In each frame update, update the water surface material properties based on the calculated interpolation results and overlay a water depth color map, ultimately presenting a responsive, smooth, and realistic hydrodynamic animation effect.

[0059] (6) When the preset time range is reached, or when certain simulation termination conditions are met, the rendering parameter update is terminated, and the current state is maintained or the view is reverted to the default view.

[0060] 5) Unified interaction and data playback function (1) A unified view reset and switching method is preset. All interactive events are dispatched and managed in a unified manner through the event bus mechanism of the Vue framework to achieve state synchronization between different view components.

[0061] (2) Provides a hydrological status timeline control, allowing users to drag the data at any historical moment or within a simulation period; the timeline is linked with the hydrodynamic simulation module, and extracts the water depth, water flow velocity, and water surface morphology from the pre-processed hydrological database according to the time point selected by the user, and displays them in the form of heat maps and bar charts; supports continuous playback, pause, fast forward, and rewind control of the time series, enabling users to trace back a specific hydrological process in all aspects.

[0062] (3) During the data playback process, the scene is updated by the clock (ClockViewModel) and timeline modules in Cesium, and the model animation, water surface material and color are dynamically adjusted. Within each time step, the hydrodynamic data changes are processed by the nonlinear response interpolation algorithm based on animation to ensure the visual continuity and naturalness of the dynamic rendering process. During the playback process, the system allows users to perform real-time interactions such as pausing, switching perspectives, and zooming, without affecting the rendering synchronization of the time series.

Claims

1. A method for constructing a visualization system for river network hydrodynamic conditions based on digital twins, characterized in that, This method employs a dual-gradient dynamic perspective switching algorithm, smoothly transitioning from a 2D map interface to a 3D visualization environment through user interaction, achieving switching between 2D and 3D. It utilizes a semantic-modulated modeling mechanism and a 3D river path construction mechanism based on water level interpolation to automatically generate building models along the river and the river path. Water flow materials and animations are constructed using the Cesium platform to achieve flow effect rendering. It integrates hydrodynamic simulation functionality, dynamically acquiring water depth and velocity data over continuous time series, connecting to the Cesium platform for real-time rendering, dynamically calculating Cesium flow parameters based on simulation parameters, using an animation-driven nonlinear response interpolation algorithm to ensure the continuity and smoothness of the visual effect, and controlling the simulation time step through a timer mechanism to support the visualization of hydrodynamic changes at different time scales. This method supports interactive operations from different perspectives and time dimensions.

2. The method for constructing a river network hydrodynamic condition visualization system based on digital twins according to claim 1, characterized in that, A two-dimensional map interface is constructed, and the map is smoothly zoomed in upon receiving a user's operation. In the two-dimensional map interface, a dynamic view path is constructed using Bézier curves and the speed is adjusted based on the user's operation and the target geographical location.

3. The method for constructing a river network hydrodynamic condition visualization system based on digital twins according to claim 1, characterized in that, The user triggers a map view change by clicking on the river, which calls the map.flyTo() method in Leaflet to smoothly zoom in on the Leaflet map and simulate entering the target area.

4. The method for constructing a river network hydrodynamic condition visualization system based on digital twins according to claim 1, characterized in that, A dual-gradient dynamic perspective switching algorithm is employed to automatically generate spatial paths during the 2D to 3D transition. The algorithm intelligently calculates the 3D perspective path based on user interaction, river network spatial layout, and geographical features, and dynamically adjusts flight speed and direction. (10) The algorithm analyzes and generates a transition path in real time based on the user's operation behavior; this step generates a transition path by calculating the angle difference between the user's click position and the current viewpoint; (11) Automatically adjust the transition speed and direction based on geographic information features and scene data to optimize the user's perspective experience; the adjustment of transition speed and direction is based on the following factors: the difference between the current perspective and the target perspective, the geographic complexity of the target area, and the occlusions in the scene.

5. The method for constructing a river network hydrodynamic condition visualization system based on digital twins according to claim 1, characterized in that, After smooth zooming, the 3D view switching and scene loading are implemented through the Cesium platform. The `viewer.camera.flyTo()` method in Cesium is called to synchronize the 3D view, and the Leaflet is hidden by setting transparency animation, fading in the Cesium 3D scene to ensure a seamless transition between 2D and 3D. (20) When the user switches back to the two-dimensional map, the view is automatically reset and smoothly restored to the two-dimensional view through a gradual change in transparency; (21) The intelligent computer mechanism dynamically adjusts the transition speed and direction during the reset process based on the current perspective and geographical features to ensure a smooth rollback.

6. The method for constructing a river network hydrodynamic condition visualization system based on digital twins according to claim 1, characterized in that, In the semantic dispatch modeling mechanism, OpenStreetMap building data and Rhino Grasshopper modeling tool are combined to automatically generate a 3D building model of the riverbank and output a lightweight glTF format for online rendering; The semantic dispatch modeling mechanism adopts a semantic-driven building construction mechanism, including the following steps: (31) Obtain relevant building data along the river. The building data comes from OpenStreetMap. Based on the OSM data provided by OpenStreetMap, extract the building information of the river area and the riverbank, and automatically label the building semantic type to obtain building semantic labels. (32) Based on the semantic tags of the buildings, semantic adjustment is performed to obtain the respective modeling parameters and modeling strategies, and then different types of three-dimensional building models are automatically generated by adopting modeling strategies based on morphological rules, component combination or program control respectively. (33) Based on the analysis of the spatial distribution relationship of buildings in the river buffer zone, automatically construct waterfront platforms, transparent structures and building height gradients; (34) Use the Grasshopper plugin in Rhino to implement scripted batch modeling and output lightweight glTF format files; (35) Upload the exported glTF format file to Cesium and use the Cesium.Model.fromGltf API to load the model into the Cesium scene for rendering; create a rotation matrix using Cesium.Matrix3.fromRotation and apply it to the model's model position transformation property (modelMatrix) to adjust the model's angle and ensure that it is correctly displayed on the map.

7. The method for constructing a river network hydrodynamic condition visualization system based on digital twins according to claim 1, characterized in that, River spatial reconstruction was completed using the Cesium platform: a three-dimensional river network model was generated using river latitude and longitude coordinates, river width parameters, and water level data. The method for generating 3D rivers employs a 3D river path construction mechanism based on water level interpolation, and includes the following steps: (41) Obtain the longitude and latitude sequence of the river path, including the longitude array and latitude array of the river centerline. Convert the geographic coordinates to Cartesian3 spatial coordinates through the Cesium fromDegrees interface and construct the river centerline. (42) Calculate the cumulative distance between each path point according to the river path, and combine the water level information waterHeights along the river. Use the piecewise linear interpolation method to generate a continuous height change sequence, assign the interpolated height to the path point, and perform spatial reconstruction of the river path with height to generate river path points in three-dimensional space. (43) Based on the river centerline and the river width parameter, generate a polygon path PolygonHierarchy with width, and construct a planar structure with real river topology. (44) Call Cesium's Primitive interface to generate a 3D graphic entity, bind the material appearance, and use the built-in "Water" material type. Combine the hydrodynamic simulation results to dynamically control the material parameters and set the following parameters: (a) normalMap: Water surface normal map, providing dynamic undulation effects; (b) frequency, amplitude, animation speed: These parameters control the frequency, amplitude, and flow speed of water surface ripples, respectively. The parameters are dynamically adjusted according to the real-time water flow speed through a mapping function to achieve real visualization of the hydrodynamic state. (c) baseWaterColor and reflectionColor: Define the water color and reflection effect; (d) refractiveIndex: controls the refractive index of the water; A hydrodynamic simulation mechanism is introduced to dynamically load water depth and velocity data, and the hydrodynamic process is displayed through animation interpolation and color mapping; a unified interactive interface is built to support playback of hydrological status at any time step, mode switching and scene navigation.

8. The method for constructing a river network hydrodynamic condition visualization system based on digital twins according to claim 1, characterized in that, The method also includes a three-dimensional construction step for the suspended river. By adding elevation values ​​to the coordinate points in the two-dimensional river network data or performing elevation difference analysis in combination with a digital elevation model, the Z-coordinate of the suspended river section is raised as a whole in the Cesium three-dimensional scene, constructing a non-ground-hugging river model that is higher than the surrounding terrain. The three-dimensional suspended river is loaded using GeoJSON, Polyline, or Primitive primitives, and its perPositionHeight property is set to true to achieve a rendering effect that is detached from the terrain. At the same time, the non-suspended river section is rendered with the CLAMP_TO_GROUND property to keep it ground-hugging, thus forming a spatial visual contrast between ground-hugging and suspended river channels. By adding visual effects such as transparent materials, water flow animation, and water level floating markers, the recognizability of the suspended river structure and the user interaction experience are improved, intuitively reflecting the differences in river channel elevation and potential risk characteristics.

9. The method for constructing a river network hydrodynamic condition visualization system based on digital twins according to claim 1, characterized in that, Design a dynamic mapping algorithm for 3D rendering animation parameters based on water flow velocity to display the dynamic flow of a river. The steps include: (51) Obtain the real-time water flow velocity data of the target river section, denoted as ν; (52) Based on the absolute value of the water flow velocity, the speed change parameters frequency, amplitude, and animation speed of the rendered animation are calculated simultaneously using a nonlinear mapping function: The animation speed, frequency, and amplitude are calculated using the following formulas: animationSpeed ​​= ; α, β, γ are adjustable hyperparameters, ν0 is the activation threshold flow rate control nonlinear mapping intensity, and sign(ν) represents the flow rate direction; frequency = f0 is the base frequency, and k is the frequency amplification factor. amplitude = a0 is the minimum amplitude, and m is the amplitude response coefficient. (53) Based on the real-time frame refresh characteristics of the Cesium rendering mechanism and the sensitivity range of the human visual system to changes in the frequency and amplitude of dynamic fluctuations, the hyperparameters are configured as follows: α = 4.29, β = 5.0, γ = 0.

1. = 0.5, k = 40, = 1, m = 0.8; (54) Pass the above parameters into the material uniforms in the 3D rendering system to control the water surface animation effect.

10. The method for constructing a river network hydrodynamic condition visualization system based on digital twins according to claim 1, characterized in that, The hydrodynamic simulation steps include: (61) Obtain hydrodynamic data of the target area in a continuous time series, including water flow velocity and water depth; (62) Connect the hydrodynamic data with the three-dimensional geographic modeling platform Cesium and update the simulation time step through a timer; (63) Based on the real-time water flow velocity, dynamically calculate and update simulation parameters, including water surface ripple frequency, flow velocity animation speed and amplitude; (64) Map real-time water depth data to color variations, with deeper water appearing as darker in color; (65) Within each time step, an animation-driven nonlinear response interpolation algorithm is used to ensure the continuity and smoothness of the visual effects during the simulation. (66) When the simulation ends or the predetermined conditions are met, the dynamic update is terminated.

Citation Information

Cited By

  • Method and device for fitting model and terrain area in Cesium scene

    CN121616774A