Three-dimensional underground pipe network real-time rendering method and system based on two-dimensional vector pipeline

By calculating the rotation and scaling matrix of the two-dimensional pipeline data and combining with the basic three-dimensional model, three-dimensional real-time rendering of the underground pipeline network is realized, solving the problem of untimely update of the three-dimensional underground pipeline network in the existing technology, and improving rendering performance and real-time performance .

CN118941684AInactive Publication Date: 2024-11-12WUHAN ZHILIAN SPACE TIME TECH CO LTD

Patent Information

Application Number
CN202410631590.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2024-11-12
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

It is difficult for the existing technology to realize real-time update of three-dimensional visualization of underground pipelines, resulting in poor real-time performance of three-dimensional underground pipelines.

Method used

By obtaining two-dimensional vector pipeline data, calculating the rotation matrix and scaling matrix, and combining the basic three-dimensional model for three-dimensional rendering, real-time rendering of the three-dimensional underground pipeline network is realized. The specific steps include extracting the pipe point data and pipeline data, establishing multiple basic three-dimensional models, calculating the model matrix of each pipe segment and pipe point, and rendering the three-dimensional pipe network based on these matrices.

Benefits of technology

It realizes rapid update and real-time rendering of three-dimensional underground pipeline networks, improves the real-timeness of three-dimensional rendering, reduces the burden of geometry rendering on the GPU, improves performance, and does not rely on commercial software to directly generate three-dimensional models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118941684A_ABST
    Figure CN118941684A_ABST
Patent Text Reader

Abstract

The invention discloses a three-dimensional underground pipe network real-time rendering method and system based on a two-dimensional vector pipeline, and belongs to the technical field of underground pipeline visualization, and the method comprises the steps: obtaining geophysical prospecting data, and respectively extracting pipe point data and pipeline data of the two-dimensional vector pipeline from the geophysical prospecting data; establishing a plurality of basic three-dimensional models; traversing pipeline data, calculating a corresponding rotation matrix and a scaling matrix for each pipe section, and calculating a first model matrix of the corresponding pipe section according to the rotation matrix and the scaling matrix; traversing the pipe point data, obtaining a plurality of pipe sections connected with each pipe point, and calculating a second model matrix of the corresponding pipe section; and rendering the three-dimensional underground pipe network according to the basic three-dimensional model, the first model matrix and the second model matrix. According to the method, the three-dimensional pipeline can be dynamically generated directly based on the vector two-dimensional pipeline data, and real-time three-dimensional underground pipe network rendering is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of underground pipeline visualization, and in particular relates to a three-dimensional underground pipeline network real-time rendering method and system based on two-dimensional vector pipelines. Background Art

[0002] Underground pipelines refer to various pipeline systems buried underground for transporting liquids, gases, electricity and other resources. Underground pipelines usually include water pipes, gas pipes, oil pipes, sewage pipes, communication cables, etc., and are widely used in urban water supply, gas supply, power supply, drainage, communication and other fields. In order to ensure the safe operation of underground pipelines, it is usually necessary to conduct regular inspections, maintenance and repairs, as well as take a series of pipeline management measures, such as pipeline identification, pipeline mapping, pipeline protection measures, etc.

[0003] At present, the 3D visualization of underground pipelines is widely used in smart cities, municipal infrastructure informatization, underground space management and other fields, providing convenience for municipal management. This visualization technology can help better understand the layout, connection and operation status of underground pipelines, so as to better maintain and manage pipelines.

[0004] Generally, the 3D visualization of underground pipelines can be achieved by using geographic information system software or specialized pipeline management software. However, underground pipeline data is updated from time to time. To ensure the real-time and current nature of the 3D underground pipelines, it is necessary to re-model and generate a new 3D model, which is time-consuming and laborious. Existing commercial software is difficult to update the 3D underground pipeline network immediately after the 2D vector pipelines are updated, and the real-time performance is poor. Summary of the invention

[0005] In view of this, the present invention proposes a three-dimensional underground pipe network real-time rendering method and system based on two-dimensional vector pipelines, which are used to solve the problem of poor real-time update of the three-dimensional underground pipe network.

