Urban pipe network scene rendering method and system

By optimizing the urban pipeline model and texture drawing set, combining Mipmaps and LOD technology for rendering, and recording rendering logs in real time, the problem of low rendering efficiency in urban pipeline scenes is solved, and faster rendering speed and higher rendering logs are achieved. Security.

CN119417989APending Publication Date: 2025-02-11ARCHITECTURAL DESIGN INST FUKIEN PROV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411579359.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The rendering efficiency of urban pipeline scenes is low, resulting in slow loading speed and affecting user experience. In addition, traditional rendering methods do not record the rendering log, resulting in difficulty in positioning the problem.

Method used

By obtaining modeling data and texture maps, we create optimized pipeline models and texture maps, use Mipmaps technology and LOD technology to render, and record the rendering log in real time.

Benefits of technology

It significantly improves the rendering efficiency of urban pipeline scenes, reduces rendering time and memory usage, and simplifies the problem positioning and optimization process by recording rendering logs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119417989A_ABST
    Figure CN119417989A_ABST
Patent Text Reader

Abstract

The invention provides an urban pipe network scene rendering method and system, and belongs to the technical field of urban pipe network management. The method comprises the steps that S1, modeling data and texture maps are acquired; s2, creating a first pipe network model based on the modeling data, and optimizing geometric data of the first pipe network model to obtain a second pipe network model; s3, the texture maps are merged into a texture map set, and the texture maps in the texture map set are mapped to the second pipe network model through the Mipmaps technology to obtain a third pipe network model; s4, classifying the third pipe network model based on the model shape, and setting a classification label; s5, creating an illumination model, setting a rendering area based on the visual field of a camera, and pre-loading each third pipe network model in the rendering area to a buffer area; and step S6, rendering the third pipe network model in the buffer area based on the illumination model and the classification label through an LOD technology and an instantiation rendering technology. The method has the advantage that the city pipe network scene rendering efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of urban pipe network management, and in particular to a method and system for rendering an urban pipe network scene. Background Art

[0002] In order to ensure the normal operation of the city, there are a large number of urban pipe networks, such as drainage pipe networks and gas pipe networks, which are indispensable infrastructure for the lives of urban residents. With the development of the digital era, relevant technologies have been developed to digitize urban pipe networks, that is, to perform three-dimensional modeling and scene rendering of urban pipe networks, so as to manage urban pipe networks visually.

[0003] However, in order to improve the management effect of urban pipe networks, while carrying out three-dimensional modeling of urban pipe networks, it is also necessary to model the terrain, urban buildings, traffic road networks, image maps, etc., and the size of a city is huge, which requires rendering a large number of layers / data, resulting in low efficiency in rendering urban pipe network scenes, which in turn affects the loading speed of urban pipe networks and seriously affects user experience; in addition, traditionally, in the process of rendering urban pipe network scenes, the corresponding rendering logs are not recorded, but the rendering results are directly generated. When rendering exceptions occur, a lot of effort is required to locate the problem, which undoubtedly affects the rendering efficiency.

[0004] Therefore, how to provide a method and system for rendering a city pipe network scene to improve the efficiency of rendering a city pipe network scene has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a method and system for rendering a city pipe network scene, so as to improve the efficiency of rendering a city pipe network scene.

[0006] In a first aspect, the present invention provides a method for rendering a city pipe network scene, comprising the following steps:

[0007] Step S1, obtaining modeling data and texture maps for urban pipe network scene modeling;

[0008] Step S2: creating a plurality of first pipe network models based on the modeling data, and optimizing the geometric data of each of the first pipe network models to obtain a corresponding second pipe network model;

[0009] Step S3, creating a texture atlas, merging each of the texture maps into the texture atlas, and mapping the texture maps in the texture atlas to the corresponding second pipe network model through Mipmaps technology to obtain a third pipe network model;

[0010] Step S4, classifying each of the third pipe network models based on the model shape, and setting a classification label;

[0011] Step S5, creating a lighting model of the urban pipe network scene based on the light map, setting a rendering area based on the camera field of view, and preloading each third pipe network model in the rendering area into a buffer of the GPU;

[0012] Step S6: Using LOD technology and instantiation rendering technology, based on the illumination model and classification labels, each third pipe network model in the buffer is rendered in real time to generate a city pipe network scene;

[0013] Step S7, recording in real time the rendering log of each of the third pipe network models during the rendering process;

[0014] The step S6 is specifically as follows:

[0015] Based on the classification label, the third pipe network models in the buffer are classified, the parallel threads of the GPU are started through the Compute Shader technology, and the classified third pipe network models are rendered in batches and in parallel through the instantiation rendering technology, the lighting model and the parallel threads. During the rendering process, the rendering details are dynamically adjusted in combination with the LOD technology, and the aliasing and performance in the rendering process are balanced through the MSAA technology to generate an urban pipe network scene.

[0016] Furthermore, in step S1, the modeling data at least includes model shape, model size, model position and model quantity;

[0017] The texture map carries at least map parameters including texture shape, texture color and texture material.

[0018] Furthermore, the step S2 is specifically as follows:

[0019] A plurality of first pipe network models are created based on the modeling data, and the vertices and faces inside each of the first pipe network models are simplified to optimize the geometric data of each of the first pipe network models to obtain a corresponding second pipe network model.

[0020] Furthermore, the step S3 is specifically as follows:

[0021] A texture atlas is created, each of the texture maps is merged into the texture atlas, UV unfolding is performed on each of the second pipe network models, a texture map is selected from the texture atlas by using Mipmaps technology, and the selected texture map is UV mapped to the corresponding second pipe network model to obtain a third pipe network model.

[0022] Furthermore, the step S7 is specifically as follows:

