A processing method, device, equipment and storage medium for power grid engineering database

By constructing a database with a specific structure to process GIM data, the problem of low efficiency and quality of multi-version GIM data management in the existing technology is solved, and the coordinated management of data and efficient backup and recovery are realized.

CN119226287BActive Publication Date: 2025-03-21STATE GRID ECONOMIC TECH RES INST CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411174516.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2025-03-21
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

The prior art is difficult to effectively process multi-version grid information model (GIM) data, resulting in low efficiency and quality of grid engineering data management.

Method used

By building a database with a specific structure, GIM data is obtained and processed, including extracting header information, determining extension files, mapping to data table structures, extracting unique identifiers, and building a target database.

Benefits of technology

It realizes the coordinated management of GIM data, improves data integrity and continuity, supports multi-version data backup and recovery, and improves the efficiency and quality of power grid engineering data management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226287B_ABST
    Figure CN119226287B_ABST
Patent Text Reader

Abstract

The present invention discloses a processing method, device, equipment and storage medium for a power grid engineering database, wherein the method includes obtaining all GIM initial data of a target power grid engineering and unified management of multi-version and multi-type data; extracting header information of each GIM initial data, and determining the extension file corresponding to each GIM initial data according to the header information; storing each GIM initial data in each data table structure; processing each data table structure according to relational database management system technology to extract a unique identifier for each GIM initial data; determining the primary key information and foreign key information corresponding to each data table structure; and constructing a target database based on each data table structure, unique identifier, primary key information and foreign key information. The processing method for a power grid engineering database provided by an embodiment of the present invention can significantly improve the efficiency and quality of power grid engineering data management, and provide a solid technical foundation for the sustainable development and intelligent upgrading of power grid engineering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a processing method, device, equipment and storage medium for a power grid engineering database. Background Art

[0002] As the structure of power grid projects becomes increasingly large-scale and complex, the amount of data involved in power grid projects is also increasing step by step. The processing of power grid data helps to improve the quality of project construction and the efficiency of power grid safety production and operation, realize the information management and intelligent operation of power grids, and provide reliable power support for the development of the digital economy.

[0003] Power grid engineering is a complex process involving multiple stages, multiple participants and a large amount of data. Among them, the processing of multi-version Grid Information Model (GIM) database plays a vital role in the full life cycle management of power grid engineering. At present, there are few studies on the market that are compatible with the GIM format and the processing of GIM format data. Therefore, how to effectively process GIM data has become a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0004] The present invention provides a method, device, equipment and storage medium for processing a power grid engineering database. By constructing a database with a specific structure to process GIM data, the overall management of the power grid engineering GIM data is achieved, and technical support is provided for the in-depth application of GIM data.

[0005] In order to solve the above technical problems, an embodiment of the present invention provides a method for processing a power grid engineering database, comprising:

[0006] Obtain all GIM initial data of the target power grid project;

[0007] Extracting header information of each of the GIM initial data respectively, and determining the extension file corresponding to each of the GIM initial data according to the header information;

[0008] Based on the mapping relationship between the preset extension file and the data table structure, each of the GIM initial data is stored in each data table structure;

[0009] Processing each of the data table structures according to relational database management system technology to extract a unique identifier for each of the GIM initial data; and,

[0010] Determine the primary key information and foreign key information corresponding to each of the data table structures;

[0011] A target database is constructed based on each of the data table structures, the unique identifier, the primary key information and the foreign key information.

[0012] As one of the preferred solutions, respectively extracting the header information of each of the GIM initial data, and determining the extension file corresponding to each of the GIM initial data according to the header information specifically includes:

[0013] Based on programming language technology, extract the first several bytes of each of the GIM initial data;

[0014] According to a mapping table of various file format signatures and corresponding types, the file header composed of the bytes is compared with the signature of a known file format to determine the extension corresponding to the file type.

[0015] As one of the preferred solutions, based on the mapping relationship between the preset extension file and the data table structure, each of the GIM initial data is stored in each data table structure, including:

[0016] According to the extension file corresponding to each of the GIM initial data, each of the GIM initial data is stored in a preset folder;

[0017] Based on the GIM historical data of the target power grid project, a mapping relationship between the extension file and the data table structure is constructed;

[0018] The GIM initial data are extracted from each folder respectively, and the initial data are processed based on the mapping relationship to store each GIM initial data in each data table structure.

[0019] As one preferred solution, after the target database is constructed, the method for processing the power grid engineering database further includes:

[0020] In response to the data storage instruction, determine each GIM data to be stored;

[0021] Extracting the entry information file of each GIM data to be stored;