[0006] In a first aspect, the present invention discloses a method for real-time rendering of a three-dimensional underground pipeline network based on two-dimensional vector pipelines, the method comprising:

[0007] Acquire geophysical data, and respectively extract pipe point data and pipeline data of two-dimensional vector pipelines from the geophysical data;

[0008] Establish multiple basic 3D models;

[0009] Traversing the pipeline data, calculating the corresponding rotation matrix and scaling matrix for each pipe section, and calculating the first model matrix of the corresponding pipe section according to the rotation matrix and scaling matrix;

[0010] Traversing the pipe point data, obtaining multiple pipe segments connected to each pipe point, and calculating the second model matrix of the corresponding pipe segment;

[0011] The three-dimensional underground pipe network is rendered according to the basic three-dimensional model, the first model matrix and the second model matrix.

[0012] On the basis of the above technical solution, preferably, the basic three-dimensional model includes a solid cylinder, a hollow cylinder, a hemisphere and a cube.

[0013] Based on the above technical solution, preferably, for each pipe segment, calculating the corresponding rotation matrix and scaling matrix specifically includes:

[0014] Extract the starting and ending coordinates and elevation of the pipe segment, and calculate the coordinate transformation matrix m of the pipe segment from the ECEF coordinate system to the ENU coordinate system o-xyz w ;

[0015] According to the coordinates of the starting and ending points, calculate the angle θ between the line segment projected onto the xoy plane of the ENU coordinate system and the x-axis, as well as the angle between the pipe segment and the xoy plane. According to the angle θ and Calculate the rotation matrix

[0016] Calculate the length of the pipe segment l according to the coordinates of the start and end points, and read the pipe diameter specification from the pipeline attribute data; if it is a circular pipe, set the pipe diameter to d, and calculate the scaling matrix according to the pipe segment length l and the pipe diameter d.

[0017] If it is a square tube, the tube diameter specification is w×h, where w and h are the width and height of the square tube respectively. The scaling matrix is ​​calculated based on the tube length l and the tube diameter specification w×h

[0018] On the basis of the above technical solution, preferably, the formula for calculating the first model matrix of the corresponding pipe segment according to the rotation matrix and the scaling matrix is:

[0019]

[0020] Among them, M1 is the first model matrix, and (x1, y1, z1) is the coordinate of the starting point of the pipe segment.

[0021] Based on the above technical solution, preferably, the step of obtaining multiple pipe segments connected to each pipe point and calculating the second model matrix of the corresponding pipe segments specifically includes:

[0022] Obtain the pipe point coordinates p (x, y, z), and determine the pipe network type related to the pipe point data; the pipe network type related to the pipe point data includes pipe joints, ancillary facilities, and inspection wells; the pipe joints include elbows, tees, multi-way joints, and reducers; the ancillary facilities include various instruments, sensors, fixed facilities, valves, and fire hydrants; the inspection wells include square wells, round wells, and tapered wells;

[0023] Get multiple pipe segments connected to each pipe point, and for each pipe segment, calculate the corresponding rotation matrix m r and the scaling matrix m s ;

[0024] According to the corresponding rotation matrix m r and the scaling matrix m s Calculate the second model matrix M2 of the corresponding pipe segment; the calculation formula of the second model matrix is:

[0025]

[0026] m r 、m s are the rotation matrix and scaling matrix of the corresponding pipe segment, m w is the coordinate transformation matrix from the ECEF coordinate system to the ENU coordinate system.

[0027] On the basis of the above technical solution, preferably, rendering the three-dimensional underground pipe network according to the basic three-dimensional model, the first model matrix and the second model matrix specifically includes:

[0028] Rendering a pipeline three-dimensional model corresponding to the pipeline data according to the basic three-dimensional model and the first model matrix;

[0029] The three-dimensional models corresponding to the pipeline joints, ancillary facilities and inspection wells are rendered according to the basic three-dimensional model and the second model matrix respectively.

[0030] On the basis of the above technical solution, preferably, the three-dimensional models corresponding to the pipeline joints, auxiliary facilities, and inspection wells are rendered according to the basic three-dimensional model and the second model matrix, and specifically include:

[0031] The two-dimensional vector pipelines of pipeline joints, auxiliary facilities and inspection wells are respectively disassembled into multiple pipe segments, a basic three-dimensional model is selected for the corresponding pipe segment, and based on the basic three-dimensional model, the corresponding second model matrix is ​​used to render and generate a three-dimensional model.

[0032] In a second aspect, the present invention discloses a three-dimensional underground pipeline network real-time rendering system based on two-dimensional vector pipelines, the system comprising:

[0033] Two-dimensional data acquisition module: used to acquire geophysical data, and extract the pipe point data and pipeline data of two-dimensional vector pipelines from the geophysical data;

[0034] Basic model building module: used to build multiple basic three-dimensional models; the basic three-dimensional models include solid cylinders, hollow cylinders, hemispheres and cubes;

[0035] Transformation matrix calculation module: used to traverse pipeline data, calculate the corresponding rotation matrix and scaling matrix for each pipe segment, and calculate the first model matrix of the corresponding pipe segment according to the rotation matrix and scaling matrix; traverse pipe point data, obtain multiple pipe segments connected to each pipe point, and calculate the second model matrix of the corresponding pipe segment;

[0036] Three-dimensional underground pipe network rendering module: used to render the three-dimensional underground pipe network according to the basic three-dimensional model, the first model matrix and the second model matrix.

[0037] In a third aspect of the present invention, an electronic device is disclosed, comprising: at least one processor, at least one memory, a communication interface and a bus;

[0038] Wherein, the processor, memory, and communication interface communicate with each other via the bus;

[0039] The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to implement the method according to the first aspect of the present invention.

[0040] According to a fourth aspect of the present invention, a computer-readable storage medium is disclosed, wherein the computer-readable storage medium stores computer instructions, and the computer instructions enable a computer to implement the method described in the first aspect of the present invention.

[0041] Compared with the prior art, the present invention has the following beneficial effects:

[0042] 1) The present invention calculates the model matrix corresponding to the two-dimensional pipeline and uses matrix transformation to realize three-dimensional model rendering. The matrix transformation can enable the GPU to use as little geometry as possible to render a large number of pipe instances, so as to reduce drawcall and video memory usage and improve performance. The present invention does not need to rely on various commercial software, and does not need to be exported or published before three-dimensional rendering. It can directly generate a three-dimensional model based on two-dimensional data and update the three-dimensional underground pipe network immediately after the two-dimensional data is updated, thereby improving the real-time performance of the three-dimensional underground pipe network update.

[0043] 2) For each pipe segment and pipe point data, the present invention calculates the corresponding rotation matrix according to the azimuth angle, calculates the corresponding scaling matrix according to the pipe segment size, and then calculates the model matrix of the corresponding pipe segment according to the rotation matrix and the scaling matrix. The three-dimensional characteristics of the pipe segments and pipe points can be accurately represented through the model matrix, which facilitates the real-time generation and dynamic update of the three-dimensional underground pipeline network through matrix transformation.

[0044] 3) The present invention disassembles the two-dimensional vector pipelines of pipe joints, ancillary facilities, and inspection wells into multiple pipe segments, selects a basic three-dimensional model for the corresponding pipe segment, and uses the corresponding second model matrix rendering to generate a three-dimensional model based on the basic three-dimensional model, that is, disassembling the complex model into basic geometric bodies. By transforming and combining the basic geometric bodies, batch and high-quality rendering of various models can be achieved, further improving the rendering speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0046] Figure 1 This is a flow chart of the real-time rendering method of a three-dimensional underground pipeline network based on two-dimensional vector pipelines of the present invention. DETAILED DESCRIPTION

[0047] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] See also Figure 1 The present invention proposes a real-time rendering method for a three-dimensional underground pipeline network based on a two-dimensional vector pipeline, the method comprising:

[0049] S1. Obtain geophysical data of the underground pipeline network, and extract pipe point data, pipeline data and surface data of two-dimensional vector pipelines from the geophysical data.

[0050] Read geophysical data from the shp file or database of the underground pipeline network, and save the pipe point data, pipeline data, and surface data of the two-dimensional vector pipeline according to the pipeline type.

