A lightweight conversion and visualization method based on the State Grid GIM model
The method addresses the inefficiencies in GIM to BIM model conversion by constructing data dictionaries and reorganizing tree structures, enabling efficient and real-time visualization of electric power grid projects, enhancing data usability and processing speed.
Patent Information
- Application Number
- CN202410897459.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-07-05
AI Technical Summary
The existing GIM models for electric power grids are not easily convertible to BIM models due to differences in formatting, leading to software dependency and inefficiencies in data processing, which affects the real-time and usability of GIM model conversions in electric power engineering projects.
A method for converting GIM models into BIM models using a lightweight and visualized approach, involving data dictionary construction, multi-processing component modeling, and tree structure reorganization, with optional steps like data compression and visualization using open standards like glTF and Three.js for web-based rendering.
This method enables efficient and lossless conversion of GIM models to BIM, improving data usability and visualization, reducing processing time, and allowing for real-time web-based visualization of electric power grid projects.
Smart Images

Figure CN118839453B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid model-aided design, and in particular to a lightweight conversion and visualization method based on a State Grid GIM model. Background Art
[0002] In order to meet the needs of data transmission and sharing of three-dimensional design results of power transmission and transformation projects in planning, design, construction, operation and maintenance, the power grid has launched a digital interactive standard format, namely the grid information model (GIM), which is a customized standard structure for the power industry. More and more power transmission and transformation projects are modeled using the GIM standard, which has brought significant improvements to the business management of the power grid.
[0003] The construction standard of GIM follows the power grid coding specification. Its GIM format is different from the building information model BIM and cannot be directly called by most general platforms. It needs to be equipped with special software for processing. In addition, power grid projects include two types: substation projects and transmission projects. The existing GIM conversion software has poor adaptability to different power grid projects, making the power grid GIM model dependent on specific software. In addition, the processing and conversion process of the GIM model with a large data scale is very time-consuming, affecting the real-time and availability of the conversion process.
[0004] Therefore, in view of the above situation, a lightweight conversion and visualization method based on the State Grid GIM model is proposed. By rationally combing the data dictionaries of different power grid projects of the hierarchical structure components of the model, physical modeling and preservation of power devices or settings are carried out in parallel. This is very necessary to achieve lossless and rapid conversion of the GIM model to the BIM model and real-time visualization display on the WEB side. Summary of the invention
[0005] In view of this, the present invention proposes a conversion method between a power grid model and a general model, which is suitable for 1:1 lossless restoration of transmission lines and substation projects. It adopts a grid sharing mechanism to improve the lightweight conversion and visualization method based on the State Grid GIM model with excessive construction data volume of reused components.
[0006] The present invention provides a lightweight conversion and visualization method based on the State Grid GIM model, comprising the following steps:
[0007] S1: parse GIM model data and build data dictionary;
[0008] S2: For the power components used in the power grid project, a multi-process deduplication power component model is constructed;
[0009] S3: Obtain a hierarchical tree structure containing several nodes according to the data dictionary;
[0010] S4: Based on the hierarchical tree structure, the power component model is called to reorganize the model of the power grid project from bottom to top;
[0011] S5: Lightweight optimization of the reorganized power grid project model;
[0012] S6: Preview and save the optimized reorganized power grid project model.
[0013] On the basis of the above technical solution, preferably, the specific content of step S1 is, after obtaining the *.GIM power transmission and transformation project three-dimensional design model data interaction file, identifying the power project type corresponding to the first sixteen bytes of *.GIM, and obtaining the data of the storage domains of different power project types respectively; according to the different power project types, decompressing the data of the storage domains respectively;
[0014] After decompression is completed, the storage domain data is parsed into the same data dictionary according to the hierarchical association relationship of the power engineering project. Each object of the power engineering project corresponds to a power component. In the data dictionary, the levels of the power engineering project are arranged from high to low and the object numbers of the same level are arranged from small to large. For all objects at each level, a key-value pair is used to construct the attribute information of the current object and the reference relationship with non-current objects, so as to obtain a data dictionary of all objects in the engineering tree structure with a hierarchical association relationship.
[0015] Preferably, the storage domain data is parsed into the same data dictionary according to the hierarchical association relationship of the power engineering project, and the engineering model directory CBM, the physical model directory DEV, the combination model directory PHM and the geometric model directory MOD are obtained by decompression; several *.cbm files under the engineering model directory CBM are read, wherein the project.cbm file is the file entry of the entire GIM model, and the non-project.cbm files correspond to the five-level systems of the power engineering project, namely, F1System, F2System, F3System, F4System and the component level, and each level corresponds to an attribute file *.fam. The parsing process is according to the five levels and the corresponding attribute files, and the levels of the objects at each level, the assembly models, physical models, combination models, geometric models and attributes involved are sorted in order respectively to obtain the corresponding json files of the objects at each level, and a complete data dictionary is formed through the json files corresponding to multiple objects in list form.
[0016] Preferably, the specific content of step S2 is to identify the unique uuid of the power component corresponding to the object, eliminate the repeated identical power components, establish power component models for different power components respectively, and update the type and quantity of power component models associated with each object in the data dictionary; different power component models are generated in a multi-process parallel manner.
[0017] Further preferably, the power grid project includes a line project and a substation project;
[0018] For line engineering, the power component model is established by introducing the STL model of external sources, parameterized pole tower and foundation model; the STL model of external sources is imported using the API provided by the open source 3D modeling software Blender; for the parameterized pole tower, the rendering range is determined according to the call height during construction; for the foundation model, the outline of the foundation model is defined by the basic control parameters;
[0019] For substation projects, the power component model is constructed by performing Boolean operations on different graphics. By using the API provided by Blender to encapsulate the logic of Boolean operations and inputting the model parameters of the substation project, the graphics required to be constructed can be obtained. The obtained graphics are matrix transformed to complete the construction of the power component model of the substation project.
[0020] The power component model constructed above is stored in the dictionary, the file name of the power component model is key, and the value is the parameter of the constructed power component model; the mesh data of the power component model is extracted and saved in the dictionary to form a one-to-one correspondence between key-value-mesh data. The power component model has custom attributes. After the power component model is built, the content of the attribute file *.fam corresponding to the object is written into the custom attribute; the longitude and latitude of the object corresponding to the power component model is converted into specific spatial coordinates through matrix transformation or Mercator projection algorithm to confirm the position of the power component model in the world coordinate system.
[0021] Further preferably, the specific content of step S3 is to construct a hierarchical tree structure corresponding to five levels according to the relationship from high to low of each level, and the hierarchical tree structure includes a number of nodes, and the nodes of the same level are located at the same layer of the hierarchical tree structure; each node corresponds to the content of a json file of an object; according to the combination of each node having a corresponding power component model, add reference relationships to different power component models.
[0022] Further preferably, the specific content of step S4 is, after completing the construction of the power component model and writing the attributes, using the number and reference relationship of different power component model configurations of the object configuration corresponding to the node, to construct a non-bottom-level combination model of the hierarchical tree structure, and according to the positional relationship of the individual power component models, assemble the non-bottom-level combination models, so as to obtain the combination models corresponding to the nodes of each level of the hierarchical tree structure step by step.
[0023] Further preferably, the specific content of step S5 is to use the export function of blender to export the power component model of the completed substation project and each power component model after the content of the property file *.fam is written into a glTF file, and the Draco algorithm is used to optimize and compress the power component model to reduce the size of the power component model.
[0024] In further preferred embodiments, the specific content of step S6 is to use the open source 3D engine Three.js to visualize the glTF file obtained by exporting the power component model in step 5, use the GPU picking technology supported by it to render graphics in a web browser, and add the mouse response time. When the mouse clicks on the power component model, the custom properties of the power component model are interactively popped up; the power component model is saved and stored in a classified manner according to the category of the object.
[0025] Preferably, the same power component model shares the same mesh data; to determine whether it is the same power component model, the hash value of the mesh mesh data contained in the power component model is calculated to determine whether the mesh mesh data is the same. If the mesh mesh data is the same, the same power component model is used, and the reference relationship of the model of the adaptation object is adapted; the hash value of the mesh mesh data contained in the power component model is calculated by the following method: first, the mesh mesh data of a certain power component model is converted into a tuple, and the hash value of the elements in each tuple is recursively calculated. The floating point value corresponding to a single element is calculated by the formula hash(t i )=hash[int_from_IEEE754(t i )] to a floating point hash value, where int_from_IEEE754(t i ) means converting IEEE754 floating point numbers into corresponding integer operations. i is the i-th element in the tuple, i = 0, 1, 2, 3, ..., n-1; then combine these hash values and take the modulus 31 is the hash base.
[0026] The lightweight conversion and visualization method based on the State Grid GIM model provided by the present invention has the following beneficial effects:
[0027] (1) The present invention proposes a conversion and visualization method for converting a power grid-specific GIM model into a general model. The method constructs a data dictionary by decompressing and extracting hierarchical association relationships, and reconstructs a general parameterized power component model. The power component model is used to reconstruct the model of the power grid project, and the hierarchical and attribute relationships corresponding to the ifc model are retained, thereby avoiding the loss of GIM model attributes during the model reconstruction process. The model of the power grid project can be previewed normally on the WEB side, thereby improving the inconvenience of previewing and using the GIM model and improving the availability and versatility of data.
[0028] (2) Power component model: Use the export function of blender to export the power component model into a glTF file, and then use the Draco algorithm to optimize and compress the power component model, which reduces the size of the power component model, improves the speed of displaying the model and rendering, and reduces the waiting time; glTF is an open standard format for 3D;
[0029] (3) Power component models with the same structure share a set of mesh data, which can not only ensure the efficiency of power component model construction, but also reduce the number of power component models that need to be saved, and further lightweight the power component model without the need to re-construct each power component model. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 A schematic diagram of a lightweight conversion and visualization method based on the State Grid GIM model of the present invention;
[0032] Figure 2 A schematic diagram of mesh data of a rotating ellipsoid of a lightweight conversion and visualization method based on the State Grid GIM model of the present invention;
[0033] Figure 3 The present invention discloses a reference relationship diagram of a power component model of a hierarchical tree-structured object based on a lightweight conversion and visualization method of a State Grid GIM model. DETAILED DESCRIPTION
[0034] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0035] like Figure 1 As shown, the present invention provides a lightweight conversion and visualization method based on the State Grid GIM model, which specifically includes the following steps:
[0036] S1: Parse GIM model data and build a data dictionary.
[0037] Specifically, after obtaining the *.GIM transmission and transformation project three-dimensional design model data interaction file, identify the power project type corresponding to the first sixteen bytes of *.GIM, and obtain the data of the storage domains of different power project types; according to the different power project types, decompress the data of the storage domains respectively. The first sixteen bytes of *.GIM correspond to the project identifier, such as GIMPKGT is the identifier of the line project, and GIMPKLGS is the identifier of the substation project.
[0038] After decompression is completed, the storage domain data is parsed into the same data dictionary according to the hierarchical association relationship of the power engineering project. Each object of the power engineering project corresponds to a power component. In the data dictionary, the levels of the power engineering project are arranged from high to low and the object numbers of the same level are arranged from small to large. For all objects at each level, a key-value pair is used to construct the attribute information of the current object and the reference relationship with non-current objects, so as to obtain a data dictionary of all objects in the engineering tree structure with a hierarchical association relationship.
[0039] Among them, the storage domain data is parsed into the same data dictionary according to the hierarchical association relationship of the power engineering project, which is obtained by decompression of the engineering model directory CBM, the physical model directory DEV, the combined model directory PHM and the geometric model directory MOD; the engineering model directory CBM stores the engineering model files *.cbm and the engineering model attribute files; the physical model directory DEV stores the physical model files *.dev, the logical model files *.sch and the physical model attribute files; the combined model directory PHM stores the model combination files *.phm; the geometric model directory MOD stores the geometric model group files *.mod and *.stl.
[0040] Read several *.cbm files under the engineering model directory CBM, among which the project.cbm file is the file entry of the entire GIM model, and the non-project.cbm files correspond to the five-level systems of the power engineering, namely F1System, F2System, F3System, F4System and component level. Each level corresponds to an attribute file *.fam. The parsing process is based on the five levels and the corresponding attribute files. The levels of the objects at each level, the assembly models, physical models, combination models, geometric models and attributes involved are sorted in order to obtain the corresponding json files of the objects at each level, and a complete data dictionary is formed through the json files corresponding to multiple objects in list form.
[0041] The five-level system may have different names for different projects:
[0042] For substation projects: F1System corresponds to engineering level; F2System corresponds to professional level; F3System corresponds to system (area) level; F4System corresponds to equipment (facility) level; component level corresponds to the lowest level.
[0043] For line engineering, the five levels are:
[0044] F1System: Project / Bidding Section;
[0045] F2System: tension segments and all objects between tension towers;
[0046] F3System: Tower level, objects corresponding to a tower position and its large or small side and its accessories;
[0047] F4System: Model level, such as tower, hardware string, foundation and conductor objects;
[0048] Component level: specific object level, such as tower head, tower body, tower legs, hardware, insulators, steel strands, spacers and anti-vibration hammers.
[0049] Extract the reference relationships at each level from the engineering model file *.cbm.
[0050] Taking the points, lines and surfaces of a rotating ellipsoid as an example, the data format of the geometric model group file mod corresponding to this structure is as follows:
[0051] <Entity ID="4"Type="simple"Visible="false">
[0052] <RotationalEllipsoid LR="80"WR="60"H="60" / >
[0053] <Color R="255"G="255"B="255"A="0" / >
[0054] <TransformMatrixValue="6.12323399573677E-17,-5.36245139718935E-17,1,0,5.36245139718935E-17,1,5.36245139718934E-17,0,-1,5.36245139718934E-17,6.12323399573677E-17,0,-102.05,24.45,-167.499899384499,1" / >
[0055]
[0056] The above data is converted into the data dictionary as follows. Under the premise of retaining the data information, the corresponding data can be accessed more easily. The polar radius LR, equatorial radius WR and cross-sectional height H of the rotating ellipsoid are all retained in the form of key-value pairs:
[0057] {
[0058] "ID":"4",
[0059] "Type":"simple",
[0060] "Visible":"false",
[0061] "RotationalEllipsoid":{
[0062] "LR":"80","WR":"60","H":"60"
[0063] },
[0064] "Color":{
[0065] "R":"255","G":"255","B":"255","A":"0"
[0066] },
[0067] "TransformMatrix":{
[0068] "Value":
[0069] "6.12323399573677E-17,-5.36245139718935E-17,1,0,5.36245139718935E-17,1,5.36245139718934E-17,0,-1,5. 36245139718934E-17,6.12323399573677E-17,0,-111.304297968963,-0.549999999999997,-208.939723918284,1"
[0070] }
[0071] }.
[0072] S2: For the power components used in the power grid project, a multi-process deduplicated power component model is constructed.
[0073] The specific content is to identify the unique uuid of the power component corresponding to the object, eliminate the repeated identical power components, establish power component models for different power components, and update the type and number of power component models associated with each object in the data dictionary. In order to simplify the workload of building the power component model, deduplication processing is adopted, that is, power components with the same specifications are modeled only once, and when the power component model is needed later, it does not need to be rebuilt, but only referenced.
[0074] The construction of the power component model is based on the API provided by the open source 3D modeling software Blender, and different power component models are generated simultaneously through different multi-channel parallel processes, which can improve the efficiency of the construction of the power component model. The power grid project includes line engineering and substation engineering. The specific content of the establishment process of the power component model of different power grid projects is;
[0075] For line engineering, the power component model is established by introducing STL models from external sources, parameterized poles and base models; for STL models from external sources, the API provided by the open source 3D modeling software blender is used for import; for parameterized poles, the rendering range is determined according to the call height during construction; for the base model, the outline of the base model is defined by basic control parameters. The STL model is a 3D model format that only describes the geometric shape of the surface of a three-dimensional object and has no attributes such as color and material mapping. The STL model uses subdivided mesh patches to represent the geometric information of the object. The 3D modeling software blender is used for powerful modeling, animation and material rendering capabilities, is highly customizable, and supports real-time preview, which is convenient for iteration and optimization of the model. The basic control parameters can be customized. It can also be obtained by referring to the following method for obtaining mesh data.
[0076] Taking the pole tower as an example, the pole tower components include angle steel, equal-diameter steel pipes, and tapered steel pipes. The angle steel needs to confirm its angle, length, width, and thickness based on the provided X-limb direction, Y-limb direction, and specifications. The mod file of a pole tower may contain tower bodies of different heights. During construction, it is necessary to determine which data of the tower body needs to be rendered based on the height.
[0077] If an STL model from an external source is used to construct a non-tower power component model, the STL model is used directly and the mesh data of the STL model is saved. If an STL model from an external source is not used to construct a non-tower power component model, the power component model is constructed based on the acquisition of the parameterized basic mesh.
[0078] For substation projects, the power component model is constructed by performing Boolean operations on different graphics elements. By using the API provided by Blender to encapsulate the logic of Boolean operations and inputting the model parameters of the substation project, the graphics elements that need to be constructed can be obtained. The obtained graphics elements are transformed into matrices to complete the construction of the power component model of the substation project.
[0079] For IFC models, the open source tool IfcConvert is used to convert the model into a glb model and an xml file. The xml file retains the internal hierarchical relationship of the IFC model and the attributes of the model objects. The converted glb model is imported and rendered through the blender API, and then the xml file is parsed to restore the hierarchical relationship and attributes of the IFC model.
[0080] Still taking the rotating ellipsoid as an example, when reconstructing the electric power component model of the rotating ellipsoid, it is necessary to construct the coordinates of the points on the surface of the rotating ellipsoid, and then construct the surface according to the coordinates of the points on the surface of the rotating ellipsoid, so as to obtain the mesh data of the rotating ellipsoid.
[0081] To calculate the coordinates of a point on the surface of a rotating ellipsoid, you need to get the zenith angle θ and the azimuth angle Assuming that the rotating ellipsoid is divided into v = 32 segments in the horizontal direction and u = 64 segments in the vertical direction, the zenith angle and azimuth angle are:
[0082]
[0083] Then the coordinates of each specific point on the surface of the rotating ellipsoid are calculated by the polar radius LR and the equatorial radius WR: z0=WR×cosθ. The coordinates of 32×64 points on the surface of the rotating ellipsoid are obtained by calculation, a rectangular plane is constructed through every four neighboring points, and the geometric figures are cut along the rectangular plane according to the cross-cutting height H. The standard ellipsoid is cut into the required mesh model, and the mesh model and the coordinates of the points on the surface of each rotating ellipsoid are saved, which is the corresponding mesh data.
[0084] The power component model of the substation project is usually obtained by Boolean operations and combinations of some regular basic graphics elements and irregular complex graphics elements, and then matrix transformation operations are performed to obtain the power component model.
[0085] The power component model constructed above is stored in the dictionary, the file name of the power component model is key, and the value is the parameter of the constructed power component model; the mesh data of the power component model is extracted and saved in the dictionary to form a one-to-one correspondence between key-value-mesh data. The power component model has custom attributes. After the power component model is built, the content of the attribute file *.fam corresponding to the object is written into the custom attribute; the longitude and latitude of the object corresponding to the power component model is converted into specific spatial coordinates through matrix transformation or Mercator projection algorithm to confirm the position of the power component model in the world coordinate system.
[0086] The attribute file *.fam indicates the attribute information of the corresponding model. For example, the content of the *.fam file of the model corresponding to the optical fiber object is as follows:
[0087] 20DCRESISTANCE=20℃DC resistance=0.591;
[0088] CABLECONFIGURATIONMODE=cable configuration mode=0;
[0089] CAPACITYOFALLOWSHORTCIRCUITCURRENT=allowable short-circuit current capacity (40℃~200℃, 0.25s)=0;
[0090] COEFFICIENTOFELASTICITY=elasticity coefficient=162000;
[0091] CROSSSECTIONALAREA = cross-sectional area = 145.9;
[0092] EXPANSIONCOEFFICIENTOFWIRE = linear expansion coefficient = 13;
[0093] EXTERNALDIAMETER=Outer diameter=16.6;
[0094] OPTICALCABLECORENUMBER=number of optical cable cores=0.
[0095] The same power component model shares the same mesh data; to determine whether it is the same power component model, the hash value of the mesh data contained in the power component model is calculated to determine whether the mesh data is the same. If it is the same, the same power component model is used, and the reference relationship of the model of the adaptation object is adapted; the hash value of the mesh data contained in the power component model is calculated by the following method: first, the mesh data of a certain power component model is converted into a tuple, and the hash value of the elements in each tuple is recursively calculated. The floating-point value corresponding to a single element is calculated by the formula hash(t i )=hash[int_from_IEEE754(t i )] to a floating point hash value, where int_from_IEEE754(t i ) means converting IEEE754 floating point numbers into corresponding integer operations. i is the i-th element in the tuple, i = 0, 1, 2, 3, ..., n-1; then combine these hash values and take the modulus 31 is the hash base.
[0096] The position of the power component model in the world coordinate system is obtained through matrix transformation because the spatial coordinate system of the GIM model is the Z-Up coordinate system, and the spatial transformation matrix of the reconstructed power component model is the Y-Up coordinate system. When the objects at each level are reorganized, the model needs to be transformed in the coordinate system. The conversion from the Z-Up coordinate system to the Y-Up coordinate system involves appropriate transformations of displacement, scaling, and rotation. This is because the axial directions between the two different coordinate systems are not exactly the same, so a transformation process is needed to adjust the positioning and direction of the object to maintain the consistency of the object's appearance and direction. When reconstructing the power component model, it is necessary to save the spatial transformation matrix of itself and each child node.
[0097] The specific content is to decompose the transformation matrix into translation vector, scaling vector and rotation quaternion. Quaternion is a common way to represent rotation in 3D graphics. The following transformation is applied to convert the corresponding Z-Up transformation into Y-Up transformation:
[0098] 1. Displacement
[0099] When converting from the Z-Up coordinate system to the Y-Up coordinate system, the displacement vector needs to adjust its component values. Specifically, the displacement vector of the Z-Up coordinate system is: T = [X, Y, Z] → the displacement vector after Y-Up conversion becomes: T = [X, Z, -Y].
[0100] 2. Zoom
[0101] The conversion of the scaling vector is similar to the processing of displacement, and the components need to be adjusted. Since scaling only changes the size of the object without changing its direction, it is only necessary to exchange the scaling values of the corresponding axes: Scaling vector of the Z-Up coordinate system: S = [Sx, Sy, Sz] → The scaling vector after conversion of the Y-Up coordinate system becomes: S = [Sx, Sz, Sy].
[0102] 3. Rotation
[0103] The rotation here is expressed in quaternion rotation: the scaling vector of the Z-Up coordinate system: [Qw, Qx, Qy, Qz] → the scaling vector after conversion in the Y-Up coordinate system becomes: [Qx, Qz, -Qy, Qw]. Finally, the Y-Up translation, scaling and rotation are obtained.
[0104] The Mercator projection algorithm is based on the entire world, with the equator as the standard latitude and the prime meridian as the central meridian. The intersection of the two is the coordinate origin, with east and north being positive and west and south being negative. The formula for converting longitude and latitude (λ, Φ) to projection coordinates (x, y) is:
[0105] Where R is the radius of the Earth.
[0106] S3: Obtain a hierarchical tree structure containing a number of nodes based on the data dictionary.
[0107] According to the relationship from high to low of each level, a hierarchical tree structure corresponding to five levels is constructed. The hierarchical tree structure contains several nodes, and the nodes of the same level are located at the same layer of the hierarchical tree structure; each node corresponds to the content of a json file of an object; according to the combination of each node with the corresponding power component model, reference relationships to different power component models are added, and the reference relationships come from the *.cbm file.
[0108] S4: Based on the hierarchical tree structure, the power component model is called to reorganize the model of the power grid project from bottom to top.
[0109] The specific content is that after completing the construction and attribute writing of the power component model, the number and reference relationship of different power component model configurations of the object configuration corresponding to the node are used to construct a non-bottom-level combination model of the hierarchical tree structure, and according to the position relationship of each power component model, the non-bottom-level combination model is assembled and assembled, thereby obtaining the combination model corresponding to the nodes of each level of the hierarchical tree structure step by step. This application converts the relevant power component model in the GIM model into a glTF model, and reorganizes it into a model of the power grid project through the combination of multiple glTF models.
[0110] S5: Lightweight optimization of the reorganized power grid project model.
[0111] The specific content is to use the export function of blender to export the power component model of the completed substation project and the power component model after the content of the attribute file *.fam is written into the power component model, and the power component model is optimized and compressed using the Draco algorithm to reduce the size of the power component model. The glTF file is an open standard format for 3D and has good versatility.
[0112] S6: Preview and save the optimized reorganized power grid project model.
[0113] Specifically, the glTF file obtained by exporting the power component model in step 5 is visualized using the open source 3D engine Three.js, and the GPU picking technology supported by it is used to render graphics in a web browser. At the same time, the mouse response time is added. When the mouse clicks on the power component model, the custom properties of the power component model are interactively popped up; the power component model is saved and stored in a classified manner according to the category of the object.
[0114] For the objects at the lowest level, only the corresponding single power component model needs to be saved.
[0115] For objects that are not at the bottom level, they are usually a combination of multiple power component models. The combined model needs to be split and then classified by category. The combined model and the split and classified power component models need to be saved separately. For transmission line projects, the model is split into eight categories: tower body, foundation, hardware, insulator, insulator string, conductor, spacer and shockproof hammer. There are multiple different models under each category. For substation projects, it is split into multiple categories such as transformers, capacitors, insulators, lightning arresters, current transformers, etc.
[0116] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A lightweight conversion and visualization method based on the State Grid GIM model, characterized in that: The steps include: S1: parse GIM model data and build data dictionary; S2: For the power components used in the power grid project, a multi-process deduplication power component model is constructed; S3: Obtain a hierarchical tree structure containing several nodes according to the data dictionary; S4: Based on the hierarchical tree structure, the power component model is called to reorganize the model of the power grid project from bottom to top; S5: Lightweight optimization of the reorganized power grid project model; S6: Preview and save the optimized reorganized power grid project model; The specific content of step S1 is that after obtaining the *.GIM power transmission and transformation project three-dimensional design model data interaction file, identifying the power project type corresponding to the first sixteen bytes of *.GIM, respectively obtaining the data of the storage domains of different power project types; decompressing the data of the storage domains respectively according to the different power project types; After decompression, the storage domain data is parsed into the same data dictionary according to the hierarchical association of the power engineering. Each object of the power engineering corresponds to a power component. In the data dictionary, the object numbers of the same level of the power engineering are from high to low, and the attribute information of the current object and the reference relationship with the non-current object are constructed in the form of key-value pairs for all objects at each level, so as to obtain a data dictionary of all objects in the engineering tree structure with hierarchical association. The specific content of step S2 is to identify the unique uuid of the power component corresponding to the object, eliminate the repeated identical power components, establish power component models for different power components, and update the type and number of power component models associated with each object in the data dictionary; different power component models are generated in a multi-process parallel manner; Power grid projects include line engineering and substation engineering; For line engineering, the power component model is established by introducing the STL model of external sources, parameterized pole tower and foundation model; the STL model of external sources is imported using the API provided by the open source 3D modeling software Blender; for the parameterized pole tower, the rendering range is determined according to the call height during construction; for the foundation model, the outline of the foundation model is defined by the basic control parameters; For substation projects, the power component model is constructed by performing Boolean operations on different graphics. By using the API provided by Blender to encapsulate the logic of Boolean operations and inputting the model parameters of the substation project, the graphics required to be constructed can be obtained. The obtained graphics are matrix transformed to complete the construction of the power component model of the substation project. The power component model constructed above is stored in the dictionary, the file name of the power component model is key, and the value is the parameter of the constructed power component model; the mesh data of the power component model is extracted and saved in the dictionary to form a one-to-one correspondence between key-value-mesh data. The power component model has custom attributes. After the power component model is built, the content of the attribute file *.fam corresponding to the object is written into the custom attribute; the longitude and latitude of the object corresponding to the power component model is converted into specific spatial coordinates through matrix transformation or Mercator projection algorithm to confirm the position of the power component model in the world coordinate system.
2. According to claim 1, a lightweight conversion and visualization method based on the State Grid GIM model is characterized in that: According to the hierarchical association of the power engineering project, the storage domain data is parsed into the same data dictionary, which is obtained by decompressing the engineering model directory CBM, the physical model directory DEV, the combined model directory PHM and the geometric model directory MOD; read several *.cbm files under the engineering model directory CBM, among which the project.cbm file is the file entry of the entire GIM model, and the non-project.cbm files correspond to the five-level systems of the power engineering project, namely F1System, F2System, F3System, F4System and component level, and each level corresponds to an attribute file *.fam. The parsing process is according to the five levels and the corresponding attribute files, and the levels of the objects at each level, the assembly models, physical models, combined models, geometric models and attributes involved are sorted in order respectively to obtain the corresponding json files of the objects at each level, and a complete data dictionary is formed through the json files corresponding to multiple objects in list form.
3. The lightweight conversion and visualization method based on the State Grid GIM model according to claim 1 is characterized in that: The specific content of step S3 is to construct a hierarchical tree structure corresponding to five levels according to the relationship from high to low of each level, and the hierarchical tree structure includes a number of nodes, and the nodes of the same level are located at the same layer of the hierarchical tree structure; each node corresponds to the content of a json file of an object; According to the combination of power component models corresponding to each node, reference relationships to different power component models are added.
4. The lightweight conversion and visualization method based on the State Grid GIM model according to claim 3 is characterized in that: The specific content of step S4 is that after completing the construction of the power component model and writing of the attributes, the number and reference relationship of different power component model configurations of the object configuration corresponding to the node are used to construct a non-bottom-level combination model of the hierarchical tree structure, and according to the positional relationship of the individual power component models, the non-bottom-level combination models are combined and assembled, so as to obtain the combination models corresponding to the nodes of each level of the hierarchical tree structure step by step.
5. The lightweight conversion and visualization method based on the State Grid GIM model according to claim 4 is characterized in that: The specific content of step S5 is to use the export function of blender to export the power component model of the completed substation project and the power component model after the content of the attribute file *.fam is written into the power component model into a glTF file, and use the Draco algorithm to optimize and compress the power component model to reduce the size of the power component model.
6. The lightweight conversion and visualization method based on the State Grid GIM model according to claim 5 is characterized in that: The specific content of step S6 is to use the open source 3D engine Three.js to visualize the glTF file obtained by exporting the power component model in step 5, use the GPU picking technology supported by it to render graphics in a web browser, and add the mouse response time. When the mouse clicks on the power component model, the custom properties of the power component model will pop up interactively; the power component model is saved and stored in a classified manner according to the category of the object.
7. The lightweight conversion and visualization method based on the State Grid GIM model according to claim 1 is characterized in that: The same power component model shares the same mesh data; to determine whether it is the same power component model, the hash value of the mesh data contained in the power component model is calculated to determine whether the mesh data is the same. If it is the same, the same power component model is used, and the reference relationship of the model of the adaptation object is adapted; the hash value of the mesh data contained in the power component model is calculated by the following method: first, the mesh data of a certain power component model is converted into a tuple, and the hash value of the elements in each tuple is recursively calculated. The floating-point value corresponding to a single element is calculated by the formula hash(t i )=hash[int_from_IEEE754(t i )] to a floating point hash value, where int_from_IEEE754(t i ) means converting IEEE754 floating point numbers into corresponding integer operations. i is the i-th element in the tuple, i = 0, 1, 2, 3, ..., n-1; then combine these hash values and take the modulus 31 is the hash base.
Citation Information
Patent Citations
Three-dimensional digital twinning business model conversion method based on GIM model
CN117593458A
Multidimensional structured data visualization method and apparatus, text visualization method and apparatus, method and apparatus for visualizing and graphically navigating the world wide web, method and apparatus for visualizing hierarchies
US20040090472A1