[0022] Loading the memory information of each of the entry information files, and adding each of the GIM data to be stored into the corresponding data table structure based on the loading result, so as to update the data table structure;

[0023] Based on the updated data table structure, a GIM data tree diagram is constructed and traversed, wherein the traversal process is designed to traverse according to the hierarchical field, spatial field or reference relationship information of the first GIM data to be stored.

[0024] As one of the preferred solutions, the step of extracting the entry information file of each GIM data to be stored in the database includes:

[0025] Decompress each of the GIM data to be stored into the corresponding folder;

[0026] Analyze the root directory of the folder to determine the file type of the entry information;

[0027] The search instruction is loaded with the file type to obtain the entry information file of each GIM data to be stored.

[0028] As one preferred solution, after the target database is constructed, the method for processing the power grid engineering database further includes:

[0029] In response to the data verification instruction, determining the first version of GIM data and the second version of GIM data to be compared;

[0030] Based on the target power grid device, respectively traverse the first version of GIM data and the second version of GIM data;

[0031] If the traversal result is that the target power grid devices are all corresponding in the first version of GIM data and the second version of GIM data, then a consistency check is performed on the first version of GIM data and the second version of GIM data;

[0032] The consistency check result is stored in the corresponding data table structure, and a corresponding first check result log is generated.

[0033] As one preferred solution, after the consistency check is performed on the first version GIM data and the second version GIM data, the method for processing the power grid engineering database further includes:

[0034] Performing redundant data verification on the first version of GIM data and the second version of GIM data;

[0035] The redundant data verification result is stored in the corresponding data table structure, and a corresponding second verification result log is generated.

[0036] Another embodiment of the present invention provides a processing device for a power grid engineering database, comprising:

[0037] An acquisition module is used to acquire all GIM initial data of the target power grid project;

[0038] An extraction module, used to extract header information of each of the GIM initial data respectively, and determine the extension file corresponding to each of the GIM initial data according to the header information;

[0039] A storage module, used for storing each of the GIM initial data in each data table structure based on a mapping relationship between a preset extension file and a data table structure;

[0040] A processing module, used to process each of the data table structures according to the relational database management system technology to extract a unique identifier of each of the GIM initial data; and determine the primary key information and foreign key information corresponding to each of the data table structures;

[0041] A construction module is used to construct a target database based on each of the data table structures, the unique identifier, the primary key information and the foreign key information.

[0042] Another embodiment of the present invention provides a processing device for a power grid engineering database, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the processing method for the power grid engineering database as described above when executing the computer program.

[0043] Yet another embodiment of the present invention provides a computer-readable storage medium storing a computer program, wherein when a device where the computer-readable storage medium is located executes the computer program, the method for processing a power grid engineering database as described above is implemented.

[0044] Compared with the prior art, the embodiments of the present invention have the following advantages:

[0045] (1) Considering that a large amount of data may be generated in each stage of the power grid project from planning, design, construction to operation and maintenance, this solution provides a processing method for the power grid project database to achieve the overall management of GIM data. The reasonable target database structure can manage multiple types of data and realize the association between data. The multi-version target database can realize data backup at different time points. When the system fails or data is lost, it can be quickly restored to a previous stable version to ensure the integrity and continuity of the data. The processing method of the entire database can significantly improve the efficiency and quality of power grid project data management and provide a solid technical foundation for the sustainable development and intelligent upgrading of power grid projects.

[0046] (2) When new GIM data appears, the processing method of the power grid engineering database of this scheme can store the new GIM data into the database, thereby improving the richness of the data set in the database and helping to maintain the integrity and timeliness of the data. In addition, during the storage process, the new GIM data is accurately divided based on the entry information file, thereby ensuring the rationality of the database after the data is stored.

[0047] (3) Considering that the types of GIM data vary, this solution can verify different versions of GIM data. By comparing different versions of data, errors and inconsistencies in the data can be discovered and corrected, thereby improving the accuracy and reliability of the data. In addition, the verified GIM data has higher quality and can provide more accurate and comprehensive log information support for power grid projects. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a flowchart of a method for processing a power grid engineering database in one embodiment of the present invention;

[0049] Figure 2 It is a logic block diagram of data storage of a method for processing a power grid engineering database in one embodiment of the present invention;

[0050] Figure 3 It is a logic block diagram of data verification of a method for processing a power grid engineering database in one embodiment of the present invention.

[0051] Figure 4 It is a structural block diagram of a processing device for a power grid engineering database in one embodiment of the present invention;

