Cache system and method for massive power grid graphic data

By designing a cache system for massive grid graph data, using memory object modeling, device configuration, data loading and real-time incremental modules, the performance problems of traditional databases when processing massive grid data are solved, and efficient storage and rapid query are achieved. Meets the real-time data processing needs of the power grid.

CN119293014APending Publication Date: 2025-01-10NARI INFORMATION & COMM TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411358306.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

Traditional relational database storage and query methods are difficult to meet the real-time processing requirements of massive power grid equipment model data, and face the challenges of processing speed, storage efficiency and query performance.

Method used

A cache system for massive grid graph data is designed, including memory object modeling module, device configuration module, data loading module, attribute field storage module and real-time incremental module. By converting the grid device model data structure into memory object model , perform configuration, data loading, attribute field storage and incremental updates to achieve efficient memory storage and fast querying.

Benefits of technology

It significantly improves the utilization rate of data storage space and query efficiency, supports fast data access and complex query operations, meets the high-speed response capabilities in massive data environments, and adapts to the real-time monitoring and analysis needs of power grid operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293014A_ABST
    Figure CN119293014A_ABST
Patent Text Reader

Abstract

The invention discloses a high-speed caching system and method for massive power grid graphic data, and the system comprises a memory object modeling module which is used for converting a power grid equipment model data structure in a database into an object model in a memory; the equipment configuration module is used for performing new configuration of the power grid equipment model in the configuration library according to the characteristics of the power grid equipment model; the data loading module is used for loading data corresponding to the power grid equipment model; the attribute field storage module is used for storing attribute fields of the power grid equipment model by using a RowBuffer model; the power grid model memory object management module is used for setting a version manager and organizing and managing power grid equipment model data according to versions; the real-time increment module is used for establishing an increment updating system and guaranteeing the real-time performance of increment updating by monitoring database change and recording increment data; compared with a traditional method, the attribute information of the power grid equipment model can be quickly stored and inquired.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a high-speed cache system and method, and in particular to a high-speed cache system and method for massive power grid graphic data, belonging to the technical field of high-speed cache of power grid equipment model data. Background Art

[0002] With the continuous growth of energy demand and the increasing complexity of the power grid structure, modern power systems are showing significant characteristics of scale, complexity and intelligence. This trend has directly led to a surge in the amount of computation required for power grid models and an exponential growth in storage requirements.

[0003] Traditional power grid management and operation modes have become incapable of coping with this huge change. Especially with the widespread application of emerging technologies such as distributed energy, electric vehicle charging facilities, and smart microgrids, the operating characteristics of the power grid have undergone fundamental changes. These changes not only increase the uncertainty of power grid operation, but also put forward higher requirements for data processing and analysis. In this context, traditional relational database storage and query methods can no longer meet the real-time processing needs of massive power grid equipment model data. Faced with the ever-changing power grid operation status and massive real-time data streams, traditional technologies face severe challenges in processing speed, storage efficiency, and query performance. Therefore, it is particularly necessary and urgent to design and implement a high-speed caching technology and system specifically for massive power grid graph data. Summary of the invention

[0004] Purpose of the invention: The purpose of the present invention is to provide a high-speed caching system and method for massive power grid graphic data that can quickly store and query power grid equipment model attribute information.

[0005] Technical solution: A high-speed cache system for massive power grid graphic data according to the present invention comprises:

[0006] The memory object modeling module is used to abstract the power grid equipment model and convert the data structure of the power grid equipment model in the database into an object model in the memory;

[0007] The device configuration module is used to perform new configuration of the power grid device model in the configuration library according to the characteristics of the power grid device model, and save the configuration information in the configuration library;

[0008] The data loading module is used to generate SQL statements according to the configuration information of the power grid equipment model in the configuration library, load the data corresponding to the power grid equipment model, and perform spatial coordinate calculation and conversion of the power grid equipment model, data verification, dirty data removal and index generation;

[0009] The attribute field storage module is used to store the attribute fields of the power grid equipment model using the RowBuffer model and configure the attribute fields;