[0051] Since geophysical pipeline data are generally projection coordinates, there will be a small amount of offset if the pipeline network is directly rendered in the three-dimensional earth without being converted into geographic coordinates first. Therefore, the present invention converts the coordinates of the two-dimensional vector pipeline into WGS84 coordinates based on the spatial reference system of the geophysical data.

[0052] S2. Check the validity and integrity of the pipe point data and pipeline data.

[0053] Specifically, traverse the pipeline data and check whether all records of various pipelines contain necessary fields such as pipeline number, starting point number, end point number, starting point elevation, end point elevation, starting point burial depth, end point burial depth, diameter, material, etc., and whether the values ​​are valid.

[0054] Traverse the pipe point data and check whether all pipe point records contain fields such as number, type, diameter, ground elevation, and valid values.

[0055] Finally, the association between point data and line data is saved according to the number, and at the same time, it is checked whether there are isolated points. If the check fails, the 3D underground pipe network real-time rendering process is exited.

[0056] S3. Establish multiple basic three-dimensional models.

[0057] The basic three-dimensional models used in the present invention include a solid cylinder, a hollow cylinder, a hemisphere, a cube and an irregular model.

[0058] For example, use 3D modeling software to make two cylinders with a height of 1 meter and a diameter of 1 meter, one of which is solid and the other is hollow but has thickness; a hemisphere with a diameter of 1 meter (it can also be connected to a shorter cylinder); two cubes with a length of 1 meter, a width of 1 meter, and a height of 1 meter, one of which is solid and the other is hollow but has thickness. Export these basic 3D models to glb or gltf format. The basic 3D model only needs to be made once, and all kinds of model rendering are universal. You can also write program code to dynamically generate the above models. For extremely irregular auxiliary facilities such as valves, fire hydrants, and instruments, make one model of each type and export it to glb or gltf format.

[0059] S4. Traverse the pipeline data, calculate the corresponding rotation matrix and scaling matrix for each pipe segment, and calculate the first model matrix of the corresponding pipe segment according to the rotation matrix and scaling matrix.

[0060] The present invention traverses the pipeline data, obtains the starting coordinates of the pipeline segment, and calculates the first model matrix of the corresponding pipeline segment.

[0061] Step S4 specifically includes the following sub-steps:

[0062] S41. Calculate the coordinate transformation matrix.

[0063] Take the latitude and longitude coordinates and elevation of the starting and ending points of the pipe section, convert them into ECEF (Earth-centered Earth-fixed coordinate system) coordinates, and get the starting point coordinates p sw (x 1w ,y 1w ,z 1w ), the end point coordinate p ew (x 2w ,y 2w ,z 2w ).

[0064] With p sw is the origin, due east is the x-axis, due north is the y-axis, the z-axis is determined by the right-hand coordinate system, and a rectangular coordinate system is established, namely the ENU coordinate system o-xyz.

[0065] Calculate the coordinate transformation matrix m from the ECEF coordinate system to the ENU coordinate system w , through the coordinate transformation matrix m w The starting point p sw , end point p ew The coordinates of the starting point are converted to the ENU coordinate system, and the coordinates of the starting point p are obtained. s (x1,y1,z1), end point coordinates p e (x2,y2,z2).

[0066] S42, calculate the rotation matrix. According to the coordinates of the starting and ending points, calculate the angle θ between the line segment projected onto the xoy plane of the ENU coordinate system and the x-axis, as well as the angle between the pipe segment and the xoy plane. According to the angle θ and Calculate the rotation matrix

[0067] S43. Calculate the scaling matrix.

[0068] The pipe segment length l is calculated according to the start and end point coordinates, the pipe diameter specification is read from the pipeline attribute data, and the scaling matrix is ​​calculated according to the pipe segment length l and the pipe diameter specification.

[0069] If it is a circular tube, let the tube diameter be d, and calculate the scaling matrix based on the tube length l and the tube diameter d.

[0070] If it is a square tube, the tube diameter specification is w×h, where w and h are the width and height of the square tube respectively. The scaling matrix is ​​calculated based on the tube length l and the tube diameter specification w×h

[0071] S44, the formula for calculating the first model matrix of the corresponding pipe segment according to the rotation matrix and the scaling matrix is:

[0072]

