Data lightweight processing method, device, storage medium and electronic device

By analyzing and dividing the GIM model data, and building a nested tree judgment to merge duplicate vertex data, the problems of low data processing efficiency and large memory usage after three-dimensional geometric modeling are solved, and data storage space is saved and processing efficiency is improved.

CN114119939BActive Publication Date: 2025-05-02STATE GRID BEIJING ELECTRIC POWER CO +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111453437.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2025-05-02
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

There are a large number of repeated vertices after the three-dimensional geometric modeling, resulting in low data processing efficiency and large memory space. The existing technology has not effectively solved this problem.

Method used

The GIM model data is analyzed and processed by the power grid information GIM standard, and the geometric data is divided and processed through the target three-dimensional geometric modeling library. A nested tree is constructed and repeated vertex data is merged to obtain the updated triangular face geometric data.

Benefits of technology

The purpose of automatically merging duplicate vertex data is realized, saving data storage space, improving data processing efficiency, and solving the problems of low data processing efficiency and large memory usage after three-dimensional geometric shapes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114119939B_ABST
    Figure CN114119939B_ABST
Patent Text Reader

Abstract

The present invention discloses a data lightweight processing method, device, storage medium and electronic device. The method comprises: using the power grid information GIM standard to parse and process the GIM model data to obtain the geometric data of the GIM model; parsing and segmenting the geometric data through the target three-dimensional geometric modeling library to obtain the triangular patch geometric data of the GIM model; judging whether there are repeated vertex data in the triangular patch geometric data by constructing a nested tree, and if the judgment result is yes, merging the repeated vertex data to obtain the updated triangular patch geometric data. The present invention solves the technical problems of low data processing efficiency and large memory space occupation caused by the presence of a large number of repeated vertices after three-dimensional geometric modeling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a data lightweight processing method, device, storage medium and electronic device. Background Art

[0002] In recent years, with the continuous deepening of the informatization of power grids, the Grid Information Model (GIM) has been widely used in the power industry. It can effectively visualize GIM geometric objects at large sites and regional levels. Since the geometric objects in GIM are parameterized, it is necessary to use the geometric modeling library to parse the parameterized geometric information into triangular mesh data. The advantage of triangular mesh data is that the computer can directly render it, but when performing geometric overlap or Boolean operations, duplicate vertex data will be generated, which not only takes up a large amount of memory space, but also has a certain impact on data processing efficiency.

[0003] The methods for achieving vertex data de-redundancy in the data lightweight processing process in the prior art are mainly achieved through simple vertex data sharing, simplification, merging and other technologies. However, the above methods may affect the parsing speed and even lose vertex attribute information such as normals, resulting in incomplete lightweight models, thereby affecting the model visualization effect.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide a data lightweight processing method, device, storage medium and electronic device to at least solve the technical problems of low data processing efficiency and large memory space occupation caused by a large number of repeated vertices after three-dimensional geometric modeling.

[0006] According to one aspect of an embodiment of the present invention, a data lightweight processing method is provided, including: using the power grid information GIM standard to parse and process GIM model data to obtain geometric data of the GIM model; parsing and segmenting the above geometric data through a target three-dimensional geometric modeling library to obtain triangular patch geometric data of the above GIM model; determining whether there is repeated vertex data in the above triangular patch geometric data by constructing a nested tree, and if the judgment result is yes, merging the above repeated vertex data to obtain updated triangular patch geometric data.

[0007] Optionally, the above-mentioned triangular patch geometry data includes: coordinate data and normal data of each vertex in the above-mentioned GIM model; or coordinate data, normal data and texture data of each vertex in the above-mentioned GIM model.

[0008] Optionally, determining whether there is duplicate vertex data in the triangular patch geometry data by constructing a nested tree, including: determining whether the nested tree is empty; if the nested tree is empty, adding the first vertex to a cache container, wherein the first vertex is the last vertex placed in the nested tree; if the nested tree is not empty, calculating the first hash value of the first vertex, and generating a node of the next level based on the first hash value, wherein the first hash value is the hash value of the current level of the first vertex.