[0023] Recording in real time a rendering log of at least the rendering time, rendering duration, modeling data, texture map, lighting model, and rendering area during the rendering process of each of the third pipe network models, encrypting the rendering log into an encrypted log, and storing and backing up the encrypted log;

[0024] The step of encrypting the rendering log into an encrypted log and storing and backing up the encrypted log is specifically as follows:

[0025] A pair of public keys and private keys are created through the ECDH algorithm, the public key is mapped through a preset first mapping rule to obtain a first key, the first key is encrypted through the RSA algorithm to obtain a second key, MAC calculation is performed on the rendering log to obtain a MAC value, the rendering log is encrypted through the private key to obtain an initial encrypted log, the initial encrypted log, the second key and the MAC value are encrypted through the AES algorithm to obtain primary encrypted data, each character of the primary encrypted data is shifted rightward by a preset first displacement to obtain secondary encrypted data, the secondary encrypted data is encrypted through the ECDSA algorithm to obtain third-level encrypted data, each character of the third-level encrypted data is shifted leftward by a preset second displacement to obtain fourth-level encrypted data, the fourth-level encrypted data is encrypted through the IDEA algorithm to obtain fifth-level encrypted data, the fifth-level encrypted data is mapped through a preset second mapping rule to obtain sixth-level encrypted data, the sixth-level encrypted data is encrypted through the ECC algorithm to obtain an encrypted log, and the encrypted log is stored and distributedly backed up.

[0026] In a second aspect, the present invention provides a city pipe network scene rendering system, comprising the following modules:

[0027] A data acquisition module, used to acquire modeling data and texture maps for urban pipe network scene modeling;

[0028] A modeling module, used to create a plurality of first pipe network models based on the modeling data, and optimize the geometric data of each of the first pipe network models to obtain a corresponding second pipe network model;

[0029] A texture map mapping module is used to create a texture atlas, merge the texture maps into the texture atlas, and map the texture maps in the texture atlas to the corresponding second pipe network model through Mipmaps technology to obtain a third pipe network model;

[0030] A model classification module, used to classify each of the third pipe network models based on the model shape and set a classification label;

[0031] A rendering parameter setting module, used to create a lighting model of the urban pipe network scene based on the light map, set a rendering area based on the camera field of view, and preload each third pipe network model in the rendering area into a buffer of the GPU;

[0032] A model rendering module, used for performing real-time rendering of each third pipe network model in the buffer zone based on the illumination model and classification labels by using LOD technology and instantiation rendering technology to generate a city pipe network scene;

[0033] A rendering log recording module, used for recording the rendering logs of each of the third pipe network models in a rendering process in real time;

[0034] The model rendering module is specifically used for:

[0035] Based on the classification label, the third pipe network models in the buffer are classified, the parallel threads of the GPU are started through the Compute Shader technology, and the classified third pipe network models are rendered in batches and in parallel through the instantiation rendering technology, the lighting model and the parallel threads. During the rendering process, the rendering details are dynamically adjusted in combination with the LOD technology, and the aliasing and performance in the rendering process are balanced through the MSAA technology to generate an urban pipe network scene.

[0036] Further, in the data acquisition module, the modeling data at least includes model shape, model size, model position and model quantity;

[0037] The texture map carries at least map parameters including texture shape, texture color and texture material.

[0038] Furthermore, the modeling module is specifically used for:

[0039] A plurality of first pipe network models are created based on the modeling data, and the vertices and faces inside each of the first pipe network models are simplified to optimize the geometric data of each of the first pipe network models to obtain a corresponding second pipe network model.

[0040] Furthermore, the texture mapping module is specifically used for:

[0041] A texture atlas is created, each of the texture maps is merged into the texture atlas, UV unfolding is performed on each of the second pipe network models, a texture map is selected from the texture atlas by using Mipmaps technology, and the selected texture map is UV mapped to the corresponding second pipe network model to obtain a third pipe network model.

[0042] Furthermore, the rendering log recording module is specifically used for:

[0043] Recording in real time a rendering log of at least the rendering time, rendering duration, modeling data, texture map, lighting model, and rendering area during the rendering process of each of the third pipe network models, encrypting the rendering log into an encrypted log, and storing and backing up the encrypted log;

[0044] The step of encrypting the rendering log into an encrypted log and storing and backing up the encrypted log is specifically as follows:

[0045] A pair of public keys and private keys are created through the ECDH algorithm, the public key is mapped through a preset first mapping rule to obtain a first key, the first key is encrypted through the RSA algorithm to obtain a second key, MAC calculation is performed on the rendering log to obtain a MAC value, the rendering log is encrypted through the private key to obtain an initial encrypted log, the initial encrypted log, the second key and the MAC value are encrypted through the AES algorithm to obtain primary encrypted data, each character of the primary encrypted data is shifted rightward by a preset first displacement to obtain secondary encrypted data, the secondary encrypted data is encrypted through the ECDSA algorithm to obtain third-level encrypted data, each character of the third-level encrypted data is shifted leftward by a preset second displacement to obtain fourth-level encrypted data, the fourth-level encrypted data is encrypted through the IDEA algorithm to obtain fifth-level encrypted data, the fifth-level encrypted data is mapped through a preset second mapping rule to obtain sixth-level encrypted data, the sixth-level encrypted data is encrypted through the ECC algorithm to obtain an encrypted log, and the encrypted log is stored and distributedly backed up.

[0046] The advantages of the present invention are:

[0047] 1. By acquiring the modeling data and texture maps used for modeling the urban pipe network scene, a number of first pipe network models are created based on the modeling data, the geometric data of each first pipe network model is optimized to obtain the corresponding second pipe network model, each texture map is merged into the created texture atlas, and the texture map in the texture atlas is mapped to the corresponding second pipe network model through the Mipmaps technology to obtain the third pipe network model; then, each third pipe network model is classified and the classification label is set based on the model shape, the lighting model of the urban pipe network scene is created based on the light map, the rendering area is set based on the camera field of view, and each third pipe network model in the rendering area is preloaded into the GPU buffer; then, through the LOD technology and the instantiation rendering technology, each third pipe network model in the buffer is rendered in real time based on the lighting model and the classification label to generate the urban pipe network scene, and the rendering log of each third pipe network model in the rendering process is recorded in real time; that is, before rendering, the vertices and faces inside each first pipe network model are simplified to optimize the geometric data, so that the network topology structure is more efficient; The textures are merged into the texture atlas, which can effectively reduce the number of times the texture maps are switched during rendering and reduce memory usage; the texture maps are mapped through the Mipmaps technology, that is, texture maps of different precisions are used based on the rendering distance to reduce the amount of data during rendering; the third pipe network models are classified by model shape, which is convenient for subsequent batch rendering of the same third pipe network models through the instantiation rendering technology, without the need to repeat the same model; the lighting model of the urban pipe network scene is created based on the light map to replace the dynamic lighting, reducing the amount of lighting calculation; the rendering area is set based on the camera field of view, that is, only the camera field of view area is rendered at present, so as to reduce the amount of rendering data; the third pipe network models in the rendering area are preloaded into the GPU buffer, effectively reducing the amount of data transferred from the CPU to the GPU; the LOD technology is combined in the rendering process, that is, the details of the third pipe network model are dynamically adjusted based on the distance between the camera and the third pipe network model, and the third pipe network model is represented by polygons with fewer edges in the distance, so as to reduce the amount of data during rendering; and the third pipe network model is represented by the Compute Shader technology activates the parallel threads of the GPU to accelerate the rendering process, taking at least nine measures before and after, ultimately greatly improving the rendering efficiency of the urban pipeline network scene.

[0048] 2. By recording in real time the rendering logs of at least the rendering time, rendering duration, modeling data, texture mapping, lighting model, and rendering area during the rendering process of each of the third pipe network models, it is convenient to trace the source when rendering is abnormal, so as to optimize the rendering process and ensure rendering efficiency.

[0049] 3. Create a pair of public and private keys through the ECDH algorithm, map the public key through the first mapping rule to obtain the first key, encrypt the first key through the RSA algorithm to obtain the second key, perform MAC calculation on the rendering log to obtain the MAC value, encrypt the rendering log through the private key to obtain the initial encrypted log, encrypt the initial encrypted log, the second key and the MAC value through the AES algorithm to obtain the first-level encrypted data, shift each character of the first-level encrypted data to the right by the first displacement to obtain the second-level encrypted data, encrypt the second-level encrypted data through the ECDSA algorithm to obtain the third-level encrypted data, shift each character of the third-level encrypted data to the left by the second displacement to obtain the fourth-level encrypted data, encrypt the fourth-level encrypted data through the IDEA algorithm to obtain the fifth-level encrypted data, and map the fifth-level encrypted data through the second mapping rule. The six-level encrypted data is obtained by projection, and the six-level encrypted data is encrypted by the ECC algorithm to obtain the encrypted log, which is stored and distributedly backed up; since the data encrypted by the private key can only be decrypted by the public key, the public key is encrypted at multiple levels to avoid leakage, and the MAC calculation is based on the hash function with a secret key, which is more secure than the ordinary hash calculation. If the corresponding encryption algorithm or data transformation rule is not known, the encrypted log cannot be cracked. At least 14 security measures are taken before and after (ECDH algorithm, public and private keys, first mapping rule, RSA algorithm, MAC calculation, AES algorithm, first displacement, second displacement, displacement direction, ECDSA algorithm, IDEA algorithm, second mapping rule, ECC algorithm, distributed backup), which greatly improves the security of the storage and backup of the rendering log and prevents the rendering log from being stolen and tampered with in plain text. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.

[0051] Figure 1 The present invention is a flow chart of a method for rendering a city pipe network scene.

[0052] Figure 2 It is a structural schematic diagram of a city pipe network scene rendering system of the present invention. DETAILED DESCRIPTION

[0053] The technical solution in the embodiment of the present application has the following overall idea: before rendering, the vertices and faces inside each first pipe network model are streamlined to optimize the geometric data, so that the network topology structure is more efficient; each texture map is merged into a texture atlas, which effectively reduces the number of times the texture map is switched during rendering and reduces memory usage; the texture map is mapped through the Mipmaps technology to reduce the amount of data during rendering; each third pipe network model is classified by model shape to facilitate subsequent batch rendering of similar third pipe network models through instantiation rendering technology; a lighting model of the urban pipe network scene is created based on the light map to replace dynamic lighting, thereby reducing the amount of lighting calculation; the rendering area is set based on the camera field of view, that is, only the camera field of view area is rendered currently to reduce the amount of rendering data; each third pipe network model within the rendering area is preloaded into the GPU buffer to reduce the amount of data transmitted from the CPU to the GPU; the LOD technology is combined in the rendering process to reduce the amount of data during rendering; Shader technology starts the parallel threads of the GPU to speed up the rendering process. At least 9 measures are taken before and after, combined with recording rendering logs to trace and optimize the rendering process when rendering anomalies occur, in order to improve the rendering efficiency of urban pipe network scenes.

[0054] Please refer to Figure 1 to Figure 2 As shown, a preferred embodiment of a method for rendering a city pipe network scene of the present invention comprises the following steps:

[0055] Step S1, obtaining modeling data and texture maps for urban pipe network scene modeling; the modeling data is used to create a basic model of the urban pipe network scene, that is, to create a skeleton, and the texture map is used to make the basic model more beautiful and practical; in specific implementation, the modeling data is renamed based on a preset naming rule so that the modeling data can be read efficiently later;

[0056] Step S2: creating a plurality of first pipe network models based on the modeling data, and optimizing the geometric data of each of the first pipe network models to obtain a corresponding second pipe network model;