[0010] The power grid model memory object management module is used to establish a memory object model, set up a version manager, and organize and manage power grid equipment model data by version;

[0011] The real-time incremental module is used to establish an incremental update system, monitor database changes, record incremental data, and ensure the real-time nature of incremental updates.

[0012] Furthermore, the memory object modeling module specifically includes converting the power grid equipment model data structure in the database into an object model in the memory, and abstracting the power grid equipment model into a point equipment model GGadget, a line segment equipment model GSegment, a line type equipment model GPath, a terminal type equipment model GPort and a resource-based non-graphics type equipment model GRecord; and introducing an inheritance mechanism to design a common top-level base class GObject; and designing a corresponding data structure for each type of power grid equipment model.

[0013] Furthermore, the GGadget point device model is used to map a device object having n terminals, where n≥0;

[0014] The GSegment linear device model is used for a linear power grid device model;

[0015] The GPath line object model calculates corresponding coordinate data based on the GSegment linear device model, which is used to map the line and feeder power grid device models in the power grid device model data;

[0016] The GPort terminal type device is used to map the single terminal type power grid device model in the power grid device model data;

[0017] The GRecord device model with resources but no graphics is used to map a power grid device model that only has resources but no graphics representation.

[0018] Furthermore, the device configuration module is specifically implemented as follows:

[0019] Allocate a classID; the classID is a power grid device model type code, each power grid device model type corresponds to a unique classID, the classID includes a segmentation rule, which is used to confirm the business field of the newly added power grid device model during allocation, and determine the classID of the newly added power grid device model according to the classID segmentation range of the corresponding business field; the classID also includes a reservation mechanism, which is used to reserve space for possible future expansion of power grid device model types;

[0020] Configure the power grid equipment model; set up a model definition table, configure the type of the newly added power grid equipment model in the model definition table, and configure information according to the type of the power grid equipment model; and introduce a template mechanism to quickly generate new equipment configurations for similar types of power grid equipment models;

[0021] It also includes configuring the data table to which it belongs; configuring field mapping, configuring version control and rollback mechanism, implementing configuration version management, supporting multiple versions coexisting and fast switching; designing configuration change logs to record detailed information for each modification; and providing configuration rollback function for quickly restoring to the previous version.

[0022] Furthermore, the data loading module is specifically implemented as follows:

[0023] Create a version manager to perform version control and management when loading data, track and roll back data changes, and set the loading order to ensure that the dependencies between data are correctly established; the loading order is: load data in the order of station container equipment, line container equipment, pole tower equipment, and other non-container equipment;

[0024] Parallel loading and multi-threaded processing: During the loading process, a parallel processing mechanism is introduced to load data through multi-threading to improve loading speed and efficiency. Each thread loads data corresponding to a type of power grid equipment model.

[0025] Data verification and filtering: Verify data during loading to ensure data integrity and accuracy; identify and filter retired equipment records in the database to avoid loading invalid data; also include detecting and filtering grid equipment model data with empty or incorrect coordinates to ensure the accuracy of spatial data;

[0026] Object management and memory optimization: Based on the SQL query results, an object is generated for each result. The object is obtained from the object recycling pool first. When the object recycling pool is empty, memory is allocated to create a new object.

[0027] Furthermore, the RowBuffer model of the attribute field storage module is established for each type of power grid device model when the system is initialized, and memory is allocated and offset is set for each power grid device model attribute according to the configured power grid device model attribute field type and length, and memory alignment is considered.

[0028] Furthermore, the specific implementation method of the attribute field storage module includes:

[0029] Set up the attribute field storage structure, introduce a dynamic attribute field mapping table, realize the dynamic association between the power grid equipment model type and the attribute field, use metadata to describe the attribute field of each type of power grid equipment model, and realize the dynamic loading and unloading mechanism of the attribute field;

[0030] Attribute field access: design a general attribute field access interface to support dynamic acquisition and setting of attribute values, and support dynamic type conversion of attribute field values;

[0031] Index optimization and fast search: create an index table from field name to offset address to speed up the search and access of attribute field values; use hash tables to optimize index performance;

