Three-dimensional water quality profile calculation and focusing display method for digital twin scene
By importing or drawing profile lines in a digital twin scene, calculating the sequence of intersections, and highlighting and raising them for display, the problem of discontinuity and lack of prominence in the display of 3D water quality model profiles in existing technologies is solved, achieving smooth transition and focused display of water quality profiles.
Patent Information
- Application Number
- CN202311052243.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-21
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2043-08-21
AI Technical Summary
Existing three-dimensional water quality visualization methods are insufficient to intuitively present the water quality status of river cross sections and arbitrary profiles in digital twin scenarios. The profile display is not prominent enough, and the vertical grid display is discontinuous, making it difficult to quickly identify the distribution and changes of pollutants.
By importing or drawing profile lines in a digital twin scene, calculating the sequence of intersections between the profile lines and the water quality grid, highlighting and raising the display, and combining interpolation calculations and interactive filtering, the profile grid and results can be displayed in a focused manner.
It enables intuitive display of any cross-section in a digital twin scenario, with smooth transition of cross-section calculation results, eye-catching focused display effect, and easy understanding of the distribution characteristics of water quality indicators.
Smart Images

Figure CN117292082B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of digital twinning, more specifically, it is a three-dimensional water quality profile calculation and focused display method for digital twinning scenarios. BACKGROUND
[0002] In recent years, the rapid development of digital twinning technology has brought great changes to the water conservancy industry. In the field of water quality application, digital twinning technology can be used in water quality monitoring, pollution control and water environment protection, etc. By establishing mathematical models of water quality and water pollution, and constructing corresponding virtual twin models, the concentration and distribution of water pollutants are monitored, water pollution and pollution sources are predicted, and water environment and ecological system are protected, so as to realize the monitoring, prediction, optimization and management of water quality conditions; in the field of three-dimensional water quality management and application, commonly used model software includes EFDC model developed by University of Virginia, Delft3D model developed by Delft University of Technology, MIKE3 model developed by Danish Hydraulic Institute, etc. These models can simulate the changes of water flow, water temperature, water quality, etc. in water body, predict the physical and chemical processes such as water quality pollution, oxidation-reduction, nitrogen cycle, and can be combined with hydrodynamic model to realize the coupling calculation with water depth, water level, flow velocity, etc.
[0003] When using three-dimensional water quality model to carry out three-dimensional water quality analysis in reservoirs, lakes and other areas, researchers usually need to analyze the spatial distribution characteristics of water quality indicators of some key concerned river sections and profiles in addition to calculating the overall evolution of water quality. At present, the visualization of three-dimensional water quality calculation results mostly adopts two-dimensional plane display method, and the water quality calculation results are analyzed in depth by grading color rendering of some water quality stratified pollutant indicators, etc. There are few researches on profile calculation. Some commercial software such as 3EWater, EFDC Explorer, IWIND-LR provides simple profile display module, which presents the profile analysis results in a two-dimensional chart form in a separate window.
[0004] The existing three-dimensional water quality visualization research lacks technical solutions for analyzing the water quality conditions of river sections and arbitrary profiles, and has the following problems:
[0005] 1) Some three-dimensional water quality application commercial software provides a simple profile display module, which presents the profile analysis results in a two-dimensional chart form in a separate window, which is difficult to intuitively understand the relationship of the water quality profile in the overall water quality model, and cannot be intuitively presented in the digital twinning scene;
[0006] 2) The existing method usually directly stacks the vertical grids involved in the profile to present the profile of the three-dimensional water quality model, resulting in discontinuity and non-smoothness of the elevation and color between adjacent grids;
[0007] 3) The 3D visualization of the water quality profile is not prominent enough, making it difficult to focus attention on the water quality profile results and failing to clearly present the meaning that the water quality profile results need to express in the 3D scene.
[0008] Therefore, there is an urgent need to propose a method for calculating and displaying three-dimensional water quality profiles in digital twin scenarios to solve the above problems and realize an intuitive and focused presentation of the three-dimensional water quality status of river sections and arbitrary profiles. Summary of the Invention
[0009] The purpose of this invention is to overcome the shortcomings of the above-mentioned background technology and provide a method for calculating and focusing on displaying three-dimensional water quality profiles for digital twin scenarios.
[0010] To achieve the above objectives, the technical solution of the present invention is: a method for calculating and focusing on three-dimensional water quality profiles for digital twin scenarios, characterized by comprising the following steps:
[0011] Step 1, Import or draw section lines:
[0012] In the digital twin scenario, after the construction of the three-dimensional water quality digital twin mesh is completed, the digital twin mesh is rendered with graded colors based on water quality pollutant indicators, and the three-dimensional water quality data is visualized in real spatial coordinates. According to the required profile, existing profile lines are imported or drawn, and the start and end spatial coordinates of the profile lines are recorded.
[0013] Step 2, calculate the water quality grid and intersection sequence involved in the profile:
[0014] On the projection plane of the three-dimensional water quality data, the intersection of the profile line and the planar projection grid of the three-dimensional water quality is calculated. If a water quality grid intersects with the profile line, then the grid is involved in the profile line. The grid number and the coordinates of the intersection point between the grid and the profile line are recorded. All intersection points are sorted along the direction of the profile line. According to the type of intersection point, the profile line is divided into one or more effective profile lines. The sequence of intersection points that make up these effective profile lines is recorded.
[0015] Step 3, Profile mesh selection and profile line interpolation calculation:
[0016] The calculated water quality grid and intersection sequence are then filtered and calculated separately:
[0017] 1) For water quality grids, interactive filtering allows you to select one or more grids of particular interest to determine the 3D water quality grid data that needs to be highlighted.
[0018] 2) For the intersection sequence, take the starting point of the profile line as the origin of the coordinate system, obtain interpolation points along the profile line direction according to the set sampling distance, and calculate the layer information of each interpolation point according to the water quality grid in which it is located, obtain the layer spatial coordinates and water quality indicators, and thus construct the profile result.
[0019] Step 4, Focused display of profile mesh and profile results:
[0020] The calculated profile mesh and profile results are displayed in a focused manner:
[0021] 1) For the focused display of the profile mesh, two methods are used: highlight display and lift display. The highlight display method makes the 3D water quality digital twin semi-transparent and highlights the profile mesh of interest. The lift display method makes the 3D water quality digital twin semi-transparent and draws wireframes at the profile mesh of interest, and lifts the mesh results in the vertical direction.
[0022] 2) For the focused display of the profile results, two methods are used: highlight display and lift display. The highlight display method makes the 3D water quality digital twin semi-transparent and blurred, and renders the interpolation points on the profile line as a 2D profile, which is superimposed on the 3D water quality digital twin with real spatial coordinates. The lift display method makes the 3D water quality digital twin semi-transparent and blurred, draws the outline of the profile at the profile result of interest, and lifts the profile result in the vertical direction.
[0023] In the above technical solution, step 2 includes:
[0024] Step 2.1: Calculate the intersection of the profile line and the water quality grid;
[0025] Step 2.1.1: On the projection plane of the three-dimensional water quality data, obtain the projection coordinates of the profile line, and the profile line formed on the plane projection is MN;
[0026] Step 2.1.2: The profile line MN is intersected with all the water quality grids in sequence. Assuming a certain water quality grid is ABCD, and the four line segments that make up the grid are AB, BC, CD, and DA, determine whether line segment MN intersects with the four line segments respectively. If they intersect, then calculate the coordinates of the intersection point.
[0027] Step 2.1.3: Record the coordinates of all intersection points to provide input for Step 2.2;
[0028] Step 2.2: Identification of the intersection type of the profile lines and extraction of key points;
[0029] Step 2.2.1: Determine which points are repeated points according to the XY coordinates of all intersection points, wherein: points without repetition are boundary points, which are marked as key points; points that appear twice are internal points, indicating that the grid line is the intersection of two internal grids, which are invalid points;
[0030] Step 2.2.2: Calculate whether the two end points of the line segment MN are inside the water quality grid, if the end points are inside, the points are key points; if not, the points are invalid points;
[0031] Step 2.3: Sort the key points and form the effective profile line;
[0032] Step 2.3.1: Sort all key points extracted in the above step in ascending order of X coordinate, and sort in ascending order of Y coordinate if the X coordinate is equal;
[0033] Step 2.3.2: Sequentially connect the key points two by two to form the effective profile line sequence, and record the intersection point sequence that constitutes these effective profile lines. For example: the profile line drawn extracts 4 key points QRST in turn, then the effective profile line is QR and ST.
[0034] In the above technical solution, step 3 includes:
[0035] Step 3.1: Interactive selection of profile grid of interest; including:
[0036] Step 3.1.1: Display the water quality grid body as a whole semi-transparently, draw the grid contour line involved in the profile line, and mark its position;
[0037] Step 3.1.2: Select one or more grids of interest through mouse click interaction; for example, provide an interactive way to highlight the contour line by clicking, which displays the grid involved in the profile line as a white line by default, changes to red after being selected by clicking, and restores to white after being selected again.
[0038] Step 3.2: Calculate the interpolation points and layering information along the profile line; including:
[0039] Step 3.2.1: Obtain interpolation points along the direction of each effective profile line; take the starting point of each profile line as the coordinate origin, and obtain interpolation points on the profile line at a set distance interval;
[0040] Step 3.2.2: Calculate the layering spatial coordinates and water quality indicators of the interpolation points; including:
[0041] Step 3.2.2.1: At a certain interpolation point P, the water quality grid ABCD where the point P is located is obtained, the grid has N layers of water quality stratification, the spatial coordinates of point P in the i-th layer of water quality stratification are Pi, and the xyz spatial coordinates of the grid vertices are Ai, Bi, Ci, and Di respectively; the water quality index of point P in the i-th layer of water quality stratification is PQi, and the water quality indexes of the grid vertices are AQi, BQi, CQi, and DQi respectively;
[0042] Step 3.2.2.2: The spatial distance from Pi to the four vertices is PAi, PBi, PCi, and PDi; the weight is calculated in a manner inversely proportional to the spatial distance, so the weight value of point Ai to point Pi is w(A) = 1.0 / PAi, and the overall normalized weight w = w(A) + w(B) + w(C) + w(D);
[0043] Step 3.2.2.3: The spatial coordinates and water quality index of Pi are calculated by weighting; the spatial coordinates Pi = (w(A)*Ai + w(B)*Bi + w(C)*Ci + w(D)*Di) / w; the water quality index PQi = (w(A)*AQi + w(B)*BQi + w(C)*CQi + w(D)*DQi) / w;
[0044] In the above technical solution, step 4 includes:
[0045] Step 4.1: The profile grid calculated is displayed in a focused manner using highlighting and lifting; including:
[0046] Step 4.1.1: The water quality grid body is displayed as a whole in a semi-transparent manner, and the edge contour of the required display grid body is drawn;
[0047] Step 4.1.2: The layered vertices constituting the water quality grid are obtained by traversing the grid body obtained through interactive filtering, the layered grid vertices are connected to form triangular facets, and the triangular facets are rendered by color interpolation using a vertex shader, and the rendering is superimposed on the whole water quality semi-transparent grid and adheres to the edge contour line of the grid body;
[0048] Step 4.1.3: The highlighted water quality grid body is lifted according to the set lifting display height, and is displayed directly above the grid contour line, and the lifted grid body is focused on the center of the screen;
[0049] Step 4.2: The profile result calculated is displayed in a focused manner using highlighting and lifting; including:
[0050] Step 4.2.1: The water quality grid body is displayed as a whole in a semi-transparent manner, and the profile contour to be displayed is drawn according to the calculated profile line interpolation points;
[0051] Step 4.2.2: traversing the layered water quality points calculated by the interpolation along the profile line, forming a triangular facet sequence of the water quality profile, setting color according to the pollution concentration index classification, using vertex shader interpolation rendering, superimposed display with the whole water quality semi-transparent grid, and sticking to the edge profile line of the profile;
[0052] Step 4.2.3: according to the set lifting display height, lifting the profile result drawn to display directly above the profile contour line, and focusing the lifted profile result to the center of the screen.
[0053] Compared with the prior art, the present application has the following advantages:
[0054] 1) The present application performs profile calculation and display on the digital twin grid body of the three-dimensional water quality model, can realize the drawing and calculation analysis of any profile, and the profile calculation result can be directly displayed in the digital twin scene. Compared with the traditional method of displaying the profile in a two-dimensional chart, the present application has higher integration with the digital twin scene, and can more fully reflect the information presentation advantage in the digital twin scene.
[0055] 2) The present application performs interpolation calculation on the profile calculation result, and the obtained profile vertical grid adjacency effect is more smooth, which can be rendered by the hierarchical color setting of the water quality index to quickly identify the profile water quality distribution and change caused by the diffusion of pollutants around. The traditional method usually directly stacks the vertical grid involved in the profile to display the profile of the three-dimensional water quality model, resulting in discontinuity and non-smoothness of the elevation and color between adjacent water quality grids, which makes it difficult to quickly identify the distribution and change of the water pollution index.
[0056] 3) The present application uses various visualization means such as highlight display, lifting display, and semi-transparent virtualization to display the profile grid and profile result, making the display effect more eye-catching, easy to focus and understand visually, and meeting the analysis needs of the spatial distribution characteristics of the water quality index of the key river section and profile. The traditional method does not highlight the three-dimensional visualization of the water quality profile, making it difficult to focus and pay attention to the profile result, and unable to intuitively express the meaning of the profile result in the twin scene. BRIEF DESCRIPTION OF DRAWINGS
[0057] Figure 1 is the overall technical flowchart of the present application.
[0058] Figure 2 is the principle diagram of the water quality grid and intersection sequence involved in the profile line calculation in the present application. Figure 2 includes Figure 2 .1, Figure 2 .2, Figure 2 .3, Figure 2 .4, Figure 2 .5, Figure 2 .6, whereinFigure 2 .1 is a schematic view of profile line MN based on water quality grid import or drawing; Figure 2 .2 is a schematic view of profile line MN intersecting with certain grid ABCD to obtain intersection point EF; Figure 2 .3 is a schematic view of all water quality grids involved by profile line MN; Figure 2 .4 is a schematic view of intersection points of profile line MN and water quality grids, which are classified and marked according to the relationship between the intersection points and the grids; Figure 2 .5 is a schematic view of effective profile line X1X2 obtained according to the intersection point type of profile line MN under normal conditions; Figure 2 .6 is a schematic view of effective profile line sequence Y1Y2, Y3Y4 and Y5Q obtained according to the intersection point type of profile line PQ under special conditions, which is truncated by the island in the middle of the water quality grid.
[0059] Figure 3 is a schematic view of the method for highlighting and lifting the profile grid of interest in the application. Figure 3 It comprises Figure 3 .1, 3.2, 3.3, 3.4, 3.5 and 3.6; wherein Figure 3 .1 is a schematic view of profile grid sequence obtained by intersecting a certain profile line with water quality grids; Figure 3 .2 is a schematic view of interactive filtering of a certain grid of interest and semi-transparent obscuring of other grids; Figure 3 .3 is a schematic view of hierarchical color setting according to the water quality index of the layered interpolation point, and the principle of constructing a triangular facet through point color interpolation;
[0060] Figure 3 .4 is a schematic view of highlighting a certain grid of interest and semi-transparent obscuring of other grids;
[0061] Figure 3 .5 is a schematic view of lifting a certain grid of interest, semi-transparent obscuring of other grids, and marking the original position of the grid with an outline; Figure 3 .6 is a schematic view of lifting multiple grids of interest, semi-transparent obscuring of other grids, and marking the original position of the grid with an outline.
[0062] Figure 4 is a schematic view of the principle of sampling and calculating interpolation points along the profile line in the application. Figure 5 It comprises Figure 4 .1, 4.2, 4.3 and 4.4; wherein Figure 4 .1 is a schematic view of obtaining effective profile line according to the calculated key points of the profile line; Figure 4 .2 is a schematic view of obtaining interpolation points on the profile line according to a certain spatial distance; Figure 4.3 is a schematic diagram of hierarchical interpolation calculation for each interpolation point on the profile line in the grid to which it belongs; Figure 4 .4 is a schematic diagram of calculating the distance of an interpolation point P on the profile line (the grid to which it belongs is ABCD) to the grid vertex in each water quality layer and determining the weight, and then performing interpolation calculation.
[0063] Figure 5 is a water quality grid division schematic diagram and a local total enlarged view constructed by a three-dimensional water quality model in an embodiment of the present application.
[0064] Figure 6 is a result graph of importing or drawing a profile line on a three-dimensional water quality digital twin grid body and calculating the water quality grid and intersection sequence involved in the profile line in an embodiment of the present application. Figure 6 comprises Figure 6 .1, Figure 6 .2, Figure 6 .3; wherein Figure 6 .1 is a result graph of hierarchical color rendering of a three-dimensional water quality digital twin grid body according to a total phosphorus water quality index, wherein a dotted line frame is used to identify the location of the key river section area; Figure 6 .2 is Figure 6 .1, a result graph after importing or drawing a profile line; Figure 6 .3 is Figure 6 .2, a water quality grid result graph involved in the profile line.
[0065] Figure 7 is a result graph of highlighting and lifting display of the profile grid in an embodiment of the present application. Figure 7 comprises Figure 7 .1, Figure 7 .2, Figure 7 .3, Figure 7 .4; wherein Figure 7 .1 is a schematic diagram of highlighting display of the grid involved in the profile line; Figure 7 .2 is a schematic diagram of highlighting display of the grid after interactive filtering in Figure 7 .1; Figure 7 .3 is a schematic diagram of lifting display of the grid involved in the profile line; Figure 7 .4 is a schematic diagram of lifting display of the grid after interactive filtering in Figure 8 .3.
[0066] Figure 8 is a result graph of highlighting and lifting display of the profile result obtained by interpolation calculation in an embodiment of the present application. Figure 8 comprises Figure 8 .1 and Figure 8 .2; wherein Figure 8 .1 is a schematic diagram of highlighting display of the profile result;Figure 2 .2 is a schematic diagram of lifting display of profile results. DETAILED DESCRIPTION
[0067] The embodiments of the present application are described in detail below with reference to the accompanying drawings, but they do not constitute limitations on the present application, and are only examples. At the same time, the advantages of the present application are made clearer and easier to understand through the description.
[0068] The present application provides a three-dimensional water quality profile calculation and focused display method for a digital twin scene, solves the river section and arbitrary profile calculation problem of three-dimensional water quality model analysis results, and provides a water quality profile display method with a visual effect that is eye-catching, easy to visually focus and understand, and meets the analysis needs of the spatial distribution characteristics of water quality indicators of key river sections and profiles.
[0069] As shown in the drawings, the three-dimensional water quality profile calculation and focused display method for the digital twin scene comprises the following steps:
[0070] Step 1, import or draw the profile line:
[0071] In the digital twin scene, after the construction of the three-dimensional water quality digital twin grid body is completed, the digital twin grid body is graded and colored based on the water quality pollutant indicators, and the three-dimensional water quality data is visually presented in the real space coordinate position; according to the profile display requirements, import the existing profile line or draw the profile line, and record the starting and ending space coordinates of the profile line;
[0072] As shown in Figure 2 , step 2, calculate the water quality grid and intersection sequence involved by the profile line:
[0073] On the projection plane of the three-dimensional water quality data, the intersection calculation is performed between the profile line and the plane projection grid of the three-dimensional water quality, if there is an intersection point between a water quality grid and the profile line, then the grid is the grid involved by the profile line, record the grid number and the intersection coordinates of the grid and the profile line; sort all intersection points along the profile line direction, divide the profile line into one or more effective profile lines according to the intersection point type, and record the intersection sequence of these effective profile lines;
[0074] Step 2.1: intersection calculation of profile line and water quality grid; including:
[0075] Step 2.1.1: as shown in Figure 2 .1, on the projection plane of the three-dimensional water quality data, the projection coordinates of the profile line are obtained, and the profile line MN is formed on the plane projection;
[0076] Step 2.1.2: the profile line MN is sequentially intersected with all water quality grids. As shown in Figure 2.2, a certain water quality grid is ABCD, the four line segments AB, BC, CD and DA constitute the grid, whether the line segment MN intersects with the four line segments is determined, if intersecting, further the intersection point E and the intersection point F are obtained; all water quality grids are calculated one by one, and the water quality grids involved in the profile line MN are obtained as shown in Figure 2 .3;
[0077] Step 2.1.3: record all intersection point coordinates to provide input for step 2.2;
[0078] Step 2.2: as shown in Figure 2 .4, profile line intersection point type discrimination and key point extraction;
[0079] Step 2.2.1: according to the XY coordinates of all intersection points, determine which points are repeated points, wherein: no repeated points are boundary points, which are marked as key points; points that appear twice are internal points, indicating that the grid line is the intersection of two internal grids, which are invalid points;
[0080] Step 2.2.2: calculate whether the two end points of the line segment MN are inside the water quality grid, if the end points are inside, the point is a key point; if not, the point is an invalid point;
[0081] Step 2.3: sort the key points and construct the effective profile line;
[0082] Step 2.3.1: sort all the key points extracted in the above steps in ascending order of X coordinate, if the X coordinate is equal, sort in ascending order of Y coordinate;
[0083] Step 2.3.2: sequentially connect the key points two by two to form an effective profile line sequence, and record the intersection point sequence that constitutes these effective profile lines. The water quality profile line under normal circumstances is shown in Figure 2 .5, the profile line MN is imported or drawn, the intersection calculation can obtain the key points X1 and X2, and the effective profile line X1X2 is obtained; the profile line under special circumstances is shown in Figure 3 .6, the profile line PQ is truncated by the island in the middle of the water quality grid, the calculation can obtain the key points Y1, Y2, Y3, Y4, Y5 and Q, and the effective profile line sequence Y1Y2, Y3Y4 and Y5Q is constructed;
[0084] Step 3, profile grid screening and profile line interpolation calculation:
[0085] As shown in Figure 3 , step 3.1: after calculating the water quality grid involved in the profile line, one or more grids are interactively screened, and the three-dimensional water quality grid data required for key display is determined; including:
[0086] Step 3.1.1: as shown in Figure 3Step 3.1.1: As shown in FIG. 1, the water quality grid is displayed as a whole semi-transparent display, the profile line involved grid is drawn with the contour line, and the position is marked;
[0087] Step 3.1.2: As shown in FIG. 2, one or more grids are interactively selected by mouse click as the focus; for example, an interactive way of highlighting the contour line by clicking is provided, the grid involved in the profile line is displayed as a white line by default, and it becomes red after being clicked to indicate that it has been selected, and it returns to white after being clicked again to indicate that it has not been selected. Figure 4
[0088] As shown in FIG. 3, step 3.2: taking the starting point of the profile line as the coordinate origin, obtaining the interpolation points along the direction of the profile line according to the set sampling distance, and calculating the layered information of each interpolation point according to the water quality grid where the interpolation point is located to obtain the layered space coordinates and water quality indicators, thereby constructing the profile result; including: Figure 4
[0089] Step 3.2.1: obtaining interpolation points along the direction of each effective profile line, as shown in FIG. 4; taking the starting point of each profile line as the coordinate origin, and obtaining interpolation points on the profile line at a set distance interval, as shown in FIG. 5; Figure 4 Figure 4
[0090] Step 3.2.2: calculating the layered space coordinates and water quality indicators of the interpolation points, as shown in FIG. 6, FIG. 7; including: Figure 4 Figure 3
[0091] Step 3.2.2.1: taking a certain interpolation point P, obtaining the water quality grid ABCD where the interpolation point is located, the grid has N layers of water quality layers, the space coordinates of point P in the i-th water quality layer are Pi, the xyz space coordinates of the grid vertices are Ai, Bi, Ci, Di respectively; the water quality indicator of point P in the i-th water quality layer is PQi, and the water quality indicators of the grid vertices are AQi, BQi, CQi, DQi respectively;
[0092] Step 3.2.2.2: the spatial distance from Pi to the four vertices is PAi, PBi, PCi, PDi; according to the inverse proportion of the spatial distance, the weight value of point Ai to point Pi is w(A) = 1.0 / PAi, and the overall normalized weight w = w(A) + w(B) + w(C) + w(D);
[0093] Step 3.2.2.3: weightedly obtaining the space coordinates and water quality indicators of Pi; the space coordinates Pi = (w(A)*Ai + w(B)*Bi + w(C)*Ci + w(D)*Di) / w; the water quality indicator PQi = (w(A)*AQi + w(B)*BQi + w(C)*CQi + w(D)*DQi) / w;
[0094] Step 4, profile grid and profile result focus display:
[0095] As Figure 3 shown, step 4.1: focus display of the calculated profile grid using highlighting and lifting two ways; highlighting display mode for three-dimensional water quality digital twin semi-transparent virtualization, and highlight the profile grid body; lifting display mode for three-dimensional water quality digital twin semi-transparent virtualization, drawing wireframe at the profile grid, and lifting the grid result in the vertical direction; including:
[0096] Step 4.1.1: display the water quality grid body as a whole semi-transparent, and draw the edge profile of the required display grid body;
[0097] Step 4.1.2: as Figure 3 .3、 Figure 3 .4 shown, traverse the grid body obtained by interactive filtering, respectively get the layered vertices constituting the water quality grid, connect the layered grid vertices to form triangular patches, and color according to the pollutant concentration index, use vertex shader for triangular color interpolation rendering, superimposed with the whole water quality semi-transparent grid, and fit with the edge profile line of the grid body;
[0098] Step 4.1.3: as Figure 3 .5、 Figure 5 .6 shown, according to the set lifting display height, the drawing of the highlighted water quality grid body is lifted and displayed directly above the grid profile line, and the lifted grid body is focused on the screen center;
[0099] Step 4.2: focus display of the calculated profile result using highlighting and lifting two ways; highlighting display mode for three-dimensional water quality digital twin semi-transparent virtualization, rendering the interpolation points on the profile line to two-dimensional profile, superimposed with three-dimensional water quality digital twin in real space coordinates; lifting display mode for three-dimensional water quality digital twin semi-transparent virtualization, drawing the profile range at the profile result, and lifting the profile result in the vertical direction; including:
[0100] Step 4.2.1: display the water quality grid body as a whole semi-transparent, and draw the profile contour according to the calculated profile line interpolation points;
[0101] Step 4.2.2: traverse the layered water quality points calculated along the profile line interpolation to form a sequence of triangular patches of water quality profile, color according to the pollutant concentration index, use vertex shader interpolation rendering, superimposed with the whole water quality semi-transparent grid, and fit with the edge profile line of the profile;
[0102] Step 4.2.3: According to the set lifting display height, the drawn profile result is lifted and displayed directly above the profile contour line, and the lifted profile result is focused to the center of the screen.
[0103] Embodiments
[0104] In order to verify the effectiveness of the present application, the following experiment is carried out.
[0105] A three-dimensional water quality profile calculation and focusing display method for a digital twin scene is described as follows:
[0106] Application scenario and input: A three-dimensional water quality model is used for modeling and calculation in a reservoir area, and a quadrilateral grid is used for modeling (the grid structure and the profile area of interest are shown in Figure 6 ), the total phosphorus water quality index is selected, the time series three-dimensional water quality evolution result is calculated, and a three-dimensional water quality digital twin grid is constructed in a digital twin engine based on Unreal Engine 5.0 technology, and the total phosphorus water quality index is graded and color-coded.
[0107] For this water quality result data, the water quality conditions of the local area of the river section and the profile need to be analyzed and displayed.
[0108] Processing: According to the algorithm process of the present application, three-dimensional water quality profile calculation and focusing display in a digital twin scene are realized, and the process is as follows.
[0109] Step 1: Import or draw the profile line. As shown in Figure 6 .1, Figure 6 .2, based on the three-dimensional water quality digital twin grid with real coordinates that has been constructed, the profile line is imported or drawn in the river section area of interest, and the start and end spatial coordinates of the profile line are recorded.
[0110] Step 2: Calculate the water quality grid and intersection sequence involved in the profile line. In the projection plane of the three-dimensional water quality data, the water quality grid and intersection sequence involved in the profile line are calculated, and the grid result involved in the profile line is shown in Figure 7 .3, a total of 30 grids are involved.
[0111] Step 3: Profile grid screening and profile line interpolation calculation. The calculated water quality grid and intersection sequence are screened and calculated respectively:
[0112] 1) For the water quality grid, the grid of interest is interactively selected, and a total of 5 water quality index grids with vertical changes are selected for display.
[0113] 2) For the intersection sequence, take the profile line starting point as the coordinate origin, sample the interpolation points at a sampling distance interval of 5m along the profile line direction, and calculate the layered information for each interpolation point according to the water quality grid it belongs to, to obtain the layered spatial coordinates and water quality indicators, and then build the profile results;
[0114] Step 4: Focus display of profile grid and profile results. The calculated profile grid and profile results are respectively focused on display:
[0115] 1) As shown in Figure 7 , the profile grid is focused on display using highlighting and lifting, the three-dimensional water quality digital twin is displayed in semi-transparent virtualization, and the profile grid body of interest is focused on display using highlighting, vertical lifting, etc., as shown in Figure 8 .1, 7.2, 7.3, 7.4.
[0116] 2) As shown in Figure 8 , the profile results are focused on display using highlighting and lifting, the three-dimensional water quality digital twin is displayed in semi-transparent virtualization, and the layered interpolation points on the profile line are rendered into two-dimensional profiles, and the profile results are displayed using highlighting, vertical lifting, etc., as shown in Figure 8 .1 and .2.
[0117] Result analysis: According to the above steps, the three-dimensional water quality profile calculation and focused display can be carried out, and the spatial distribution characteristics of the water quality indicators of the key river section and profile can be analyzed interactively, providing water quality profile display results with visual effects that are eye-catching, easy to visually focus on and understand.
[0118] The other parts not mentioned belong to the prior art.
Claims
1. A method for three-dimensional water quality profile calculation and focused display for digital twin scenarios, characterized in that, The method comprises the following steps: Step 1, import or draw a profile line: In the digital twin scene, after the construction of the three-dimensional water quality digital twin grid body is completed, the digital twin grid body is rendered based on the water quality pollutant index, and the three-dimensional water quality data is visualized at the real space coordinate position; according to the profile requirement to be displayed, an existing profile line is imported or a profile line is drawn, and the starting and ending space coordinates of the profile line are recorded; Step 2, calculate the water quality grid and intersection point sequence involved in the profile line: On the projection plane of the three-dimensional water quality data, the intersection calculation is performed between the profile line and the planar projection grid of the three-dimensional water quality, if there is an intersection point between the water quality grid and the profile line, the grid is the grid involved in the profile line, and the grid number and the intersection point coordinates of the grid and the profile line are recorded; all intersection points are sorted along the profile line direction, the profile line is divided into one or more effective profile lines according to the intersection point type, and the intersection point sequence forming the effective profile lines is recorded; Step 3, profile grid screening and profile line interpolation calculation: The water quality grid and intersection point sequence calculated are respectively screened and calculated: 1) for the water quality grid, one or more grids are interactively screened, and the three-dimensional water quality grid data required to be displayed is determined; 2) for the intersection point sequence, the profile line starting point is taken as the coordinate origin, the interpolation points are obtained along the profile line direction according to the set sampling distance, and the layered information of each interpolation point is calculated according to the water quality grid to obtain the layered space coordinates and water quality index, so as to construct the profile result; Step 4, focused display of profile grid and profile result: The profile grid and profile result calculated are respectively focused and displayed: 1) for the focused display of the profile grid, two display modes of highlighting display and lifting display are adopted: the highlighting display mode is used to semi-transparently virtualize the three-dimensional water quality digital twin body, and to highlight the profile grid body to be focused; the lifting display mode is used to semi-transparently virtualize the three-dimensional water quality digital twin body, to draw a wireframe at the profile grid to be focused, and to lift and display the grid result in the vertical direction; 2) for the focused display of the profile result, two display modes of highlighting display and lifting display are adopted: the highlighting display mode is used to semi-transparently virtualize the three-dimensional water quality digital twin body, to render the interpolation points on the profile line into a two-dimensional profile, and to superimpose and display the profile line on the three-dimensional water quality digital twin body with real space coordinates; the lifting display mode is used to semi-transparently virtualize the three-dimensional water quality digital twin body, to draw the profile outline at the profile result to be focused, and to lift and display the profile result in the vertical direction.
2. The method of claim 1, wherein, The step 2 comprises: Step 2.1: intersection calculation of the profile line and the water quality grid; comprising: Step 2.1.1: on the projection plane of the three-dimensional water quality data, the projection coordinates of the profile line are obtained, and the profile line MN is formed on the planar projection; Step 2.1.2: the profile line MN is sequentially intersected with all water quality grids; whether the line segment MN intersects with the grid line segment is judged respectively, if the line segment MN intersects with the grid line segment, the intersection point coordinates are further calculated; Step 2.1.3: all intersection point coordinates are recorded, which provides input for step 2.
2. Step 2.2: Intersection line intersection point type discrimination and key point extraction; including: Step 2.2.1: According to the XY coordinates of all intersection points, judge which points are repeated points, and mark the points as key points if there are no repeated points; if the points are repeated twice, they are internal points, indicating that the grid line is the intersection of two internal grids, which is an invalid point; Step 2.2.2: Calculate whether the two endpoints of the line segment MN are inside the water quality grid, if the endpoints are inside, the point is a key point; if not, the point is an invalid point; Step 2.3: Key point sorting and forming effective profile line; including: Step 2.3.1: Sort all extracted key points in ascending order of X coordinate, and sort in ascending order of Y coordinate if the X coordinate is equal; Step 2.3.2: Sequentially connect the key points two by two to form an effective profile line sequence, and record the intersection point sequence that constitutes these effective profile lines.
3. The method of claim 2, wherein, The step 3 includes: Step 3.1: Interactive filtering of profile grid of interest; including: Step 3.1.1: Display the water quality grid body as a whole semi-transparently, draw the outline of the profile line involved grid, and mark its position; Step 3.1.2: Select one or more grids of interest through mouse click interaction; Step 3.2: Calculate the interpolation points and stratification information along the profile line; including: Step 3.2.1: Get the interpolation points along the direction of each effective profile line; respectively take the starting point of each profile line as the coordinate origin, and get the interpolation points on the profile line at a set distance interval; Step 3.2.2: Calculate the stratification space coordinates and water quality indicators of the interpolation points; including: Step 3.2.2.1: Take a certain interpolation point P, get the water quality grid ABCD where it is located, the grid has N layers of water quality stratification, the spatial coordinates of point P in the i-th layer of water quality stratification are Pi, and the xyz spatial coordinates of the grid vertices are Ai, Bi, Ci and Di; the water quality indicator of point P in the i-th layer of water quality stratification is PQi, and the water quality indicators of the grid vertices are AQi, BQi, CQi and DQi; Step 3.2.2.2: The spatial distance from Pi to the four vertices is PAi, PBi, PCi and PDi; according to the inverse proportion of the spatial distance, the weight value of point Ai to point Pi is w(A) = 1.0 / PAi, and the overall normalized weight w = w(A) + w(B) + w(C) + w(D); Step 3.2.2.3: Weightedly calculate the spatial coordinates and water quality indicators of Pi; spatial coordinates Pi = (w(A)*Ai + w(B)*Bi + w(C)*Ci + w(D)*Di) / w; water quality indicator PQi = (w(A)*AQi + w(B)*BQi + w(C)*CQi + w(D)*DQi) / w.
4. The method of claim 3, wherein, The step 4 includes: Step 4.1: Focus on displaying the calculated profile grid by highlighting and lifting; including: Step 4.1.1: Display the water quality grid body as a whole semi-transparently, and draw the edge outline of the grid body to be displayed. Step 4.1.2: Traverse the grid body obtained by interactive filtering, respectively obtain the hierarchical vertices constituting the water quality grid, connect the hierarchical grid vertices to form triangular facets, and color grade according to the pollutant concentration index, use vertex shader for triangular color interpolation rendering, superimposed with the whole water quality translucent grid, and fit with the edge outline of the grid body; Step 4.1.3: According to the set lifting display height, the highlighted water quality grid is lifted and displayed directly above the grid outline, and the lifted grid body is focused on the screen center; Step 4.2: The profile results calculated are focused and displayed in two ways of highlighting and lifting, including: Step 4.2.1: The water quality grid body is displayed as a whole semi-transparency, and the profile outline to be displayed is drawn according to the calculated profile line interpolation points; Step 4.2.2: Traverse the hierarchical water quality points calculated along the profile line interpolation, form the triangular facet sequence of the water quality profile, color grade according to the pollutant concentration index, use vertex shader interpolation rendering, superimposed with the whole water quality translucent grid, and fit with the edge outline of the profile; Step 4.2.3: According to the set lifting display height, the profile result is lifted and displayed directly above the profile outline, and the lifted profile result is focused on the screen center.
Citation Information
Patent Citations
Method for accurately positioning soil contamination based on geophysical exploration and accurate estimation method
CN107544097A
Intelligent vibratory digital twinning system and method for industrial environments
CN115039045A