[0057] Step S3, creating a texture atlas, merging each of the texture maps into the texture atlas, and mapping the texture maps in the texture atlas to the corresponding second pipe network model through Mipmaps technology to obtain a third pipe network model;

[0058] Step S4, classifying each of the third pipe network models based on the model shape, and setting a classification label;

[0059] Classify the third pipe network models by model shape, so as to facilitate batch rendering of the same third pipe network models through instanced rendering technology, without repeating the operation on the same model;

[0060] Step S5, creating a lighting model of the urban pipe network scene based on a lightmap, setting a rendering area based on the camera field of view, and preloading each third pipe network model in the rendering area into a buffer of the GPU; setting the rendering area, that is, using tiled rendering technology (Tiled Rendering) to divide the urban pipe network scene into multiple tiles (areas), and only rendering the tiles in the camera field of view;

[0061] A lighting model for the urban pipe network scene is created through light mapping to replace dynamic lighting, reducing the amount of lighting calculations; each third pipe network model in the rendering area is preloaded into the GPU buffer, effectively reducing the amount of data transmission from the CPU to the GPU.

[0062] Step S6, through LOD technology (Level of Detail) and instantiation rendering technology (Instancing), based on the illumination model and classification labels, each third pipe network model in the buffer is rendered in real time to generate an urban pipe network scene; in specific implementation, the third pipe network model can be progressively loaded and rendered so as to be quickly presented in a network environment; during the rendering process, when the scene is switched, the last frame image of the previous scene is screenshotted, and the screenshot is used as a placeholder to release the memory occupied by the previous scene;

[0063] Step S7, recording in real time the rendering log of each of the third pipe network models during the rendering process;

[0064] The step S6 is specifically as follows:

[0065] Based on the classification label, the third pipe network models in the buffer are classified, the parallel threads of the GPU are started through the Compute Shader technology, and the classified third pipe network models are rendered in batches and in parallel through the instantiation rendering technology, the lighting model and the parallel threads. During the rendering process, the rendering details are dynamically adjusted in combination with the LOD technology, and the aliasing and performance in the rendering process are balanced through the MSAA technology (multi-sampling anti-aliasing) to generate an urban pipe network scene.

[0066] The rendering process is combined with LOD technology, that is, the details of the third pipe network model are dynamically adjusted based on the distance between the camera and the third pipe network model, and polygons with fewer edges are used to represent the third pipe network model in the distance to reduce the amount of data during rendering. Ambient occlusion and ray tracing are also turned off during the rendering process to reduce the amount of calculation.

[0067] In step S1, the modeling data at least includes model shape, model size, model position and model quantity;

[0068] The texture map carries at least map parameters including texture shape, texture color and texture material.

[0069] The step S2 is specifically as follows:

[0070] Based on the modeling data, a plurality of first pipe network models are created, and the vertices and faces inside each of the first pipe network models are simplified to optimize the geometric data of each of the first pipe network models to obtain a corresponding second pipe network model, that is, unnecessary vertices and faces are reduced, and a more efficient network topology structure is used, such as deleting duplicate faces.

[0071] The step S3 is specifically as follows:

[0072] A texture atlas is created, each of the texture maps is merged into the texture atlas, UV unfolding is performed on each of the second pipe network models, a texture map is selected from the texture atlas by using Mipmaps technology, and the selected texture map is UV mapped to the corresponding second pipe network model to obtain a third pipe network model.

[0073] Merging each texture map into a texture atlas can effectively reduce the number of times texture maps are switched during rendering and reduce memory usage; mapping texture maps through Mipmaps technology, that is, using texture maps of different precisions based on the rendering distance, can reduce the amount of data during rendering.

[0074] The step S7 is specifically as follows:

[0075] Recording in real time a rendering log of at least the rendering time, rendering duration, modeling data, texture map, lighting model, and rendering area during the rendering process of each of the third pipe network models, encrypting the rendering log into an encrypted log, and storing and backing up the encrypted log;

[0076] By recording in real time the rendering log of at least the rendering time, rendering duration, modeling data, texture map, lighting model, and rendering area during the rendering process of each of the third pipe network models, it is convenient to trace the source when rendering is abnormal, so as to optimize the rendering process and ensure rendering efficiency.

[0077] The step of encrypting the rendering log into an encrypted log and storing and backing up the encrypted log is specifically as follows:

[0078] A pair of public keys and private keys are created through the ECDH algorithm, the public key is mapped through a preset first mapping rule to obtain a first key, the first key is encrypted through the RSA algorithm to obtain a second key, MAC calculation is performed on the rendering log to obtain a MAC value, the rendering log is encrypted through the private key to obtain an initial encrypted log, the initial encrypted log, the second key and the MAC value are encrypted through the AES algorithm to obtain primary encrypted data, each character of the primary encrypted data is shifted rightward by a preset first displacement to obtain secondary encrypted data, the secondary encrypted data is encrypted through the ECDSA algorithm to obtain third-level encrypted data, each character of the third-level encrypted data is shifted leftward by a preset second displacement to obtain fourth-level encrypted data, the fourth-level encrypted data is encrypted through the IDEA algorithm to obtain fifth-level encrypted data, the fifth-level encrypted data is mapped through a preset second mapping rule to obtain sixth-level encrypted data, the sixth-level encrypted data is encrypted through the ECC algorithm to obtain an encrypted log, and the encrypted log is stored and distributedly backed up.