[0032] Memory management and performance optimization, implement memory optimization algorithm, dynamically adjust the memory space size to adapt to the attribute field storage requirements of different power grid equipment model types, and use memory data alignment method to control the size of each field to a multiple of 8.

[0033] Further, in the version manager of the power grid model memory object management module, each version includes a memory power grid device model data version set, power grid device model type configuration data and an organizational structure management object;

[0034] The in-memory power grid device model data version includes the version ID, version name, description information, device index, and device type data of the power grid device model data in the version;

[0035] The device index includes a topology index, a device and container relationship index, and an organization and device power grid device model index. The storage structure of the device index is a structure in which a HashMap structure and a list structure coexist.

[0036] The device type data includes all device data, device space index and device name index of the corresponding type of power grid device model. The storage structure of the device space index is a quadtree structure, and the storage structure of the device name index is a dictionary tree structure.

[0037] Furthermore, the real-time incremental module is specifically implemented as follows:

[0038] When the service starts, register the event listener for database changes and record the current maximum sequence value as the benchmark value;

[0039] When a database change event is monitored, the sequence value of the changed data is compared with the maximum sequence value of the record. If it is greater than the maximum sequence value, the data is regarded as incremental data.

[0040] For incremental data, update incremental data in batches to reduce frequent access to the database;

[0041] Introduce a monitoring mechanism to dynamically adjust the detection interval based on database load and data changes;

[0042] Record the logs of incremental updates and monitor the status and performance indicators of incremental updates.

[0043] Based on the same inventive concept, the present invention further provides a method for caching massive power grid graphic data in a high-speed caching system for massive power grid graphic data according to any one of the above items, comprising:

[0044] (1) Abstract the power grid equipment model and convert the data structure of the power grid equipment model in the database into an object model in memory;

[0045] (2) performing a new configuration of the power grid device model in the configuration library according to the characteristics of the power grid device model, and saving the configuration information in the configuration library;

[0046] (3) Generate SQL statements based on the configuration information of the power grid equipment model in the configuration library, load the data corresponding to the power grid equipment model, and perform spatial coordinate calculation and conversion, data verification, dirty data removal, and index generation of the power grid equipment model;

[0047] (4) Use the RowBuffer model to store the attribute fields of the power grid equipment model and configure the attribute fields;

[0048] (5) Establish a memory object model, set up a version manager, and organize and manage power grid equipment model data by version;

[0049] (6) utilizing the high-speed cache system of the massive power grid graphic data to quickly query and perform topological analysis on power grid equipment model data;

[0050] (7) Establish an incremental update system to monitor database changes, record incremental data, and ensure the real-time nature of incremental updates.

[0051] Beneficial effects: Compared with the prior art, the present invention designs a set of data structures specifically adapted to the power grid model, realizing efficient memory storage of the power grid model data; designs advanced attribute field data storage algorithms, significantly reducing the data storage space while ensuring the integrity and availability of the data; designs multi-dimensional indexing technology, greatly improving data retrieval efficiency, supporting fast data access and complex query operations; through a number of performance optimization measures, ensures high-speed response capabilities in a massive data environment to meet the needs of real-time monitoring and analysis; adopts a modular design to support flexible expansion and upgrading of the system to meet the needs of future power grid development; the present invention can not only significantly improve the data processing capability of the power system, but also provide strong data support for the intelligent operation and decision-making of the power grid; by realizing efficient management and rapid access to massive data, it provides technical guarantees for key applications such as safe and stable operation of the power grid, rapid fault diagnosis, and load forecasting, and promotes the progress of smart grid construction. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1A schematic diagram of a system module according to an embodiment of the present invention;

[0053] Figure 2 A diagram showing the system memory structure of an embodiment of the present invention;

[0054] Figure 3 It is a schematic diagram of the hierarchical structure of an object model according to an embodiment of the present invention;

[0055] Figure 4 A schematic diagram of a device configuration module flow chart of an embodiment of the present invention;

[0056] Figure 5 A schematic diagram of a data loading module flow chart of an embodiment of the present invention;

[0057] Figure 6 This is a schematic diagram of an attribute field storage module according to an embodiment of the present invention;