[0052] Figure 5 It is a structural block diagram of a processing device for a power grid engineering database provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] In the description of this application, the terms "first", "second", "third", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", "third", etc. may explicitly or implicitly include one or more of the feature. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0055] In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be a connection between the two elements. The terms "vertical", "horizontal", "left", "right", "upper", "lower" and similar expressions used herein are only for illustrative purposes, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0056] In the description of this application, it should be noted that, unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those commonly understood by those skilled in the art. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood by specific circumstances.

[0057] Power grid engineering data is the core resource for the digital transformation of power grids. Effectively managing multi-type and multi-version data to ensure its consistency and accuracy is of great significance for improving engineering efficiency, reducing costs, and ensuring engineering quality and safety. At present, there are still technical barriers to the integration and connection of data throughout the entire process of power grid engineering, which is one of the topics that must be overcome to achieve the construction of a digital power grid. In view of this, the present invention provides a processing method for a power grid engineering database, which aims to achieve effective management and control of multi-version GIM data.

[0058] Specifically, an embodiment of the present invention provides a method for processing a power grid engineering database, see Figure 1 , Figure 1 The flowchart of the method for processing the power grid engineering database in one embodiment of the present invention is shown, which includes steps S1 to S6:

[0059] S1. Obtain all GIM initial data of the target power grid project;

[0060] S2, extracting the header information of each of the GIM initial data respectively, and determining the extension file corresponding to each of the GIM initial data according to the header information;

[0061] S3, based on the mapping relationship between the preset extension file and the data table structure, storing each of the GIM initial data in each data table structure;

[0062] S4, processing each of the data table structures according to the relational database management system technology to extract a unique identifier for each of the GIM initial data; and,

[0063] S5, determining the primary key information and foreign key information corresponding to each of the data table structures;

[0064] S6. Construct a target database based on each of the data table structures, the unique identifier, the primary key information, and the foreign key information.

[0065] The processing method of the power grid engineering database in this embodiment includes three major processing processes for the database, namely, construction / design of the target database, data storage and data verification, which are described one by one below:

[0066] Database design:

[0067] As the complexity and scale of power grid projects increase, the types and amounts of data involved are also growing. These data include not only the geometry and topology information of the power grid, but also key information such as equipment parameters, operating status, maintenance records, etc. Designing an effective database structure for GIM data can ensure the accuracy, consistency and accessibility of the data, thereby improving the efficiency and effectiveness of planning, design, construction and operation and maintenance of power grid projects, and can also support the innovation and development of power grid projects, providing a solid data foundation for the realization of smart grids and sustainable development.

[0068] Specifically, in the above embodiment, firstly, all GIM initial data of the target power grid project are obtained, and how to obtain them is not specifically limited in the embodiment of the present invention. Secondly, it is necessary to determine the type of all GIM initial data. The GIM data types are diverse, including spatial information, attribute information, hierarchical information classification, etc. The embodiment of the present invention organizes and stores files with different extensions, and determines the corresponding extension file by extracting the header information of each of the GIM initial data. The type of data is determined according to the header information of the data, which is mainly achieved by analyzing the metadata of the data or the first few bytes of a specific format (also called "file header" or "magic number"). Preferably, the first several bytes of each of the GIM initial data can be extracted based on programming language technology (such as Python, Java, etc.), and then the file header composed of the bytes is compared with the signature of the known file format according to the mapping table of various file format signatures and corresponding types (for example, the file header signature corresponding to the JPEG file type is ffd8ffe000104a464946) to determine the extension corresponding to the file type.

[0069] GIM data types are diverse, including spatial information, attribute information, hierarchical information classification, etc. These data are organized and stored in files with different extensions such as *.cbm, *.dev, *.sch, *.fam, *.phm, *.mod, *.ifc, *.stl, *.xml (corresponding to engineering model files, physical model files, logical model files, attribute information files, combined model files, geometric model files, non-electrical model files, non-parametric geometric model files and supplementary material information files, respectively). Among them, *.stl stores models that cannot be drawn with basic graphics; *.ifc stores non-electrical models, such as building, plumbing and other facility models; *.mod stores geometric models composed of multiple basic graphics or parameterized definitions; *.phm stores combined models composed of multiple *.mod files and *.stl files; *.fam stores attribute information composed of identifiers, attribute names and attribute values; *.dev stores physical models composed of combined models (*.phm) and physical model attributes (*.fam); *.sch stores logical models composed of graphic symbols and their associations; .cbm stores engineering models that are information sets composed of all building (structure), equipment, materials and other facility models and engineering attributes in power grid projects, and it also contains logical relationships between equipment; *.xml stores supplementary material information for the unmodeled but required engineering quantity statistics part of the power grid project.