[0079] A pair of public key and private key is created through the ECDH algorithm, the public key is mapped through the first mapping rule to obtain the first key, the first key is encrypted through the RSA algorithm to obtain the second key, MAC calculation is performed on the rendering log to obtain the MAC value, the rendering log is encrypted through the private key to obtain the initial encrypted log, the initial encrypted log, the second key and the MAC value are encrypted through the AES algorithm to obtain the first-level encrypted data, each character of the first-level encrypted data is shifted to the right by the first displacement to obtain the second-level encrypted data, the second-level encrypted data is encrypted through the ECDSA algorithm to obtain the third-level encrypted data, each character of the third-level encrypted data is shifted to the left by the second displacement to obtain the fourth-level encrypted data, the fourth-level encrypted data is encrypted through the IDEA algorithm to obtain the fifth-level encrypted data, and the fifth-level encrypted data is mapped through the second mapping rule Get six-level encrypted data, encrypt the six-level encrypted data through the ECC algorithm to get the encrypted log, and store and distribute the encrypted log; because the data encrypted by the private key can only be decrypted by the public key, the public key is encrypted at multiple levels to avoid leakage, and the MAC calculation is based on the hash function with a secret key, which is more secure than the ordinary hash calculation. If you don't know the corresponding encryption algorithm or data transformation rule, you will not be able to crack the encrypted log. At least 14 security measures are taken before and after (ECDH algorithm, public and private keys, first mapping rule, RSA algorithm, MAC calculation, AES algorithm, first displacement, second displacement, displacement direction, ECDSA algorithm, IDEA algorithm, second mapping rule, ECC algorithm, distributed backup), which greatly improves the security of rendering log storage and backup, and prevents the rendering log from being stolen and tampered with in plain text.

[0080] The decryption process of the encrypted log is as follows: decrypting the encrypted log by the ECC algorithm to obtain level 6 encrypted data, mapping the level 6 encrypted data by the preset second mapping rule to obtain level 5 encrypted data, decrypting the level 5 encrypted data by the IDEA algorithm to obtain level 4 encrypted data, shifting each character of the level 4 encrypted data to the right by the preset second displacement to obtain level 3 encrypted data, decrypting the level 3 encrypted data by the ECDSA algorithm to obtain level 2 encrypted data, shifting each character of the level 2 encrypted data to the left by the preset first displacement to obtain level 1 encrypted data, decrypting the level 1 encrypted data by the AES algorithm to obtain an initial encrypted log, a second key and a MAC value, decrypting the second key by the RSA algorithm to obtain a first key, mapping the first key by the preset first mapping rule to obtain a public key, decrypting the initial encrypted log by the public key to obtain a rendering log, and performing integrity verification on the rendering log by the MAC value.

[0081] A preferred embodiment of a city pipe network scene rendering system of the present invention includes the following modules:

[0082] The data acquisition module is used to acquire modeling data and texture maps for urban pipe network scene modeling; the modeling data is used to create a basic model of the urban pipe network scene, that is, to create a skeleton, and the texture map is used to make the basic model more beautiful and practical; in specific implementation, the modeling data is renamed based on a preset naming rule so that the modeling data can be read efficiently later;

[0083] A modeling module, used to create a plurality of first pipe network models based on the modeling data, and optimize the geometric data of each of the first pipe network models to obtain a corresponding second pipe network model;

[0084] A texture map mapping module is used to create a texture atlas, merge the texture maps into the texture atlas, and map the texture maps in the texture atlas to the corresponding second pipe network model through Mipmaps technology to obtain a third pipe network model;

[0085] A model classification module, used to classify each of the third pipe network models based on the model shape and set a classification label;

[0086] Classify the third pipe network models by model shape, so as to facilitate batch rendering of the same third pipe network models through instanced rendering technology, without repeating the operation on the same model;

[0087] A rendering parameter setting module is used to create a lighting model of the urban pipe network scene based on a lightmap, set a rendering area based on the camera field of view, and preload each third pipe network model within the rendering area into a buffer of the GPU; set the rendering area, that is, use tiled rendering technology to divide the urban pipe network scene into multiple tiles (areas), and only render the tiles within the camera field of view;

[0088] A lighting model for the urban pipe network scene is created through light mapping to replace dynamic lighting, reducing the amount of lighting calculations; each third pipe network model in the rendering area is preloaded into the GPU buffer, effectively reducing the amount of data transmission from the CPU to the GPU.

[0089] The model rendering module is used to perform real-time rendering of each third pipe network model in the buffer based on the illumination model and classification labels through LOD technology and instancing technology to generate an urban pipe network scene; in specific implementation, the third pipe network model can be progressively loaded and rendered so as to be quickly presented in a network environment; during the rendering process, when switching scenes, the last frame image of the previous scene is captured, and the screenshot is used as a placeholder to release the memory occupied by the previous scene;

[0090] A rendering log recording module, used for recording the rendering logs of each of the third pipe network models in a rendering process in real time;

[0091] The model rendering module is specifically used for:

[0092] Based on the classification label, the third pipe network models in the buffer are classified, the parallel threads of the GPU are started through the Compute Shader technology, and the classified third pipe network models are rendered in batches and in parallel through the instantiation rendering technology, the lighting model and the parallel threads. During the rendering process, the rendering details are dynamically adjusted in combination with the LOD technology, and the aliasing and performance in the rendering process are balanced through the MSAA technology (multi-sampling anti-aliasing) to generate an urban pipe network scene.

[0093] The rendering process is combined with LOD technology, that is, the details of the third pipe network model are dynamically adjusted based on the distance between the camera and the third pipe network model, and polygons with fewer edges are used to represent the third pipe network model in the distance to reduce the amount of data during rendering. Ambient occlusion and ray tracing are also turned off during the rendering process to reduce the amount of calculation.

[0094] In the data acquisition module, the modeling data at least includes model shape, model size, model position and model quantity;

[0095] The texture map carries at least map parameters including texture shape, texture color and texture material.

[0096] The modeling module is specifically used for:

[0097] Based on the modeling data, a plurality of first pipe network models are created, and the vertices and faces inside each of the first pipe network models are simplified to optimize the geometric data of each of the first pipe network models to obtain a corresponding second pipe network model, that is, unnecessary vertices and faces are reduced, and a more efficient network topology structure is used, such as deleting duplicate faces.