[0058] Figure 7 A schematic diagram of topological connection of an embodiment of the present invention;

[0059] Figure 8 Schematic diagram of a power grid model memory object management module according to an embodiment of the present invention. DETAILED DESCRIPTION

[0060] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0061] As attached Figure 1 As shown, the high-speed cache system for massive power grid graphic data of this embodiment includes:

[0062] The memory object modeling module is used to abstract the power grid equipment model and convert the data structure of the power grid equipment model in the database into an object model in the memory;

[0063] The device configuration module is used to perform new configuration of the power grid device model in the configuration library according to the characteristics of the power grid device model, and save the configuration information in the configuration library;

[0064] The data loading module is used to generate SQL statements according to the configuration information of the power grid equipment model in the configuration library, load the data corresponding to the power grid equipment model, and perform spatial coordinate calculation and conversion of the power grid equipment model, data verification, dirty data removal and index generation;

[0065] The attribute field storage module is used to store the attribute fields of the power grid equipment model using the RowBuffer model and configure the attribute fields;

[0066] The power grid model memory object management module is used to establish a memory object model, set up a version manager, and organize and manage power grid equipment model data by version;

[0067] The real-time incremental module is used to establish an incremental update system, monitor database changes, record incremental data, and ensure the real-time nature of incremental updates.

[0068] Specifically, the memory object modeling is abstracted into five categories according to the characteristics of the power grid equipment model, namely, point-like equipment (Gadget), line-like equipment (Segment), line-like equipment (Path), terminal-like equipment (Port) and resource-free graphics-free equipment (Record). The five types of equipment inherit from the top-level base class GObject. The GGadget point-like equipment model is used to map equipment objects with n (n>=0) terminals, covering substations, transformers, switch-like equipment, capacitors and inductors, etc. The GSegment linear equipment model is used to map linear power grid equipment models such as cable segments, overhead line segments, and connecting lines. The GRecord resource-free graphics-free equipment model is used to map power grid equipment models that only have resources but no graphics, such as substations. The GPath line object model is used to map the lines and feeders in the power grid equipment model data. These devices do not have spatial coordinates in the data table, and the corresponding coordinate data can be calculated based on the GSegment linear equipment model. The GPort terminal-like equipment is used to map the single-terminal power grid equipment model in the power grid equipment model data, including operating towers, main transformer virtual terminals, etc. Memory structure such as Figure 2 As shown, the hierarchy is as Figure 3 Design a dedicated data structure for each major type of power grid equipment model, optimize memory layout, and improve data access efficiency.

[0069] Equipment configuration module, when loading power grid equipment model data, each type of loaded power grid equipment model is included in the above five categories, and the loading information of each type of equipment is saved in the configuration library. When adding a new type of power grid equipment model, it is configured in the configuration library according to the characteristics of the power grid equipment model. The configuration process is as follows Figure 4 The detailed process is as follows:

[0070] 1) Assign classID. ClassID is the equipment type code. Each type of power grid equipment model corresponds to a unique classID. When allocating, the classID segmentation rules must be followed to confirm which business field the newly adapted model belongs to. Then, according to the classID segmentation range of the corresponding business field, the classID of the newly adapted model is determined. In addition, a ClassID reservation mechanism is designed to reserve space for possible future expansion of power grid equipment model types;

[0071] 2) Configure the power grid equipment model. Configuring the power grid equipment model means realizing the dynamic adaptation of the new model in the model definition table. In the model definition table, configure which of the five categories the new power grid equipment model belongs to. According to the power grid equipment model category, configure the power grid equipment model category, power grid equipment model subtype, whether it is an on-site or off-site power grid equipment model, graphic resource asset table name, business field number, container table name, attribute field name that the power grid equipment model needs to load, etc. Introduce a template mechanism to quickly generate new equipment configurations based on similar power grid equipment model types;

[0072] 3) Configure the data table, configure the graphic resource asset table, the container table of the power grid equipment model category, the corresponding primary key information, etc. according to the power grid equipment model category, support multi-data source configuration, and realize the integration of power grid equipment model information across databases;