[0009] Optionally, determining whether there is duplicate vertex data in the triangular patch geometry data by constructing a nested tree also includes: obtaining a second hash value of a second vertex, wherein the second vertex is a vertex to be placed in the nested tree, and the second hash value is a hash value of the current level of the second vertex; determining whether the second hash value is equal to the first hash value; if the second hash value is not equal to the first hash value, generating a node of a next level based on the second hash value, and placing the second hash value and the node of the next level into the nested tree.

[0010] Optionally, determining whether there is duplicate vertex data in the triangular patch geometry data by constructing a nested tree also includes: if the second hash value is equal to the first hash value, adding one to the current level of the second vertex, and continuing to determine whether the second hash value is equal to the first hash value, until the second hash value is not equal to the first hash value, and / or the current level of the second vertex reaches a target level number, wherein the target level number is related to the triangular patch geometry data; if the current level reaches the target level number, and the second hash value is equal to the first hash value, determining that the triangular patch geometry data corresponding to the second vertex is the duplicate vertex data.

[0011] Optionally, the above method also includes: designing a model tree based on the target hierarchical structure; establishing a mapping relationship between the above model tree and the updated GIM model data, wherein the above updated GIM model data includes the above updated triangular patch geometry data; and reconstructing the above updated GIM model data based on the above mapping relationship.

[0012] According to another aspect of an embodiment of the present invention, a data lightweight processing device is also provided, including: a parsing module, used to parse and process GIM model data using the power grid information GIM standard to obtain geometric data of the GIM model; a subdivision module, used to parse and subdivide the above-mentioned geometric data through a target three-dimensional geometric modeling library to obtain triangular patch geometric data of the above-mentioned GIM model; a judgment module, used to judge whether there is repeated vertex data in the above-mentioned triangular patch geometric data by constructing a nested tree, and if the judgment result is yes, merge the above-mentioned repeated vertex data to obtain updated triangular patch geometric data.

[0013] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided, wherein the non-volatile storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing any one of the above-mentioned data lightweight processing methods.

[0014] According to another aspect of an embodiment of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any one of the above-mentioned data lightweight processing methods.

[0015] According to another aspect of an embodiment of the present invention, a processor is further provided, and the processor is used to run a program, wherein the program executes any one of the above-mentioned data lightweight processing methods when running.

[0016] In an embodiment of the present invention, a data lightweight processing method is adopted, and the GIM model data is parsed and processed by adopting the power grid information GIM standard to obtain the geometric data of the GIM model; the above-mentioned geometric data is parsed and segmented through the target three-dimensional geometric modeling library to obtain the triangular patch geometric data of the above-mentioned GIM model; by constructing a nested tree, it is determined whether there is repeated vertex data in the above-mentioned triangular patch geometric data, and when the judgment result is yes, the above-mentioned repeated vertex data is merged to obtain updated triangular patch geometric data, thereby achieving the purpose of automatically merging the repeated vertex data, thereby realizing the technical effect of saving data storage space and improving data processing efficiency, and further solving the technical problems of low data processing efficiency and large memory space occupation caused by the presence of a large number of repeated vertices after three-dimensional geometric modeling. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0018] Figure 1is a flow chart of a data lightweight processing method according to an embodiment of the present invention;

[0019] Figure 2 is a flowchart of an optional data lightweight processing method according to an embodiment of the present invention;

[0020] Figure 3 is a schematic diagram of an optional nested tree structure according to an embodiment of the present invention;

[0021] Figure 4 is a flowchart of another optional data lightweight processing method according to an embodiment of the present invention;

[0022] Figure 5 is a flowchart of another optional data lightweight processing method according to an embodiment of the present invention;

[0023] Figure 6 is a schematic diagram of an optional structural relationship between a model tree and a scene tree according to an embodiment of the present invention;

[0024] Figure 7 is a flowchart of another optional data lightweight processing method according to an embodiment of the present invention;

[0025] Figure 8 It is a structural schematic diagram of a data lightweight processing device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present invention.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] First, to facilitate understanding of the embodiments of the present invention, some terms or nouns involved in the present invention are explained below:

[0029] GIM format: The GIM standard is a product data expression standard released by the State Grid Economic Research Institute for the power industry. It is a common data format in the field of power engineering.