[0098] The texture map mapping module is specifically used for:

[0099] A texture atlas is created, each of the texture maps is merged into the texture atlas, UV unfolding is performed on each of the second pipe network models, a texture map is selected from the texture atlas by using Mipmaps technology, and the selected texture map is UV mapped to the corresponding second pipe network model to obtain a third pipe network model.

[0100] Merging each texture map into a texture atlas can effectively reduce the number of times texture maps are switched during rendering and reduce memory usage; mapping texture maps through Mipmaps technology, that is, using texture maps of different precisions based on the rendering distance, can reduce the amount of data during rendering.

[0101] The rendering log recording module is specifically used for:

[0102] Recording in real time a rendering log of at least the rendering time, rendering duration, modeling data, texture map, lighting model, and rendering area during the rendering process of each of the third pipe network models, encrypting the rendering log into an encrypted log, and storing and backing up the encrypted log;

[0103] By recording in real time the rendering log of at least the rendering time, rendering duration, modeling data, texture map, lighting model, and rendering area during the rendering process of each of the third pipe network models, it is convenient to trace the source when rendering is abnormal, so as to optimize the rendering process and ensure rendering efficiency.

[0104] The step of encrypting the rendering log into an encrypted log and storing and backing up the encrypted log is specifically as follows:

[0105] A pair of public keys and private keys are created through the ECDH algorithm, the public key is mapped through a preset first mapping rule to obtain a first key, the first key is encrypted through the RSA algorithm to obtain a second key, MAC calculation is performed on the rendering log to obtain a MAC value, the rendering log is encrypted through the private key to obtain an initial encrypted log, the initial encrypted log, the second key and the MAC value are encrypted through the AES algorithm to obtain primary encrypted data, each character of the primary encrypted data is shifted rightward by a preset first displacement to obtain secondary encrypted data, the secondary encrypted data is encrypted through the ECDSA algorithm to obtain third-level encrypted data, each character of the third-level encrypted data is shifted leftward by a preset second displacement to obtain fourth-level encrypted data, the fourth-level encrypted data is encrypted through the IDEA algorithm to obtain fifth-level encrypted data, the fifth-level encrypted data is mapped through a preset second mapping rule to obtain sixth-level encrypted data, the sixth-level encrypted data is encrypted through the ECC algorithm to obtain an encrypted log, and the encrypted log is stored and distributedly backed up.

[0106] A pair of public key and private key is created through the ECDH algorithm, the public key is mapped through the first mapping rule to obtain the first key, the first key is encrypted through the RSA algorithm to obtain the second key, MAC calculation is performed on the rendering log to obtain the MAC value, the rendering log is encrypted through the private key to obtain the initial encrypted log, the initial encrypted log, the second key and the MAC value are encrypted through the AES algorithm to obtain the first-level encrypted data, each character of the first-level encrypted data is shifted to the right by the first displacement to obtain the second-level encrypted data, the second-level encrypted data is encrypted through the ECDSA algorithm to obtain the third-level encrypted data, each character of the third-level encrypted data is shifted to the left by the second displacement to obtain the fourth-level encrypted data, the fourth-level encrypted data is encrypted through the IDEA algorithm to obtain the fifth-level encrypted data, and the fifth-level encrypted data is mapped through the second mapping rule Get six-level encrypted data, encrypt the six-level encrypted data through the ECC algorithm to get the encrypted log, and store and distribute the encrypted log; because the data encrypted by the private key can only be decrypted by the public key, the public key is encrypted at multiple levels to avoid leakage, and the MAC calculation is based on the hash function with a secret key, which is more secure than the ordinary hash calculation. If you don't know the corresponding encryption algorithm or data transformation rule, you will not be able to crack the encrypted log. At least 14 security measures are taken before and after (ECDH algorithm, public and private keys, first mapping rule, RSA algorithm, MAC calculation, AES algorithm, first displacement, second displacement, displacement direction, ECDSA algorithm, IDEA algorithm, second mapping rule, ECC algorithm, distributed backup), which greatly improves the security of rendering log storage and backup, and prevents the rendering log from being stolen and tampered with in plain text.

[0107] The decryption process of the encrypted log is as follows: decrypting the encrypted log by the ECC algorithm to obtain level 6 encrypted data, mapping the level 6 encrypted data by the preset second mapping rule to obtain level 5 encrypted data, decrypting the level 5 encrypted data by the IDEA algorithm to obtain level 4 encrypted data, shifting each character of the level 4 encrypted data to the right by the preset second displacement to obtain level 3 encrypted data, decrypting the level 3 encrypted data by the ECDSA algorithm to obtain level 2 encrypted data, shifting each character of the level 2 encrypted data to the left by the preset first displacement to obtain level 1 encrypted data, decrypting the level 1 encrypted data by the AES algorithm to obtain an initial encrypted log, a second key and a MAC value, decrypting the second key by the RSA algorithm to obtain a first key, mapping the first key by the preset first mapping rule to obtain a public key, decrypting the initial encrypted log by the public key to obtain a rendering log, and performing integrity verification on the rendering log by the MAC value.

[0108] In summary, the advantages of the present invention are:

