A WebGPU-based power grid equipment lightweight model rapid processing method, system, device and medium
By adopting a lightweight model processing method for power grid equipment based on WebGPU, the problems of the inability to dynamically adjust rendering strategies and the asynchrony of LOD scheduling mechanisms in existing technologies are solved. This achieves the adaptation of terminal hardware performance and real-time interaction requirements, and improves the rendering quality and smoothness of the 3D model of power grid equipment.
Patent Information
- Application Number
- CN202611053764.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-15
- Publication Date
- 2026-11-24
AI Technical Summary
Existing technologies cannot dynamically adjust rendering strategies based on client performance in the rendering of 3D models of power grid equipment. This results in loading lag on low-performance terminals and underutilization of resources on high-performance terminals. Furthermore, the LOD scheduling mechanism is out of sync with multiple rendering channels, causing misalignment of model details and screen flickering, which affects the visualization experience.
A lightweight model processing method for power grid equipment based on WebGPU is adopted. Through geometric simplification, texture compression and attribute association, the model is converted into a custom 3DTiles format. Combined with WebGPU and WebGL rendering pipeline, dynamic rendering strategy adjustment is realized. And through bidirectional coordinate transformation and LOD level matching, scene data is synchronized to ensure rendering quality and smoothness.
It enables dynamic adaptation of rendering strategies based on terminal hardware performance, shortens the loading and rendering time of 3D models, improves real-time interaction capabilities, avoids model detail misalignment and screen flickering issues, and enhances the user experience on different devices.
Smart Images