[0030] GIM lightweight processing: Parse the GIM file according to the GIM format, and then perform lightweight processing and organization on the acquired data according to a certain format, so that the lightweight data is as concise as possible to facilitate the subsequent rapid transmission and lightweight display of data.

[0031] BIMBASE: BIMBASE geometry engine is a domestically produced 3D geometry modeling library that provides function packages in the form of C++ class libraries. Through function encapsulation, it can convert parameterized geometric objects in GIM into geometric entities that can be directly rendered by computers.

[0032] Example 1

[0033] According to an embodiment of the present invention, a method embodiment of data lightweight processing is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0034] Figure 1 is a flow chart of a data lightweight processing method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0035] Step S102, using the power grid information GIM standard to parse and process the GIM model data to obtain geometric data of the GIM model;

[0036] Step S104, parsing and segmenting the geometric data through the target three-dimensional geometric modeling library to obtain the triangular facet geometric data of the GIM model;

[0037] Step S106, determining whether there are repeated vertex data in the triangular patch geometry data by constructing a nested tree, and if the determination result is yes, merging the repeated vertex data to obtain updated triangular patch geometry data.

[0038] In an embodiment of the present invention, a data lightweight processing method is adopted, and the GIM model data is parsed and processed by adopting the power grid information GIM standard to obtain the geometric data of the GIM model; the above-mentioned geometric data is parsed and segmented through the target three-dimensional geometric modeling library to obtain the triangular patch geometric data of the above-mentioned GIM model; by constructing a nested tree, it is determined whether there is repeated vertex data in the above-mentioned triangular patch geometric data, and when the judgment result is yes, the above-mentioned repeated vertex data is merged to obtain updated triangular patch geometric data, thereby achieving the purpose of automatically merging the repeated vertex data, thereby realizing the technical effect of saving data storage space and improving data processing efficiency, and further solving the technical problems of low data processing efficiency and large memory space occupation caused by the presence of a large number of repeated vertices after three-dimensional geometric modeling.

[0039] Optionally, the above-mentioned target three-dimensional geometric modeling library can be but is not limited to a BIMBASE library.

[0040] Optionally, the above-mentioned triangular patch geometry data includes: coordinate data and normal data of each vertex in the above-mentioned GIM model; or coordinate data, normal data and texture data of each vertex in the above-mentioned GIM model, wherein the above-mentioned coordinate data are the X coordinate, Y coordinate and Z coordinate of the vertex coordinates, the above-mentioned normal data are the normal X coordinate, normal Y coordinate and normal Z coordinate of the normal, and the above-mentioned texture data are the X coordinate and Y coordinate of the texture coordinates.

[0041] It should be noted that the process of merging the above-mentioned repeated vertex data can be but is not limited to being implemented by merging the repeated vertex data through an algorithm that maintains vertex attributes, that is, by constructing a nested tree to determine whether there is repeated vertex data in the above-mentioned triangular patch geometry data, and if the judgment result is yes, merging the above-mentioned repeated vertex data to obtain updated data processing of the triangular patch geometry data.

[0042] Optionally, the GIM data is parsed according to the GIM specification standard to obtain data at each level of the GIM model, wherein the data at each level includes geometric data of the GIM model; the geometric data is parsed through the target three-dimensional geometric modeling library BIMBASE library, and the geometric data is segmented to obtain the triangular patch geometric data of each component in the GIM model; and the repeated vertex data in the triangular patch geometric data is merged using a vertex attribute preservation algorithm (i.e., a nested tree method).

[0043] As an optional embodiment, Figure 2 is a flowchart of an optional data lightweight processing method according to an embodiment of the present invention. Figure 2As shown, whether there is duplicate vertex data in the above triangular patch geometry data is determined by constructing a nested tree, including:

[0044] Step S202, determining whether the above nested tree is empty;

[0045] Step S204, if the nested tree is empty, adding the first vertex to the cache container, wherein the first vertex is the last vertex put into the nested tree;

[0046] Step S206, if the nested tree is not empty, calculate the first hash value of the first vertex, and generate nodes of the next level based on the first hash value, wherein the first hash value is the hash value of the current level of the first vertex.

