A method and device for visual loading optimization based on a state grid GIM model

By converting the GIM model into a 3D Tiles model, the performance bottleneck caused by the large amount of GIM model data was solved, enabling fast rendering and interactive display on the web, and improving loading efficiency and visualization capabilities.

CN121094253BActive Publication Date: 2026-02-27WUHAN OPTICS VALLEY INFORMATION TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511644803.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-11
Publication Date
2026-02-27
Estimated Expiration
2045-11-11

AI Technical Summary

Technical Problem

When modeling structures such as towers and conductors, GIM models involve large amounts of data and deep hierarchies. Direct loading and processing can easily cause performance bottlenecks and response delays, leading to data loss or errors. This makes it impossible to achieve real-time preview and interaction on the web, affecting remote operation and maintenance and visual collaboration.

Method used

The GIM model is converted into a 3D Tiles model. By obtaining the device model's dependencies and merging geometric measurement errors, a lightweight loading method suitable for the web is generated. Data flow technology is used to load and unload data on demand, optimizing resources and performing layered thinning.

Benefits of technology

It significantly improves the loading efficiency and interactive performance of 3D scenes on the Web platform, solves the problem that the large amount of GIM model data cannot be directly displayed in a lightweight manner on the Web platform, and realizes fast rendering and interactive display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121094253B_ABST
    Figure CN121094253B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on State Grid GIM model's visual loading tuning method and device, obtain all equipment models in GIM model and the first dependent relationship between equipment model, to save the first dependent relationship between equipment model with first multi-tree, generate glb model corresponding to equipment model, the bounding box and geometric metric error of glb model are merged to generate tile data corresponding to glb model, obtain the second dependent relationship between glb model, to save the second dependent relationship between all or part glb model with second multi-tree, glb model and corresponding tile data are combined, generate 3D Tiles model corresponding to GIM model, 3D Tiles model is published and visualized.The application converts GIM model into 3D Tiles model suitable for large-scale heterogeneous three-dimensional geographic space data streaming transmission and rendering, significantly improves the loading efficiency and interactive performance of Web end three-dimensional scene.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power grid model aided design, in particular to a visualization loading optimization method and device based on a State Grid GIM model. BACKGROUND

[0002] With the rapid development of power systems and the continuous expansion of power transmission and transformation projects, the precision, efficiency and visualization capability of power grid models are required to be higher for engineering construction, operation and maintenance, and intelligent management. In order to realize data fusion and collaboration in the whole process of the project, the State Grid Corporation of China has developed and promoted the Grid Information Model (GIM) standard as the core data structure and information interaction format to support the three-dimensional design and digital delivery of power transmission and transformation projects.

[0003] GIM is a comprehensive model that creates and manages the entire power grid physical entity and its attributes, behaviors and relationship information in a digital way, and has the characteristics of high precision, full factor, structured and standardized. However, with the increasing complexity and scale of the GIM data model, the GIM model has large data volume and deep hierarchy when modeling towers, conductors and other structures, and direct loading and processing can easily cause performance bottlenecks, response delays, and even data loss or errors. The huge model data cannot be directly and efficiently rendered, which restricts the ability to realize real-time preview and interaction on the WEB side and affects the promotion of GIM in remote operation and maintenance, visualization collaboration and other scenarios.

[0004] Therefore, there is an urgent need for a lightweight processing and visualization loading optimization method for GIM models to simplify the structure, optimize resources and layer and thin out the data of the model under the premise of ensuring the accuracy and integrity of the model, so as to realize fast rendering and interactive display of the model on the WEB platform, break the dependence on special software, and improve the adaptability, accessibility and business flexibility of the model. SUMMARY

[0005] According to the deficiencies of the prior art, the purpose of the present application is to provide a visualization loading optimization method and device based on a State Grid GIM model, which can convert the GIM model into a 3D Tiles model suitable for large-scale heterogeneous three-dimensional geographic spatial data streaming transmission and rendering, significantly improving the loading efficiency and interaction performance of the three-dimensional scene on the Web side, and having good platform adaptability and universality, and being suitable for various three-dimensional visualization application scenarios.

[0006] Other characteristics and advantages of the present application will become apparent from the following detailed description, or will be learned by practice of the present application.

[0007] According to a first aspect of the present application, a visualization loading optimization method based on a State Grid GIM model is provided, comprising:

[0008] According to the hierarchy of the GIM model, all device models in the GIM model and first dependency relationships between the device models are acquired, and first dependency relationships between all or part of the device models are saved in a first multi-way tree;

[0009] A glb model corresponding to the device model is generated;

[0010] A bounding box and a geometric metric error of the glb model are merged to generate tile data corresponding to the glb model;

[0011] Second dependency relationships between the glb models are acquired, and the second dependency relationships are the same as the first dependency relationships between the device models corresponding to the glb models;

[0012] Second dependency relationships between all or part of the glb models are saved in a second multi-way tree, and a 3D Tiles model corresponding to the GIM model is generated by combining the glb models and the corresponding tile data, and the 3D Tiles model is published and visualized.

[0013] In some embodiments of the present application, based on the foregoing scheme, the glb model corresponding to the device model is generated, including:

[0014] Three-dimensional mesh data of the device model is constructed by drawing points, lines and surfaces according to a geometric algorithm by using a 3D modeling software, the glb model corresponding to the device model is generated, the glb model is classified according to a model type, and the glb model is compressed and optimized by using a Draco algorithm.