[0070] Preferably, the embodiment of the present invention stores each of the GIM initial data in a preset folder according to the extension file corresponding to each of the GIM initial data. The name of the specific folder is determined by actual needs and can be the first folder or the second folder. In this embodiment, for ease of understanding, the files with various extensions are stored in the CBM, DEV, PHM, and MOD folders respectively. The CBM folder stores the hierarchy, attribute information, and non-electrical model data of the model, and is a logical grouping of the entire model. project.cbm is the file entry for the entire GIM model. Other *.cbm files contain five levels of systems, corresponding to F1System, F2System, F3System, and F4System, respectively. Each level of *.cbm files corresponds to an attribute file *.fam. *.cbm files can be referenced at the same level, but cannot reference themselves. *.ifc and *.xml files are uniformly stored in this folder. The DEV folder stores the equipment, facilities, and attribute data of the model, and is the smallest unit of visual management. It contains files in the three extension formats of *.dev, *.fam, and *.sch. *.dev can reference other *.dev files at the same level and reference the next level *.phm files, but cannot reference itself. The *.fam file format under the DEV folder is related to the corresponding device. The number of attributes and field names stored in the *.fam files corresponding to different physical models are different. The PHM folder includes *.phm files. *.phm can reference *.mod, *.stl or other *.phm, but cannot reference itself. The MOD folder contains *.mod files, and there is no reference relationship between *.mod files.

[0071] In this embodiment, the GIM initial data is extracted from the folder, and the initial data is processed based on the mapping relationship to store each GIM initial data in each data table structure. The advantages of this design are: 1. The folder provides an intuitive hierarchical structure, making data management and access simple and intuitive; 2. Storing data in the folder can reduce the coupling between the data processing logic and the data storage location.

[0072] After that, the above embodiment uses relational database management system technology (PostgreSQL database) to process each of the data table structures. PostgreSQL combined with PostGIS extension provides GIM data management with powerful spatial data support, rich data types, advanced index options, transactionality, concurrency control, security, easy maintainability, community support, multi-platform compatibility, integration capabilities with other systems, backup and recovery mechanisms, customizability, and cost-effectiveness, etc. It is an ideal choice for managing complex GIM space and attribute data at the same time.

[0073] The file data of various extension formats are saved in different data table structures, and GUID (Globally Unique Identifier) ​​is used as the unique identifier. The data is associated with each other through primary key information, foreign key information, etc., so as to save the calling relationship between GIM models at all levels and attribute files and the complete information of attribute files, and effectively organize and manage various types of geometric and non-geometric data. The database constructed in this way is more reasonable and effective.

[0074] It should be noted in advance that, preferably, in the above embodiments, when designing each data table structure, it is necessary to take into account the characteristics of various file storages and design corresponding field types to store corresponding data. The embodiment of the present invention takes 13 data table structures / data tables as examples. According to the specification, the contents of *.cbm, *.dev, *.phm and *.fam files are stored in the form of "identifier name-value" pairs, associated with "=", and the content length is not fixed, so the field type corresponding to the file data in the database is set to JSONB type; the contents of *.mod, *.sch and *.xml files are stored in the form of xml-like tags, so the corresponding field type is set to xml type; the field type corresponding to the content of *.stl files is set to BYTEA type; the field type corresponding to the content of *.ifc files is set to TEXT type. In order to implement the indexing of entity space, each data table adds the outer box position and size information, mainly the coordinates of the lower left corner of the outer bounding box and its length, width and height size information. Table 1 is the data table structure corresponding to the *.cbm file, and the meaning of each field is shown in the remarks column.

[0075] Table 1gim_cbm table structure

[0076]

[0077] Table 2 is the data table structure corresponding to the *.dev file. The meaning of each field is shown in the Remarks column.

[0078] Table 2gim_dev table structure

[0079]

[0080] Table 3 is the data table structure corresponding to the *.fam file. The meaning of each field is shown in the Remarks column. Because the *.fam file corresponds to the attribute information of the entity, there is no need to design the related fields such as the position and size of the outer bounding box.

[0081] Table 3 gim_fam table structure

[0082]

[0083] Table 4 is the data table structure corresponding to the *.phm file. The meaning of each field is shown in the remarks column.

[0084] Table 4 gim_phm table structure

[0085]

[0086] Table 5 is the data table structure corresponding to the *.mod file. The meaning of each field is shown in the remarks column.

[0087] Table 5 gim_mod table structure

[0088]

[0089] Table 6 is the data table structure corresponding to the *.sch file. The meaning of each field is shown in the Remarks column. Because the *.sch file represents graphic symbols and their associations, there is no need to design related fields such as the position and size of the outer bounding box.