[0047] Optionally, the level of the nested tree is related to the triangular patch geometry data, and different levels correspond to different parameters. The corresponding relationship between the level of the nested tree and the parameters is as follows: Figure 3 As shown, the above-mentioned triangular patch geometry data includes: coordinate data and normal data of each vertex in the above-mentioned GIM model; or coordinate data, normal data and texture data of each vertex in the above-mentioned GIM model.

[0048] Optionally, when the above-mentioned triangular patch geometry data includes: coordinate data and normal data of each vertex in the above-mentioned GIM model, the above-mentioned nested tree has a total of 7 levels, including a spatial bounding box and six parameters in the triangular patch geometry data in the GIM model, namely: the X coordinate, Y coordinate, Z coordinate of the vertex and the normal X coordinate, normal Y coordinate, and normal Z coordinate of the normal.

[0049] Optionally, when the above-mentioned triangular patch geometry data includes: coordinate data, normal data and texture data of each vertex in the above-mentioned GIM model, the above-mentioned nested tree has a total of 9 levels, including a spatial bounding box and eight parameters in the triangular patch geometry data in the GIM model, namely: X coordinate, Y coordinate, Z coordinate of vertex coordinates, normal X coordinate, normal Y coordinate, normal Z coordinate of the normal, and X coordinate, Y coordinate of texture coordinates.

[0050] Optionally, when looking for duplicate vertex data in the above-mentioned triangular patch geometry data, first determine whether the above-mentioned nested tree is empty. If the above-mentioned nested tree is empty, directly add the first vertex to the cache container, generate an index and return it; if the above-mentioned nested tree is not empty, calculate the hash value of the first vertex in the cache container at the current level (ie, the first hash value), and use the above-mentioned first hash value as the key value, and generate the next level of nodes according to the elements in the above-mentioned first vertex and put them into the nested tree, and at the same time clear the above-mentioned cache container, wherein the above-mentioned first vertex is the last vertex placed in the above-mentioned nested tree.

[0051] As an optional embodiment, Figure 4 is a flowchart of another optional data lightweight processing method according to an embodiment of the present invention. Figure 4 As shown, determining whether there is duplicate vertex data in the above triangular patch geometry data by constructing a nested tree also includes:

[0052] Step S302, obtaining a second hash value of a second vertex, wherein the second vertex is a vertex to be placed in the nested tree, and the second hash value is a hash value of the current level of the second vertex;

[0053] Step S304, determining whether the second Hash value is equal to the first Hash value;

[0054] Step S306: if the second hash value is not equal to the first hash value, generate a node of the next level based on the second hash value, and put the second hash value and the node of the next level into the nested tree.

[0055] Optionally, obtain the second hash value (i.e., the hash value of the second vertex at the current level) of the second vertex (i.e., the vertex to be placed in the nested tree), and query it in the nested tree. If the first hash value equal to the second hash value is not found in the nested tree, generate the nodes of the next level based on the second hash value, put the second hash value and the nodes of the next level into the nested tree, generate an index and return it.

[0056] In an optional embodiment, determining whether there is duplicate vertex data in the triangular patch geometry data by constructing a nested tree further includes:

[0057] Step S402, if the second hash value is equal to the first hash value, then the current level of the second vertex is increased by one, and the second hash value is continuously determined to be equal to the first hash value, until the second hash value is not equal to the first hash value, and / or the current level of the second vertex reaches a target level number, wherein the target level number is related to the triangle patch geometry data;

[0058] Step S404: if the current level reaches the target level number and the second hash value is equal to the first hash value, then determine that the triangle patch geometry data corresponding to the second vertex is the repeated vertex data.

[0059] Optionally, the target number of levels is related to the triangular patch geometry data, and the target number of levels may be, but is not limited to, 7 or 9 levels.

[0060] Optionally, if a first hash value equal to the second hash value is found in the nested tree, proceed to the next node and continue to determine whether there is a first hash value equal to the second hash value in the nested tree until no first hash value is found or the nesting depth reaches the target level.