[0015] In some embodiments of the present application, based on the foregoing scheme, the bounding box and the geometric metric error of the glb model are merged to generate the tile data corresponding to the glb model, and the method further includes:

[0016] The bounding box of the glb model is generated, and specifically:

[0017] A hexahedral AABB box corresponding to a mesh in the glb model is generated, and a corner point matrix of the hexahedral AABB box is:

[0018]

[0019] wherein, is a minimum horizontal coordinate of the hexahedral AABB box, is a minimum vertical coordinate of the hexahedral AABB box, is a minimum vertical coordinate of the hexahedral AABB box, is a maximum horizontal coordinate of the hexahedral AABB box,​ is the maximum longitudinal coordinate of the hexahedron AABB box, is the maximum vertical coordinate of the hexahedron AABB box;

[0020] According to the world transformation matrix transform the hexahedron AABB box to the world space, then the world space matrix is:

[0021]

[0022] Ignoring the homogeneous component, retaining the first three column coordinates of the world space matrix, the world corner point matrix of the hexahedron AABB box is obtained :

[0023]

[0024] wherein, represents a programmatic symbol, and the first three columns are removed from the homogeneous component;

[0025] Stacking the world corner point matrices of all the hexahedron AABB boxes, the matrix corresponding to the bounding box of the glb model is obtained :

[0026]

[0027] wherein, is the world corner point matrix of the th hexahedron AABB box;

[0028] Obtaining the maximum coordinate matrix and the minimum coordinate matrix of the bounding box in the three-dimensional space:

[0029]

[0030]

[0031] wherein, represents operating on the by column;

[0032] Obtaining the coordinate matrix of the center point of the bounding box:

[0033]

[0034] wherein, , , are the horizontal coordinate, the longitudinal coordinate and the vertical coordinate of the center point of the bounding box, respectively;

[0035] Obtaining a half-size matrix of the bounding box :

[0036]

[0037] wherein, 、 、 are the distances from the center to the boundary of the bounding box along the X direction, the distances from the center to the boundary of the bounding box along the Y direction, and the distances from the center to the boundary of the bounding box along the Z direction, respectively;

[0038] Obtaining a bounding box based on a coordinate matrix and a half-size matrix of a center point of the bounding box :

[0039] .

[0040] In some embodiments of the present application, based on the foregoing scheme, the merging of the bounding box and the geometric error of the glb model to generate the tile data corresponding to the glb model further comprises:

[0041] Setting the distance from the camera to the center of the bounding sphere in the 3D Tiles model as the half-size radius of the bounding box, and obtaining the geometric error of the glb model , the calculation formula is:

[0042]

[0043]

[0044] wherein, is the pixel height of the drawing area, is the vertical field of view angle of the camera in the 3D Tiles model, is the distance from the camera to the center of the bounding sphere in the 3D Tiles model, is the screen error threshold of the camera in the 3D Tiles model, 、 、 are the half-size length, width and height of the bounding box, respectively.

[0045] In some embodiments of the present application, based on the foregoing scheme, before the merging of the bounding box and the geometric error of the glb model to generate the tile data corresponding to the glb model, further comprising:

[0046] Extracting the geographic coordinate system information of the device model and converting it into the geocentric coordinate system information of the 3D Tiles model, the specific method being:

[0047] extracting geographic coordinate system information of the device model, the geographic coordinate system information comprising latitude , longitude , elevation , north direction angle ;

[0048] According to , the translation vector corresponding to the geocentric coordinate system information is obtained , and the calculation formula is:

[0049]

[0050] wherein, is the first eccentricity, is the ellipsoid curvature radius, represents the translation amount in the X direction, represents the translation amount in the Y direction, represents the translation amount in the Z direction;

[0051] The calculation formula of the square of the first eccentricity and the ellipsoid curvature radius is respectively:

[0052]

[0053]

[0054] wherein, is the equatorial radius of the earth, is the flattening;

[0055] Obtaining a local rotation matrix around the z axis :

[0056]

[0057]

[0058] wherein, is the north direction angle in radians;

[0059] Obtaining a rotation matrix :

[0060]

[0061] wherein, is the east unit vector, is the north unit vector, is the sky unit vector;

[0062] Obtaining a combined rotation matrix :

[0063]

[0064] obtaining a homogeneous transformation matrix :

[0065] ;

[0066] convert geographical coordinate system information of the device model into geocentric coordinate system information of the 3D Tiles model based on the homogeneous transformation matrix.

[0067] In some embodiments of the present application, based on the foregoing scheme, further comprising:

[0068] The GIM model includes a plurality of tower corresponding device models, and a transformation matrix of other towers relative to the first tower is obtained based on the first tower as a reference. :

[0069]

[0070] wherein, inverse of the transformation matrix of the geocentric coordinate system information of the first tower.

[0071] In some embodiments of the present application, based on the foregoing scheme, further comprising:

[0072] obtaining the fam attribute of the device model corresponding to the glb model, and writing the fam attribute into the metadata of the 3D Tiles model.

[0073] According to a second aspect of the present application, a visualization loading optimization device based on a State Grid GIM model is provided, and the device comprises:

[0074] The obtaining module is configured to obtain all device models in the GIM model and a first dependency relationship between the device models according to a hierarchical structure of the GIM model, and save the first dependency relationship between all or part of the device models in a first multi-way tree.

[0075] The glb model generation module is configured to generate a glb model corresponding to the device model.

[0076] The tile data generation module is configured to combine a bounding box and a geometric metric error of the glb model to generate tile data corresponding to the glb model.

[0077] The relationship conversion module is configured to obtain a second dependency relationship between the glb models, which is the same as the first dependency relationship between the device models corresponding to the glb models.

[0078] 3D Tiles model generation module, configured to save second dependency relationships between all or part of the glb models in a second multi-tree, generate a 3D Tiles model corresponding to the GIM model in combination with the glb model and corresponding tile data, and publish and visualize the 3D Tiles model.

[0079] According to a third aspect of the present application, a computer readable storage medium is provided, which stores a computer program including executable instructions, when the executable instructions are executed by a processor, the method described above is implemented.

[0080] According to a fourth aspect of the present application, an electronic device is provided, comprising:

[0081] one or more processors;

[0082] a memory for storing executable instructions of the processor, when the executable instructions are executed by the one or more processors, the one or more processors implement the method described above.

[0083] The beneficial effects of the present application are as follows:

[0084] The visualization loading optimization method and device based on the State Grid GIM model provided by the present application convert the GIM model into a 3D Tiles model, dynamically adjust the detail level of the 3D Tiles model according to the camera position and height using data flow technology, load and unload data on demand, minimize data transmission and loading time, and avoid performance problems caused by loading too much data at one time. The problem of too large GIM model data that cannot be directly displayed on the Web in a lightweight manner is solved.

[0085] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS

[0086] The drawings described herein are used to provide further understanding of the present application, and form a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation on the present application. In the drawings:

[0087] Figure 1 a flowchart of the visualization loading optimization method based on the State Grid GIM model of the present embodiment;

[0088] Figure 2 a schematic diagram of the first multi-tree of the present embodiment;

[0089] Figure 3 a schematic diagram of the visualization loading optimization device based on the State Grid GIM model of the present embodiment;

[0090] Figure 4 A schematic diagram of an electronic device according to the present embodiment. DETAILED DESCRIPTION

[0091] In order to make the inventive objectives, features and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the embodiments described below are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of the present application.

[0092] It should be understood that the terms “comprise” and other similar terms in the specification or claims of the present application and the above-described drawings mean covering non-exclusive inclusion, such as a process, method or system, device comprising a series of steps or units, which is not limited to the listed steps or units. In addition, “first” and “second” are used to distinguish different objects, and are not used to describe a specific order.

[0093] Referring to Figure 1 The present embodiment provides a visual loading and optimization method based on a State Grid GIM model, which comprises the following steps:

[0094] Step S1: According to the hierarchical structure of the GIM model, all device models in the GIM model and the first dependency relationship between the device models are obtained, and the first dependency relationship between all or part of the device models is saved in a first multi-way tree.

[0095] In some embodiments of the present embodiment, the data of the GIM model is read, the geographic spatial coordinate information of all device models in the GIM model and the spatial transformation matrix of each device model relative to the geographic spatial coordinate information are extracted from top to bottom according to the hierarchical structure of the GIM model, and the first dependency relationship between the device models is saved in a first multi-way tree. In the first multi-way tree, the nodes are device models, and each leaf node saves the spatial transformation matrix information and fam attribute information relative to the parent node.

[0096] In the present embodiment, the fam attribute information refers to the file (fam) in the GIM model The .fam file includes attribute names, attribute keywords, and attribute values. Attribute names are represented in Chinese and cannot be empty; attribute keywords are represented in uppercase English letters and can be empty; attribute values ​​are represented in Chinese characters, numbers, characters, or a combination thereof. For example, the fam attribute information related to conductors includes: Bundle Number = 2, Bundle Spacing = 0, Every Day Tension = 0, Manufacturer = 0, Material Code = 0, Maximum Stress = 0, Maximum Tension = 0, Phase = B, Safety Factor Every Day Tension = 0, Safety Factor Maximum Tension = 0, Serial Number of Circuit = 2, and Split Type = 0.

[0097] In one specific embodiment, such as Figure 2 As shown, the GIM model includes five levels of systems: F1System, F2System, F3System, F4System, and component level. The geospatial coordinates are extracted from the BLHA field, storing the latitude, longitude, altitude, and north deflection angle of the geometric center of the origin in the tower model at the actual height and the longest leg in the actual joint. Latitude is in decimal, retained to eight decimal places; longitude is in decimal, retained to eight decimal places; altitude is in meters, retained to three decimal places; and the north deflection angle is counter-clockwise, in decimal, retained to six decimal places. The tower mod model referenced by the TOWER field is read, the base mod model referenced by the BASE field is read, and the STL insulator hardware model referenced by the STRINGS field is read. The spatial transformation matrix of each node is extracted according to the hierarchy, and the TRANS FOR MMATRIX field is taken. The fam attribute information referenced by BASE FAMILY is also extracted, and the above information is associated with the corresponding node in the first multi-way tree.

[0098] In some embodiments of this example, the node storing each tower also includes the geospatial coordinates of the tower.

[0099] Step S2: Generate the GLB model corresponding to the device model.

[0100] In some implementations of this embodiment, the glb model corresponding to the device model is generated, including:

[0101] The geometric parameters of the device model are analyzed, the point, line and surface are drawn to construct the three-dimensional grid data of the device model according to the geometric algorithm through the bpy library provided by the open source 3D modeling software blender, the glb model corresponding to the device model is generated, the glb model is saved in the directory corresponding to the model type according to the model type, and the glb model is compressed and optimized by using the Draco algorithm. At the same time, according to the uuid of the geometric parameter file of the saved device model, the same device model is avoided to be parsed and generated.

[0102] In the embodiment, each device model generates an independent glb model. Specifically, for the glb model, first, the point position information of the glb model is constructed according to the parameter information, and then the points are connected into surfaces in the counterclockwise direction. These surfaces are usually composed of triangle meshes, quadrilaterals or other simple convex polygons (n-gons), which can accurately describe the contour boundary of the solid model object. These surfaces constitute the surface grid data of the solid model. Finally, the model is saved in different directories (basic, tower, insulator, fitting, conductor, spacer rod, shock absorber, etc.) according to the type, and the glb model is compressed and optimized by using the Draco algorithm; for the stl model, the model is directly converted into a glb model.

[0103] In the GIM model, different positions of the device model may refer to the same mod or stl model. According to the uuid of the referenced model file name, it is confirmed whether it is the same model. When the uuid is the same, only one glb model generation or conversion is performed, so as to avoid the same device model being parsed and generated multiple times.

[0104] Step S3: merging the bounding box and geometric metric error of the glb model to generate the tile data corresponding to the glb model.

[0105] In the embodiment, the bounding box defines the spatial range of the glb model. In order to support the close-fitting volume of various models, the boundingVolume.box box is adopted here. The boundingVolume.box attribute is an array of 12 numbers, which is used to define the oriented bounding box in the right-handed 3-axis (x, y, z) Cartesian coordinate system, wherein the z axis is upward. The first three elements define the x, y and z values of the center of the box. The next three elements (indices 3, 4 and 5) define the x-axis direction and half length. The next three elements (indices 6, 7 and 8) define the y-axis direction and half length. The last three elements (indices 9, 10 and 11) define the z-axis direction and half length. Simply put, a cuboid box is calculated, which just covers the three-dimensional model.

[0106] In some embodiments of the present embodiment, the bounding box and geometric error of the glb model are combined to generate tile data corresponding to the glb model, and the tile data further comprises:

[0107] The bounding box of the glb model is generated, specifically:

[0108] The glb model generated in the loading step S2 is loaded and parsed to construct a first multi-tree, and the local matrix of each device model is obtained when the first multi-tree is constructed, and the translation / rotation (quaternion) / scale three elements of the device model or the matrix (if any) are directly used, and then starting from the device model corresponding to the root node, the local matrix is multiplied by level to obtain the 4x4 world matrix of each device model .

[0109] For each node referring to the same mesh, the mesh is a mesh in a three-dimensional model, which is a core data structure for constituting visible geometric shapes. In simple terms, it is a surface composed of vertices and their connection relationships (usually triangular faces). The mesh determines the shape and appearance outline of the object. Here, it refers to the mesh data stored in the glb model.

[0110] The POSITION accessor based on the mesh primitive reads the minimum point coordinates and maximum point coordinates of the mesh, the minimum point coordinates and the maximum point coordinates Then generate eight corner points, that is, a simple hexahedral AABB box.

[0111] For the hexahedral AABB box corresponding to the mesh in the glb model, the corner point matrix of the hexahedral AABB box is :

[0112]

[0113] Among them, is the minimum x-coordinate of the hexahedral AABB box, is the minimum y-coordinate of the hexahedral AABB box, is the minimum z-coordinate of the hexahedral AABB box, is the maximum x-coordinate of the hexahedral AABB box, is the maximum y-coordinate of the hexahedral AABB box, is the maximum z-coordinate of the hexahedral AABB box.

[0114] According to the world transformation matrix Transform the hexahedron AABB box to the world space, then the world space matrix is:

[0115] .

[0116] Ignore the homogeneous component, keep the first three column coordinates of the world space matrix, and get the world corner point matrix of the hexahedron AABB box :

[0117] .

[0118] wherein, represents a programmatic symbol, and the first three columns are removed from the homogeneous component.

[0119] The glb model includes a plurality of meshes, i.e. a plurality of world corner point matrices of hexahedron AABB boxes, so as to stack all the world corner point matrices of the hexahedron AABB boxes to obtain the matrix corresponding to the bounding box of the glb model :

[0120]

[0121] wherein, is the world corner point matrix of the i-th hexahedron AABB box.

[0122] Get the maximum coordinate matrix of the bounding box in the three-dimensional space and the minimum coordinate matrix :

[0123]

[0124]

[0125] wherein, represents the operation on the column.

[0126] Get the coordinate matrix of the center point of the bounding box :

[0127]

[0128] wherein, , , are the horizontal coordinate, the vertical coordinate and the vertical coordinate of the center point of the bounding box, respectively.

[0129] Get the half-size matrix of the bounding box :

[0130] ​​

[0131] wherein, , , are the distance from the center to the boundary of the bounding box along the X direction, the distance from the center to the boundary of the bounding box along the Y direction, and the distance from the center to the boundary of the bounding box along the Z direction, respectively;

[0132] The bounding box is obtained based on a coordinate matrix of a center point of the bounding box and a half-size matrix:

[0133] .

[0134] In this way, by setting the bounding box, the bounding box defines the position and range of the device model in the three-dimensional space, and the rendering engine can quickly judge whether the model is in the current camera frustum by the bounding box. If the bounding box is completely outside the frustum, this model can be skipped to load and render, thereby significantly improving the performance.

[0135] In the 3D Tiles model, the bounding box is used to judge when to switch the device model of different levels of detail (Level of Detail). When the camera is far away from the bounding box, a low-precision model is loaded; when it is close, a high-precision model is loaded, realizing streaming loading and smooth transition.

[0136] In some embodiments of the present embodiment, the spatial partitioning (such as octree / quaternary tree) of the 3D Tiles model relies on the bounding box to judge whether a certain spatial block needs to be loaded. Only the tile data that is currently visible or will be visible is downloaded, reducing the network transmission amount. The bounding box gives each glb model a “spatial shell”, which is the key to rendering optimization (clipping + LOD) and is the core basis for spatial positioning and loading strategy. If the bounding box is not set, it will degenerate into full loading, losing the performance advantage of streaming loading.

[0137] In some embodiments of the present embodiment, the geometric error (Geometric Error) of the glb model is used to control the level of model details, and according to the geometric error, it is determined when to switch the model of different levels of detail to optimize the performance. When the distance is far enough, multiple objects can be combined into a new object, and this new object is a low-polygon model. When the camera is at a distance of from the center of the bounding sphere (bounding sphere) of the glb model, the geometric error (Geometric Error) of the tile itself corresponds to the pixel error (Pixel Error) on the screen :

[0138]

[0139] wherein, pixel height of the rendering area, here set to 1080, geometric error, vertical field of view of the camera in the 3D Tiles model, by default about 60°, , , half-size length, width and height of the bounding box, respectively.

[0140] It is envisaged that when the camera distance from the center of the bounding sphere is i.e. the distance of the camera in the 3D Tiles model to the center of the bounding sphere is set to the half-size radius of the bounding box, the geometric error of the glb model is obtained, and the calculation formula is:

[0141]

[0142]

[0143] wherein, pixel height of the rendering area, vertical field of view of the camera in the 3D Tiles model, distance of the camera in the 3D Tiles model to the center of the bounding sphere, screen error threshold of the camera in the 3D Tiles model, here by default 16px, usually the screen error threshold T is between 8-24px, , , half-size length, width and height of the bounding box, respectively.

[0144] Thus, the geometric error of the glb model is obtained, the switching time of LOD (Level of Detail) is controlled, and the rendering engine determines whether a higher precision model needs to be loaded according to the camera distance, the geometric error, and the SSE (screen space error). If the error exceeds the threshold T (for example, 16 pixels), the more detailed device model is replaced. Otherwise, if the error is small enough, the current lower precision model is retained to reduce the performance overhead, and the performance and the picture quality are balanced. In the distance, the low-face-number and low-precision device model is used to reduce the GPU and network transmission burden, and in the near distance, the high-precision device model is switched to maintain the visual quality. Through the geometric error parameter, the engine can automatically switch at a suitable distance, without wasting performance due to early switching or without obvious distortion due to late switching, and error transmission of the hierarchical structure can be performed. In the first multi-tree, the geometric error of the parent node represents the detail gap between the device model of the parent node and the device model of the leaf node. The larger the geometric error of the parent node is, the more rough the device model of the parent node is, and the earlier the device model of the parent node needs to be replaced by the leaf node. The smaller the geometric error of the parent node is, the less difference there is between the device model of the parent node and the device model of the leaf node, and the later the replacement is delayed. The geometric error of the leaf node is 0 because the device model of the leaf node is the highest precision model.

[0145] In short, the geometric error is a digital measurement of the model blur degree, directly affects when the higher precision model is loaded and displayed, and thus the performance and bandwidth are maximally saved while the visual effect is ensured.

[0146] In some embodiments of the embodiment, for the leaf node, the geometric error is set to 0 by default, the device model of the leaf node is the highest precision model, and there is no more detailed leaf node. The value calculated here is mainly the geometric error of the parent node, because the device model of the parent node is an approximate model, and the LOD loading needs to be triggered according to the error.

[0147] In some embodiments of the present embodiment, step S3 calculates the bounding box and geometric metric error of the glb model corresponding to the leaf node. The parent node has multiple glb models combined by different spatial transformation matrices, so the bounding box of the parent node needs to be calculated according to all the bounding boxes of its leaf nodes and the transformation matrices. Similarly, the bounding box and geometric metric error of the final root node are calculated.

[0148] In some embodiments of the present embodiment, before the bounding box and geometric metric error of the glb model are combined to generate the tile data corresponding to the glb model, the following steps are further included:

[0149] The geographic coordinate system information of the device model is extracted and converted into the geocentric coordinate system supported by the 3D Tiles model.

[0150] In some embodiments of the present embodiment, in order to ensure that the converted 3D Tiles model can be displayed at the correct position, the CGCS2000 geographic coordinate system information of the model needs to be converted into the geocentric coordinate system (ECEF) supported by the 3D Tiles model according to the latitude, longitude, elevation, and north direction angle.

[0151] The translation vector corresponding to the geocentric coordinate system (ECEF) is converted into This coordinate is the center position of the placed model, and its formula is as follows:

[0152]

[0153] wherein, is the first eccentricity, is the ellipsoid curvature radius, represents the translation amount in the X direction, represents the translation amount in the Y direction, represents the translation amount in the Z direction.

[0154] The calculation formulas of the first eccentricity and the ellipsoid curvature radius are as follows:

[0155]

[0156]

[0157] wherein, is the equatorial radius of the earth, with the unit of m, is the flattening.

[0158] The CGCS2000 ellipsoid constants are as follows:

[0159] ​​

[0160] .

[0161] Local rotation matrix around z-axis, and the north direction angle radian calculation model facing direction:

[0162]

[0163]

[0164] wherein, is the north direction angle radian.

[0165] In the 3D Tiles model world, the earth surface "orientation" needs to be considered, and the direction vector of the local ENU (East-North-Sky) coordinate system is converted to the ECEF coordinate system through the given latitude and longitude information. This matrix defines the orientation of the surface normal, and the rotation matrix calculation formula is as follows:

[0166]

[0167] wherein, is the east unit vector, which represents the unit vector of the "east" direction in the local coordinate system, and the direction is along the direction of increasing latitude (due east), which is consistent with the earth longitude direction. The east unit vector in ECEF is horizontal and tangent to the surface cut, pointing to due east; is the north unit vector, which represents the unit vector of the "north" direction in the local coordinate system, and the direction is along the direction of fixed latitude and increasing latitude (due north). The north unit vector in ECEF is also horizontal and tangent to the surface cut, pointing to due north; is the sky unit vector, which represents the unit vector of the "sky" direction (perpendicular to the surface) in the local coordinate system, and the direction points to the opposite direction of the earth center (along the surface normal outward), which points to space in ECEF and is perpendicular to the earth surface.

[0168] First, rotate around the local Z-axis, then embed in the earth coordinate system, to get the combined rotation matrix:

[0169] .

[0170] Construct a homogeneous transformation matrix , which is the final model space transformation matrix:

[0171] ;

[0172] Based on the homogeneous transformation matrix, the geographic coordinate system information of the device model is converted into the geocentric coordinate system information of the 3D Tiles model.

[0173] In some embodiments of the present embodiment, for a power transmission line project, each tower has a geographic coordinate indicating the position of the tower on a map, and the coordinate of the first tower is taken as the origin of the model, that is, the transformation matrix of the Earth-Centered Earth-Fixed coordinate system information (ECEF) of the first tower is denoted as , and the transformation matrix of the remaining towers relative to the first tower is calculated.

[0174] The GIM model includes a plurality of tower corresponding device models, and the transformation matrix of the other towers relative to the first tower is obtained based on the first tower as a reference :

[0175]

[0176] wherein, is the inverse of the transformation matrix of the Earth-Centered Earth-Fixed coordinate system information of the first tower.

[0177] Step S4: obtaining a second dependency relationship between the glb models, the second dependency relationship being the same as the first dependency relationship between the device models corresponding to the glb models.

[0178] Step S5: saving the second dependency relationship between all or part of the glb models in a second multi-tree, combining the glb models and corresponding tile data to generate a 3D Tiles model corresponding to the GIM model, and publishing and visualizing the 3D Tiles model.

[0179] In some embodiments of the present embodiment, the 3D Tiles model is a JSON file, and the JSON file includes metadata and an object tree for describing the hierarchy, spatial structure and loading mode of the entire 3D scene, which specifies the spatial range, error, transformation matrix and other data of each tile data. Each tile data can include its own content, or can determine whether to load the next level of tile data according to the camera position, to realize LOD (Level of Detail) control.

[0180] Among them, a 3D Tiles model mainly consists of the following parts:

[0181] tileset.json: an entry file describing the scene hierarchy and spatial structure;

[0182] root→children: a spatial indexing structure constituting the second multi-tree;

[0183] boundingVolume.box: used for spatial clipping to improve performance;

[0184] Geometric Error: determines the LOD switching strategy.

[0185] Homogeneous transformation matrix: locates the spatial position of each glb model.

[0186] content.uri: points to the actual data content, which is the glb model file.

[0187] According to the parsed tree structure, and the calculated homogeneous transformation matrix of each node, bounding volume (boundingVolume.box) for spatial clipping, and geometric error (GeometricError) for calculating screen space error, a 3D tiles model with hierarchical structure is generated.

[0188] In some embodiments of the present embodiment, the 3D Tiles model uses version 1.1, which can directly reference the generated glb model without additional conversion, and directly writes the fam attribute of each node into the metadata metadata of the 3D Tiles model, which avoids the problem of loss of model attribute information. Specifically, a set of attributes that the metadata instance has are defined, including name (name), type (type), glb model (model), and style attribute (defaultAttr), wherein defaultAttr is a string array used to save the fam attribute of the GIM model.

[0189] In some embodiments of the present embodiment, the generated 3D Tiles model is published to a data service, and the GIM model can be visualized on the web side by combining Cesium and level of detail (LOD) technology. By using multi-level cache to avoid repeated loading and rendering of the same data, the performance is improved.

[0190] In summary, by converting the GIM model into a 3D Tiles model, using data flow technology to dynamically adjust the detail level of the 3D Tiles model according to the camera position and height, and loading and unloading data on demand, the data transmission amount and loading time are minimized, and the performance problem caused by loading too much data at once is avoided. The problem of too large GIM model data that cannot be directly displayed on the web side in a lightweight manner is solved.