[0073] Among them, M1 is the first model matrix, and (x1, y1, z1) is the coordinate of the starting point of the pipe segment.

[0074] S5. Traverse the pipe point data, obtain multiple pipe segments connected to each pipe point, and calculate the second model matrix of the corresponding pipe segment.

[0075] The present invention traverses the pipe point data and calculates the second model matrix of each pipe segment connected to each pipe point.

[0076] Step S5 specifically includes the following sub-steps:

[0077] S51, obtaining the pipe point coordinates p (x, y, z), searching for multiple pipe segments connected to the pipe point according to the numbers, and determining the pipe network type related to the pipe point data.

[0078] The types of pipe network related to the pipe point data include pipe joints, ancillary facilities, and inspection wells; the pipe joints include elbows, tees, and multi-way joints; the ancillary facilities include various instruments, sensors, fixed facilities, valves, fire hydrants, etc.; the inspection wells include square wells, round wells, and tapered wells;

[0079] S52, obtain multiple pipe segments connected to each pipe point, and for each pipe segment, calculate the corresponding rotation matrix m r and the scaling matrix m s , according to the rotation matrix m r and the scaling matrix m s Calculate the second model matrix M2 of the corresponding pipe segment.

[0080] The overall calculation formula of the second model matrix is:

[0081]

[0082] m r 、m s are the rotation matrix and scaling matrix of the corresponding pipe segment, m w is the coordinate transformation matrix from the ECEF coordinate system to the ENU coordinate system.

[0083] Specifically, step S52 includes the following sub-steps:

[0084] S521, for the pipe joint, obtain each pipe segment connected to the pipe point, and calculate a rotation matrix m according to the direction of the pipe segment using the same method as step S42 and step S43 r and a scaling matrix m s .

[0085] For pipe joints such as elbows, tees and multi-way joints, the second model matrix of the corresponding pipe segment is

[0086]

[0087] S522: For auxiliary facilities, read the rotation angle from the attribute data. If there is no such attribute, the direction of the pipe segment or the direction perpendicular to the pipe segment can be taken as the rotation angle θ according to the pipe segment connected to the pipe point. The rotation matrix m is calculated in the same way as step S42. r , the second model matrix of the corresponding pipe segment is

[0088] S523. For the inspection well, the rotation matrix m is calculated using the same method as for the auxiliary facilities. r , and then calculate the scaling matrix m according to the size parameters of the inspection well s , the second model matrix of the corresponding pipe segment is

[0089] For example, if the inspection well is a square well, read the manhole cover specification w from the attribute data w ×h w , ground elevation h t , according to the ground elevation and the z value of the pipe point, the well depth d can be calculated w , d w = ground elevation - lowest pipe point elevation + pipe diameter + well extension depth, where the lowest pipe point elevation is obtained by finding the minimum elevation of all pipe points within the well range. Well extension depth is a configurable value. The purpose is to ensure that the generated 3D pipeline is still in the inspection well and not close to the well bottom. If the well bottom depth exists in the geophysical data, the well bottom depth can also be used to calculate d w Based on these size parameters, the scaling matrix of the square well can be calculated

[0090] Then the second model matrix M of the square well is 2_3_1 for:

[0091]

[0092] d t is the thickness of the basic three-dimensional model in step S3.

[0093] For a circular well, let the well diameter be D w The calculation method of the second model matrix is ​​the same as that of the square well, but there is no need to calculate the rotation matrix, that is, the second model matrix M of the circular well 2_3_2 for:

[0094]

[0095] For a conical well, the conical well is divided into three parts: upper, middle and lower. The upper part calculates the scaling matrix according to the well neck depth and the well cover size, and the second model matrix m1 of the upper part is calculated according to the following formula:

[0096]

[0097] Among them, d1 is the diameter of the manhole cover, d2 is the diameter of the manhole chamber, and d w1 The well neck is deep.

[0098] The middle part calculates the scaling matrix according to the well depth, and calculates the second model matrix m2 of the middle part according to the following formula:

[0099]

[0100] Among them, d w1 is the depth of the well neck, d w2 is the height of the middle part. And its scaling is non-linear, which can be achieved by writing a shader.