[0073] 4) Configure field mapping. According to the power grid equipment model category, configure the required personalized fields in the field mapping table. Common fields will be loaded uniformly, and field mapping templates are implemented to support fast batch configuration of similar power grid equipment model types. Introduce field dependency analysis to ensure that the necessary associated fields are correctly configured;

[0074] It can also include configuration version control and rollback mechanisms to implement configuration version management, support multiple versions coexisting and fast switching. Design a configuration change log to record the details of each modification. Provide a configuration rollback function to allow quick recovery to the previous stable version.

[0075] The data loading module is used to generate SQL statements based on the configuration information in the configuration library, load the corresponding power grid equipment model data, and introduce a multi-threaded parallel loading mechanism to significantly improve the data loading speed. When loading data, the retired equipment recorded in the database is filtered according to the data consistency check. In addition, the graphic devices with empty coordinates and the devices with incorrect graphic device coordinates (such as a cable segment with one end connected in China and the other end connected in Africa) are filtered, and the spatial coordinates of the equipment are calculated, processed and converted, and various equipment indexes are generated. The data loading module loading process is as follows: Figure 5 As shown, the specific loading process is as follows:

[0076] 1) Create a version manager to ensure version control and management during data loading, so as to track and roll back data changes, and set the loading order: load data in the order of station container equipment, line container equipment, tower equipment and other non-container equipment to ensure that the dependencies between data are correctly established;

[0077] 2) Parallel loading and multi-threaded processing. In order to improve the loading speed, a parallel processing mechanism is introduced during the loading process. Data is loaded through multi-threading to improve the loading speed and efficiency. One thread corresponds to a type of equipment. Each thread is responsible for loading the data of a specific type of power grid equipment model. SQL queries are optimized to reduce query time and avoid data conflicts and interference.

[0078] 3) Data verification and filtering, strengthen data consistency verification: Strictly verify the data during the loading process to ensure the integrity and accuracy of the data. Identify and filter retired equipment records in the database to avoid loading invalid data. In addition, detect and filter the grid equipment model data with empty or unreasonable coordinates to ensure the accuracy of spatial data.

[0079] 4) Object management and memory optimization: Based on the SQL query results, an object is generated for each result. To reduce memory fragmentation, objects are obtained from the object recycling pool first. When the object recycling pool is empty, memory is allocated to create new objects, thus achieving object reuse, reducing memory fragmentation, and improving memory utilization.

[0080] Attribute field storage module, because each device type has different attribute fields in the database, and there are only five types of memory objects, while there are thousands of device types, if the traditional data structure design is used, the fields involved in each device type are hard-coded in the code, which will not only make the code redundant and difficult to maintain, but also cause a large memory footprint. In order to solve the above problems, we designed the following Figure 6 The attribute field storage structure shown in the figure stores the personalized attribute fields of each device type in a continuous address space. In order to find the corresponding field and convert it to the correct data type, the offset address and data type of each attribute field are recorded. In order to quickly find the corresponding field value through the field name, an index from the field name to the offset address is set. The specific process is as follows:

[0081] 1) Attribute field storage structure: the system introduces a dynamic attribute field mapping table to achieve dynamic association between device type and attribute field. Metadata is used to describe the attribute field of each type of power grid device model to avoid hard coding in the code, and a dynamic loading and unloading mechanism of attribute fields is implemented to reduce unnecessary memory usage.

[0082] 2) Attribute field access: We design a general attribute field access interface to support dynamic acquisition and setting of attribute values. It supports dynamic type conversion of attribute field values ​​to ensure data consistency and correctness.

[0083] 3) Index optimization and fast search: Establish an index table from field name to offset address to speed up the search and access of attribute field values. Use hash tables to optimize index performance, reduce the time complexity of field value retrieval, and improve the efficiency of locating corresponding field values;

[0084] 4) Memory management and performance optimization: implement memory optimization algorithms, dynamically adjust the memory space size to adapt to the attribute field storage requirements of different power grid equipment model types, use memory data alignment methods, control the size of each field to a multiple of 8, and improve memory utilization and system performance;