[0061] It should be noted that, in the embodiment of the present invention, the hash value of each vertex at each level (i.e., the hash value corresponding to each parameter) constitutes a nested balanced binary search tree, and the above nested tree is in a dynamic growth state during the point merging process; in the case of common points, that is, the hash values ​​of the same parameters are equal, the nested depth of the above nested tree is 7 or 9 layers, and each level represents a hash part; in the case of non-common points, the tree does not need to be fully grown, and the hash value of the point does not need to be fully calculated and stored; that is, short-circuit operation is realized by searching the tree, and for non-common points, it is not necessary to fully compare all the features of the point, thereby improving data storage efficiency; in addition, the nested subtrees share a parent node, for example, a certain X coordinate subtree shares a parent node (i.e., the spatial enclosing hash value), which reduces the use of data memory space.

[0062] As an optional embodiment, Figure 5 is a flowchart of another optional data lightweight processing method according to an embodiment of the present invention. Figure 5 As shown, the above method also includes:

[0063] Step S502, designing a model tree based on the target hierarchical structure;

[0064] Step S504, establishing a mapping relationship between the model tree and the updated GIM model data, wherein the updated GIM model data includes the updated triangular patch geometry data;

[0065] Step S506: reconstructing the updated GIM model data based on the mapping relationship.

[0066] Optionally, the target hierarchical structure may be, but is not limited to, a hierarchical structure specified by the GIM standard, and the model tree is a lightweight model tree.

[0067] Optionally, the GIM model data at least includes the data of the material, geometry, transformation matrix, bounding box, etc. of each component in the above GIM model. The relationship between each component and its material, geometry, transformation matrix, bounding box, etc. data (i.e., GIM model data) can be understood as a scene tree. Construct a lightweight model tree according to the hierarchical structure specified by the GIM standard, and establish a mapping relationship between the above lightweight model tree and the above scene tree. Figure 6In the schematic diagram of the model tree and scene tree structure shown, the hierarchy of components and the relationship between components and the scene tree are expressed by the above-mentioned lightweight model tree, and the updated GIM model data is reorganized by combining the above-mentioned lightweight model tree with the scene tree, wherein the above-mentioned updated GIM model data includes the above-mentioned updated triangular patch geometry data.

[0068] As an optional embodiment, Figure 7 is a flowchart of another optional data lightweight processing method according to an embodiment of the present invention. Figure 7 As shown, a given GIM model file is obtained, and the model type of the GIM model is determined by reading the file header information in the GIM model file; the project entry file is read based on the model type to determine whether the project entry file is a geometry data file; if the project entry file is a geometry data file, the IFC / STL / MOD geometry nodes in the project entry file are continued to be read, the reading result is added to the corresponding parsing task queue, and it is determined whether all files have been read; if the project entry file is not a geometry data file, it is directly determined whether all files have been read; if not, After all files are retrieved, the files are traversed and parsed according to the reference relationship, and it is continued to be determined whether the above-mentioned project entry file is a geometry data file; if all files have been read, the task queues are executed in parallel, the read geometry data files are stored in the geometry cache container, and the vertex data are deduplicated using the nested tree fixed-point deduplication algorithm to obtain an updated GIM model file. According to the reference relationship between the GIM model data in the above-mentioned updated GIM model file, the geometry / material / attribute and other information constructed in the above-mentioned updated GIM model file are reorganized to generate a lightweight model tree and scene tree.

[0069] It should be noted that the above-mentioned lightweight model tree and scene tree separate a large number of file reference relationships between hierarchies, physical models, and composite graphics in the GIM model. To create an instance of a parsed physical model or composite graphics, it is only necessary to add a corresponding model tree node, and bind the corresponding data on the scene tree through a unique identification ID. This will not cause changes in the actual geometry, material, and attribute data, and avoid repeated expression of the same data.

[0070] The embodiments of the present invention can at least achieve the following technical effects: parsing the parameterized geometric information of the GIM model through the target geometry library (such as the BIMBASE library) to ensure the reliability of the GIM model data parsing; removing redundant data through the vertex attribute preservation algorithm to ensure the integrity of the model while merging duplicate data; designing a lightweight data structure for the GIM model hierarchical structure to improve the lightweight performance of the GIM model at the data structure level, thereby providing lightweight and reliable data support for subsequent lightweight display.

[0071] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0072] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the above methods of each embodiment of the present invention.

[0073] Example 2