[0101] The lower part is based on the bottom depth d w3 、Well neck depth d w1 The scaling matrix is ​​calculated based on the well chamber size, and the second model matrix m3 in the lower part is calculated according to the following formula:

[0102]

[0103] Among them, d1 is the diameter of the manhole cover, d2 is the diameter of the manhole chamber, and d w1 is the depth of the well neck, d w2 is the height of the middle part, d w3 The bottom of the well is deep.

[0104] For manhole covers, the method for calculating the second model matrix is ​​the same as for inspection wells. However, when calculating the scaling ratio, it is not necessary to take the model thickness into account so that the manhole cover is exactly connected with the inner wall of the well. For inspection wells that fall within the range of the surface data, their depth is calculated based on the well neck depth.

[0105] The present invention calculates the corresponding rotation matrix and scaling matrix for each pipe segment and pipe point data, and then calculates the model matrix of the corresponding pipe segment based on the rotation matrix and the scaling matrix. The three-dimensional size characteristics of the pipe segment and the pipe point can be accurately represented by the model matrix, which facilitates the real-time generation and dynamic update of the three-dimensional underground pipeline network through matrix transformation.

[0106] S6. Rendering a three-dimensional underground pipe network according to the basic three-dimensional model, the first model matrix and the second model matrix.

[0107] The present invention does not transform the pipeline joints, ancillary facilities, and inspection wells, but disassembles these complex models into basic geometric bodies, and constructs pipeline joints, ancillary facilities, inspection wells, etc. by transforming and combining the basic geometric bodies.

[0108] S61. Rendering a pipeline three-dimensional model corresponding to the pipeline data according to the basic three-dimensional model and the first model matrix.

[0109] For example, the pipeline data is rendered using the hollow cylinder or cube in step S3 in combination with the first model matrix to obtain a three-dimensional model corresponding to the pipeline.

[0110] S62, rendering three-dimensional models corresponding to pipeline joints, auxiliary facilities, and inspection wells according to the basic three-dimensional model and the second model matrix.

[0111] The two-dimensional vector pipelines of pipeline joints, auxiliary facilities and inspection wells are respectively disassembled into multiple pipe segments, a basic three-dimensional model is selected for the corresponding pipe segment, and based on the basic three-dimensional model, the corresponding second model matrix is ​​used to render and generate a three-dimensional model.

[0112] For pipe joints such as elbows, tees, multi-passes, reducers, etc., the hemisphere in step S3 is used in combination with the second model matrix to render the corresponding three-dimensional model. For example, an elbow is composed of two hemispheres connected to a cylinder, and the corresponding three-dimensional model is generated through the rotation and scaling transformation of the second model matrix. The cylindrical parts are connected to the pipelines to generate flanges, and the hemisphere parts form the elbows; the inspection wells are rendered using hollow cylinders or cubes in combination with the second model matrix; the manhole covers are rendered using solid cylinders or cubes in combination with the model matrix; the well chamber uses the surface data as the bottom surface, and the maximum bottom depth of multiple wells within its range is used as the bottom elevation, and the minimum neck depth is used as the top elevation to extrude the three-dimensional polygon.

[0113] The present invention disassembles the two-dimensional vector pipelines of pipeline joints, ancillary facilities, and inspection wells into multiple pipe segments, selects a basic three-dimensional model for the corresponding pipe segment, and based on the basic three-dimensional model, uses the corresponding second model matrix rendering to generate a three-dimensional model, that is, disassembles the complex model into basic geometric bodies. Through the transformation and combination of the basic geometric bodies, batch and high-quality rendering of various models can be achieved, further improving the rendering speed.

[0114] The present invention calculates the model matrix corresponding to the two-dimensional pipeline and realizes three-dimensional model rendering in the form of matrix transformation. The matrix transformation can enable the GPU to use as little geometry as possible to render a large number of pipe instances, so as to reduce drawcall and video memory occupancy and improve performance. The present invention does not need to rely on various commercial software, and does not need to be exported or published before three-dimensional rendering. It can directly generate a three-dimensional model based on two-dimensional data and update the three-dimensional underground pipe network immediately after the two-dimensional data is updated, thereby improving the real-time performance of the three-dimensional underground pipe network update.