[0085] The RowBuffer model is established for each type of power grid device model when the system is initialized. Memory is allocated and an offset is set for each device attribute according to the configured power grid device model attribute field type and length to improve the access speed of the power grid device model attributes, and memory alignment is considered to further optimize performance.

[0086] After loading a type of equipment, the equipment ID index and spatial index of the power grid equipment model type will be created, and a topological index will be generated. The topological connection diagram is as follows: Figure 7 When all power grid equipment models are loaded, they will be saved in a power grid equipment model version object. The power grid equipment model memory version object is managed by the power grid equipment model memory version object manager. Its structure diagram is shown in Figure 8 As shown. The power grid equipment model version manager manages the power grid equipment model data in a version mode. Each version contains a complete power grid equipment model data of a certain area topology, attributes, and location. Each version contains version ID, version name, description information, device index information, and device type data. The device index contains the topology index, the device and container relationship index, and the organization and power grid equipment model relationship index. The device type data contains all the power grid equipment model data of a certain type of equipment, the spatial index of the equipment, the name index of the equipment, and other information. The power grid equipment model data contains the complete data of its corresponding version, including ID, spatial location, topology information, attribute information, etc.; topology information refers to the topological connection relationship between power grid equipment models. The topological connection relationship between devices is established through the topological connection node value. Only GGadget and GSegment will participate in the topology. The GGadget object will record n ​​(n>=0) node values, and the GSegment object will record the head node value and the end node value of the linear device. When different devices have at least one identical node value, it is considered that the two power grid equipment models are topologically connected.

[0087] Real-time incremental update module, this module monitors database changes, the detection interval is configurable, the default detection interval is set to 20ms, if the detection interval is set to less than 200ms, and all changed data can be loaded within 500ms, then the incremental data update can be controlled to be completed within 1 second, ensuring the real-time nature of the incremental update. The service identifies incremental data based on the sequence value, and records the current maximum sequence value when the service starts. After the service starts, it continues to monitor database changes. When data larger than the sequence value is found in the database, this data is regarded as incremental data, and the current maximum sequence value data is recorded for subsequent incremental updates. The incremental update process is consistent with the data loading process. The specific implementation process is as follows:

[0088] 1) Event listener registration: register the event listener for database changes when the service starts, so as to capture database change operations in real time.

[0089] 2) Record the current maximum sequence value. When the service starts, obtain the maximum sequence value in the current database and record it as the benchmark value.

[0090] 3) Event processing: When a database change event is monitored, the sequence value of the changed data is compared with the maximum sequence value of the record. If it is greater than the maximum sequence value, the data is regarded as incremental data.

[0091] 4) Incremental update processing: For incremental data, the service updates the incremental data in batches to reduce frequent access to the database.

[0092] 5) Dynamically adjust the detection interval and introduce a monitoring mechanism to dynamically adjust the detection interval according to the database load and data changes to ensure real-time performance while reducing resource consumption.

[0093] 6) Logging and monitoring: record the logs of incremental updates and monitor the status and performance indicators of incremental updates for subsequent optimization and troubleshooting.

[0094] This system not only needs to be able to efficiently store and manage huge amounts of grid equipment model data, but also needs to provide fast data access and real-time analysis capabilities. It will provide strong technical support for key applications such as intelligent dispatching, fault diagnosis, and load forecasting of the power grid, thereby significantly improving the operating efficiency and reliability of the power grid. This innovative caching technology has promoted the progress of smart grid construction and paved the way for building a safer, more efficient, and cleaner modern power system. It can not only meet the urgent needs of current power grid operation, but also lay a solid technical foundation for the further intelligence and modernization of future power systems.

[0095] Based on the same inventive concept, this embodiment further provides a method for caching massive power grid graphic data in a high-speed caching system for massive power grid graphic data according to any one of the above items, comprising:

[0096] (1) Abstract the power grid equipment model and convert the data structure of the power grid equipment model in the database into an object model in memory;

[0097] (2) performing a new configuration of the power grid device model in the configuration library according to the characteristics of the power grid device model, and saving the configuration information in the configuration library;

