Water level rendering method and device in digital twin river basin, equipment and storage medium
Patent Information
- Application Number
- CN202311699003.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-12
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2043-12-12
AI Technical Summary
但数字孪生流域旨在实现与现实流域河道的实时联动,现实河道水位变化频次极高,采用二维水动力学模型进行水位推演耗时较长,无法实现快速更新的需求,也就无法实时联动现实流域河道,这与孪生的初衷不符
[0056] This application provides a method, apparatus, device, and storage medium for rendering water levels in a digital twin river basin. It combines a one-dimensional hydrodynamic model and raster interpolation technology, utilizing the rapid calculation capability of the one-dimensional hydrodynamic model to calculate the water surface line. On the other hand, it extrapolates the calculation results to all rasters between each cross section, thus preserving the accuracy of the one-dimensional hydrodynamic model while enabling the rendering of water levels at any raster point in the twin river section. This allows for the real-time calculation and analysis of water levels at any river location in the entire river section of interest during non-flood periods, based on limited water level monitoring equipment, and rendering and displaying the results in the digital twin river channel.
Smart Images

Figure CN117788665B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of digital twin technology, and in particular to a method, apparatus, device and storage medium for rendering water levels in a digital twin watershed. Background Technology
[0002] Digital twins refer to the dynamic and consistent mapping relationship between physical objects, processes, systems, or services and their digital representations, constructed through data transmission and interaction between the physical and virtual worlds. Digital twin watersheds represent a new development path for the integration of digital twin technology with water, and a higher level of development for digital watersheds and smart water conservancy. A digital twin watershed uses the physical watershed as a unit, spatiotemporal data as a foundation, mathematical models as the core, and water conservancy knowledge as a driving force. It digitally maps, intelligently simulates, and proactively rehearses all elements of the physical watershed and the entire process of water conservancy governance and management activities, simulating, interacting, and iteratively optimizing in sync with the physical watershed.
[0003] Currently, most digital twin watershed water level modeling primarily employs two-dimensional hydrodynamic models. The main computational principle of these models is to establish the mass and momentum balance equations for river flow. During simulation, the model first divides the data into grids based on topographic data, then iteratively calculates and solves these equations grid by grid. While two-dimensional hydrodynamic models can provide water level information for any grid cell within a region of interest, the complexity of their iterative solutions makes a single simulation time-consuming. For fixed-standard flood conditions, two-dimensional hydrodynamic models can be used to pre-simulate flood water levels, and the rendering process can directly utilize existing calculations grid by grid, resulting in relatively accurate rendering. However, digital twin watersheds aim to achieve real-time linkage with real-world river channels. Real-world river water levels change extremely frequently, and the time-consuming nature of two-dimensional hydrodynamic models for water level simulations prevents rapid updates and real-time linkage with real-world river channels, contradicting the original purpose of digital twins.
[0004] Therefore, how to calculate and analyze the water level at any point in the entire river section of interest in real time during non-flood periods based on limited water level monitoring equipment, and then render and display it in the digital twin river channel, has become a major challenge in the construction of digital twin river basins at this stage. Summary of the Invention
[0005] This application provides a method, apparatus, equipment, and storage medium for rendering water levels in a digital twin watershed. It enables the real-time calculation and analysis of water levels at any location in the entire river section of interest during non-flood periods, based on limited water level monitoring equipment, and then renders and displays the water levels in the digital twin watershed.
[0006] In view of this, the first aspect of this application provides a method for rendering water levels in a digital twin watershed, the method comprising:
[0007] S1. Convert the measured topographic map of the river section from the digital twin into a digital elevation model, and cut n cross sections xs along the river according to preset features;
[0008] S2. Based on the data of n cross sections xs, construct a one-dimensional water surface line calculation model based on Bernoulli's equation, and determine the calculation parameters of the calculation model based on the training data.
[0009] S3. Obtain real-time water level and flow rate data of each water level station in the digital twin river section, and calculate the real-time water level xs_Zi (i=1,2,...,n) of n cross sections xs according to the calculation model;
[0010] S4. Compare the real-time water level xs_Zi with the elevation of the digital elevation model grid points, determine whether the digital elevation model grid point elevations need to be marked with null labels, and generate the water level raster_xs_Z for each cross section xs.
[0011] S5. Create the centerline of the digital twin river section. Based on the number of grid points in the digital elevation model and the real-time water level xs_Zi of the adjacent cross sections, linearly interpolate the grid water level on the centerline to generate the centerline water level grid raster_centerline_Z.
[0012] S6. Calculate the target river segment's water level grid raster_river_Z based on the water level grid raster_xs_Z of cross section xs and the centerline water level grid raster_centerline_Z;
[0013] S7. Determine the real-time water level based on whether the water level raster_river_Z of the digital twin river section is marked with a rendering null value label.
[0014] Optionally, step S4 specifically includes:
[0015] Compare the real-time water level xs_Zi with the elevation of the grid points in the digital elevation model;
[0016] If the elevation of a digital elevation model grid point is not greater than the real-time water level xs_Zi, then the digital elevation model grid point is regarded as the water surface, and the real-time water level xs_Zi is assigned to the digital elevation model grid point.
[0017] Otherwise, treat the digital elevation model grid points as the ground and assign the real-time water level xs_Zi to the digital elevation model grid points, but mark the digital elevation model grid points with a null value for rendering.
[0018] The water level grid raster_xs_Z is formed for each cross-section xs.
[0019] Optionally, step S5 specifically includes:
[0020] Create a centerline for the digital twin river segment, perpendicular to n cross-sections xs;
[0021] Mark the intersection points (intersection_point_i, i = 1, 2, ..., n) of the cross sections xs used in the calculation model on the centerline, and assign the real-time water level xs_Zi to the intersection point. Compare the real-time water level xs_Zi of the intersection point with the elevation of the raster point in the digital elevation model to determine whether the intersection point needs to be marked with a null value label, and generate the water level raster raster_intersetion_point_Z for each intersection point.
[0022] The centerline is intersected with the digital elevation model raster data. Assuming that the number of digital elevation model raster cells between two adjacent cross sections xs_i and xs_i+1 through which the centerline passes is k, the centerline is divided into k segments, and the dividing point is cut_point_j (j=1,2,...,k).
[0023] Using a linear interpolation method, the water level cut_point_Zj of each cut_point_j of the center line is interpolated based on the water level grid raster_intersetion_point_Z at the intersection of each adjacent cross section.
[0024] Compare the water level cut_point_Zj of each cut_point_j segment on the centerline with the elevation of the corresponding digital elevation model raster point, determine whether the digital elevation model raster point elevation needs to be marked with a null value label, and generate the water level raster raster_cut_point_Z of each cut_point_j segment on the centerline.
[0025] The water level grid raster_centerline_Z is formed by combining the water level grid raster_cut_point_j at each cut_point_j point of the centerline with the water level grid raster_intersetion_point_Z at the intersection point of the centerline.
[0026] Optionally, step S6 specifically includes:
[0027] S61. Take the first centerline dividing point cut_point_Z1 between the downstream cross section xs_1 and the adjacent cross section xs_2 of the digital twin river section as the center point grid, and determine the water level values of the eight water level grids around the center point grid.
[0028] S62. Randomly select one of the eight water level grids as the center grid, and repeat step S61 until the water level grid raster_river_Z of the target river section is obtained.
[0029] Optionally, the water level values of the eight water level grids surrounding the center point grid are specifically determined as follows:
[0030] If the shared grid cells around the center point grid have already been assigned water level values, then retain the water level values of the shared grid cells; otherwise, assign the cut_point_Z1 value of the center point grid to the shared grid cells, and at the same time determine whether the water level values of the shared grid cells need to be marked with null labels for rendering.
[0031] A second aspect of this application provides a water level rendering device for a digital twin watershed, the device comprising:
[0032] The conversion unit is used to convert the measured topographic map of the river section of the digital twin river into a digital elevation model, and to cut n cross sections xs along the river according to preset features;
[0033] The modeling unit is used to construct a one-dimensional water surface line calculation model based on Bernoulli's equation using data from n cross-sections xs, and to determine the calculation parameters of the calculation model based on training data.
[0034] The acquisition unit is used to acquire real-time water level and flow data of each water level station in the digital twin river section, and calculate the real-time water level xs_Zi (i=1,2,...,n) of n cross sections xs according to the calculation model;
[0035] The comparison unit is used to compare the real-time water level xs_Zi with the elevation of the digital elevation model grid points, determine whether the elevation of the digital elevation model grid points needs to be marked with null labels, and generate the water level raster_xs_Z for each cross section xs.
[0036] Create a cell to create the centerline of the digital twin river section. Based on the number of grid points in the digital elevation model and the real-time water level xs_Zi of the adjacent cross sections, linearly interpolate the grid water level on the centerline to generate the centerline water level grid raster_centerline_Z.
[0037] The calculation unit is used to calculate the water level grid raster_river_Z of the target river segment based on the water level grid raster_xs_Z of the cross section xs and the water level grid raster_centerline_Z of the centerline;
[0038] The rendering unit is used to determine the real-time water level based on whether the water level raster_river_Z of the digital twin river segment is marked with a render null label.
[0039] Optionally, the comparison unit is specifically used for:
[0040] Compare the real-time water level xs_Zi with the elevation of the grid points in the digital elevation model;
[0041] If the elevation of a digital elevation model grid point is not greater than the real-time water level xs_Zi, then the digital elevation model grid point is regarded as the water surface, and the real-time water level xs_Zi is assigned to the digital elevation model grid point.
[0042] Otherwise, treat the digital elevation model grid points as the ground and assign the real-time water level xs_Zi to the digital elevation model grid points, but mark the digital elevation model grid points with a null value for rendering.
[0043] The water level grid raster_xs_Z is formed for each cross-section xs.
[0044] Optionally, the creation unit is specifically used for:
[0045] Create a centerline for the digital twin river segment, perpendicular to n cross-sections xs;
[0046] Mark the intersection points (intersection_point_i, i = 1, 2, ..., n) of the cross sections xs used in the calculation model on the centerline, and assign the real-time water level xs_Zi to the intersection point. Compare the real-time water level xs_Zi of the intersection point with the elevation of the raster point in the digital elevation model to determine whether the intersection point needs to be marked with a null value label, and generate the water level raster raster_intersetion_point_Z for each intersection point.
[0047] The centerline is intersected with the digital elevation model raster data. Assuming that the number of digital elevation model raster cells between two adjacent cross sections xs_i and xs_i+1 through which the centerline passes is k, the centerline is divided into k segments, and the dividing point is cut_point_j (j=1,2,...,k).
[0048] Using a linear interpolation method, the water level cut_point_Zj of each cut_point_j of the center line is interpolated based on the water level grid raster_intersetion_point_Z at the intersection of each adjacent cross section.
[0049] Compare the water level cut_point_Zj of each cut_point_j segment on the centerline with the elevation of the corresponding digital elevation model raster point, determine whether the digital elevation model raster point elevation needs to be marked with a null value label, and generate the water level raster raster_cut_point_Z of each cut_point_j segment on the centerline.
[0050] The water level grid raster_centerline_Z is formed by combining the water level grid raster_cut_point_j at each cut_point_j point of the centerline with the water level grid raster_intersetion_point_Z at the intersection point of the centerline.
[0051] A third aspect of this application provides a water level rendering device for a digital twin watershed, the device comprising a processor and a memory:
[0052] The memory is used to store program code and transmit the program code to the processor;
[0053] The processor is configured to execute, according to instructions in the program code, the steps of the method for rendering water levels in a digital twin watershed as described in the first aspect above.
[0054] A fourth aspect of this application provides a computer-readable storage medium for storing program code for performing the method described in the first aspect above.
[0055] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0056] This application provides a method, apparatus, device, and storage medium for rendering water levels in a digital twin river basin. It combines a one-dimensional hydrodynamic model and raster interpolation technology, utilizing the rapid calculation capability of the one-dimensional hydrodynamic model to calculate the water surface line. On the other hand, it extrapolates the calculation results to all rasters between each cross section, thus preserving the accuracy of the one-dimensional hydrodynamic model while enabling the rendering of water levels at any raster point in the twin river section. This allows for the real-time calculation and analysis of water levels at any river location in the entire river section of interest during non-flood periods, based on limited water level monitoring equipment, and rendering and displaying the results in the digital twin river channel. Attached Figure Description
[0057] Figure 1 This is a flowchart illustrating the water level rendering method in a digital twin watershed as described in this application embodiment.
[0058] Figure 2 This is a schematic diagram of the structure of the water level rendering device in the digital twin watershed in the embodiments of this application;
[0059] Figure 3 This is a schematic diagram of the structure of the water level rendering device in the digital twin watershed in this application embodiment;
[0060] Figure 4 This is a schematic diagram of a partial cross-sectional water level grid in an embodiment of this application;
[0061] Figure 5 This is a schematic diagram of some of the water level grids at intersection points in an embodiment of this application;
[0062] Figure 6 This is a schematic diagram of a local centerline water level grid in an embodiment of this application.
[0063] Figure 7 This is a schematic diagram of a partial water level grid to be derived in an embodiment of this application.
[0064] Figure 8 This is a schematic diagram of a local water level data grid in an embodiment of this application.
[0065] Figure 9 This is a schematic diagram of a local water level data grid in an embodiment of this application. Detailed Implementation
[0066] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0067] This application designs a method, device, equipment, and storage medium for water level rendering in a digital twin watershed. It realizes the real-time calculation and analysis of water level at any location in the entire river section of interest during non-flood periods based on limited water level monitoring equipment, and renders and displays the water level in the digital twin watershed.
[0068] For easier understanding, please refer to Figure 1 , Figure 1 This is a flowchart illustrating the water level rendering method in a digital twin watershed, as described in this application embodiment. Figure 1 As shown, specifically:
[0069] S1. Convert the measured topographic map of the river section from the digital twin into a digital elevation model, and cut n cross sections xs along the river according to preset features;
[0070] S2. Based on the data of n cross sections xs, construct a one-dimensional water surface line calculation model based on Bernoulli's equation, and determine the calculation parameters of the calculation model based on the training data.
[0071] S3. Obtain real-time water level and flow rate data of each water level station in the digital twin river section, and calculate the real-time water level xs_Zi (i=1,2,...,n) of n cross sections xs according to the calculation model;
[0072] S4. Compare the real-time water level xs_Zi with the elevation of the digital elevation model grid points, determine whether the digital elevation model grid point elevations need to be marked with null labels, and generate the water level raster_xs_Z for each cross section xs.
[0073] Step S4 specifically includes:
[0074] Compare the real-time water level xs_Zi with the elevation of the grid points in the digital elevation model;
[0075] If the elevation of a digital elevation model grid point is not greater than the real-time water level xs_Zi, then the digital elevation model grid point is regarded as the water surface, and the real-time water level xs_Zi is assigned to the digital elevation model grid point.
[0076] Otherwise, treat the digital elevation model grid points as the ground and assign the real-time water level xs_Zi to the digital elevation model grid points, but mark the digital elevation model grid points with a null value for rendering.
[0077] The water level grid raster_xs_Z is formed for each cross-section xs.
[0078] S5. Create the centerline of the digital twin river section. Based on the number of grid points in the digital elevation model and the real-time water level xs_Zi of the adjacent cross sections, linearly interpolate the grid water level on the centerline to generate the centerline water level grid raster_centerline_Z.
[0079] Step S5 specifically includes:
[0080] Create a centerline for the digital twin river segment, perpendicular to n cross-sections xs;
[0081] Mark the intersection points (intersection_point_i, i = 1, 2, ..., n) of the cross sections xs used in the calculation model on the centerline, and assign the real-time water level xs_Zi to the intersection point. Compare the real-time water level xs_Zi of the intersection point with the elevation of the raster point in the digital elevation model to determine whether the intersection point needs to be marked with a null value label, and generate the water level raster raster_intersetion_point_Z for each intersection point.
[0082] The centerline is intersected with the digital elevation model raster data. Assuming that the number of digital elevation model raster cells between two adjacent cross sections xs_i and xs_i+1 through which the centerline passes is k, the centerline is divided into k segments, and the dividing point is cut_point_j (j=1,2,...,k).
[0083] Using a linear interpolation method, the water level cut_point_Zj of each cut_point_j of the center line is interpolated based on the water level grid raster_intersetion_point_Z at the intersection of each adjacent cross section.
[0084] Compare the water level cut_point_Zj of each cut_point_j segment on the centerline with the elevation of the corresponding digital elevation model raster point, determine whether the digital elevation model raster point elevation needs to be marked with a null value label, and generate the water level raster raster_cut_point_Z of each cut_point_j segment on the centerline.
[0085] The water level grid raster_centerline_Z is formed by combining the water level grid raster_cut_point_j at each cut_point_j point of the centerline with the water level grid raster_intersetion_point_Z at the intersection point of the centerline.
[0086] S6. Calculate the target river segment's water level grid raster_river_Z based on the water level grid raster_xs_Z of cross section xs and the centerline water level grid raster_centerline_Z;
[0087] Step S6 specifically includes:
[0088] S61. Take the first centerline dividing point cut_point_Z1 between the downstream cross section xs_1 and the adjacent cross section xs_2 of the digital twin river section as the center point grid, and determine the water level values of the eight water level grids around the center point grid.
[0089] Specifically, the water level values of the eight water level grids surrounding the center point grid are determined as follows:
[0090] If the shared grid cells around the center point grid have already been assigned water level values, then retain the water level values of the shared grid cells; otherwise, assign the cut_point_Z1 value of the center point grid to the shared grid cells, and at the same time determine whether the water level values of the shared grid cells need to be marked with null labels for rendering.
[0091] S62. Randomly select one of the eight water level grids as the center grid, and repeat step S61 until the water level grid raster_river_Z of the target river section is obtained.
[0092] S7. Determine the real-time water level based on whether the water level raster_river_Z of the digital twin river section is marked with a rendering null value label.
[0093] This application provides a method for rendering water levels in a digital twin watershed. The technical solution of this application is described in detail below with reference to specific embodiments:
[0094] The target twin river section is 100km long and has four water level monitoring stations located at 20km, 40km, 60km and 80km respectively. All four hydrological monitoring stations have measured flow data and have deduced a stable water level-flow relationship.
[0095] Step 1: Convert the measured topographic map of the target river section into a DEM. Based on the characteristics of the river section such as length, shape, and gradient change, cut cross sections xs along the river channel, and lay out a total of 200 cross sections. These 200 cross sections can accurately reflect the hydraulic characteristics of the target river section and meet the accuracy requirements of one-dimensional hydraulic model calculation.
[0096] Step 2: Based on the river cross-section data in Step 1, establish a one-dimensional water surface line calculation model based on the Bernoulli equation. Use the monitoring data of four existing water level stations in the target river section to calibrate the calculation parameters of the model, mainly including the river section roughness and gradient, to meet the real-time water surface line calculation requirements of the target river section.
[0097] Step 3: Based on the real-time water level and flow data monitored by four water level stations in the target river section as the calculation boundary, the real-time water level xs_Zi (i=1,2,...,200) of each cross section of the target river section mentioned in Step 1 is calculated using the one-dimensional hydraulic model calibrated in Step 2.
[0098] Step 4: Compare the water level xs_Zi of each cross-section with the elevation of the DEM raster points through which each cross-section passes. If the DEM raster elevation is less than or equal to xs_Zi, then the raster point should be considered as the water surface, and xs_Zi should be assigned to the raster point. Otherwise, the point should be considered as the ground, with a water level of zero, and xs_Zi should still be assigned to the raster point, but at the same time, a null value should be added to this raster point. This forms the water level raster raster_xs_Z for each cross-section, as shown below. Figure 4 As shown, Figure 4 This is a schematic diagram of a partial cross-sectional water level grid in an embodiment of this application.
[0099] Step 5: Create the centerline of the target river segment, perpendicular to each cross-section xs from Step 1. Mark the positions of the cross-sections xs used in the aforementioned one-dimensional hydrodynamic model, intersection_point_i (i = 1, 2, ..., 200), on the centerline. Assign the water levels xs_Zi of each river cross-section calculated in Step 3 to the intersection_point_i of the centerline and the cross-section xs. Use the method described in Step 4 to determine whether the water levels at the intersection need to be marked with null values for rendering. Then obtain the raster_intersetion_point_Z of the water levels at each intersection, as shown below. Figure 5 As shown, Figure 5 This is a schematic diagram of some intersection water level grids in the embodiments of this application.
[0100] Step 6: Assuming that the number of DEM grids between two adjacent cross sections xs_i and xs_i+1 through which the centerline of the target river segment passes is k=4, then the centerline of the river segment is divided into 4 segments, and the dividing point is cut_point_j (j=1,2,...,4).
[0101] Step 7: Using the linear interpolation method, based on the raster_intersetion_point_Z level of each adjacent cross-section intersection, interpolate the water level cut_point_j (j=1,2,...,4) of each segment point cut_point_j of the river segment centerline in Step 6.
[0102] Step 8: Compare the water level (cut_point_Zj) values of each cut_point_j segment on the centerline with the elevation of the DEM raster points below it. If the DEM raster elevation is less than or equal to cut_point_Zj, then the raster point should be considered as the water surface and the cut_point_Zj value should be retained. Otherwise, the point should be considered as the ground with a water level of zero. The water level of the raster point should still be set to the cut_point_Zj value, but a null value should be added to this raster point. This forms the final water level raster (raster_cut_point_Z) for each cut_point_j segment on the centerline.
[0103] Step 9: The water level grids at each cut_point_j point of the centerline, raster_cut_point_Z, together with the water level grids at the intersection points of the centerline, raster_intersetion_point_Z, form the centerline water level grid raster_centerline_Z, as shown below. Figure 6 As shown, Figure 6 This is a schematic diagram of a local centerline water level grid in an embodiment of this application.
[0104] Step 10: Based on the water level grid raster_xs_Z of each cross section and the water level grid raster_centerline_Z of the river segment centerline, the water level grid for the entire twin river segment is derived using the following method:
[0105] (1) Locate the first segment centerline dividing point (cut_point_Z1 = 6) between the downstream cross-section xs_1 and the upstream adjacent cross-section xs_2 of the twin river segments as the starting centerline grid. There are eight water level grids surrounding this grid point. The water level values of the surrounding grids need to be calculated, such as... Figure 7 As shown, Figure 7 This is a schematic diagram of a partial water level grid to be derived in an embodiment of this application.
[0106] (2) Using the grid cell containing cut_point_Z1=6 as the base point, search for surrounding grid cells sharing the same edge. If the surrounding grid cells already have a water level value, retain that value. If the surrounding grid cells do not have a water level value, assign the cut_point_Z1=6 value to the target grid cell. Simultaneously, use the method described in step 4 to determine whether the target grid cell's water level needs to be marked with a null label. Figure 8 As shown, Figure 8 This is a schematic diagram of a local water level data grid in an embodiment of this application.
[0107] (3) Repeat the process in (2) until all grid water levels in the twin river segment are assigned values, and finally obtain the water level grid raster_river_Z at any position in the entire twin river segment.
[0108] Step 11: Render the real-time water level on the twin river section using the water level raster_river_Z obtained in Step 10. During rendering, determine whether to render based on whether a null value is marked. Figure 9 In the raster cells with water levels of 5 and 8, two are marked with the "Render Null Forest" tag and are not rendered in the twin platform, such as... Figure 9 As shown, Figure 9 This is a schematic diagram of a local water level data grid in an embodiment of this application.
[0109] Please see Figure 2 , Figure 2 This is a schematic diagram of the structure of the water level rendering device in the digital twin watershed in this application embodiment, as shown below. Figure 2 As shown, specifically:
[0110] The conversion unit 201 is used to convert the measured topographic map of the river section of the digital twin river into a digital elevation model, and cut n cross sections xs along the river according to preset features;
[0111] Modeling unit 202 is used to construct a one-dimensional water surface line calculation model based on Bernoulli's equation according to the data of n cross-sections xs, and to determine the calculation parameters of the calculation model based on training data;
[0112] The acquisition unit 203 is used to acquire real-time water level and flow data of each water level station in the digital twin river section, and calculate the real-time water level xs_Zi (i=1,2,...,n) of n cross sections xs according to the calculation model;
[0113] The comparison unit 204 is used to compare the real-time water level xs_Zi with the elevation of the digital elevation model grid points, determine whether the elevation of the digital elevation model grid points needs to be marked with null labels, and generate water level raster_xs_Z for each cross section xs.
[0114] Create unit 205 to create the centerline of the digital twin river section. Based on the number of grid points in the digital elevation model and the real-time water level xs_Zi of the adjacent cross sections, linearly interpolate the grid water level on the centerline to generate the centerline water level grid raster_centerline_Z.
[0115] Calculation unit 206 is used to calculate the water level grid raster_river_Z of the target river segment based on the water level grid raster_xs_Z of the cross section xs and the water level grid raster_centerline_Z of the centerline;
[0116] Rendering unit 207 is used to determine the real-time water level based on whether the water level raster_river_Z of the digital twin river segment is marked with a rendering null value label.
[0117] This application also provides another digital twin water level rendering device, such as... Figure 3 As shown, for ease of explanation, only the parts related to the embodiments of this application are shown. For specific technical details not disclosed, please refer to the method section of the embodiments of this application. The terminal can be any terminal device including mobile phones, tablets, personal digital assistants (PDAs), point-of-sales terminals (POS), in-vehicle computers, etc. Taking a mobile phone as an example:
[0118] Figure 3 This is a block diagram illustrating a portion of the structure of a mobile phone related to the terminal provided in the embodiments of this application. (Reference) Figure 3 The mobile phone includes: a radio frequency (RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, a processor 1080, and a power supply 1090, etc. Those skilled in the art will understand that... Figure 3 The mobile phone structure shown does not constitute a limitation on the mobile phone and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0119] The following is combined with Figure 3 A detailed introduction to each component of a mobile phone:
[0120] The RF circuit 1010 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with the processor 1080; additionally, it transmits uplink data to the base station. Typically, the RF circuit 1010 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, the RF circuit 1010 can also communicate wirelessly with networks and other devices. The aforementioned wireless communications may use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, and Short Messaging Service (SMS).
[0121] The memory 1020 can be used to store software programs and modules. The processor 1080 executes various mobile phone functions and data processing by running the software programs and modules stored in the memory 1020. The memory 1020 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 1020 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0122] The input unit 1030 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the mobile phone. Specifically, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel 1031), and drive the corresponding connection devices according to a pre-set program. Optionally, the touch panel 1031 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 1080, and can also receive and execute commands sent by the processor 1080. In addition, the touch panel 1031 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1031, the input unit 1030 may also include other input devices 1032. Specifically, other input devices 1032 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.
[0123] The display unit 1040 can be used to display information input by the user or information provided to the user, as well as various menus of the mobile phone. The display unit 1040 may include a display panel 1041, which may optionally be configured as a Liquid Crystal Display (LCD), Organic Light-Emitting Diode (OLED), or similar display panel 1041. Further, a touch panel 1031 may cover the display panel 1041. When the touch panel 1031 detects a touch operation on or near it, it transmits the information to the processor 1080 to determine the type of touch event. Subsequently, the processor 1080 provides corresponding visual output on the display panel 1041 according to the type of touch event. Although in Figure 3 In this embodiment, the touch panel 1031 and the display panel 1041 are two separate components to realize the input and output functions of the mobile phone. However, in some embodiments, the touch panel 1031 and the display panel 1041 can be integrated to realize the input and output functions of the mobile phone.
[0124] The mobile phone may also include at least one sensor 1050, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1041 according to the ambient light level, and the proximity sensor can turn off the display panel 1041 and / or the backlight when the phone is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, taps), etc. Other sensors that may be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.
[0125] The audio circuit 1060, speaker 1061, and microphone 1062 provide an audio interface between the user and the mobile phone. The audio circuit 1060 converts the received audio data into electrical signals and transmits them to the speaker 1061, where the speaker 1061 converts them into sound signals for output. On the other hand, the microphone 1062 converts the collected sound signals into electrical signals, which are then received by the audio circuit 1060, converted into audio data, and then processed by the processor 1080 before being transmitted via the RF circuit 1010 to, for example, another mobile phone, or the audio data can be output to the memory 1020 for further processing.
[0126] WiFi is a short-range wireless transmission technology. Through the WiFi module 1070, mobile phones can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 3 The WiFi module 1070 is shown, but it is understood that it is not an essential component of a mobile phone and can be omitted as needed without changing the essence of the invention.
[0127] The processor 1080 is the control center of the mobile phone, connecting various parts of the phone through various interfaces and lines. It executes software programs and / or modules stored in the memory 1020 and calls data stored in the memory 1020 to perform various functions and process data, thereby providing overall monitoring of the phone. Optionally, the processor 1080 may include one or more processing units; preferably, the processor 1080 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 1080.
[0128] The mobile phone also includes a power supply 1090 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 1080 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.
[0129] Although not shown, mobile phones may also include a camera, Bluetooth module, etc., which will not be described in detail here.
[0130] In this embodiment of the application, the processor 1080 included in the terminal also has the following functions:
[0131] S1. Convert the measured topographic map of the river section from the digital twin into a digital elevation model, and cut n cross sections xs along the river according to preset features;
[0132] S2. Based on the data of n cross sections xs, construct a one-dimensional water surface line calculation model based on Bernoulli's equation, and determine the calculation parameters of the calculation model based on the training data.
[0133] S3. Obtain real-time water level and flow rate data of each water level station in the digital twin river section, and calculate the real-time water level xs_Zi (i=1,2,...,n) of n cross sections xs according to the calculation model;
[0134] S4. Compare the real-time water level xs_Zi with the elevation of the digital elevation model grid points, determine whether the digital elevation model grid point elevations need to be marked with null labels, and generate the water level raster_xs_Z for each cross section xs.
[0135] S5. Create the centerline of the digital twin river section. Based on the number of grid points in the digital elevation model and the real-time water level xs_Zi of the adjacent cross sections, linearly interpolate the grid water level on the centerline to generate the centerline water level grid raster_centerline_Z.
[0136] S6. Calculate the target river segment's water level grid raster_river_Z based on the water level grid raster_xs_Z of cross section xs and the centerline water level grid raster_centerline_Z;
[0137] S7. Determine the real-time water level based on whether the water level raster_river_Z of the digital twin river section is marked with a rendering null value label.
[0138] This application also provides a computer-readable storage medium for storing program code that executes any one of the implementation methods of a digital twin watershed water level rendering method described in the foregoing embodiments.
[0139] This application provides a method, apparatus, device, and storage medium for rendering water levels in a digital twin river basin. It combines a one-dimensional hydrodynamic model and raster interpolation technology, utilizing the rapid calculation capability of the one-dimensional hydrodynamic model to calculate the water surface line. On the other hand, it extrapolates the calculation results to all rasters between each cross section, thus preserving the accuracy of the one-dimensional hydrodynamic model while enabling the rendering of water levels at any raster point in the twin river section. This achieves the real-time calculation and analysis of water levels at any river location in the entire river section of interest during non-flood periods based on limited water level monitoring equipment, and renders and displays the results in the digital twin river channel.
[0140] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0141] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0142] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0143] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0144] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0145] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0146] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0147] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application 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. Such 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 this application.
Claims
1. A method for rendering water levels in a digital twin watershed, characterized in that, include: S1. Convert the measured topographic map of the river section from the digital twin into a digital elevation model, and cut n cross sections xs along the river according to preset features; S2. Based on the data of n cross sections xs, construct a one-dimensional water surface line calculation model based on Bernoulli's equation, and determine the calculation parameters of the calculation model based on the training data. S3. Obtain real-time water level and flow rate data of each water level station in the digital twin river section, and calculate the real-time water level xs_Zi (i=1,2,...,n) of n cross sections xs according to the calculation model; S4. Compare the real-time water level xs_Zi with the elevation of the digital elevation model grid points, determine whether the digital elevation model grid point elevations need to be marked with null labels, and generate the water level raster_xs_Z for each cross section xs. S5. Create the centerline of the digital twin river section. Based on the number of grid points in the digital elevation model and the real-time water level xs_Zi of the adjacent cross sections, linearly interpolate the grid water level on the centerline to generate the centerline water level grid raster_centerline_Z. S6. Calculate the target river segment's water level grid raster_river_Z based on the water level grid raster_xs_Z of cross section xs and the centerline water level grid raster_centerline_Z; S7. Determine the real-time water level based on whether the water level raster_river_Z of the digital twin river section is marked with a rendering null value label; Step S4 specifically includes: Compare the real-time water level xs_Zi with the elevation of the grid points in the digital elevation model; If the elevation of a digital elevation model grid point is not greater than the real-time water level xs_Zi, then the digital elevation model grid point is regarded as the water surface, and the real-time water level xs_Zi is assigned to the digital elevation model grid point. Otherwise, treat the digital elevation model grid points as the ground and assign the real-time water level xs_Zi to the digital elevation model grid points, but mark the digital elevation model grid points with a null value for rendering. Form water level grids raster_xs_Z with each cross-section xs; Step S6 specifically includes: S61. Take the first centerline dividing point cut_point_Z1 between the downstream cross section xs_1 and the adjacent cross section xs_2 of the digital twin river section as the center point grid, and determine the water level values of the eight water level grids around the center point grid. S62. Select one of the eight water level grids as the center point grid, and repeat step S61 until the water level grid raster_river_Z of the target river section is obtained. Specifically, the water level values of the eight water level grids surrounding the center point grid are determined as follows: If the shared grid cells around the center grid cell have already been assigned water level values, then retain the water level values of the shared grid cells; otherwise, assign the cut_point_Z1 value of the center grid cell to the shared grid cells, and at the same time determine whether the water level values of the shared grid cells need to be marked with null labels for rendering.
2. The method for rendering water levels in a digital twin watershed according to claim 1, characterized in that, Step S5 specifically includes: Create a centerline for the digital twin river segment, perpendicular to n cross-sections xs; Mark the intersection points (intersection_point_i, i=1,2,...,n) of the cross sections xs used in the calculation model on the centerline, and assign the real-time water level xs_Zi to the intersection point. Compare the real-time water level xs_Zi of the intersection point with the elevation of the raster point in the digital elevation model to determine whether the intersection point needs to be marked with a null value label, and generate the water level raster raster_intersetion_point_Z for each intersection point. The centerline is intersected with the digital elevation model (DEM) raster data. Assuming that the number of DEM raster cells between two adjacent cross sections xs_i and xs_i+1 through which the centerline passes is k, the centerline is divided into k segments, with the dividing point being cut_point_j (j=1,2,...,k). Using a linear interpolation method, the water level cut_point_Zj of each cut_point_j of the center line is interpolated based on the water level grid raster_intersetion_point_Z at the intersection of each adjacent cross section. Compare the water level cut_point_Zj of each cut_point_j segment on the centerline with the elevation of the corresponding digital elevation model raster point, determine whether the digital elevation model raster point elevation needs to be marked with a null value label, and generate the water level raster raster_cut_point_Z of each cut_point_j segment on the centerline. The water level grid raster_centerline_Z is formed by combining the water level grid raster_cut_point_j at each cut_point_j point of the centerline with the water level grid raster_intersetion_point_Z at the intersection point of the centerline.
3. A water level rendering device in a digital twin watershed, characterized in that, include: The conversion unit is used to convert the measured topographic map of the river section of the digital twin river into a digital elevation model, and to cut n cross sections xs along the river according to preset features; The modeling unit is used to construct a one-dimensional water surface line calculation model based on Bernoulli's equation using data from n cross-sections xs, and to determine the calculation parameters of the calculation model based on training data. The acquisition unit is used to acquire real-time water level and flow data of each water level station in the digital twin river section, and calculate the real-time water level xs_Zi (i=1,2,...,n) of n cross sections xs according to the calculation model. The comparison unit is used to compare the real-time water level xs_Zi with the elevation of the digital elevation model grid points, determine whether the elevation of the digital elevation model grid points needs to be marked with null labels, and generate the water level raster_xs_Z for each cross section xs. Create a cell to create the centerline of the digital twin river section. Based on the number of grid points in the digital elevation model and the real-time water level xs_Zi of the adjacent cross sections, linearly interpolate the grid water level on the centerline to generate the centerline water level grid raster_centerline_Z. The calculation unit is used to calculate the water level grid raster_river_Z of the target river segment based on the water level grid raster_xs_Z of the cross section xs and the water level grid raster_centerline_Z of the centerline; The rendering unit is used to determine the real-time water level based on whether the water level raster_river_Z of the digital twin river segment is marked with a render null label.
4. The digital twin watershed water level rendering device according to claim 3, characterized in that, The comparison unit is specifically used for: Compare the real-time water level xs_Zi with the elevation of the grid points in the digital elevation model; If the elevation of a digital elevation model grid point is not greater than the real-time water level xs_Zi, then the digital elevation model grid point is regarded as the water surface, and the real-time water level xs_Zi is assigned to the digital elevation model grid point. Otherwise, treat the digital elevation model grid points as the ground and assign the real-time water level xs_Zi to the digital elevation model grid points, but mark the digital elevation model grid points with a null value for rendering. The water level grid raster_xs_Z is formed for each cross-section xs.
5. The digital twin watershed water level rendering device according to claim 3, characterized in that, The creation unit is specifically used for: Create a centerline for the digital twin river segment, perpendicular to n cross-sections xs; Mark the intersection points (intersection_point_i, i=1,2,...,n) of the cross sections xs used in the calculation model on the centerline, and assign the real-time water level xs_Zi to the intersection point. Compare the real-time water level xs_Zi of the intersection point with the elevation of the raster point in the digital elevation model to determine whether the intersection point needs to be marked with a null value label, and generate the water level raster raster_intersetion_point_Z for each intersection point. The centerline is intersected with the digital elevation model (DEM) raster data. Assuming that the number of DEM raster cells between two adjacent cross sections xs_i and xs_i+1 through which the centerline passes is k, the centerline is divided into k segments, with the dividing point being cut_point_j (j=1,2,...,k). Using a linear interpolation method, the water level cut_point_Zj of each cut_point_j of the center line is interpolated based on the water level grid raster_intersetion_point_Z at the intersection of each adjacent cross section. Compare the water level cut_point_Zj of each cut_point_j segment on the centerline with the elevation of the corresponding digital elevation model raster point, determine whether the digital elevation model raster point elevation needs to be marked with a null value label, and generate the water level raster raster_cut_point_Z of each cut_point_j segment on the centerline. The water level grid raster_centerline_Z is formed by combining the water level grid raster_cut_point_j at each cut_point_j point of the centerline with the water level grid raster_intersetion_point_Z at the intersection point of the centerline.
6. A water level rendering device in a digital twin watershed, characterized in that, The device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the water level rendering method in a digital twin watershed as described in any one of claims 1-2, according to the instructions in the program code.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program code for executing the water level rendering method in a digital twin watershed as described in any one of claims 1-2.
Citation Information
Patent Citations
Flood efficient simulation and high-fidelity visual dynamic display method for water conservancy informatization system
CN108062453A
Flood inundation range dynamic display method based on BIM and GIS
CN112070849A