[0191] The 3D Tiles model structure is strictly constructed according to the hierarchical relationship of the GIM model, and the corresponding fam attribute information is written into the metadata metadata of the corresponding node, completely retaining the hierarchy and attribute information of the GIM model, and preserving the original model's geographic spatial information, topological relationship, and attribute data during the conversion process.

[0192] Through a series of coordinate system conversion and matrix transformation, each model is accurately placed in its corresponding position, avoiding model position and posture deviation caused by different coordinate systems.

[0193] According to the second aspect of the present application, the embodiment provides a visualization loading optimization device based on a State Grid GIM model, the device comprises:

[0194] The acquisition module is configured to acquire all device models in the GIM model and a first dependency relationship between the device models according to a hierarchical structure of the GIM model, and save the first dependency relationship between all or part of the device models in a first multi-way tree.

[0195] The glb model generation module is configured to generate glb models corresponding to the device models.

[0196] The tile data generation module is configured to combine a bounding box and a geometric metric error of the glb models to generate tile data corresponding to the glb models.

[0197] The relationship conversion module is configured to acquire a second dependency relationship between the glb models, the second dependency relationship being the same as the first dependency relationship between the device models corresponding to the glb models.

[0198] The 3D Tiles model generation module is configured to save the second dependency relationship between all or part of the glb models in a second multi-way tree, combine the glb models and the corresponding tile data, and generate a 3D Tiles model corresponding to the GIM model, and publish and visualize the 3D Tiles model.

[0199] According to the third aspect of the present application, the embodiment provides a computer readable storage medium having a computer program stored thereon, the computer program comprising executable instructions, when the executable instructions are executed by a processor, the method described above is implemented.

[0200] The present invention can implement all or part of the processes in the above methods, or it can be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content contained in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0201] According to a fourth aspect of this application, an electronic device is provided, comprising:

[0202] One or more processors;

[0203] Memory is used to store executable instructions for the processor, which, when executed by one or more processors, cause one or more processors to implement the methods described above.

[0204] Electronic devices are manifested in the form of general-purpose computing devices. Components of an electronic device may include, but are not limited to: at least one processor, at least one memory, and a bus connecting different device components (including memory and processor).

[0205] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the computer device, connecting all parts of the computer device through various interfaces and lines.

[0206] The memory can be used to store computer programs and / or modules, and the processor realizes various functions of the computer device by running or executing the computer programs and / or modules stored in the memory, and calling data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store application programs required by the operation device, at least one function (such as a sound playing function, an image playing function, etc.); and the data storage area can store data created according to the use of the mobile phone (such as audio data, video data, etc.). In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state memory devices.

[0207] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, device, server or computer program product. Therefore, the present application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage and memory, etc.) containing computer usable program codes.

[0208] The present application is described with reference to flowcharts and / or block diagrams of methods, devices (apparatuses), servers and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one flow or multiple flows and / or blocks Figure 1 The functions specified in one flow or multiple flows and / or blocks

[0209] These computer program instructions can also be stored in a computer readable memory capable of guiding a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer readable memory produce a product including instruction devices, which realize the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one flow or multiple flows and / or blocks Figure 1 The functions specified in one flow or multiple flows and / or blocks

[0210] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 Figure 1

[0211] It should be understood that the sequence of the steps in the above-described embodiments does not mean the order of execution, and the execution order of the processes should be determined according to the functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0212] In the above-described embodiments, the description of each embodiment has its own focus, and the parts not described or recorded in a certain embodiment can be referred to the relevant description of other embodiments.

[0213] The above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can still be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.​​

Claims

1. A method for visual loading tuning based on a State Grid GIM model, characterized in that, The method comprises the following steps: According to the hierarchy of the GIM model, all device models in the GIM model and the first dependency relationship between the device models are obtained, and the first dependency relationship between all or part of the device models is saved in a first multi-way tree; Generate the glb model corresponding to the device model; Merge the bounding box and geometric metric error of the glb model to generate the tile data corresponding to the glb model: Generate the bounding box of the glb model, specifically: constructing a hexahedron AABB box corresponding to the grid in the glb model, the matrix of corner points of the hexahedron AABB box is: wherein, is a minimum x-coordinate of a hexagonal AABB box, is a minimum y-coordinate of a hexagonal AABB box, is a minimum z-coordinate of a hexagonal AABB box, is a maximum x-coordinate of a hexagonal AABB box, is a maximum y-coordinate of a hexagonal AABB box, is a maximum z-coordinate of a hexagonal AABB box; According to the world transformation matrix The hexahedral AABB box is transformed to world space, then the world space matrix is: ignoring the homogeneous component, retaining the first three columns of coordinates of the world space matrix, resulting in a world corner matrix of the hexahedral AABB box : wherein represents a programmed symbol, for taking the first three columns and removing the homogeneous component; stacking world corner matrices of all the hexahedral AABB boxes, obtaining a matrix corresponding to the bounding box of the glb model : wherein, is the world corner matrix for the sixth hexahedral AABB box. obtaining a maximum coordinate matrix of the bounding box in a three-dimensional space and a minimum coordinate matrix : wherein denotes a substitution operate on columns; Obtaining a coordinate matrix of a bounding box center point : wherein, , , are the horizontal, vertical and vertical coordinates of the bounding box center point, respectively; Obtaining a half-size matrix of bounding boxes : wherein, , , are the distance of the bounding box along the X direction from the center to the border, the distance of the bounding box along the Y direction from the center to the border, the distance of the bounding box along the Z direction from the center to the border, respectively. Bounding box based on a coordinate matrix of a center point of the bounding box and a half-size matrix : The rendering engine determines whether the glb model is in the current camera view frustum by the bounding box. If the bounding box is completely outside the view frustum, skip loading and rendering the glb model; Setting the distance from the camera in the 3D Tiles model to the center of the bounding sphere to be the half-size radius of the bounding box, obtaining the geometric error of the glb model The calculation formula is: wherein, is the pixel height of the region being drawn, is the vertical field of view angle of the camera in the 3D Tiles model, is the distance from the camera to the center of the bounding sphere in the 3D Tiles model, is the screen error threshold for the camera in the 3D Tiles model, , , are the half-size length, width, and height of the bounding box, respectively; In the first multi-way tree, the geometric metric error of the parent node represents the detail gap between the device model of the parent node and the device model of the leaf node. The larger the geometric metric error of the parent node, the earlier the replacement. The smaller the geometric metric error of the parent node, the later the replacement; Obtain the second dependency relationship between the glb models, which is the same as the first dependency relationship between the device models corresponding to the glb models; Save the second dependency relationship between all or part of the glb models in a second multi-way tree, combine the glb models and the corresponding tile data, and generate a 3D Tiles model corresponding to the GIM model. Publish and visualize the 3D Tiles model.