[0098] (3) Generate SQL statements based on the configuration information of the power grid equipment model in the configuration library, load the data corresponding to the power grid equipment model, and perform spatial coordinate calculation and conversion, data verification, dirty data removal, and index generation of the power grid equipment model;

[0099] (4) Use the RowBuffer model to store the attribute fields of the power grid equipment model and configure the attribute fields;

[0100] (5) Establish a memory object model, set up a version manager, and organize and manage power grid equipment model data by version;

[0101] (6) utilizing the high-speed cache system of the massive power grid graphic data to quickly query and perform topological analysis on power grid equipment model data;

[0102] (7) Establish an incremental update system to monitor database changes, record incremental data, and ensure the real-time nature of incremental updates.

Claims

1. A high-speed cache system for massive power grid graphic data, characterized in that: include: The memory object modeling module is used to abstract the power grid equipment model and convert the data structure of the power grid equipment model in the database into an object model in the memory; The device configuration module is used to perform new configuration of the power grid device model in the configuration library according to the characteristics of the power grid device model, and save the configuration information in the configuration library; The data loading module is used to generate SQL statements according to the configuration information of the power grid equipment model in the configuration library, load the data corresponding to the power grid equipment model, and perform spatial coordinate calculation and conversion of the power grid equipment model, data verification, dirty data removal and index generation; The attribute field storage module is used to store the attribute fields of the power grid equipment model using the RowBuffer model and configure the attribute fields; The power grid model memory object management module is used to establish a memory object model, set up a version manager, and organize and manage power grid equipment model data by version; The real-time incremental module is used to establish an incremental update system, monitor database changes, record incremental data, and ensure the real-time nature of incremental updates.

2. The high-speed cache system for massive power grid graphic data according to claim 1, characterized in that: The memory object modeling module specifically includes converting the power grid device model data structure in the database into an object model in the memory, and abstracting the power grid device model into a point device model GGadget, a line segment device model GSegment, a line device model GPath, a terminal device model GPort and a resource-free graphics device model GRecord; And introduce inheritance mechanism, design common top-level base class GObject; design corresponding data structure for each type of power grid equipment model.

3. The high-speed cache system for massive power grid graphic data according to claim 2, characterized in that: The GGadget point device model is used to map a device object with n terminals, where n≥0; The GSegment linear device model is used for a linear power grid device model; The GPath line object model calculates corresponding coordinate data based on the GSegment linear device model, which is used to map the line and feeder power grid device models in the power grid device model data. The GPort terminal type device is used to map the single terminal type power grid device model in the power grid device model data; The GRecord device model with resources but no graphics is used to map a power grid device model that only has resources but no graphics representation.

4. The high-speed cache system for massive power grid graphic data according to claim 1, characterized in that: The device configuration module is specifically implemented as follows: Allocate a classID; the classID is a power grid equipment model type code, each power grid equipment model type corresponds to a unique classID, the classID includes a segmentation rule, which is used to confirm the business field of the newly added power grid equipment model during allocation, and determine the classID of the newly added power grid equipment model according to the classID segmentation range of the corresponding business field; the classID also includes a reservation mechanism, which is used to reserve space for possible future expansion of power grid equipment model types; Configure the power grid equipment model; set up a model definition table, configure the type of the newly added power grid equipment model in the model definition table, and configure information according to the type of the power grid equipment model; and introduce a template mechanism to quickly generate new equipment configurations for similar types of power grid equipment models; It also includes configuring the data table to which it belongs; configuring field mapping, configuring version control and rollback mechanism, implementing configuration version management, supporting multiple versions coexisting and fast switching; designing configuration change logs to record detailed information for each modification; and providing configuration rollback function for quickly restoring to the previous version.