[0074] According to an embodiment of the present invention, a device embodiment for implementing the above data lightweight processing method is also provided. Figure 8 is a structural schematic diagram of a data lightweight processing device according to an embodiment of the present invention. Figure 8 As shown, the above-mentioned data lightweight processing device includes: an analysis module 600, a segmentation module 602, and a judgment module 604, wherein:

[0075] The above-mentioned parsing module 600 is used to parse and process the GIM model data using the power grid information GIM standard to obtain the geometric data of the GIM model; the above-mentioned segmentation module 602 is used to parse and segment the above-mentioned geometric data through the target three-dimensional geometric modeling library to obtain the triangular patch geometric data of the above-mentioned GIM model; the above-mentioned judgment module 604 is used to judge whether there is repeated vertex data in the above-mentioned triangular patch geometric data by constructing a nested tree, and if the judgment result is yes, merge the above-mentioned repeated vertex data to obtain updated triangular patch geometric data.

[0076] In an embodiment of the present invention, a data lightweight processing method is adopted, and the above-mentioned parsing module 600 is used to parse and process the GIM model data using the power grid information GIM standard to obtain the geometric data of the GIM model; the above-mentioned subdivision module 602 is used to parse and subdivide the above-mentioned geometric data through the target three-dimensional geometric modeling library to obtain the triangular patch geometric data of the above-mentioned GIM model; the above-mentioned judgment module 604 is used to judge whether there is repeated vertex data in the above-mentioned triangular patch geometric data by constructing a nested tree, and when the judgment result is yes, merge the above-mentioned repeated vertex data to obtain updated triangular patch geometric data, thereby achieving the purpose of automatically merging the repeated vertex data, thereby realizing the technical effect of saving data storage space and improving data processing efficiency, and further solving the technical problems of low data processing efficiency and large memory space occupation caused by the presence of a large number of repeated vertices after three-dimensional geometric modeling.

[0077] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0078] It should be noted that the above-mentioned analysis module 600, segmentation module 602, and judgment module 604 correspond to steps S102 to S106 in Example 1, and the examples and application scenarios implemented by the above-mentioned modules and corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules as part of the device can be run in a computer terminal.

[0079] It should be noted that the optional or preferred implementation of this embodiment can refer to the relevant description in Example 1, which will not be repeated here.

[0080] The above-mentioned data lightweight processing device may also include a processor and a memory. The above-mentioned analysis module 600, segmentation module 602, judgment module 604, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.

[0081] The processor includes a kernel, which retrieves the corresponding program unit from the memory. The kernel may be one or more. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. The memory includes at least one memory chip.

[0082] According to an embodiment of the present application, an embodiment of a non-volatile storage medium is also provided. Optionally, in this embodiment, the non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute any of the above data lightweight processing methods.

[0083] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group, and the non-volatile storage medium includes a stored program.

[0084] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: using the power grid information GIM standard to parse and process the GIM model data to obtain the geometric data of the GIM model; parsing and segmenting the above geometric data through the target three-dimensional geometric modeling library to obtain the triangular patch geometric data of the above GIM model; determining whether there is repeated vertex data in the above triangular patch geometric data by constructing a nested tree, and if the judgment result is yes, merging the above repeated vertex data to obtain updated triangular patch geometric data.

[0085] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: determine whether the above-mentioned nested tree is empty; if the above-mentioned nested tree is empty, add the first vertex to the cache container, wherein the above-mentioned first vertex is the last vertex placed in the above-mentioned nested tree; if the above-mentioned nested tree is not empty, calculate the first hash value of the above-mentioned first vertex, and generate the next level of nodes based on the above-mentioned first hash value, wherein the above-mentioned first hash value is the hash value of the current level of the above-mentioned first vertex.

[0086] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: obtain a second hash value of the second vertex, wherein the second vertex is the vertex to be placed in the nested tree, and the second hash value is the hash value of the current level of the second vertex; determine whether the second hash value is equal to the first hash value; if the second hash value is not equal to the first hash value, generate a node of the next level based on the second hash value, and place the second hash value and the node of the next level into the nested tree.

