Compression storage method and system of transformer substation GIM model

By preprocessing, three-dimensional spatial division and eight-tree construction of the STL file of the substation GIM model, generating integer encoding and storing it in database, the problem of inefficiency of existing storage solutions is solved, and efficient and easy-to-manage GIM model storage is achieved.

CN119988320AInactive Publication Date: 2025-05-13湖南经研电力设计有限公司 +1

Patent Information

Application Number
CN202510198801.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-05-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing GIM model storage solution of substations has poor storage efficiency and takes up too much storage space, making it difficult to meet the data management needs of large substations.

Method used

By obtaining the STL file of the target GIM model for preprocessing, dividing the three-dimensional space and building an octree, generating integer encoding, and storing and indexing in the database, to realize the compressed storage of the substation GIM model.

Benefits of technology

It realizes efficient storage of the substation GIM model, improves storage efficiency and query performance, is easy to manage, greatly reduces storage space and query time, and reduces operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119988320A_ABST
    Figure CN119988320A_ABST
Patent Text Reader

Abstract

The invention discloses a compression storage method for a transformer substation GIM model. The compression storage method comprises the steps that an STL file of a target GIM model is acquired and preprocessed; dividing a three-dimensional space and constructing an octree; generating an integer code; and performing database storage and index construction to complete compression storage of the target GIM model. The invention also discloses a system for realizing the compression storage method of the transformer substation GIM model. According to the method, through preprocessing, three-dimensional space division, octree establishment and a corresponding coding scheme of the corresponding file of the model, compression storage of the transformer substation GIM model is achieved, the storage efficiency is high, the query performance is good, and management is convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of electrical automation, and in particular relates to a compression storage method and system for a substation GIM model. Background Art

[0002] With the development of economy and technology and the improvement of people's living standards, electricity has become an indispensable secondary energy source in people's production and life, bringing endless convenience to people's production and life. Therefore, ensuring the stable and reliable supply of electricity has become one of the most important tasks of the power system.

[0003] As a core component of the power system, the design, construction, operation and management of substations are crucial to the safe and stable operation of the power system. With the development of digital technology, the grid information model (GIM) of substations has become an important tool for power system planning, design, simulation and operation and maintenance. The GIM model uses three-dimensional modeling technology to accurately describe the physical structure, equipment layout and spatial relationship of the substation, providing important support for the visualization, analysis and decision-making of the power system.

[0004] A typical GIM model file contains four main folders: CBM, DEV, PHM, and MOD. Each folder contains a series of files of a specific type. *.cbm files are used to describe the structure of the model in the substation system, while *.dev files are used to describe the model equipment. Therefore, one *.cbm file can reference multiple *.dev files. *.stl files are used to describe the geometry of a specific component, and multiple components can be combined into an assembly, which is represented by a *.phm file. When *.cbm references *.dev, when *.dev references *.phm, and when *.phm references *.stl, the relative position relationship between the models will be defined.

[0005] At present, with the expansion of substation scale and the acceleration of refined management of power systems, the amount of data in GIM models has increased dramatically. A GIM model of a large substation may contain millions of triangular faces. At present, the commonly used storage solution for substation GIM models is to directly store STL files in relational databases (such as MySQL) or file systems. However, the storage efficiency of such solutions is poor and it takes up a lot of storage space. Summary of the invention

[0006] One of the purposes of the present invention is to provide a compression storage method for a substation GIM model which has high storage efficiency, good query performance and is easy to manage.

[0007] A second object of the present invention is to provide a system for implementing the compression storage method of the substation GIM model.

[0008] The compression storage method of the substation GIM model provided by the present invention comprises the following steps:

[0009] S1. Obtain the STL file of the target GIM model and perform preprocessing;

[0010] S2. According to the preprocessed file obtained in step S1, three-dimensional space division and octree construction are performed;

[0011] S3. Generate integer code according to the three-dimensional space divided by step S2 and the constructed octree;

[0012] S4. According to the integer code generated in step S3, database storage and index construction are performed to complete the compressed storage of the target GIM model.