[0115] Based on the above method embodiments, the present invention further proposes a three-dimensional underground pipeline network real-time rendering system based on two-dimensional vector pipelines, the system comprising:

[0116] Two-dimensional data acquisition module: used to acquire geophysical data, and extract the pipe point data, pipeline data and surface data of two-dimensional vector pipelines from the geophysical data;

[0117] Basic model building module: used to build multiple basic three-dimensional models; the basic three-dimensional models include solid cylinders, hollow cylinders, hemispheres and cubes;

[0118] Transformation matrix calculation module: used to traverse pipeline data, calculate the corresponding rotation matrix and scaling matrix for each pipe segment, and calculate the first model matrix of the corresponding pipe segment according to the rotation matrix and scaling matrix; traverse pipe point data, obtain multiple pipe segments connected to each pipe point, and calculate the second model matrix of the corresponding pipe segment;

[0119] Three-dimensional underground pipe network rendering module: used to render the three-dimensional underground pipe network based on the basic three-dimensional model, the first model matrix, the second model matrix and the surface data.

[0120] The above system embodiments and method embodiments correspond one to one, and for a brief description of the system embodiments, please refer to the method embodiments.

[0121] The present invention also discloses an electronic device, comprising: at least one processor, at least one memory, a communication interface and a bus; wherein the processor, memory, and communication interface communicate with each other through the bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to implement the aforementioned method of the present invention.

[0122] The present invention also discloses a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, wherein the computer instructions enable the computer to implement all or part of the steps of the method described in the embodiment of the present invention. The storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk, and other media that can store program codes.

[0123] The system embodiment described above is merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be distributed to multiple network units. A person skilled in the art may select some or all of the modules according to actual needs to achieve the purpose of the solution of this embodiment without creative effort.

[0124] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A real-time rendering method for a three-dimensional underground pipeline network based on two-dimensional vector pipelines, characterized in that: The method comprises: Obtaining geophysical data of underground pipe networks, and extracting pipe point data and pipeline data of two-dimensional vector pipelines from the geophysical data; Establish multiple basic 3D models; Traversing the pipeline data, calculating the corresponding rotation matrix and scaling matrix for each pipe section, and calculating the first model matrix of the corresponding pipe section according to the rotation matrix and scaling matrix; Traversing the pipe point data, obtaining multiple pipe segments connected to each pipe point, and calculating the second model matrix of the corresponding pipe segment; The three-dimensional underground pipe network is rendered according to the basic three-dimensional model, the first model matrix and the second model matrix.

2. The real-time rendering method of a three-dimensional underground pipeline network based on a two-dimensional vector pipeline according to claim 1 is characterized in that: The basic three-dimensional models include a solid cylinder, a hollow cylinder, a hemisphere and a cube.

3. The real-time rendering method of a three-dimensional underground pipeline network based on a two-dimensional vector pipeline according to claim 1 is characterized in that: The calculation of the corresponding rotation matrix and scaling matrix for each pipe segment specifically includes: Extract the starting and ending coordinates and elevation of the pipe segment, and calculate the coordinate transformation matrix m of the pipe segment from the ECEF coordinate system to the ENU coordinate system o-xyz w ; According to the coordinates of the starting and ending points, calculate the angle θ between the line segment projected onto the xoy plane of the ENU coordinate system and the x-axis, as well as the angle between the pipe segment and the xoy plane. According to the angle θ and Calculate the rotation matrix Calculate the length of the pipe segment l according to the coordinates of the start and end points, and read the pipe diameter specification from the pipeline attribute data; if it is a circular pipe, set the pipe diameter to d, and calculate the scaling matrix according to the pipe segment length l and the pipe diameter d. If it is a square tube, the tube diameter specification is w×h, where w and h are the width and height of the square tube respectively. The scaling matrix is ​​calculated based on the tube length l and the tube diameter specification w×h 4. The method for real-time rendering of a three-dimensional underground pipeline network based on two-dimensional vector pipelines according to claim 3 is characterized in that: The formula for calculating the first model matrix of the corresponding pipe segment according to the rotation matrix and the scaling matrix is: Among them, M1 is the first model matrix, and (x1, y1, z1) is the coordinate of the starting point of the pipe segment.