[0087] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: if the second hash value is equal to the first hash value, the current level of the second vertex is increased by one, and the second hash value is continued to be determined whether it is equal to the first hash value, until the second hash value is not equal to the first hash value, and / or the current level of the second vertex reaches the target level number, wherein the target level number is related to the triangular patch geometry data; if the current level reaches the target level number, and the second hash value is equal to the first hash value, the triangular patch geometry data corresponding to the second vertex is determined to be the repeated vertex data.

[0088] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: design a model tree based on the target hierarchical structure; establish a mapping relationship between the above model tree and the updated GIM model data, wherein the above updated GIM model data includes the above updated triangular patch geometry data; and reconstruct the above updated GIM model data based on the above mapping relationship.

[0089] According to an embodiment of the present application, an embodiment of a processor is also provided. Optionally, in this embodiment, the processor is used to run a program, wherein the program executes any one of the above data lightweight processing methods when it is run.

[0090] According to an embodiment of the present application, an embodiment of a computer program product is also provided. When executed on a data processing device, it is suitable for executing a program that initializes any one of the steps of the above-mentioned data lightweight processing method.

[0091] Optionally, the above-mentioned computer program product, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: using the power grid information GIM standard to parse and process the GIM model data to obtain the geometric data of the GIM model; parsing and segmenting the above-mentioned geometric data through the target three-dimensional geometric modeling library to obtain the triangular patch geometric data of the above-mentioned GIM model; determining whether there is repeated vertex data in the above-mentioned triangular patch geometric data by constructing a nested tree, and if the judgment result is yes, merging the above-mentioned repeated vertex data to obtain updated triangular patch geometric data.

[0092] Optionally, the above-mentioned computer program product, when executed on a data processing device, is suitable for executing a program initialized with the following method steps: determining whether the above-mentioned nested tree is empty; if the above-mentioned nested tree is empty, adding the first vertex to the cache container, wherein the above-mentioned first vertex is the last vertex placed in the above-mentioned nested tree; if the above-mentioned nested tree is not empty, calculating the first hash value of the above-mentioned first vertex, and generating a node of the next level based on the above-mentioned first hash value, wherein the above-mentioned first hash value is the hash value of the current level of the above-mentioned first vertex.

[0093] Optionally, the above-mentioned computer program product, when executed on a data processing device, is suitable for executing a program initialized with the following method steps: obtaining a second hash value of a second vertex, wherein the above-mentioned second vertex is a vertex to be placed in the above-mentioned nested tree, and the above-mentioned second hash value is a hash value of the current level of the above-mentioned second vertex; determining whether the above-mentioned second hash value is equal to the above-mentioned first hash value; if the above-mentioned second hash value is not equal to the above-mentioned first hash value, generating a node of the next level based on the above-mentioned second hash value, and placing the above-mentioned second hash value and the above-mentioned node of the next level into the above-mentioned nested tree.

[0094] Optionally, the above-mentioned computer program product, when executed on a data processing device, is suitable for executing a program initialized with the following method steps: if the above-mentioned second hash value is equal to the above-mentioned first hash value, then the current level of the above-mentioned second vertex is increased by one, and the above-mentioned second hash value is continued to be determined whether the above-mentioned second hash value is equal to the above-mentioned first hash value, until the above-mentioned second hash value is not equal to the above-mentioned first hash value, and / or the current level of the above-mentioned second vertex reaches the target level number, wherein the above-mentioned target level number is related to the above-mentioned triangular patch geometry data; if the above-mentioned current level reaches the target level number, and the above-mentioned second hash value is equal to the above-mentioned first hash value, then the above-mentioned triangular patch geometry data corresponding to the above-mentioned second vertex is determined to be the above-mentioned repeated vertex data.

[0095] Optionally, the above-mentioned computer program product, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: designing a model tree based on a target hierarchical structure; establishing a mapping relationship between the above-mentioned model tree and the updated GIM model data, wherein the above-mentioned updated GIM model data includes the above-mentioned updated triangular patch geometry data; and reconstructing the above-mentioned updated GIM model data based on the above-mentioned mapping relationship.

[0096] According to an embodiment of the present application, an embodiment of an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any one of the above-mentioned data lightweight processing methods.