[0090] Table 6 gim_sch table structure

[0091]

[0092] Table 7 is the data table structure corresponding to the *.xml file. The meaning of each field is shown in the Remarks column. Because the *.xml file represents graphic symbols and their associations, etc., there is no need to design related fields such as the position and size of the outer bounding box.

[0093] Table 7gim_xml table structure

[0094]

[0095] Table 8 is the data table structure corresponding to the *.ifc file. The meaning of each field is shown in the remarks column.

[0096] Table 8 gim_ifc table structure

[0097]

[0098]

[0099] Table 9 is the data table structure corresponding to the *.stl file. The meaning of each field is shown in the Remarks column.

[0100] Table 9 gim_stl table structure

[0101]

[0102] Tables 1 to 8 above fully record the information of various types of GIM data. In order to effectively restore and save information such as the relationship between models and file references at each level of GIM, a GIM hierarchical structure data table is designed, see Table 9. This table well reproduces the relationship between father and son, brothers, descendants, etc. at each level of the GIM data tree structure. In order to quickly locate various types of data, hierarchical structure traversal coding index related fields are set, see the meaning of the fields in Table 9.

[0103] Table 10gim_tree table structure

[0104]

[0105] In order to provide a complete history of data changes, so that every update, creation or deletion of data can be traced and data traceability can be achieved, a history record change table is designed, as shown in Table 10. The operation_type field records the type of table operation, such as creation, deletion or update. The operation_content field records the data corresponding to the operation type, and records the data in the form of "name-value" in the JSONB field type.

[0106] Table 11gim_history table structure

[0107]

[0108] Tables 1 to 10 above fully record all data of a single version of GIM. To achieve multi-version GIM data management, a multi-version GIM database table is designed, see Table 11. The gim_tree_name field records the name of the gim_tree data table of a certain GIM version data. To link GIM data with geographic coordinates and unify the coordinate system of multi-version data, the location information of the project is stored in four fields: gim_latitude, gim_longitude, gim_altitude, and gim_northDeviationAngle.

[0109] Table 12gims_databse table structure

[0110]

[0111] Table 13 is the table structure corresponding to the gim_check table. The meaning of each field is shown in the Remarks column. This table mainly records the results of consistency check and redundancy check of different versions of GIM data.

[0112] Table 13gim_check table structure

[0113]

[0114]

[0115] Data storage:

[0116] The method for processing a power grid engineering database provided in an embodiment of the present invention further includes data entry, where a data entry instruction is manually issued by an external user or automatically triggered by a target database when specific conditions are met, which is not specifically limited in the embodiment of the present invention.

[0117] For details, see Figure 2 , Figure 2 The logical block diagram of data entry of the processing method of the power grid engineering database in one embodiment of the present invention is shown. In the data entry process, each GIM data to be entered is first determined, and the GIM data to be entered is parsed, that is, data reading and hierarchical structure coding index construction, and then the spatial index construction is performed. First, the GIM data to be entered is specified, and then the GIM data is decompressed, and then all types of file data in the four folders of CBM, DEV, PHM and MOD are stored in the corresponding type data table, and the file hierarchy structure and reference relationship information are placed in the gim_tree hierarchical structure data table, and the relevant information of this version of GIM data is added to the gims_databse multi-version GIM database table.

[0118] For ease of understanding, the data entry process is described in detail below. The first step is to specify the GIM file to be processed, the second step is to decompress the GIM file, the third step is to find the entry information file project.cbm from the decompressed CBM folder, the fourth step is to load the project.cbm file information into the memory, read the longitude, latitude, altitude and north declination angle and other information representing the project's geographic location information, and add this GIM data information to the gims_databse multi-version GIM database table, the fifth step is to initialize the variable values, set the pre-order traversal number value preorder_number to 1, postorder_number to 1, parent_id to NULL, node_level to 1, the sixth step is to determine the file extension information, the seventh step is to determine whether it is a leaf node type file, if it is a leaf node type file, such as *ifc, *.stl, *,mod, *.xml and other extension files, the seventh step is to add the file data to the data table corresponding to the corresponding extension, the eighth step is to add the information to the gim_tree table, and the ninth step is to add the subsequent The traversal number postorder_number value is increased by 1, and the tenth step returns to the MarkLth step of the previous level. If the node type is judged as no in the seventh step, the eleventh step is performed to load the file data into the memory, the twelfth step is performed to add information to the gim_tree table, and the thirteenth step is performed to determine whether there are references to other files line by line. If so, the fourteenth step is performed to increase the values ​​of preorder_number and node_level by 1 respectively, and the fifteenth step is performed to recursively read the referenced file to the sixth step. If the thirteenth step is judged as no, the sixteenth step is performed to determine whether it has reached the end of the file line by line. If not, it returns to the thirteenth step. If the sixteenth step is judged as yes, the seventeenth step is performed to store the current file data in the data table corresponding to the corresponding extension name, the eighteenth step is performed to update the postorder_number value in the gim_tree table, the nineteenth step is performed to increase the subsequent traversal number postorder_number value by 1, and the twentieth step is performed to determine whether there is a previous level. If yes, it returns to the sixteenth step to continue the operation. If not, the data parsing ends. It can be seen that the above steps 6 to 20 are equivalent to building and traversing the GIM data tree diagram.