[0109] 1. By acquiring the modeling data and texture maps used for modeling the urban pipe network scene, a number of first pipe network models are created based on the modeling data, the geometric data of each first pipe network model is optimized to obtain the corresponding second pipe network model, each texture map is merged into the created texture atlas, and the texture map in the texture atlas is mapped to the corresponding second pipe network model through the Mipmaps technology to obtain the third pipe network model; then, each third pipe network model is classified and the classification label is set based on the model shape, the lighting model of the urban pipe network scene is created based on the light map, the rendering area is set based on the camera field of view, and each third pipe network model in the rendering area is preloaded into the GPU buffer; then, through the LOD technology and the instantiation rendering technology, each third pipe network model in the buffer is rendered in real time based on the lighting model and the classification label to generate the urban pipe network scene, and the rendering log of each third pipe network model in the rendering process is recorded in real time; that is, before rendering, the vertices and faces inside each first pipe network model are simplified to optimize the geometric data, so that the network topology structure is more efficient; The textures are merged into the texture atlas, which can effectively reduce the number of times the texture maps are switched during rendering and reduce memory usage; the texture maps are mapped through the Mipmaps technology, that is, texture maps of different precisions are used based on the rendering distance to reduce the amount of data during rendering; the third pipe network models are classified by model shape, which is convenient for subsequent batch rendering of the same third pipe network models through the instantiation rendering technology, without the need to repeat the same model; the lighting model of the urban pipe network scene is created based on the light map to replace the dynamic lighting, reducing the amount of lighting calculation; the rendering area is set based on the camera field of view, that is, only the camera field of view area is rendered at present, so as to reduce the amount of rendering data; the third pipe network models in the rendering area are preloaded into the GPU buffer, effectively reducing the amount of data transferred from the CPU to the GPU; the LOD technology is combined in the rendering process, that is, the details of the third pipe network model are dynamically adjusted based on the distance between the camera and the third pipe network model, and the third pipe network model is represented by polygons with fewer edges in the distance, so as to reduce the amount of data during rendering; and the third pipe network model is represented by the Compute Shader technology activates the parallel threads of the GPU to accelerate the rendering process, taking at least nine measures before and after, ultimately greatly improving the rendering efficiency of the urban pipeline network scene.

[0110] 2. By recording in real time the rendering logs of at least the rendering time, rendering duration, modeling data, texture mapping, lighting model, and rendering area during the rendering process of each of the third pipe network models, it is convenient to trace the source when rendering is abnormal, so as to optimize the rendering process and ensure rendering efficiency.

[0111] 3. Create a pair of public and private keys through the ECDH algorithm, map the public key through the first mapping rule to obtain the first key, encrypt the first key through the RSA algorithm to obtain the second key, perform MAC calculation on the rendering log to obtain the MAC value, encrypt the rendering log through the private key to obtain the initial encrypted log, encrypt the initial encrypted log, the second key and the MAC value through the AES algorithm to obtain the first-level encrypted data, shift each character of the first-level encrypted data to the right by the first displacement to obtain the second-level encrypted data, encrypt the second-level encrypted data through the ECDSA algorithm to obtain the third-level encrypted data, shift each character of the third-level encrypted data to the left by the second displacement to obtain the fourth-level encrypted data, encrypt the fourth-level encrypted data through the IDEA algorithm to obtain the fifth-level encrypted data, and map the fifth-level encrypted data through the second mapping rule. The six-level encrypted data is obtained by projection, and the six-level encrypted data is encrypted by the ECC algorithm to obtain the encrypted log, which is stored and distributedly backed up; since the data encrypted by the private key can only be decrypted by the public key, the public key is encrypted at multiple levels to avoid leakage, and the MAC calculation is based on the hash function with a secret key, which is more secure than the ordinary hash calculation. If the corresponding encryption algorithm or data transformation rule is not known, the encrypted log cannot be cracked. At least 14 security measures are taken before and after (ECDH algorithm, public and private keys, first mapping rule, RSA algorithm, MAC calculation, AES algorithm, first displacement, second displacement, displacement direction, ECDSA algorithm, IDEA algorithm, second mapping rule, ECC algorithm, distributed backup), which greatly improves the security of the storage and backup of the rendering log and prevents the rendering log from being stolen and tampered with in plain text.

[0112] Although the specific implementation modes of the present invention are described above, those skilled in the art should understand that the specific implementation modes described are only illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included in the scope of protection of the claims of the present invention.

Claims

1. A method for rendering a city pipe network scene, characterized in that: The steps include: Step S1, obtaining modeling data and texture maps for urban pipe network scene modeling; Step S2: creating a plurality of first pipe network models based on the modeling data, and optimizing the geometric data of each of the first pipe network models to obtain a corresponding second pipe network model; Step S3, creating a texture atlas, merging the texture maps into the texture atlas, and mapping the texture maps in the texture atlas to the corresponding second pipe network model by using M ipmaps technology to obtain a third pipe network model; Step S4, classifying each of the third pipe network models based on the model shape, and setting a classification label; Step S5, creating a lighting model of the urban pipe network scene based on the light map, setting a rendering area based on the camera field of view, and preloading each third pipe network model in the rendering area into a buffer of the GPU; Step S6: Using LOD technology and instantiation rendering technology, based on the illumination model and classification labels, each third pipe network model in the buffer is rendered in real time to generate a city pipe network scene; Step S7, recording in real time the rendering log of each of the third pipe network models during the rendering process; The step S6 is specifically as follows: Based on the classification label, the third pipe network models in the buffer are classified, the parallel threads of the GPU are started through the Compute Shader technology, and the classified third pipe network models are rendered in batches and in parallel through the instantiation rendering technology, the lighting model and the parallel threads. During the rendering process, the rendering details are dynamically adjusted in combination with the LOD technology, and the aliasing and performance in the rendering process are balanced through the MSAA technology to generate an urban pipe network scene.

2. A method for rendering a city pipe network scene according to claim 1, characterized in that: In step S1, the modeling data at least includes model shape, model size, model position and model quantity; The texture map carries at least map parameters including texture shape, texture color and texture material.

3. A method for rendering a city pipe network scene according to claim 1, characterized in that: The step S2 is specifically as follows: A plurality of first pipe network models are created based on the modeling data, and the vertices and faces inside each of the first pipe network models are simplified to optimize the geometric data of each of the first pipe network models to obtain a corresponding second pipe network model.