[0013] The step S1 of obtaining the STL file of the target GIM model and performing preprocessing specifically includes the following steps:

[0014] Get the STL file of the target GIM model and extract all the triangular face data in the STL file;

[0015] Perform coordinate system conversion: Obtain the global position and attitude of the component based on the spatial position information and attitude information of the component, where the position is represented by a translation vector and the attitude is represented by a rotation matrix; Perform rotation and translation transformation on each vertex coordinate to convert the vertex from the local coordinate system to the global coordinate system, update the vertex coordinates of the triangle patch, and ensure that all components are represented in the global coordinate system;

[0016] Uniformly sample points on the surface of each triangular patch: parameterize the surface of the triangular patch into a two-dimensional plane, and use barycentric coordinates to represent any point on the surface; perform uniform sampling on the parameterized plane to generate a number of surface points; convert the barycentric coordinates of the sampling points into three-dimensional space coordinates to obtain uniformly distributed points on the surface of the triangular patch;

[0017] Calculate the bounding box of the target GIM model: traverse the vertex coordinates of all triangular facets, extract the coordinate values ​​of the X, Y and Z dimensions, calculate the minimum and maximum values ​​of the X, Y and Z dimensions, determine the bounding box of the target GIM model and record the parameters of the bounding box.

[0018] Step S2, according to the preprocessed file obtained in step S1, performs three-dimensional space division and octree construction, specifically includes the following steps:

[0019] Initialize the root node of the octree according to the parameters of the bounding box of the target GIM model: the boundary range of the root node is defined by the parameters of the bounding box to represent the maximum range of the model in three-dimensional space; the root node is the starting point of the octree, and the level of the root node is set to 0 to indicate that the root node is the topmost node of the octree;