[0097] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0098] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0099] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0100] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0101] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0102] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable non-volatile storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a non-volatile storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned non-volatile storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0103] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A data lightweight processing method, characterized in that: include: The GIM model data is analyzed and processed using the power grid information GIM standard to obtain the geometric data of the GIM model; The geometric data is parsed and segmented by a target three-dimensional geometric modeling library to obtain triangular facet geometric data of the GIM model; Determine whether there are duplicate vertex data in the triangular patch geometry data by constructing a nested tree, and if the determination result is yes, merge the duplicate vertex data to obtain updated triangular patch geometry data; Determining whether there is duplicate vertex data in the triangular patch geometry data by constructing a nested tree includes: Determine whether the nested tree is empty; If the nested tree is empty, adding a first vertex to the cache container, wherein the first vertex is the last vertex put into the nested tree; If the nested tree is not empty, calculating a first hash value of the first vertex, and generating a node of a next level based on the first hash value, wherein the first hash value is a hash value of the current level of the first vertex; Obtain a second hash value of a second vertex, wherein the second vertex is a vertex to be placed in the nested tree, and the second hash value is a hash value of a current level of the second vertex; Determine whether the second Hash value is equal to the first Hash value; If the second Hash value is not equal to the first Hash value, generating a node of the next level based on the second Hash value, and placing the second Hash value and the node of the next level into the nested tree; If the second hash value is equal to the first hash value, then the current level of the second vertex is increased by one, and the second hash value is continuously determined to be equal to the first hash value, until the second hash value is not equal to the first hash value, and / or the current level of the second vertex reaches a target level number, wherein the target level number is related to the triangle patch geometry data; If the current level reaches the target level number, and the second hash value is equal to the first hash value, it is determined that the triangle patch geometry data corresponding to the second vertex is the repeated vertex data.

2. The method according to claim 1, characterized in that The triangular patch geometric data includes: Coordinate data and normal data of each vertex in the GIM model; or The coordinate data, normal data and texture data of each vertex in the GIM model.

3. The method according to claim 1, characterized in that The method further comprises: Design model tree based on target hierarchy; Establishing a mapping relationship between the model tree and the updated GIM model data, wherein the updated GIM model data includes the updated triangular patch geometry data; The updated GIM model data is reconstructed based on the mapping relationship.

4. A data lightweight processing device, characterized in that: include: The parsing module is used to parse the GIM model data using the power grid information GIM standard to obtain the geometric data of the GIM model; A subdivision module, used for parsing and subdividing the geometric data through a target three-dimensional geometric modeling library to obtain triangular facet geometric data of the GIM model; A judgment module, used for judging whether there are repeated vertex data in the triangular patch geometric data by constructing a nested tree, and if the judgment result is yes, merging the repeated vertex data to obtain updated triangular patch geometric data; Determining whether there is duplicate vertex data in the triangular patch geometry data by constructing a nested tree includes: Determine whether the nested tree is empty; If the nested tree is empty, adding a first vertex to the cache container, wherein the first vertex is the last vertex put into the nested tree; If the nested tree is not empty, calculating a first hash value of the first vertex, and generating a node of a next level based on the first hash value, wherein the first hash value is a hash value of the current level of the first vertex; Obtain a second hash value of a second vertex, wherein the second vertex is a vertex to be placed in the nested tree, and the second hash value is a hash value of a current level of the second vertex; Determine whether the second Hash value is equal to the first Hash value; If the second Hash value is not equal to the first Hash value, generating a node of the next level based on the second Hash value, and placing the second Hash value and the node of the next level into the nested tree; If the second hash value is equal to the first hash value, then the current level of the second vertex is increased by one, and the second hash value is continuously determined to be equal to the first hash value, until the second hash value is not equal to the first hash value, and / or the current level of the second vertex reaches a target level number, wherein the target level number is related to the triangle patch geometry data; If the current level reaches the target level number, and the second hash value is equal to the first hash value, it is determined that the triangle patch geometry data corresponding to the second vertex is the repeated vertex data.

5. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the data lightweight processing method described in any one of claims 1 to 3.

6. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to run the computer program to execute the data lightweight processing method according to any one of claims 1 to 3.

7. A processor, characterized in that: The processor is used to run a program, wherein the program executes the data lightweight processing method described in any one of claims 1 to 3 when running.