2. The method of visualizing loading tuning based on a national power grid GIM model of claim 1, wherein, The method for generating the glb model corresponding to the device model comprises the following steps: Through a 3D modeling software, the three-dimensional mesh data of the device model is constructed by drawing points, lines and surfaces according to geometric algorithms, the glb model corresponding to the device model is generated, the glb models are classified according to model types, and the glb models are compressed and optimized using the Draco algorithm.

3. The method of visualizing loading tuning based on a national power grid GIM model of claim 1, wherein, Before the bounding box and the geometric metric error of the glb model are merged to generate the tile data corresponding to the glb model, the following steps are further included: Extract the geographic coordinate system information of the device model and convert it into the geocentric coordinate system information of the 3D Tiles model. The specific method is: extracting geographic coordinate system information of the device model, the geographic coordinate system information including latitude , longitude , elevation , north direction angle ; According to Obtaining the translation vector corresponding to the information of the earth-centered earth-fixed coordinate system The calculation formula is: wherein, is a first eccentricity, is an ellipsoid radius of curvature, represents a translation amount in the X direction, represents a translation amount in the Y direction, represents a translation amount in the Z direction; The square of the first eccentricity and the ellipsoidal radius of curvature are calculated by the formulas wherein is the radius of the Earth's equator, is the flattening; Obtaining a local rotation matrix around the z-axis : wherein is the north direction angle in radians; Obtaining a rotation matrix : wherein, is an eastward unit vector, is a northward unit vector, is a skyward unit vector; Obtaining a combined rotation matrix : Obtaining a homogeneous transformation matrix : ; Based on the homogeneous transformation matrix, the geographic coordinate system information of the device model is converted into the geocentric coordinate system information of the 3D Tiles model.

4. The method of visualizing loading tuning based on a national grid GIM model according to claim 3, wherein, Further comprising: The GIM model comprises a plurality of tower corresponding device models, and a transformation matrix of other towers relative to a first tower is obtained based on the first tower : wherein is the inverse of the transformation matrix for the first tower's ECEF coordinate system information.

5. The method for visualizing loading tuning based on the GIM model of the national power grid according to claim 1, characterized in that, Further comprising: Obtain the fam attribute of the device model corresponding to the glb model, and write the fam attribute into the metadata of the 3D Tiles model.

6. A device for visual loading tuning based on the State Grid GIM model, applied to the method of any one of claims 1-5, characterized in that, The device comprises: An acquisition module is configured to obtain all device models in a GIM model and a first dependency relationship between the device models according to a hierarchy of the GIM model, and save the first dependency relationship between all or part of the device models in a first multi-way tree; A glb model generation module is configured to generate a glb model corresponding to the device model; A tile data generation module is configured to merge a bounding box and a geometric metric error of the glb model to generate tile data corresponding to the glb model; A relationship conversion module is configured to obtain a second dependency relationship between the glb models, which is the same as the first dependency relationship between the device models corresponding to the glb models; 3D Tiles model generation module, configured to save second dependency relationships between all or part of the glb models in a second multi-tree, generate a 3D Tiles model corresponding to the GIM model in combination with the glb model and corresponding tile data, and publish and visualize the 3D Tiles model.

7. A computer readable storage medium having stored thereon a computer program, characterized in that The computer program comprises executable instructions which, when executed by a processor, implement the method of any one of claims 1-5.

8. An electronic device, comprising: Comprise: one or more processors; a memory for storing executable instructions of the processor, which, when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.

Citation Information

Patent Citations

  • LOD-based BIM model lightweight construction and display method

    CN114283231A

  • Lightweight conversion and visualization method based on state grid GIM model

    CN118839453A

  • Construction method of 3D Tiles data structure

    CN120277165A