4. A method for rendering a city pipe network scene according to claim 1, characterized in that: The step S3 is specifically as follows: A texture atlas is created, each of the texture maps is merged into the texture atlas, UV unfolding is performed on each of the second pipe network models, a texture map is selected from the texture atlas by using Mipmaps technology, and the selected texture map is UV mapped to the corresponding second pipe network model to obtain a third pipe network model.

5. The method for rendering a city pipe network scene according to claim 1, characterized in that: The step S7 is specifically as follows: Recording in real time a rendering log of at least the rendering time, rendering duration, modeling data, texture map, lighting model, and rendering area during the rendering process of each of the third pipe network models, encrypting the rendering log into an encrypted log, and storing and backing up the encrypted log; The step of encrypting the rendering log into an encrypted log and storing and backing up the encrypted log is specifically as follows: A pair of public keys and private keys are created through the ECDH algorithm, the public key is mapped through a preset first mapping rule to obtain a first key, the first key is encrypted through the RSA algorithm to obtain a second key, MAC calculation is performed on the rendering log to obtain a MAC value, the rendering log is encrypted through the private key to obtain an initial encrypted log, the initial encrypted log, the second key and the MAC value are encrypted through the AES algorithm to obtain primary encrypted data, each character of the primary encrypted data is shifted rightward by a preset first displacement to obtain secondary encrypted data, the secondary encrypted data is encrypted through the ECDSA algorithm to obtain third-level encrypted data, each character of the third-level encrypted data is shifted leftward by a preset second displacement to obtain fourth-level encrypted data, the fourth-level encrypted data is encrypted through the IDEA algorithm to obtain fifth-level encrypted data, the fifth-level encrypted data is mapped through a preset second mapping rule to obtain sixth-level encrypted data, the sixth-level encrypted data is encrypted through the ECC algorithm to obtain an encrypted log, and the encrypted log is stored and distributedly backed up.

6. A city pipe network scene rendering system, characterized by: Includes the following modules: A data acquisition module, used to acquire modeling data and texture maps for urban pipe network scene modeling; A modeling module, used to create a plurality of first pipe network models based on the modeling data, and optimize the geometric data of each of the first pipe network models to obtain a corresponding second pipe network model; A texture map mapping module is used to create a texture atlas, merge the texture maps into the texture atlas, and map the texture maps in the texture atlas to the corresponding second pipe network model through Mipmaps technology to obtain a third pipe network model; A model classification module, used to classify each of the third pipe network models based on the model shape and set a classification label; A rendering parameter setting module, used to create a lighting model of the urban pipe network scene based on the light map, set a rendering area based on the camera field of view, and preload each third pipe network model in the rendering area into a buffer of the GPU; A model rendering module, used for performing real-time rendering of each third pipe network model in the buffer zone based on the illumination model and classification labels by using LOD technology and instantiation rendering technology to generate a city pipe network scene; A rendering log recording module, used for recording the rendering logs of each of the third pipe network models in a rendering process in real time; The model rendering module is specifically used for: Based on the classification label, the third pipe network models in the buffer are classified, the parallel threads of the GPU are started through the Compute Shader technology, and the classified third pipe network models are rendered in batches and in parallel through the instantiation rendering technology, the lighting model and the parallel threads. During the rendering process, the rendering details are dynamically adjusted in combination with the LOD technology, and the aliasing and performance in the rendering process are balanced through the MSAA technology to generate an urban pipe network scene.

7. The urban pipe network scene rendering system according to claim 6, characterized in that: In the data acquisition module, the modeling data at least includes model shape, model size, model position and model quantity; The texture map carries at least map parameters including texture shape, texture color and texture material.

8. The urban pipe network scene rendering system according to claim 6, characterized in that: The modeling module is specifically used for: A plurality of first pipe network models are created based on the modeling data, and the vertices and faces inside each of the first pipe network models are simplified to optimize the geometric data of each of the first pipe network models to obtain a corresponding second pipe network model.

9. The urban pipe network scene rendering system according to claim 6, characterized in that: The texture map mapping module is specifically used for: A texture atlas is created, each of the texture maps is merged into the texture atlas, UV unfolding is performed on each of the second pipe network models, a texture map is selected from the texture atlas by using Mipmaps technology, and the selected texture map is UV mapped to the corresponding second pipe network model to obtain a third pipe network model.

10. The urban pipe network scene rendering system according to claim 6, characterized in that: The rendering log recording module is specifically used for: Recording in real time a rendering log of at least the rendering time, rendering duration, modeling data, texture map, lighting model, and rendering area during the rendering process of each of the third pipe network models, encrypting the rendering log into an encrypted log, and storing and backing up the encrypted log; The step of encrypting the rendering log into an encrypted log and storing and backing up the encrypted log is specifically as follows: A pair of public keys and private keys are created through the ECDH algorithm, the public key is mapped through a preset first mapping rule to obtain a first key, the first key is encrypted through the RSA algorithm to obtain a second key, MAC calculation is performed on the rendering log to obtain a MAC value, the rendering log is encrypted through the private key to obtain an initial encrypted log, the initial encrypted log, the second key and the MAC value are encrypted through the AES algorithm to obtain primary encrypted data, each character of the primary encrypted data is shifted rightward by a preset first displacement to obtain secondary encrypted data, the secondary encrypted data is encrypted through the ECDSA algorithm to obtain third-level encrypted data, each character of the third-level encrypted data is shifted leftward by a preset second displacement to obtain fourth-level encrypted data, the fourth-level encrypted data is encrypted through the IDEA algorithm to obtain fifth-level encrypted data, the fifth-level encrypted data is mapped through a preset second mapping rule to obtain sixth-level encrypted data, the sixth-level encrypted data is encrypted through the ECC algorithm to obtain an encrypted log, and the encrypted log is stored and distributedly backed up.