Figure CN123160741A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of lightweight power grid equipment modeling technology, and in particular to a fast processing method, system, device and medium for lightweight power grid equipment models based on WebGPU. Background Technology
[0002] With the advancement of power grid digitalization, 3D visualization technology has been widely applied in scenarios such as power grid equipment operation and maintenance management, planning and design, and emergency drills. To achieve fast loading and smooth rendering of larger-scale 3D models on the browser side, existing solutions typically utilize the WebGL graphics interface for web-based rendering of 3D models, optimizing rendering performance through techniques such as lightweight geometry processing and Level of Detail (LOD) layering. Currently, there are numerous visualization solutions for power grid 3D scenes that can load 3D models of power grid equipment on multiple terminals, meeting basic needs for equipment inspection and scene browsing.
[0003] However, existing solutions suffer from significant hardware performance differences across different terminals. Most existing solutions employ fixed rendering pipeline configurations, failing to dynamically adjust rendering strategies based on client performance. This leads to loading stutters and insufficient frame rates on low-performance mobile terminals, while on high-performance devices, hardware resources cannot be fully utilized to achieve superior rendering quality. Furthermore, the parallel computing capabilities of existing WebGL interfaces are not fully utilized. For large-scale 3D model transformations and coordinate transformations of power grid equipment, the process relies heavily on CPU serial processing, resulting in long loading and rendering times that cannot meet the demands of real-time interaction. Additionally, existing LOD scheduling mechanisms do not integrate scene data synchronization across multiple rendering channels, easily leading to mismatches in model detail matching and screen flickering under different rendering states, thus impacting the visualization experience. Summary of the Invention
[0004] This application provides a method, system, device, and medium for fast processing of lightweight power grid equipment models based on WebGPU, in order to solve the problems that most existing solutions use fixed rendering pipeline configurations, cannot dynamically adjust rendering strategies according to client performance, and rely heavily on CPU serial processing for the transformation and coordinate transformation of large-scale power grid equipment 3D models, resulting in long loading and rendering times and failing to meet the needs of real-time interaction.
[0005] Firstly, this application provides a fast processing method for lightweight power grid equipment models based on WebGPU, the method comprising: The original 3D model of the power grid equipment is geometrically simplified, texture compressed, and attribute associated, and then converted into lightweight 3D vector tile data in a custom 3DTiles extended format; During page initialization, the current rendering mode is determined based on client performance information; Initialize the corresponding rendering pipeline as the rendering channel based on the current rendering mode; Perform bidirectional real-time conversion between WGS84 geographic coordinates and Cartesian coordinates corresponding to rendering channels in 3D vector tile data; and synchronize scene data corresponding to 3D vector tile data in different rendering channels at a preset frequency; Based on the actual camera distance, the current LOD level of the model and the scene data corresponding to the current rendering channel are determined in real time, and then the scene data with the precision corresponding to the LOD level is loaded using the current rendering channel.
[0006] In one implementation of this application, the original 3D model of the power grid equipment undergoes geometric simplification, texture compression, and attribute association to be converted into lightweight 3D vector tile data in a custom 3D Tiles extended format, specifically including: An edge-folding algorithm is used to compress the number of triangular faces in the power grid equipment model while preserving the key structural features of the equipment. Convert the original texture to KTX2 format and generate a multi-level resolution texture pyramid. Embed the unique identifier, equipment type, operating parameters, and business attributes of power grid equipment into the nodes of the 3D model; According to the spatial grid and hierarchical division rules, the processed model is cut into 256×256×256 three-dimensional vector slices.
[0007] In one implementation of this application, the current rendering mode is determined based on client performance information during page initialization, specifically including: Detect whether the browser's GPU supports the WebGPU standard; If the GPU supports WebGPU and has ≥2GB of video memory, enable the preset high-performance rendering mode corresponding to WebGPU; If the GPU does not support WebGPU or has less than 2GB of video memory, it will automatically switch to the corresponding preset compatible rendering mode for WebGL.
[0008] In one implementation of this application, the corresponding rendering pipeline is initialized as a rendering channel according to the current rendering mode, specifically including: When the default high-performance rendering mode corresponding to WebGPU is enabled, the WebGPU adapter and logical device are created, the swap chain and rendering target are configured, the vertex shader and fragment shader are compiled, and the pipeline state object is created; vertex buffers, index buffers and texture buffers are allocated to store 3D model data; and WebGPU-based compute shaders are created. When the default compatible rendering mode corresponding to WebGL is enabled, a WebGL context is created, the viewport size and clear color are set, the vertex shader and fragment shader are compiled and linked into a shader program, and a buffer object is created to store vertex data and index data.
[0009] In one implementation of this application, a bidirectional real-time conversion is performed between WGS84 geographic coordinates and Cartesian coordinates corresponding to the rendering channel in the 3D vector tile data; and the converted 3D vector tile data is synchronized with scene data corresponding to different rendering channels at a preset frequency, specifically including: The Mercator projection algorithm is used to perform bidirectional conversion between WGS84 latitude and longitude coordinates in 3D vector tile data and Cartesian coordinates corresponding to the rendering channel; Simulate the camera position, rotation angle, and field of view parameters of the rendering engine at a frequency of 60Hz. Based on the transformed 3D vector tile data, a unified requestAnimationFrame is used to drive the rendering loop of the rendering mode engine, and the same timestamp is used to update the scene data of different rendering mode engines.
[0010] In one implementation of this application, the current LOD level of the model and the scene data corresponding to the current rendering channel are determined in real time based on the actual camera distance. Then, scene data with the precision corresponding to the LOD level is loaded using the current rendering channel. Specifically, this includes: Calculate the Euclidean distance between the center of the current power grid equipment 3D slice bounding box and the camera viewpoint. Combined with the screen resolution and field of view of the current rendering channel, calculate the slice's proportion threshold in screen space: when the proportion is greater than the preset high resolution threshold, select the highest LOD level to load full-precision triangles and original resolution textures; when the proportion is in the preset low to medium range, match the corresponding LOD level and load the corresponding compressed face count and down-resolution textures; when the proportion is lower than the preset minimum LOD threshold, only load the device placeholder bounding box and the lowest precision texture. The matched LOD level is combined with the slice space index after bidirectional coordinate transformation. The slice data index of corresponding precision is queried from the custom 3D Tiles extended format data. Slice data that exceeds the view frustum range is filtered out. Only the index information of the slices to be loaded within the current viewport range is retained. The index result is then passed to the rendering channel data loading module. Based on the passed-in index of the slice to be loaded, the current rendering channel parses the slice data according to its own pipeline specifications; after loading is complete, the current frame is rendered and the final image is output.
[0011] Secondly, this application provides a fast processing system for lightweight power grid equipment models based on WebGPU, the system comprising: The data preprocessing module is used to perform geometric simplification, texture compression, and attribute association on the original 3D model of the power grid equipment, and convert it into lightweight 3D vector tile data in a custom 3D Tiles extended format; The hardware detection module is used to determine the current rendering mode based on client performance information during page initialization. The fusion rendering engine module is used to initialize the corresponding rendering pipeline as a rendering channel according to the current rendering mode; perform bidirectional real-time conversion between WGS84 geographic coordinates in 3D vector tile data and Cartesian coordinates corresponding to the rendering channel; synchronize scene data corresponding to different rendering channels of 3D vector tile data at a preset frequency; determine the current LOD level of the model and the scene data corresponding to the current rendering channel in real time according to the actual camera distance, and then load scene data with the precision corresponding to the LOD level using the current rendering channel.
[0012] In one implementation of this application, the model preprocessing module uses an edge folding algorithm to compress the number of triangular faces of the power grid equipment model while retaining the key structural features of the equipment. Convert the original texture to KTX2 format and generate a multi-level resolution texture pyramid. Embed the unique identifier, equipment type, operating parameters, and business attributes of power grid equipment into the nodes of the 3D model; According to the spatial grid and hierarchical division rules, the processed model is cut into 256×256×256 three-dimensional vector slices.
[0013] Thirdly, this application provides a fast processing device for lightweight power grid equipment models based on WebGPU, the device comprising: processor; And a memory on which executable code is stored, which, when executed, causes the processor to perform a fast processing method for a lightweight model of power grid equipment based on WebGPU, as described above.
[0014] Fourthly, this application provides a non-volatile computer storage medium storing computer instructions, which, when executed, implement a fast processing method for a lightweight power grid device model based on WebGPU, as described above.
[0015] As can be seen from the above technical solutions, this application has the following advantages: This application enables dynamic adaptation of rendering strategies based on terminal hardware performance, solving the technical problem that fixed rendering pipeline configurations cannot match devices with different performance levels. By obtaining client performance information during the page initialization phase and initializing a dedicated rendering pipeline according to the corresponding rendering mode, low-performance mobile terminals can adapt to simplified rendering configurations, reducing rendering load and avoiding loading stutters and insufficient frame rates, thus ensuring the smoothness of basic visual interactions. Meanwhile, high-performance desktop terminals or high-end mobile devices can enable the full-configuration rendering pipeline, utilizing GPU hardware resources to achieve higher rendering accuracy and image quality, thus balancing the user experience across different device scenarios.
[0016] This solution leverages the parallel computing capabilities of WebGPU to transform the data processing workflow, resolving the pain point of relying on CPU serial processing for coordinate transformation of large-scale 3D power grid equipment models, which is time-consuming. WebGPU natively supports compute shaders and massively parallel computing. This solution migrates the bidirectional conversion task between WGS84 geographic coordinates and Cartesian coordinates, which was originally executed serially by the CPU, to the GPU. Relying on the multi-core parallel architecture of the GPU, it simultaneously processes the coordinate transformation of massive model vertices, shortening data processing and loading time. This meets the real-time interaction requirements of large-scale equipment models in power grid digitalization scenarios, providing a smooth interactive foundation for frequent perspective switching and equipment inspection roaming operations in power grid operation and maintenance and planning scenarios.
[0017] By synchronizing scene data from different rendering channels at a preset frequency and dynamically matching the corresponding LOD level with camera distance, this solution resolves the issues of model detail misalignment and screen flickering caused by the asynchrony between traditional LOD scheduling mechanisms and multiple rendering channels. This solution binds LOD level selection to scene data from multiple rendering channels. When switching rendering channels or adjusting the camera perspective, it consistently matches the model data of the current rendering channel with the required precision. This ensures precise matching of model details with the current perspective and rendering configuration under different rendering states, avoiding visual anomalies caused by detail level misalignment. Attached Figure Description
[0018] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart of a fast processing method for lightweight power grid equipment based on WebGPU, provided in an embodiment of this application.
[0020] Figure 2This is a schematic diagram of a WebGPU and WebGL fusion rendering pipeline provided in an embodiment of this application.
[0021] Figure 3 This is a schematic diagram of a lightweight model hierarchical loading provided in an embodiment of this application.
[0022] Figure 4 This is a schematic diagram of the internal structure of a WebGPU-based lightweight power grid equipment fast processing system provided in an embodiment of this application.
[0023] Figure 5 This is a schematic diagram of the internal structure of a lightweight power grid equipment fast processing device based on WebGPU, provided in an embodiment of this application. Detailed Implementation
[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] Those skilled in the art should understand that the embodiments described below are merely preferred embodiments of this disclosure and do not imply that this disclosure can only be implemented through these preferred embodiments. These preferred embodiments are merely used to explain the technical principles of this disclosure and are not intended to limit the scope of protection of this disclosure. Based on the preferred embodiments provided by this disclosure, all other embodiments obtained by those skilled in the art without creative effort should still fall within the scope of protection of this disclosure.
[0026] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0027] The technical solutions proposed in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0028] This embodiment provides a fast processing method for lightweight power grid equipment models based on WebGPU, such as... Figure 1 As shown in the embodiments of this application, the method mainly includes the following steps: Step 110: Perform geometric simplification, texture compression, and attribute association on the original 3D power grid equipment model, and convert it into lightweight 3D vector tile data in a custom 3D Tiles extended format.
[0029] In some embodiments, the specific components include: An edge-folding algorithm is used to compress the number of triangular faces in the power grid equipment model while preserving the key structural features of the equipment. Convert the original texture to KTX2 format and generate a multi-level resolution texture pyramid. Embed the unique identifier, equipment type, operating parameters, and business attributes of power grid equipment into the nodes of the 3D model; According to the spatial grid and hierarchical division rules, the processed model is cut into 256×256×256 three-dimensional vector slices.
[0030] More specifically: Geometric simplification: The QEM edge folding algorithm is used to compress the number of triangular faces in the model. For critical equipment such as towers and transformers, the compression ratio is controlled at 5:1; for auxiliary facilities such as walls and ground, the compression ratio can be increased to 10:1. Key structural features and electrical connection points of the equipment are preserved during the compression process.
[0031] Texture Compression: Converts original JPG / PNG textures to KTX2 format using the ASTC compression algorithm, achieving a compression ratio of 4:1. KTX2 format supports direct GPU hardware decompression without CPU intervention, improving texture loading speed. Simultaneously, it generates multi-level resolution texture pyramids to adapt to different LOD (Level of Detail) requirements.
[0032] Attribute association: Embed business attributes such as the unique identifier (equipment ID), equipment type, voltage level, manufacturer, and commissioning date of power grid equipment into the node data of the 3D model to establish the association between the model and the business database.
[0033] Vector Tiles: Following the octree space partitioning rules, the processed model is cut into 256×256×256 3D vector tiles. Each tile contains geometric data, texture data, and attribute data, generating an extended format dataset conforming to the 3D Tiles standard.
[0034] Step 120: During page initialization, determine the current rendering mode based on client performance information; and initialize the corresponding rendering pipeline as the rendering channel based on the current rendering mode.
[0035] In some embodiments, during page initialization, the current rendering mode is determined based on client performance information, specifically including: Check if the browser supports the WebGPU standard (by checking if the navigator.gpu object exists); If WebGPU is supported, further obtain GPU adapter information and detect video memory capacity; If the GPU supports WebGPU and has ≥2GB of video memory, enable the preset high-performance rendering mode corresponding to WebGPU; If the GPU does not support WebGPU or has less than 2GB of video memory, it will automatically switch to the corresponding preset compatible rendering mode for WebGL.
[0036] It should be noted that the client's GPU model, video memory capacity, CPU performance, and browser compatibility are automatically detected during page initialization. If the GPU supports WebGPU and has ≥2GB of video memory, the WebGPU high-performance rendering mode is enabled; otherwise, it automatically switches to the WebGL compatible rendering mode and enables a more aggressive optimization strategy.
[0037] In some embodiments, the corresponding rendering pipeline is initialized as a rendering channel according to the current rendering mode, specifically including: When the default high-performance rendering mode corresponding to WebGPU is enabled, the WebGPU adapter and logical device are created, the swap chain and rendering target are configured, the vertex shader and fragment shader are compiled, and the pipeline state object is created; vertex buffers, index buffers and texture buffers are allocated to store 3D model data; and WebGPU-based compute shaders are created. When the default compatible rendering mode corresponding to WebGL is enabled, a WebGL context is created, the viewport size and clear color are set, the vertex shader and fragment shader are compiled and linked into a shader program, and a buffer object is created to store vertex data and index data.
[0038] As an example: WebGPU rendering pipeline initialization: Create a WebGPU adapter and logical device; Configure the swap chain and set the rendering target format and size; Compile the vertex shader and fragment shader, and create the pipeline state object; Allocate vertex buffers, index buffers, and texture buffers; Implement a WebGPU-based compute shader for the instantiation and rendering of large-scale power grid equipment (such as batch rendering of repetitive equipment like towers and insulators).
[0039] WebGL rendering pipeline initialization: Create a WebGL context, set the viewport size and clear screen color; Compile the vertex shader and fragment shader, and link them into a shader program; Create a buffer object to store vertex data and index data; Maintain consistency between the WebGL interface and the WebGPU interface to facilitate calls from upper-layer applications.
[0040] Step 130: Perform bidirectional real-time conversion between WGS84 geographic coordinates and Cartesian coordinates corresponding to the rendering channels in the 3D vector tile data; and synchronize the scene data corresponding to the 3D vector tile data in different rendering channels at a preset frequency.
[0041] In some embodiments, a bidirectional real-time conversion is performed between WGS84 geographic coordinates and Cartesian coordinates corresponding to the rendering channel in the 3D vector tile data; and the scene data corresponding to the converted 3D vector tile data in different rendering channels is synchronized at a preset frequency, specifically including: The Mercator projection algorithm is used to perform bidirectional conversion between WGS84 latitude and longitude coordinates in 3D vector tile data and Cartesian coordinates corresponding to the rendering channel; The engine synchronizes camera position, rotation angle, and field of view parameters in a 60Hz rendering mode; quaternions are used to represent camera rotation to avoid gimbal lock issues.
[0042] Based on the transformed 3D vector tile data, a unified requestAnimationFrame is used to drive the rendering loop of the rendering mode engine, and the same timestamp is used to update the scene data of different rendering mode engines.
[0043] In addition, resources such as lighting, materials, and textures are shared and reused between the two engines. For the same texture data, only one copy is stored in the GPU, reducing memory usage.
[0044] It should be noted that this step is to achieve deep integration between the WebGPU and WebGL engines, including bidirectional conversion between WGS84 geographic coordinates and Cartesian coordinates, real-time synchronization of camera states, unified scheduling of rendering loops, and sharing of GPU resources, to ensure consistency of rendering results between the two engines.
[0045] like Figure 2As shown, the dual-rendering pipeline collaborative architecture is demonstrated. It relies on four key elements—bidirectional coordinate system transformation, 60Hz camera state synchronization, unified rendering loop, and GPU resource sharing—to achieve coordinated adaptation between the two pipelines. When hardware performance is sufficient, the WebGPU pipeline is activated, sequentially completing adapter and logical device creation, swap chain configuration, shader compilation to generate pipeline state objects, allocating various data buffers, and building compute shaders to achieve batch instance rendering on the device. When hardware performance is insufficient, the WebGL pipeline is switched. This involves creating a GL context, compiling and linking shader programs, and configuring vertex index buffers to complete rendering initialization. Both pipelines share a set of scene data and GPU texture resources, ultimately unifying and compositing the output image to achieve adaptive rendering switching on the terminal hardware.
[0046] Step 140: Based on the actual camera distance, determine the current LOD level of the model and the scene data corresponding to the current rendering channel in real time, and then use the current rendering channel to load the scene data with the precision corresponding to the LOD level.
[0047] In some embodiments, based on the actual camera distance, the current LOD level of the model and the scene data corresponding to the current rendering channel are determined in real time, and then scene data with the precision corresponding to the LOD level is loaded using the current rendering channel, specifically including: Calculate the Euclidean distance between the center of the current power grid equipment 3D slice bounding box and the camera viewpoint. Combined with the screen resolution and field of view of the current rendering channel, calculate the slice's proportion threshold in screen space: when the proportion is greater than the preset high resolution threshold, select the highest LOD level to load full-precision triangles and original resolution textures; when the proportion is in the preset low to medium range, match the corresponding LOD level and load the corresponding compressed face count and down-resolution textures; when the proportion is lower than the preset minimum LOD threshold, only load the device placeholder bounding box and the lowest precision texture. The matched LOD level is combined with the slice space index after bidirectional coordinate transformation. The slice data index of corresponding precision is queried from the custom 3D Tiles extended format data. Slice data that exceeds the view frustum range is filtered out. Only the index information of the slices to be loaded within the current viewport range is retained. The index result is then passed to the rendering channel data loading module. Based on the passed-in index of the slice to be loaded, the current rendering channel parses the slice data according to its own pipeline specifications; after loading is complete, the current frame is rendered and the final image is output.
[0048] It should be noted that this application employs streaming loading and Level of Detail (LOD) technology to dynamically load 3D vector tile data of varying precision based on camera viewpoint and distance. Combined with internal CDN acceleration services, network latency is reduced to less than 50ms, improving first-screen loading speed.
[0049] In addition, such as Figure 4 As shown, for distances > 1000 meters: load the Level 0 overview model (number of triangles < 10,000); Distance 100-1000 meters: Load level 1-3 models (10,000-100,000 triangles); Distance <100 meters: Load level 4-5 fine model (100,000-500,000 triangles); Parallel download of slice data is performed using the HTTP / 2 protocol, with rendering occurring as the data is downloaded, prioritizing the loading of high-priority slices (such as the slice at the center of the viewport). Deploying 3D tile data on internal CDN edge nodes reduces network latency to less than 50ms.
[0050] In addition, this application Figure 3 This application provides a WebGPU-based system for fast processing of lightweight power grid equipment models. For example... Figure 4 As shown in the embodiments of this application, the system mainly includes: The data preprocessing module 210 is used to perform geometric simplification, texture compression and attribute association on the original 3D model of the power grid equipment, and convert it into lightweight 3D vector tile data in a custom 3D Tiles extended format.
[0051] The model preprocessing module 210 uses an edge folding algorithm to compress the number of triangular faces in the power grid equipment model while retaining the key structural features of the equipment. Convert the original texture to KTX2 format and generate a multi-level resolution texture pyramid. Embed the unique identifier, equipment type, operating parameters, and business attributes of power grid equipment into the nodes of the 3D model; According to the spatial grid and hierarchical division rules, the processed model is cut into 256×256×256 three-dimensional vector slices.
[0052] The hardware detection module 220 is used to determine the current rendering mode based on client performance information during page initialization.
[0053] The fusion rendering engine module 230 is used to initialize the corresponding rendering pipeline as a rendering channel according to the current rendering mode; perform bidirectional real-time conversion between WGS84 geographic coordinates in the 3D vector tile data and the corresponding Cartesian coordinates of the rendering channel; synchronize the scene data corresponding to the 3D vector tile data in different rendering channels at a preset frequency; determine the current LOD level of the model and the scene data corresponding to the current rendering channel in real time according to the actual camera distance, and then use the current rendering channel to load the scene data with the precision corresponding to the LOD level.
[0054] The above are method embodiments of this application. Based on the same inventive concept, this application also provides a fast processing device for lightweight power grid equipment models based on WebGPU. Figure 5 As shown, the device includes: a processor; and a memory storing executable code thereon, which, when executed, causes the processor to perform a fast processing method for a lightweight power grid device model based on WebGPU, as described in the above embodiment.
[0055] Specifically, the server performs geometric simplification, texture compression, and attribute association on the original 3D model of the power grid equipment, converting it into lightweight 3D vector tile data in a custom 3D Tiles extended format. During page initialization, the current rendering mode is determined based on client performance information. Based on the current rendering mode, the corresponding rendering pipeline is initialized as a rendering channel. A bidirectional real-time conversion is performed between the WGS84 geographic coordinates in the 3D vector tile data and the Cartesian coordinates corresponding to the rendering channel. Scene data corresponding to different rendering channels of the 3D vector tile data is synchronized at a preset frequency. Based on the actual camera distance, the current LOD level of the model and the scene data corresponding to the current rendering channel are determined in real time, and then scene data with the precision corresponding to the LOD level is loaded using the current rendering channel.
[0056] In addition, embodiments of this application also provide a non-volatile computer storage medium storing executable instructions, which, when executed, implement the above-described method for fast processing of lightweight power grid equipment models based on WebGPU.
[0057] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A fast processing method for lightweight power grid equipment models based on WebGPU, characterized in that, The method includes: The original 3D model of the power grid equipment is geometrically simplified, texture compressed, and attribute associated, and then converted into lightweight 3D vector tile data in a custom 3DTiles extended format; During page initialization, the current rendering mode is determined based on client performance information; based on the current rendering mode, the corresponding rendering pipeline is initialized as the rendering channel. Perform bidirectional real-time conversion between WGS84 geographic coordinates and Cartesian coordinates corresponding to rendering channels in 3D vector tile data; and synchronize scene data corresponding to 3D vector tile data in different rendering channels at a preset frequency; Based on the actual camera distance, the current LOD level of the model and the scene data corresponding to the current rendering channel are determined in real time, and then the scene data with the precision corresponding to the LOD level is loaded using the current rendering channel.
2. The fast processing method for lightweight power grid equipment models based on WebGPU according to claim 1, characterized in that, The original 3D model of the power grid equipment undergoes geometric simplification, texture compression, and attribute association, transforming it into lightweight 3D vector tile data in a custom 3DTiles extended format. Specifically, this includes: An edge-folding algorithm is used to compress the number of triangular faces in the power grid equipment model while preserving the key structural features of the equipment. Convert the original texture to KTX2 format and generate a multi-level resolution texture pyramid. Embed the unique identifier, equipment type, operating parameters, and business attributes of power grid equipment into the nodes of the 3D model; According to the spatial grid and hierarchical division rules, the processed model is cut into 256×256×256 three-dimensional vector slices.
3. The fast processing method for lightweight power grid equipment models based on WebGPU according to claim 1, characterized in that, During page initialization, the current rendering mode is determined based on client performance information, specifically including: Detect whether the browser's GPU supports the WebGPU standard; If the GPU supports WebGPU and has ≥2GB of video memory, enable the preset high-performance rendering mode corresponding to WebGPU; If the GPU does not support WebGPU or has less than 2GB of video memory, it will automatically switch to the corresponding preset compatible rendering mode for WebGL.
4. The fast processing method for lightweight power grid equipment models based on WebGPU according to claim 3, characterized in that, Based on the current rendering mode, initialize the corresponding rendering pipeline as the rendering pass, specifically including: When the default high-performance rendering mode corresponding to WebGPU is enabled, the WebGPU adapter and logical device are created, the swap chain and rendering target are configured, the vertex shader and fragment shader are compiled, and the pipeline state object is created; vertex buffers, index buffers and texture buffers are allocated to store 3D model data; and WebGPU-based compute shaders are created. When the default compatible rendering mode corresponding to WebGL is enabled, a WebGL context is created, the viewport size and clear color are set, the vertex shader and fragment shader are compiled and linked into a shader program, and a buffer object is created to store vertex data and index data.
5. The fast processing method for lightweight power grid equipment models based on WebGPU according to claim 1, characterized in that, Perform bidirectional real-time conversion between WGS84 geographic coordinates and Cartesian coordinates corresponding to rendering channels in 3D vector tile data; and synchronously convert the 3D vector tile data to scene data corresponding to different rendering channels at a preset frequency, specifically including: The Mercator projection algorithm is used to perform bidirectional conversion between WGS84 latitude and longitude coordinates in 3D vector tile data and Cartesian coordinates corresponding to the rendering channel; Simulate the camera position, rotation angle, and field of view parameters of the rendering engine at a frequency of 60Hz. Based on the transformed 3D vector tile data, a unified requestAnimationFrame is used to drive the rendering loop of the rendering mode engine, and the same timestamp is used to update the scene data of different rendering mode engines.
6. The fast processing method for lightweight power grid equipment models based on WebGPU according to claim 1, characterized in that, Based on the actual camera distance, the current LOD level of the model and the scene data corresponding to the current rendering pass are determined in real time. Then, scene data with the precision corresponding to the LOD level is loaded using the current rendering pass, specifically including: Calculate the Euclidean distance between the center of the current power grid equipment 3D slice bounding box and the camera viewpoint. Combined with the screen resolution and field of view of the current rendering channel, calculate the slice's proportion threshold in screen space: when the proportion is greater than the preset high resolution threshold, select the highest LOD level to load full-precision triangles and original resolution textures; when the proportion is in the preset low to medium range, match the corresponding LOD level and load the corresponding compressed face count and down-resolution textures; when the proportion is lower than the preset minimum LOD threshold, only load the device placeholder bounding box and the lowest precision texture. The matched LOD level is combined with the slice space index after bidirectional coordinate transformation. The slice data index of corresponding precision is queried from the custom 3D Tiles extended format data. Slice data that exceeds the view frustum range is filtered out. Only the index information of the slices to be loaded within the current viewport range is retained. The index result is then passed to the rendering channel data loading module. Based on the passed-in index of the slice to be loaded, the current rendering channel parses the slice data according to its own pipeline specifications; after loading is complete, the current frame is rendered and the final image is output.
7. A fast processing system for lightweight power grid equipment models based on WebGPU, characterized in that, The system includes: The data preprocessing module is used to perform geometric simplification, texture compression, and attribute association on the original 3D model of the power grid equipment, and convert it into lightweight 3D vector tile data in a custom 3D Tiles extended format; The hardware detection module is used to determine the current rendering mode based on client performance information during page initialization. The fusion rendering engine module is used to initialize the corresponding rendering pipeline as a rendering channel according to the current rendering mode; perform bidirectional real-time conversion between WGS84 geographic coordinates in 3D vector tile data and Cartesian coordinates corresponding to the rendering channel; synchronize scene data corresponding to different rendering channels of 3D vector tile data at a preset frequency; determine the current LOD level of the model and the scene data corresponding to the current rendering channel in real time according to the actual camera distance, and then load scene data with the precision corresponding to the LOD level using the current rendering channel.
8. The fast processing system for lightweight power grid equipment models based on WebGPU according to claim 7, characterized in that, The model preprocessing module uses an edge folding algorithm to compress the number of triangular faces in the power grid equipment model while retaining the key structural features of the equipment. Convert the original texture to KTX2 format and generate a multi-level resolution texture pyramid. Embed the unique identifier, equipment type, operating parameters, and business attributes of power grid equipment into the nodes of the 3D model; According to the spatial grid and hierarchical division rules, the processed model is cut into 256×256×256 three-dimensional vector slices.
9. A fast processing device for lightweight models of power grid equipment based on WebGPU, characterized in that, The device includes: processor; And a memory having executable code stored thereon, which, when executed, causes the processor to perform a fast processing method for a lightweight model of power grid equipment based on WebGPU as described in any one of claims 1-6.
10. A non-volatile computer storage medium, characterized in that, It stores computer instructions, which, when executed, implement a fast processing method for lightweight power grid equipment models based on WebGPU as described in any one of claims 1-6.