5. The high-speed cache system for massive power grid graphic data according to claim 1, characterized in that: The data loading module is specifically implemented as follows: Create a version manager; used for version control and management during data loading, tracking and rolling back data changes, setting the loading order, and ensuring that dependencies between data are correctly established; the loading order is: load data in the order of station container equipment, line container equipment, pole tower equipment, and other non-container equipment; Parallel loading and multi-threaded processing: During the loading process, a parallel processing mechanism is introduced to load data through multi-threading to improve loading speed and efficiency. Each thread loads data corresponding to a type of power grid equipment model. Data verification and filtering: Verify data during the loading process to ensure data integrity and accuracy; identify and filter retired equipment records in the database to avoid loading invalid data; also includes detecting and filtering grid equipment model data with empty or incorrect coordinates to ensure the accuracy of spatial data; Object management and memory optimization: Based on the SQL query results, an object is generated for each result. The object is obtained from the object recycling pool first. When the object recycling pool is empty, memory is allocated to create a new object.

6. The high-speed cache system for massive power grid graphic data according to claim 1, characterized in that: The RowBuffer model of the attribute field storage module is established for each type of power grid device model when the system is initialized, and memory is allocated and offset is set for each power grid device model attribute according to the configured power grid device model attribute field type and length, and memory alignment is considered.

7. The high-speed cache system for massive power grid graphic data according to claim 1, characterized in that: The specific implementation method of the attribute field storage module includes: Set up the attribute field storage structure, introduce a dynamic attribute field mapping table, realize the dynamic association between the power grid equipment model type and the attribute field, use metadata to describe the attribute field of each type of power grid equipment model, and realize the dynamic loading and unloading mechanism of the attribute field; Attribute field access: design a general attribute field access interface to support dynamic acquisition and setting of attribute values, and support dynamic type conversion of attribute field values; Index optimization and fast search: create an index table from field name to offset address to speed up the search and access of attribute field values; use hash tables to optimize index performance; Memory management and performance optimization, implement memory optimization algorithm, dynamically adjust the memory space size to adapt to the attribute field storage requirements of different power grid equipment model types, and use memory data alignment method to control the size of each field to a multiple of 8.

8. The high-speed cache system for massive power grid graphic data according to claim 1, characterized in that: In the version manager of the power grid model memory object management module, each version includes a memory power grid device model data version set, power grid device model type configuration data and an organizational structure management object; The in-memory power grid device model data version includes the version ID, version name, description information, device index, and device type data of the power grid device model data in the version; The device index includes a topology index, a device-container relationship index, and an organization-grid device model relationship index. The storage structure of the device index is a structure in which a HashMap structure and a list structure coexist. The device type data includes all device data, device space index and device name index of the corresponding type of power grid device model. The storage structure of the device space index is a quadtree structure, and the storage structure of the device name index is a dictionary tree structure.

9. The high-speed cache system for massive power grid graphic data according to claim 1, characterized in that: The real-time incremental module is specifically implemented as follows: When the service starts, register the event listener for database changes and record the current maximum sequence value as the benchmark value; When a database change event is monitored, the sequence value of the changed data is compared with the maximum sequence value of the record. If it is greater than the maximum sequence value, the data is regarded as incremental data. For incremental data, update incremental data in batches to reduce frequent access to the database; Introduce a monitoring mechanism to dynamically adjust the detection interval based on database load and data changes; Record the logs of incremental updates and monitor the status and performance indicators of incremental updates.

10. A method for caching massive power grid graphic data in a high-speed caching system for massive power grid graphic data according to claims 1 to 9, characterized in that: include: (1) Abstract the power grid equipment model and convert the data structure of the power grid equipment model in the database into an object model in memory; (2) performing a new configuration of the power grid device model in the configuration library according to the characteristics of the power grid device model, and saving the configuration information in the configuration library; (3) Generate SQL statements based on the configuration information of the power grid equipment model in the configuration library, load the data corresponding to the power grid equipment model, and perform spatial coordinate calculation and conversion, data verification, dirty data removal, and index generation of the power grid equipment model; (4) Use the RowBuffer model to store the attribute fields of the power grid equipment model and configure the attribute fields; (5) Establish a memory object model, set up a version manager, and organize and manage power grid equipment model data by version; (6) utilizing the high-speed cache system of the massive power grid graphic data to quickly query and perform topological analysis on power grid equipment model data; (7) Establish an incremental update system to monitor database changes, record incremental data, and ensure the real-time nature of incremental updates.