[0119] At this time, all types of GIM data have been stored, and the corresponding data tables have been updated. A hierarchical structure encoding index has been constructed for each file based on the hierarchical structure and reference relationship, including the parent node sequence number, pre-order traversal value, post-order traversal value, hierarchical information, etc. It is easy to extract other relevant information based on this information, such as the number of descendants, brother nodes, child nodes, etc. In order to search and judge spatial relationships, it is also necessary to assign values ​​to the field information related to the spatial index in the data table. According to the three-dimensional geometric information of the benchmark primitive, the information corresponding to the minimum outer bounding box can be extracted, which records the three-dimensional coordinate value of the lower left corner of the outer bounding box and the length, width, and height information of the outer bounding box. According to the hierarchical structure and reference information recorded in gim_tree, the field values ​​corresponding to the spatial index of the data tables such as gim_cbm, gim_dev, gim_phm, gim_mod, gim_stl, and gim_ifc are calculated one by one. The spatial matrix of the GIM data file is stored in the "TRANSFORMMATRIX" field by row, and the spatial transfer matrix can be obtained by parsing every four numbers in one row. GIM data starts from the device-level cbm and ends at the primitives of the leaf node mod file of the GIM hierarchical structure. Each level corresponds to a spatial transfer matrix, where the device-level spatial transfer matrix is ​​the transfer matrix relative to the origin of the project coordinates. After that, the transfer matrix of each level is relative to the parent node of the GIM hierarchical structure. The three-dimensional coordinate values ​​need to be converted to the coordinate system corresponding to the project. First, the parent space transformation matrix is ​​continuously left-multiplied from bottom to top to obtain the final space transformation matrix. The coordinate value of the lower left corner of the outer bounding box is then left-multiplied by the final calculated space transformation matrix to obtain the three-dimensional coordinate value after the coordinate conversion. Finally, set the spatial index for the coordinate of the lower left corner of the outer bounding box in the data table.

[0120] Of course, the above process is only a preferred implementation method. The actual data storage process needs to be adjusted and optimized according to the actual application scenario and requirements, and will not be explained in detail in the embodiments of the present invention.

[0121] Data verification:

[0122] The method for processing a power grid engineering database provided in an embodiment of the present invention further includes data verification, and a data verification instruction is manually issued by an external user or automatically triggered by the target database when specific conditions are met, which is not specifically limited in the embodiment of the present invention.

[0123] For details, see Figure 3 , Figure 3 The figure shows a logic block diagram of data verification of a processing method for a power grid engineering database in one embodiment of the present invention. The verification between different versions of GIM data includes two parts: consistency verification and redundancy verification. By using effective database design and multidimensional indexes in two dimensions, space and attributes, the verification between different versions of data can be carried out quickly and efficiently.

[0124] Preferably, the first step specifies which two versions of data are to be compared and checked, the second step traverses each device in the opposite direction, the third step checks whether the device is in both version databases, if not, the fourth step determines whether it is a newly added device, if so, the fifth step adds it to the newly added device set, if not, the sixth step adds it to the deleted device set. If the third step is yes, the seventh step consistency check is performed, and the two versions of data are compared based on the query and search functions to see if there is consistency, if so, the eighth step adds the inconsistent data to the gim_check table in the form of "key-value" JSONB type, and then the ninth step redundancy check (redundant data check) is performed, if there is redundant data in the tenth step, the eleventh step adds the redundant data to the gim_check table in the form of "key-value" JSONB type, and then all the check values ​​are exported from gim_check to generate the final check result.

[0125] In addition, the consistency check can generate a corresponding first check result log, and the redundancy check can generate a corresponding second check result log. The first check result log and the second check result log are recorded and stored for subsequent use.

[0126] For details, see Figure 4 , Figure 4 The structure block diagram of a processing device for a power grid engineering database in one embodiment of the present invention is shown, which includes:

[0127] An acquisition module 11 is used to acquire all GIM initial data of the target power grid project;

[0128] An extraction module 12, used to extract header information of each of the GIM initial data respectively, and determine the extension file corresponding to each of the GIM initial data according to the header information;

[0129] The storage module 13 is used to store each of the GIM initial data in each data table structure based on the mapping relationship between the preset extension file and the data table structure;

[0130] The processing module 14 is used to process each of the data table structures according to the relational database management system technology to extract the unique identifier of each of the GIM initial data; and determine the primary key information and foreign key information corresponding to each of the data table structures;

[0131] The construction module 15 is used to construct a target database based on each of the data table structures, the unique identifier, the primary key information and the foreign key information.

[0132] See also Figure 5, which is a structural block diagram of a processing device for a power grid engineering database provided in an embodiment of the present invention. The processing device 20 for a power grid engineering database provided in an embodiment of the present invention comprises a processor 21, a memory 22, and a computer program stored in the memory 22 and configured to be executed by the processor 21. When the processor 21 executes the computer program, the steps in the above-mentioned power grid engineering database processing method embodiment are implemented, for example Figure 1 or, when the processor 21 executes the computer program, the functions of the modules in the above-mentioned device embodiments are implemented, such as the acquisition module 11.

[0133] Exemplarily, the computer program may be divided into one or more modules, which are stored in the memory 22 and executed by the processor 21 to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the processing device 20 of the power grid engineering database. For example, the computer program may be divided into an acquisition module 11, an extraction module 12, a storage module 13, a processing module 14, and a construction module 15, and the specific functions of each module are as follows:

[0134] An acquisition module 11 is used to acquire all GIM initial data of the target power grid project;

[0135] An extraction module 12, used to extract header information of each of the GIM initial data respectively, and determine the extension file corresponding to each of the GIM initial data according to the header information;

[0136] The storage module 13 is used to store each of the GIM initial data in each data table structure based on the mapping relationship between the preset extension file and the data table structure;

[0137] The processing module 14 is used to process each of the data table structures according to the relational database management system technology to extract the unique identifier of each of the GIM initial data; and determine the primary key information and foreign key information corresponding to each of the data table structures;

[0138] The construction module 15 is used to construct a target database based on each of the data table structures, the unique identifier, the primary key information and the foreign key information.

[0139] The processing device 20 of the power grid engineering database may include, but is not limited to, a processor 21 and a memory 22. Those skilled in the art will appreciate that the schematic diagram is merely an example of the processing device of the power grid engineering database, and does not constitute a limitation on the processing device 20 of the power grid engineering database, and may include more or fewer components than shown in the figure, or a combination of certain components, or different components, for example, the processing device 20 of the power grid engineering database may also include input and output devices, network access devices, buses, etc.

[0140] The processor 21 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 21 is the control center of the processing device 20 of the power grid engineering database, and uses various interfaces and lines to connect various parts of the processing device 20 of the entire power grid engineering database.

[0141] The memory 22 can be used to store the computer program and / or module. The processor 21 realizes various functions of the processing device 20 of the power grid engineering database by running or executing the computer program and / or module stored in the memory 22 and calling the data stored in the memory 22. The memory 22 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.). In addition, the memory 22 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0142] Wherein, if the module integrated in the processing device 20 of the power grid engineering database 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 storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0143] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0144] Accordingly, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the steps in the method for processing a power grid engineering database in the above embodiment, for example Figure 1 Steps S1 to S6 described in .

[0145] The processing method, device, equipment and storage medium of the power grid engineering database provided by the embodiments of the present invention have the beneficial effects of at least one of the following:

[0146] (1) Considering that a large amount of data may be generated in each stage of the power grid project from planning, design, construction to operation and maintenance, this solution provides a processing method for the power grid project database to achieve the overall management of GIM data. The reasonable target database structure can manage various types of data and realize the association between data. The multi-version target database can realize data backup at different time points. When the system fails or data is lost, it can be quickly restored to a previous stable version to ensure the integrity and continuity of the data. The processing method of the entire power grid project database can significantly improve the efficiency and quality of power grid project data management, and provide a solid technical foundation for the sustainable development and intelligent upgrading of power grid projects.

[0147] (2) When new GIM data appears, the processing method of the power grid engineering database of this scheme can store the new GIM data into the database, thereby improving the richness of the data set in the database and helping to maintain the integrity and timeliness of the data. In addition, during the storage process, the new GIM data is accurately divided based on the entry information file, thereby ensuring the rationality of the database after the data is stored.