5. The real-time rendering method of a three-dimensional underground pipeline network based on two-dimensional vector pipelines according to claim 4 is characterized in that: The step of obtaining a plurality of pipe segments connected to each pipe point and calculating a second model matrix of the corresponding pipe segments specifically includes: Obtain the pipe point coordinates p (x, y, z), and determine the pipe network type related to the pipe point data; the pipe network type related to the pipe point data includes pipe joints, ancillary facilities, and inspection wells; the pipe joints include elbows, tees, multi-way joints, and reducers; the ancillary facilities include various instruments, sensors, fixed facilities, valves, and fire hydrants; the inspection wells include square wells, round wells, and tapered wells; Get multiple pipe segments connected to each pipe point, and for each pipe segment, calculate the corresponding rotation matrix m r and the scaling matrix m s ; According to the corresponding rotation matrix m r and the scaling matrix m s Calculate the second model matrix M2 of the corresponding pipe segment; the calculation formula of the second model matrix is: m r 、m s are the rotation matrix and scaling matrix of the corresponding pipe segment, m w is the coordinate transformation matrix from the ECEF coordinate system to the ENU coordinate system.

6. The real-time rendering method of a three-dimensional underground pipeline network based on two-dimensional vector pipelines according to claim 1 is characterized in that: Rendering the three-dimensional underground pipe network according to the basic three-dimensional model, the first model matrix and the second model matrix specifically includes: Rendering a pipeline three-dimensional model corresponding to the pipeline data according to the basic three-dimensional model and the first model matrix; The three-dimensional models corresponding to the pipeline joints, ancillary facilities and inspection wells are rendered according to the basic three-dimensional model and the second model matrix respectively.

7. The method for real-time rendering of a three-dimensional underground pipeline network based on two-dimensional vector pipelines according to claim 6, characterized in that: The three-dimensional models corresponding to the pipeline joints, auxiliary facilities, and inspection wells are rendered according to the basic three-dimensional model and the second model matrix, specifically including: The two-dimensional vector pipelines of pipeline joints, ancillary facilities and inspection wells are respectively disassembled into multiple pipe segments, a basic three-dimensional model is selected for each pipe segment, and based on the basic three-dimensional model, the corresponding second model matrix is ​​used to render and generate a three-dimensional model.

8. A three-dimensional underground pipeline network real-time rendering system based on two-dimensional vector pipelines, characterized in that: The system comprises: Two-dimensional data acquisition module: used to obtain geophysical data of underground pipe network, and extract pipe point data and pipeline data of two-dimensional vector pipeline from the geophysical data; Basic model building module: used to build multiple basic three-dimensional models; the basic three-dimensional models include solid cylinders, hollow cylinders, hemispheres and cubes; Transformation matrix calculation module: used to traverse pipeline data, calculate the corresponding rotation matrix and scaling matrix for each pipe segment, and calculate the first model matrix of the corresponding pipe segment according to the rotation matrix and scaling matrix; traverse pipe point data, obtain multiple pipe segments connected to each pipe point, and calculate the second model matrix of the corresponding pipe segment; Three-dimensional underground pipe network rendering module: used to render the three-dimensional underground pipe network according to the basic three-dimensional model, the first model matrix and the second model matrix.

9. An electronic device, characterized in that: include: at least one processor, at least one memory, a communication interface, and a bus; Wherein, the processor, memory, and communication interface communicate with each other via the bus; The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions enable a computer to implement the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • 3D automatic modeling and scheduling rendering method for integrated pipe network

    CN106683198A

  • Pipe network drainage enhancement visualization method and device, storage medium, and electronic equipment

    CN113627038A

  • Correlation analysis method and device of pipe network road, storage medium and electronic device

    CN113704945A

  • Automatic parameterization three-dimensional pipeline modeling method and system based on GIS (Geographic Information System)

    CN113963120A

  • Three-dimensional pipe network incremental update modeling method and device, storage medium and electronic equipment

    CN115641407A

Cited By

  • Method for generating three-dimensional model according to pipe network vector data

    CN120526083A

  • Vector pipeline three-dimensional instantiation coherent rendering method and system

    CN120807741A