[0020] Recursively divide each node of the octree into 8 child nodes until the 16th level of the octree is reached: each time the midpoint coordinates are calculated as (x_mid, y_mid, z_mid) according to the spatial range of the current node (x_min, x_max, y_min, y_max, z_min, z_max), where x_mid is the X-axis coordinate of the midpoint and y_mid is the Y-axis coordinate of the midpoint and z_mid is the Z-axis coordinate of the midpoint and x_min is the minimum X-axis value of the spatial range of the current node, x_max is the maximum X-axis value of the spatial range of the current node, y_min is the minimum Y-axis value of the spatial range of the current node, y_max is the maximum Y-axis value of the spatial range of the current node, z_min is the minimum Z-axis value of the spatial range of the current node, and z_max is the maximum Z-axis value of the spatial range of the current node; according to the spatial range and midpoint coordinates of the current node, the spatial range of the current node is divided into 8 subspaces, each subspace corresponds to a child node; among them, the boundary range of the first child node is (x_min, x_mid, y_min, y_mid, z_min, z_mid), the boundary range of the second child node is (x_min, x_mid, y_min, y_mid, z_mid, z_max), and the boundary range of the third child node is (x_min, The boundary range of the fourth child node is (x_mid,x_max,y_mid,y_max,z_min,z_mid), the boundary range of the fifth child node is (x_min,x_mid,y_min,y_mid,z_mid,z_max), the boundary range of the sixth child node is (x_mid,x_max,y_min,y_mid,z_mid,z_max), the boundary range of the seventh child node is (x_min,x_mid,y_mid,y_max,z_mid,z_max), and the boundary range of the eighth child node is (x_mid,x_max,y_mid,y_max,z_mid,z_max); repeat the recursion and division until the level of the octree reaches 16;

[0021] Discretize the triangular face into grid units and perform status judgment: traverse the vertex coordinates of all triangular facets to determine the grid unit where each vertex coordinate is located; for each grid unit, determine whether the grid unit intersects with the geometric surface of the model or contains the internal area of ​​the model: if it intersects with the geometric surface of the model or contains the internal area of ​​the model, mark the corresponding octree node as "occupied"; otherwise, mark the corresponding octree node as "unoccupied".

[0022] The step S3 generates integer codes according to the three-dimensional space obtained by dividing in step S2 and the constructed octree, and specifically includes the following steps:

[0023] Traverse and encode the octree obtained in step S2: starting from the root node of the octree, recursively traverse all nodes of the octree to generate the encoding of each leaf node; the encoding is expressed in the form of a string, representing the path from the root node to the current node; in the encoding, each character represents the index of the node in the parent node and is represented by a corresponding number;

[0024] Convert the generated code: use 3-bit binary numbers to represent each character of the generated code; concatenate the 3-bit binary numbers of each character in the generated code to obtain the corresponding integer value, and complete the conversion of the generated code;

[0025] Record and store relevant data: record the codes of all occupied leaf nodes and the corresponding spatial positions, and store them.

[0026] The step S4 described in which the integer code generated in step S3 is used to store and index the database to complete the compressed storage of the target GIM model specifically includes the following steps:

[0027] The integer codes and corresponding spatial positions obtained in step S3 are stored in the database; wherein the integer value codes are used to represent the discretized voxels of the model in the three-dimensional space; each code corresponds to an occupied leaf node and records the existence of the model in the corresponding spatial region;

[0028] Establish spatial index in the database to support spatial retrieval;

[0029] Finally, the compressed storage of the target GIM model is completed.

[0030] In the stored database, the following steps are used for storage:

[0031] The following rules are used to design the structure of the database table, including the design of the coding table and the attribute table;

[0032] Coding table: The coding table is used to store integer value codes and their corresponding spatial positions; the coding table structure includes integer value code fields, boundary coordinate fields of network units, and node level fields;

[0033] Attribute table: The attribute table is used to store the attribute information of the model; the attribute table structure includes integer value encoding field, device type field, and electrical parameter field;

[0034] When storing, the integer value code, spatial location and attribute information are stored in an associated manner.

[0035] The present invention also provides a system for implementing the compression storage method of the substation GIM model, comprising a model acquisition module, a model processing module, a model encoding module and a compression storage module; the model acquisition module, the model processing module, the model encoding module and the compression storage module are connected in series in sequence; the model acquisition module is used to acquire the STL file of the target GIM model, perform preprocessing, and upload the data information to the model processing module; the model processing module is used to divide the three-dimensional space and construct an octree according to the received data information and the obtained preprocessing file, and upload the data information to the model encoding module; the model encoding module is used to generate integer codes according to the received data information, the divided three-dimensional space and the constructed octree, and upload the data information to the compression storage module; the compression storage module is used to store the database and construct the index according to the received data information and the generated integer code to complete the compression storage of the target GIM model.

[0036] The compression storage method and system of the substation GIM model provided by the present invention not only realizes the compression storage of the substation GIM model through preprocessing of the model corresponding files, three-dimensional space division, octree establishment and corresponding encoding scheme, but also has high storage efficiency, good query performance and is easy to manage. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 The figure is a schematic diagram of the method flow of the present invention.

[0038] Figure 2 It is a schematic diagram of uniform segmentation in the method of the present invention.

[0039] Figure 3 Schematic diagram of the bounding box in the method of the present invention.

[0040] Figure 4 Schematic diagram of an octree node in the method of the present invention.

[0041] Figure 5 The figure is a schematic diagram of storing the octree model in the method of the present invention.

[0042] Figure 6Schematic diagram of the functional modules of the system of the present invention. DETAILED DESCRIPTION

[0043] like Figure 1 The method flow chart of the method of the present invention is shown as follows: The compression storage method of the substation GIM model disclosed in the present invention comprises the following steps:

[0044] S1. Obtain the STL file of the target GIM model and perform preprocessing; specifically, the steps include:

[0045] In the modeling process of substation GIM, refined components (such as insulator strings, terminal boards, hardware, etc.) are usually stored in STL file format; STL files describe the geometric shape of the model through triangle meshes, and are a widely used file format in 3D modeling; therefore, the STL file of the target GIM model is obtained, and all triangle mesh data in the STL file is extracted; each triangle mesh consists of three vertex coordinates and a normal vector, the vertex coordinates define the geometric shape of the triangle mesh, and the normal vector describes the orientation of the triangle mesh; the data structure of each triangle mesh includes three vertex coordinates (V1, V2, V3) and a normal vector; these data are stored in array form for easy subsequent processing;

[0046] Perform coordinate system conversion: Obtain the global position and attitude of the component based on the spatial position information and attitude information of the component, where the position is represented by a translation vector and the attitude is represented by a rotation matrix; Perform rotation and translation transformation on each vertex coordinate to convert the vertex from the local coordinate system to the global coordinate system, update the vertex coordinates of the triangle patch, and ensure that all components are represented in the global coordinate system;

[0047] In the substation GIM model, the STL files of different components may use different local coordinate systems. In order to unify the spatial representation of the model, each triangular face is uniformly point-selected on the surface (such as Figure 2 As shown in the figure, the geometric details of the model are increased: the surface of the triangular patch is parameterized into a two-dimensional plane, and the barycentric coordinates are used to represent any point on the surface; uniform sampling is performed on the parameterized plane to generate a number of surface points; the sampling density is determined according to the accuracy requirements of the model, and a fixed step size or an adaptive step size is usually used for sampling; the barycentric coordinates of the sampling points are converted into three-dimensional space coordinates to obtain uniformly distributed points on the surface of the triangular patch; by uniformly taking points on the surface, the geometric details of the model can be significantly increased, and the accuracy of space division and code generation can be improved; these surface points, together with the original vertex data, constitute a complete geometric representation of the model;

[0048] Calculate the bounding box of the target GIM model (such as Figure 3As shown), the bounding box is the smallest cuboid that contains all the vertices of the model: traverse the vertex coordinates of all triangular facets, extract the coordinate values ​​of the X, Y and Z dimensions, calculate the minimum and maximum values ​​of the X, Y and Z dimensions, determine the bounding box of the target GIM model and record the parameters of the bounding box;

[0049] In specific implementation, the extracted triangular face data (including vertex coordinates and normal vectors) and bounding box parameters can also be stored in memory or temporary files for subsequent processing; the triangular face and bounding box of the model can be drawn through visualization tools to verify the correctness of data loading and preprocessing; for example, check whether the geometric shape of the model is complete and whether the bounding box accurately contains all vertices. This step ensures the accuracy and efficiency of subsequent space division and code generation;

[0050] S2. According to the preprocessed file obtained in step S1, the three-dimensional space is divided and the octree is constructed. The core goal of this step is to divide the bounding box of the model into uniform three-dimensional grids, and to achieve efficient discretization representation of the model space by constructing a 16-level octree structure. The specific steps include the following:

[0051] Initialize the root node of the octree according to the parameters of the bounding box of the target GIM model: the boundary range of the root node is defined by the parameters of the bounding box to represent the maximum range of the model in three-dimensional space; the root node is the starting point of the octree, and the level of the root node is set to 0 to indicate that the root node is the topmost node of the octree;

[0052] Recursively divide each node of the octree into 8 child nodes until the 16th level of the octree is reached (such as Figure 4 As shown): Each time the node is divided, the corresponding midpoint coordinates are calculated as (x_mid, y_mid, z_mid) according to the spatial range of the current node (x_min, x_max, y_min, y_max, z_min, z_max), where x_mid is the X-axis coordinate of the midpoint and y_mid is the Y-axis coordinate of the midpoint and z_mid is the Z-axis coordinate of the midpoint and x_min is the minimum X-axis value of the spatial range of the current node, x_max is the maximum X-axis value of the spatial range of the current node, y_min is the minimum Y-axis value of the spatial range of the current node, y_max is the maximum Y-axis value of the spatial range of the current node, z_min is the minimum Z-axis value of the spatial range of the current node, and z_max is the maximum Z-axis value of the spatial range of the current node; according to the spatial range and midpoint coordinates of the current node, the spatial range of the current node is divided into 8 subspaces, each subspace corresponds to a child node; among them, the boundary range of the first child node is (x_min, x_mid, y_min, y_mid, z_min, z_mid), the boundary range of the second child node is (x_min, x_mid, y_min, y_mid, z_mid, z_max), and the boundary range of the third child node is (x_min, The boundary range of the fourth child node is (x_mid,x_max,y_mid,y_max,z_min,z_mid), the boundary range of the fifth child node is (x_min,x_mid,y_min,y_mid,z_mid,z_max), the boundary range of the sixth child node is (x_mid,x_max,y_min,y_mid,z_mid,z_max), the boundary range of the seventh child node is (x_min,x_mid,y_mid,y_max,z_mid,z_max), and the boundary range of the eighth child node is (x_mid,x_max,y_mid,y_max,z_mid,z_max); repeat the recursion and division until the level of the octree reaches 16;

[0053] Discretize the triangular face into grid units and perform status judgment: traverse the vertex coordinates of all triangular facets to determine the grid unit where each vertex coordinate is located; for each grid unit, determine whether the grid unit intersects with the geometric surface of the model or contains the internal area of ​​the model: if it intersects with the geometric surface of the model or contains the internal area of ​​the model, mark the corresponding octree node as "occupied"; otherwise, mark the corresponding octree node as "unoccupied"; this process is implemented through spatial query algorithms, such as ray intersection method or bounding box detection method, to ensure the accuracy and efficiency of judgment;

[0054] Through three-dimensional space division and octree construction, the present invention realizes the hierarchical discretization representation of the substation GIM model; the octree structure can not only efficiently describe the spatial distribution of the model, but also support multi-level detail (LOD) representation and fast spatial retrieval; for example, in a long-distance view, a higher-level node can be used to represent the overall outline of the model; in a close-up view, a lower-level node can be used to represent the fine details of the model; in addition, the hierarchical characteristics of the octree also provide basic support for subsequent integer code generation and efficient query;

[0055] S3. Generate integer coding according to the three-dimensional space obtained by partitioning in step S2 and the constructed octree; integer coding can not only significantly reduce storage space, but also support efficient spatial retrieval and multi-level detail (LOD) representation, providing basic support for subsequent data storage and query; specifically includes the following steps:

[0056] Traverse and encode the octree obtained in step S2: Starting from the root node of the octree, recursively traverse all nodes of the octree to generate the code of each leaf node; the code is expressed in the form of a string, indicating the path from the root node to the current node; in the code, each character represents the index of the node in the parent node and is represented by a corresponding number; in specific implementation, the code of the root node is an empty string ˋ""ˋ, the code of its child nodes is ˋ"0"ˋ to ˋ"7"ˋ, the code of the grandchild nodes is ˋ"00"ˋ to ˋ"77"ˋ, and so on; this encoding method makes full use of the hierarchical structure of the octree and can clearly represent the position and hierarchical relationship of the nodes in space; for each occupied leaf node, record its code string to indicate the existence of the model in this spatial area;

[0057] Convert the generated code: use 3-bit binary numbers to represent each character of the generated code; concatenate the 3-bit binary numbers of each character in the generated code to obtain the corresponding integer value, and complete the conversion of the generated code; in specific implementation, index ˋ0ˋ is represented as ˋ000ˋ, index ˋ1ˋ is represented as ˋ001ˋ, and so on, index ˋ7ˋ is represented as ˋ111ˋ; by converting each character in the string code into a 3-bit binary number and concatenating these binary numbers, a unique integer value can be obtained; for example, the string code ˋ"012"ˋ can be converted to the integer ˋ0b000001010ˋ (i.e., ˋ10ˋ in decimal); this integer value encoding not only further compresses the storage space, but also facilitates numerical comparison and index construction, and supports efficient spatial retrieval;

[0058] Record and store relevant data: record the codes of all occupied leaf nodes and the corresponding spatial positions, and store them; these codes represent the discretized voxels of the model in three-dimensional space, which can efficiently describe the geometric characteristics and spatial distribution of the model (such as Figure 5 By storing the codes in the database and combining them with spatial indexes (such as R-trees or quadtrees), efficient query and analysis of the model can be supported. For example, by prefix matching of the codes, nodes in a specific area or level can be quickly located. By comparing the values ​​of the codes, range queries and proximity queries can be efficiently implemented.

[0059] S4. According to the integer code generated in step S3, database storage and index construction are performed to complete the compressed storage of the target GIM model; database storage and index construction are key links in achieving efficient management and rapid retrieval of model data, and provide strong technical support for the planning, design, operation and maintenance, and fault diagnosis of power systems; specifically, the following steps are included:

[0060] The integer codes and corresponding spatial positions obtained in step S3 are stored in the database; wherein the integer value codes are used to represent the discretized voxels of the model in the three-dimensional space; each code corresponds to an occupied leaf node and records the existence of the model in the corresponding spatial region;

[0061] In specific implementation, the following steps are used for storage:

[0062] The following rules are used to design the structure of the database table, including the design of the coding table and the attribute table;

[0063] Coding table: The coding table is used to store integer value codes and their corresponding spatial positions; the coding table structure includes integer value code fields, boundary coordinate fields of network units, and node level fields;

[0064] Attribute table: The attribute table is used to store the attribute information of the model; the attribute table structure includes integer value encoding field, device type field, and electrical parameter field;

[0065] When storing, the integer value code, spatial location and attribute information are stored in association; by storing the integer value code in association with the spatial location and attribute information, the database can efficiently manage model data and support multi-condition queries; for example, query all instances of a certain type of equipment and their spatial locations, or find other components adjacent to a certain component;

[0066] A spatial index is created in the database to support spatial retrieval. A spatial index is an index structure specifically used to process spatial data, which can quickly locate nodes in a specific area or level. For integer value encoding, the construction method of the spatial index is as follows:

[0067] The R-tree is a balanced tree structure used to index multidimensional spatial data. Each node represents a spatial region, and its child nodes represent smaller sub-regions. By inserting the spatial range corresponding to the integer value encoding (such as the boundary coordinates of the grid cell) into the R-tree, the encoded data in a specific area can be quickly located. For example, all devices in a certain area can be queried or other components adjacent to a certain component can be found.

[0068] The construction of spatial index significantly improves query performance and supports efficient retrieval of substation GIM models. For example, through spatial index, all devices in a certain area can be quickly located or other components adjacent to a certain component can be found. In addition, spatial index also supports multi-level detail (LOD) query, which facilitates dynamic loading and rendering of model data at different levels of detail.

[0069] Finally, the compressed storage of the target GIM model is completed.

[0070] The present invention significantly reduces the storage space occupied by the model by converting the three-dimensional geometric data of the substation GIM model into compact integer value coding. The present invention discretizes the spatial information of the model into voxels through an octree structure and integer value coding, greatly reducing the storage requirements, and is particularly suitable for the efficient storage of large-scale substation GIM models. The present invention supports data interaction and integration with other systems such as building information modeling (BIM) and geographic information systems (GIS). As a universal data representation form, integer value coding is compatible with various database systems, programming languages ​​and hardware platforms, and is convenient for model reuse and expansion. In addition, the present invention can also be extended to three-dimensional model data processing in other fields, such as urban three-dimensional modeling, medical image processing, etc.

[0071] Moreover, through efficient compression storage and fast retrieval, the present invention significantly reduces the operation and maintenance cost of the substation GIM model. Through integer value encoding and spatial indexing, the present invention greatly reduces storage space and query time, and reduces the cost of data management and maintenance.

[0072] like Figure 6The functional module schematic diagram of the system of the present invention is shown as follows: the system for realizing the compression storage method of the substation GIM model disclosed in the present invention comprises a model acquisition module, a model processing module, a model encoding module and a compression storage module; the model acquisition module, the model processing module, the model encoding module and the compression storage module are connected in series in sequence; the model acquisition module is used to acquire the STL file of the target GIM model, perform preprocessing, and upload the data information to the model processing module; the model processing module is used to divide the three-dimensional space and construct the octree according to the received data information and the obtained preprocessing file, and upload the data information to the model encoding module; the model encoding module is used to generate integer codes according to the received data information, the divided three-dimensional space and the constructed octree, and upload the data information to the compression storage module; the compression storage module is used to store and construct the index of the database according to the received data information and the generated integer codes to complete the compression storage of the target GIM model.

Claims

1. A compression storage method for a substation GIM model, comprising the following steps: S1. Obtain the STL file of the target GIM model and perform preprocessing; S2. According to the preprocessed file obtained in step S1, three-dimensional space division and octree construction are performed; S3. Generate integer code according to the three-dimensional space divided by step S2 and the constructed octree; S4. According to the integer code generated in step S3, database storage and index construction are performed to complete the compressed storage of the target GIM model.

2. The compression storage method of the substation GIM model according to claim 1 is characterized in that The step S1 of obtaining the STL file of the target GIM model and performing preprocessing specifically includes the following steps: Get the STL file of the target GIM model and extract all the triangular face data in the STL file; Perform coordinate system conversion: Obtain the global position and attitude of the component based on the spatial position information and attitude information of the component, where the position is represented by a translation vector and the attitude is represented by a rotation matrix; Perform rotation and translation transformation on each vertex coordinate to convert the vertex from the local coordinate system to the global coordinate system, update the vertex coordinates of the triangle patch, and ensure that all components are represented in the global coordinate system; Uniformly sample points on the surface of each triangular patch: parameterize the surface of the triangular patch into a two-dimensional plane, and use barycentric coordinates to represent any point on the surface; perform uniform sampling on the parameterized plane to generate a number of surface points; convert the barycentric coordinates of the sampling points into three-dimensional space coordinates to obtain uniformly distributed points on the surface of the triangular patch; Calculate the bounding box of the target GIM model: traverse the vertex coordinates of all triangular facets, extract the coordinate values ​​of the X, Y and Z dimensions, calculate the minimum and maximum values ​​of the X, Y and Z dimensions, determine the bounding box of the target GIM model and record the parameters of the bounding box.

3. The compression storage method of the substation GIM model according to claim 2 is characterized in that Step S2, according to the preprocessed file obtained in step S1, performs three-dimensional space division and octree construction, specifically includes the following steps: Initialize the root node of the octree according to the parameters of the bounding box of the target GIM model: the boundary range of the root node is defined by the parameters of the bounding box to represent the maximum range of the model in three-dimensional space; the root node is the starting point of the octree, and the level of the root node is set to 0 to indicate that the root node is the topmost node of the octree; Recursively divide each node of the octree into 8 child nodes until the 16th level of the octree is reached: each time the midpoint coordinates are calculated as (x_mid, y_mid, z_mid) according to the spatial range of the current node (x_min, x_max, y_min, y_max, z_min, z_max), where x_mid is the X-axis coordinate of the midpoint and y_mid is the Y-axis coordinate of the midpoint and z_mid is the Z-axis coordinate of the midpoint and x_min is the minimum X-axis value of the spatial range of the current node, x_max is the maximum X-axis value of the spatial range of the current node, y_min is the minimum Y-axis value of the spatial range of the current node, y_max is the maximum Y-axis value of the spatial range of the current node, z_min is the minimum Z-axis value of the spatial range of the current node, and z_max is the maximum Z-axis value of the spatial range of the current node; according to the spatial range and midpoint coordinates of the current node, the spatial range of the current node is divided into 8 subspaces, each subspace corresponds to a child node; among them, the boundary range of the first child node is (x_min, x_mid, y_min, y_mid, z_min, z_mid), the boundary range of the second child node is (x_min, x_mid, y_min, y_mid, z_mid, z_max), and the boundary range of the third child node is (x_min, The boundary range of the fourth child node is (x_mid,x_max,y_mid,y_max,z_min,z_mid), the boundary range of the fifth child node is (x_min,x_mid,y_min,y_mid,z_mid,z_max), the boundary range of the sixth child node is (x_mid,x_max,y_min,y_mid,z_mid,z_max), the boundary range of the seventh child node is (x_min,x_mid,y_mid,y_max,z_mid,z_max), and the boundary range of the eighth child node is (x_mid,x_max,y_mid,y_max,z_mid,z_max); repeat the recursion and division until the level of the octree reaches 16; Discretize the triangular face into grid units and perform status judgment: traverse the vertex coordinates of all triangular facets to determine the grid unit where each vertex coordinate is located; for each grid unit, determine whether the grid unit intersects with the geometric surface of the model or contains the internal area of ​​the model: if it intersects with the geometric surface of the model or contains the internal area of ​​the model, mark the corresponding octree node as "occupied"; otherwise, mark the corresponding octree node as "unoccupied".

4. The compression storage method of the substation GIM model according to claim 3 is characterized in that The step S3 generates integer codes according to the three-dimensional space obtained by dividing in step S2 and the constructed octree, and specifically includes the following steps: Traverse and encode the octree obtained in step S2: starting from the root node of the octree, recursively traverse all nodes of the octree to generate the encoding of each leaf node; the encoding is expressed in the form of a string, indicating the path from the root node to the current node; In the encoding, each character represents the index of the node in the parent node and is represented by the corresponding number; Convert the generated code: use 3-bit binary numbers to represent each character of the generated code; concatenate the 3-bit binary numbers of each character in the generated code to obtain the corresponding integer value, and complete the conversion of the generated code; Record and store relevant data: record the codes of all occupied leaf nodes and the corresponding spatial positions, and store them.

5. The compression storage method of the substation GIM model according to claim 4 is characterized in that The step S4 described in which the integer code generated in step S3 is used to store and index the database to complete the compressed storage of the target GIM model specifically includes the following steps: The integer codes and corresponding spatial positions obtained in step S3 are stored in the database; wherein the integer value codes are used to represent the discretized voxels of the model in the three-dimensional space; each code corresponds to an occupied leaf node and records the existence of the model in the corresponding spatial region; Establish spatial index in the database to support spatial retrieval; Finally, the compressed storage of the target GIM model is completed.

6. The compression storage method of the substation GIM model according to claim 5 is characterized in that In the stored database, the following steps are used for storage: The following rules are used to design the structure of the database table, including the design of the coding table and the attribute table; Coding table: The coding table is used to store integer value codes and their corresponding spatial positions; the coding table structure includes integer value code fields, boundary coordinate fields of network units, and node level fields; Attribute table: The attribute table is used to store the attribute information of the model; the attribute table structure includes integer value coding field, device type field, and electrical parameter field; When storing, the integer value code, spatial location and attribute information are stored in an associated manner.

7. A system for implementing the compression storage method of the substation GIM model according to any one of claims 1 to 6, characterized in that It includes a model acquisition module, a model processing module, a model encoding module and a compression storage module; the model acquisition module, the model processing module, the model encoding module and the compression storage module are connected in series in sequence; the model acquisition module is used to obtain the STL file of the target GIM model, perform preprocessing, and upload the data information to the model processing module; The model processing module is used to divide the three-dimensional space and construct the octree according to the received data information and the obtained pre-processing file, and upload the data information to the model encoding module; The model encoding module is used to generate integer codes according to the received data information, the divided three-dimensional space and the constructed octree, and upload the data information to the compression storage module; The compression storage module is used to store the database and construct the index according to the received data information and the generated integer code, so as to complete the compression storage of the target GIM model.

Citation Information

Patent Citations

  • Application of mixed data model in three-dimensional modeling of building

    CN106940898A

  • Three-dimensional model plane pickup method and system based on position coding octree

    CN116188685A

  • Three-dimensional geometric model surface element space division and BVH tree construction method based on Morton codes

    CN116310108A

  • Method and device for converting BIM data into 3D tiles data, medium and equipment

    CN119131229A

  • Easily fixed compass

    KR1020250054014A

Cited By

  • Overhead transmission line power grid information model construction and space division method and device

    CN120893158A