[0148] (3) Considering that the types of GIM data vary, this solution can verify different versions of GIM data. By comparing different versions of data, errors and inconsistencies in the data can be discovered and corrected, thereby improving the accuracy and reliability of the data. In addition, the verified GIM data has higher quality and can provide more accurate and comprehensive log information support for power grid projects.

[0149] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A method for processing a power grid engineering database, characterized in that: include: Obtain all GIM initial data of the target power grid project; Extracting header information of each of the GIM initial data respectively, and determining the extension file corresponding to each of the GIM initial data according to the header information; Based on the mapping relationship between the preset extension file and the data table structure, each of the GIM initial data is stored in each data table structure; Processing each of the data table structures according to relational database management system technology to extract a unique identifier for each of the GIM initial data; as well as, Determine the primary key information and foreign key information corresponding to each of the data table structures; A target database is constructed based on each of the data table structures, the unique identifier, the primary key information and the foreign key information.

2. The method for processing a power grid engineering database according to claim 1, characterized in that: The extracting the header information of each of the GIM initial data respectively and determining the extension file corresponding to each of the GIM initial data according to the header information specifically includes: Based on programming language technology, extract the first several bytes of each of the GIM initial data; According to a mapping table of various file format signatures and corresponding types, the file header composed of the bytes is compared with the signature of a known file format to determine the extension corresponding to the file type.

3. The method for processing a power grid engineering database according to claim 1, characterized in that: Based on the mapping relationship between the preset extension file and the data table structure, each of the GIM initial data is stored in each data table structure, including: According to the extension file corresponding to each of the GIM initial data, each of the GIM initial data is stored in a preset folder; Based on the GIM historical data of the target power grid project, a mapping relationship between the extension file and the data table structure is constructed; The GIM initial data are extracted from each folder respectively, and the initial data are processed based on the mapping relationship to store each GIM initial data in each data table structure.

4. The method for processing a power grid engineering database according to claim 3, characterized in that: After the target database is constructed, the database processing method further includes: In response to the data storage instruction, determine each GIM data to be stored; Extracting the entry information file of each GIM data to be stored; Loading the memory information of each of the entry information files, and adding each of the GIM data to be stored into the corresponding data table structure based on the loading result, so as to update the data table structure; Based on the updated data table structure, a GIM data tree diagram is constructed and traversed, wherein the traversal process is designed to traverse according to the hierarchical field, spatial field or reference relationship information of the first GIM data to be stored.

5. The method for processing a power grid engineering database according to claim 4, characterized in that: The step of extracting the entry information file of each GIM data to be stored in the database includes: Decompress each of the GIM data to be stored into the corresponding folder; Analyze the root directory of the folder to determine the file type of the entry information; The search instruction is loaded with the file type to obtain the entry information file of each GIM data to be stored.

6. The method for processing a power grid engineering database according to claim 1, characterized in that: After the target database is constructed, the database processing method further includes: In response to the data verification instruction, determining the first version of GIM data and the second version of GIM data to be compared; Based on the target power grid device, respectively traverse the first version of GIM data and the second version of GIM data; If the traversal result is that the target power grid devices are all corresponding in the first version of GIM data and the second version of GIM data, then a consistency check is performed on the first version of GIM data and the second version of GIM data; The consistency check result is stored in the corresponding data table structure, and a corresponding first check result log is generated.

7. The method for processing a power grid engineering database according to claim 6, characterized in that: After the consistency check is performed on the first version of the GIM data and the second version of the GIM data, the database processing method further includes: Performing redundant data verification on the first version of GIM data and the second version of GIM data; The redundant data verification result is stored in the corresponding data table structure, and a corresponding second verification result log is generated.

8. A processing device for a power grid engineering database, characterized in that: include: An acquisition module is used to acquire all GIM initial data of the target power grid project; An extraction module, used to extract header information of each of the GIM initial data respectively, and determine the extension file corresponding to each of the GIM initial data according to the header information; A storage module, used for storing each of the GIM initial data in each data table structure based on a mapping relationship between a preset extension file and a data table structure; A processing module, used for processing each of the data table structures according to the relational database management system technology to extract a unique identifier of each of the GIM initial data; And, determining the primary key information and foreign key information corresponding to each of the data table structures; A construction module is used to construct a target database based on each of the data table structures, the unique identifier, the primary key information and the foreign key information.

9. A processing device for a power grid engineering database, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the method for processing a power grid engineering database as claimed in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the device where the computer-readable storage medium is located executes the computer program, the method for processing the power grid engineering database according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method for converting grid information model (GIM) into an FBX three-dimensional model and storing attributes

    CN113221297A

  • Multi-source heterogeneous three-dimensional model data processing method and system

    CN114756555A