General maintenance method and system for web-side power grid model data
By extracting and expanding the grid model metadata and configuring model types and dependencies, the grid model data maintenance problems under different platforms and regions are solved, unified management and low-cost maintenance of grid model data are realized, and reusability and flexibility are improved.
Patent Information
- Application Number
- CN202510434613.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-25
AI Technical Summary
The prior art is difficult to achieve unified maintenance of power grid model data under different platforms and regions, resulting in high maintenance costs and poor reusability.
By extracting and expanding the grid model metadata, configuring model types and dependencies, using JDBC to connect to the database and store it in the form of table information tables and column information tables, combining the JdbcTemplate technology of the spring framework, and automatically extracting metadata, and realizing dynamic maintenance requirements in different regions through configuration files.
It realizes unified maintenance of power grid model data under different platforms and regions, reduces maintenance costs, improves reusability and flexibility, and supports integrated graphical model maintenance and grid operation status monitoring.
Smart Images

Figure CN120371833A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data maintenance, and particularly relates to a general maintenance method and system for power grid model data on the web side. Background Art
[0002] As an important type of data in the power system, model data plays a crucial role in the entire power grid dispatching, monitoring, and analysis and decision-making. Power grid model data has the characteristics of various types, frequent changes, large data volume, tight model association relationships, and significant differences in model structures under different platforms, which poses certain challenges to the maintenance of the model. At the same time, as the scale of the power grid gradually increases, the amount of model data also increases, and new types of equipment models continue to emerge, further increasing the difficulty of maintaining power system model data. Currently, the method for obtaining power grid model data is that engineering personnel in the real-time area of the power dispatching data network send requests to the server on the workstation client, and the server obtains the model data by querying the power system real-time database. The management information area (web side) and the real-time area of the power dispatching data network complete data exchange and synchronization through a synchronization program. The maintenance of web side data uses respective maintenance systems in different regions and different applications, increasing the R & D and operation and maintenance costs.
[0003] Therefore, in order to support the stable and reliable operation of various business systems of the power grid and reduce the maintenance cost, it is necessary to design a simple and efficient power grid model data maintenance method, which can realize data maintenance functions such as flexible configuration and on-demand access according to the particularity of the data, and ensure the real-time, accurate, and complete nature of the data. Summary of the Invention
[0004] Object of the Invention: The present invention provides a general maintenance method and system for power grid model data on the web side, which can meet the different requirements under different platforms and in different regions, realize the unified maintenance and management of multi-source heterogeneous model data, reduce the maintenance cost, and increase the reusability and flexibility of the model maintenance tool.
[0005] Technical Solution: A general maintenance method for power grid model data on the web side according to the present invention includes the following steps:
[0006] Step 1: Extract and expand the metadata of the power grid model, and store the expanded metadata in the database in the form of a table information table and a column information table;
[0007] Step 2: Configure the types of models to be maintained and the dependency relationships between the models;
[0008] Step 3: Read and parse the metadata and configuration files in Step 1 and Step 2, and display and maintain the model data.
[0009] Further, in step 1, use JDBC to connect to the power grid model database, read the original metadata information in the database respectively, perform formatting conversion on the original data, and finally merge and classify the metadata information of the same type.
[0010] From the original metadata of the power grid model to the extended metadata, establish the field mapping relationship from the original data to the target data. The table information metadata and the extended table information table are in a one-to-one relationship; the column information metadata and the extended column information table are in a many-to-one relationship. For example, the extended column information table contains the English column name (obtained from the column information metadata table), the Chinese column name (obtained from the column comment metadata), the column reference information (obtained from the constraint information metadata), etc.; convert the mapping relationship into SQL statements for extraction and insertion into the database, and then use the JdbcTemplate technology of the spring framework to execute these SQL statements to complete the automatic extraction of metadata.
[0011] Further, the original metadata in the power grid model database includes: table information metadata, column information metadata, table comment information metadata, column comment information metadata, constraint information metadata, column constraint information metadata. After classifying and extending the above metadata, the required table information table and column information table are obtained and stored in the database.
[0012] Further, in step 2, configure the model types to be maintained and the dependencies between models. The power grid model type configuration information includes the model type tableid and the model name label; the model dependencies include the logical dependency information extTableid and the business dependency information trigger.
[0013] Further, in the power grid system, the model data includes two types: necessary information and extended information. The necessary information is the information required by each business system, such as model type, model name, affiliated organization, etc.; the extended information refers to the information temporarily added by different business systems according to local needs, such as whether to go to the cloud, local specific model data types, etc.; manually configure the basic model type information in the text file in the form of a JSON tree according to the necessary model information, and the dependency information that needs to be domain-validated before model changes. When the system is deployed to various sites for use, add the information to be maintained as needed in the text file.
[0014] Further, in step 3, read and analyze the metadata and configuration files in steps 1 and 2. The display and maintenance of the model data specifically include the following steps:
[0015] Step 31: Read the model types in the configuration file in sequence and form a model list tree on the display interface;
[0016] Step 32: Read the column information table of the model, hide the columns with the is_display value of 0 in the column information, and display the columns with the is_display value of 1 on the interface.
[0017] Step 33: For data maintenance, determine whether there is permission to modify, whether to directly input modifications, and whether to provide a drop-down selection box for modification according to the is_input and reference_table values in the column information table.
[0018] Correspondingly, a web-based general maintenance system for power grid model data includes: a metadata extraction module: extracting and expanding the metadata in the database where the power grid model is located into more comprehensive information required for system maintenance;
[0019] A configuration module: used to configure the power grid models to be maintained in different regions and their dependencies;
[0020] A parsing module: used to read the power grid model metadata and parse the configuration file to obtain the power grid models to be maintained, and display and maintain them in the interface.
[0021] Beneficial effects: Compared with the prior art, the present invention has the following remarkable advantages: Through the web-based general model maintenance tool of the present invention, unified management and unified support are provided for the model maintenance requirements of each on-site application in the power grid system. Only simple text configuration modifications are required to customize and implement the dynamic maintenance requirements of different applications, without the need to upgrade and optimize the entire maintenance system at the source code level, with high reusability and scalability; Through the actual application of the system of the present invention, the operation and maintenance costs of model data in various places can be reduced, and flexible support for integrated maintenance of graphic models, monitoring of power grid operation status, etc. can be provided. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a schematic flowchart of the method of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0023] As Figure 1 shown, a web-based general maintenance method for power grid model data includes the following steps:
[0024] Step 1: Extract and expand the metadata of the power grid model; Use JDBC to connect to the database where the model is located, read the table metadata of the original power grid model in the database, and fill in the table_id and table_name_eng fields of the table information table in the reading order; Read the table comment metadata of the original power grid model in the database, and fill in the table_name_chn field of the table information table in the reading order; Read the column metadata of the original power grid model in the database, and fill in the table_id, column_id, and column_name_eng of the column information table in sequence; Read the column comment metadata of the original power grid model in the database, and fill in the column_name_chn field of the column information table; Read the column constraint metadata and the constraint information table of the original power grid model, and fill in the reference_flag, reference_table, and reference_column fields of the column information table; The remaining fields in the column information table are filled as needed during system operation.
[0025] As shown in Table 1 and Table 2, the expanded model data table information and the expanded model data column information contain the following field information.
[0026] Table 1 Expanded Model Data Table Information
[0027] Field Name Remarks Value Type table_id Model Data Table ID Value table_name_eng Model Data Table English Name String table_name_chn Model Data Table Chinese Name String
[0028] Table 2 Expanded Model Data Column Information
[0029] Field Name Remarks Value Type table_id Model Data Table ID Value column_id Model Data Table Column ID Value column_name_eng Model Data Table English Name String column_name_chn Model Data Table Chinese Name String is_key Whether it is the primary key Enumeration values 0, 1 allow_null Whether it can be null Enumeration values 0, 1 is_input Whether input is allowed Enumeration values 0, 1 is_display Whether to display Enumeration values 0, 1 is_fix Whether to display fixed Enumeration values 0, 1 menu_name Menu Name, used to display fixed dictionary data String reference_flag Whether to reference other tables Enumeration values 0, 1 reference_table Foreign Key Reference Table ID Value reference_column Foreign Key Application Table Field ID Value column_special Special Attribute String reserved Reserved Attribute String units Data Unit String
[0030] Step 2: Configure the model data type and dependency relationship, and the configuration file is in JSON format. The maintenance requirements for the types of power grid model data vary in different regions. For example, a local area needs to maintain distribution network data, and a provincial area needs to maintain main network data. If you want to maintain multiple models, configure multiple rules in a similar JSON format. The model data type configuration is a JSON object that contains five attributes: the unique identifier of the model, the name of the table where the model is located, the table number information, the icon required for interface display, and the text description information; The model dependency relationship configuration contains the information of other model sets associated with the current model. Each element in this set is a JSON object, and the object contains three attributes: the unique identifier of the model, whether to cascade delete, and the corresponding column of the associated model's data with this model.
[0031] Dependency relationships of model data. There are two types of dependency relationships for power grid model data: business dependencies and logical dependencies. Specifically, business dependencies mean that multiple model data affect each other during the process of addition and deletion. For example, for the transformer model and the transformer winding model, deleting a transformer will also delete the winding information at the same time. Otherwise, there will be orphaned transformer winding models in the database, which is incorrect in actual business. Logical dependencies mean that a model data is stored in multiple tables, and these tables are generally associated through the id primary key. For example, for the power plant table and the power plant statistics table, when maintaining a power plant information, the power plant statistics information will also be maintained.
[0032] Step 3: Display and maintain model data based on metadata information and configuration files. Specifically, it includes the following steps:
[0033] Step 31: Read the configuration file to obtain the data type tableid that needs to be displayed. According to the tableid, match the model data table to be queried in the table information table, and query the columns of the model data table in the column information table. Finally, splice them into a query SQL to read data from the database.
[0034] Step 32: After reading the data, determine whether to display the column information in the display interface table according to the is_display field in the column information table.
[0035] Step 33: For data editing, judge whether the column information is modifiable according to the is_input field in the column information table; at the same time, judge whether the column is modified by selecting from a dropdown list or directly inputting in an input box according to the reference_flag field.
[0036] Step 34: For data deletion, first judge whether the corresponding data exists in the model data represented by the trigger field. If it exists, before deleting the data, display the data to be cascaded deleted in the display interface.
[0037] Step 35: For data addition, two methods are provided: one is to fill in the global form, and the second is to copy an existing model data and only modify a few individual fields. The first method is suitable for entering new data, and the second method is suitable for batch addition of similar data.
[0038] Correspondingly, a general maintenance system for power grid model data on the web side includes:
[0039] Metadata extraction module: Extract and expand the metadata in the database where the power grid model is located into more comprehensive information required for system maintenance.
[0040] Configuration module: Used to configure the types of power grid models to be maintained in different regions and their dependency relationships.
[0041] Parsing module: used to read the metadata of the power grid model and parse the configuration file to obtain the power grid model to be maintained, and display and maintain it in the interface.
Claims
1. A general maintenance method for power grid model data on the web side, characterized in that, It includes the following steps: Step 1: Extract and expand the metadata of the power grid model, and store the expanded metadata in the database in the form of a table information table and a column information table; Step 2: Configure the types of models to be maintained and the dependencies between models; Step 3: Read and parse the metadata and configuration files in Steps 1 and 2, and display and maintain the model data.
2. The general maintenance method for web - side power grid model data as described in claim 1, wherein, In Step 1, use JDBC to connect to the power grid model database, read the original metadata information in the database respectively, perform formatting conversion on the original data, and finally merge and classify the metadata information of the same type.
3. The general maintenance method for web - side power grid model data according to claim 2, characterized in that, The original metadata in the power grid model database includes: table information metadata, column information metadata, table annotation information metadata, column annotation information metadata, constraint information metadata, column constraint information metadata. After classifying and expanding the above metadata, the required table information table and column information table are obtained and stored in the database.
4. The general maintenance method for web - side power grid model data according to claim 2, wherein From the original metadata of the power grid model to the extended metadata, establish a field mapping relationship from the original data to the target data. The table information metadata and the extended table information table are in a one-to-one relationship, and the column information metadata and the extended column information table are in a many-to-one relationship. Convert the mapping relationship into sql statements for extracting and inserting into the database, and then use the JdbcTemplate technology of the spring framework to execute these sql statements to complete the automatic extraction of metadata.
5. The general maintenance method for web - side power grid model data according to claim 1, characterized in that, In Step 2, configure the types of models to be maintained and the dependencies between models. The power grid model type configuration information includes the model type tableid and the model name label; the model dependencies include the logical dependency information extTableid and the business dependency information trigger.
6. The web - side general maintenance method for power grid model data according to claim 5, characterized in that, In Step 2, in the power grid system, the model data includes two types: necessary information and extended information. The necessary information is the information that each business system needs to use, and the extended information refers to the information temporarily added by different business systems according to local needs. Manually configure the basic model type information in the text file in the form of a JSON tree according to the necessary information of the model, and the dependency information that needs to be domain-validated before the model is changed. When the system is deployed to various field sites for use, add the information to be maintained as needed in the text file.
7. The general maintenance method for web - side power grid model data according to claim 1, characterized in that, In Step 3, read and parse the metadata and configuration files in Steps 1 and 2, and the specific steps for displaying and maintaining the model data include the following: Step 31: Read the model types in the configuration file in sequence and form a model list tree on the display interface; Step 32: Read the column information table of the model, hide the columns with the is_display value of 0 in the column information, and display the columns with the is_display value of 1 on the interface; Step 33: For data maintenance, determine whether there is permission to modify, whether to directly input and modify, and whether to provide a drop-down selection box for modification according to the is_input and reference_table values in the column information table.
8. A system for implementing the general maintenance method of web - side power grid model data as described in claim 1, characterized in that, It includes: Metadata extraction module: Extract and expand the metadata in the database where the power grid model is located into more comprehensive information required for system maintenance; Configuration module: Used to configure the power grid models to be maintained in different regions and their dependencies; Analysis module: It is used to read the metadata of the power grid model and parse the configuration file to obtain the power grid model to be maintained, and display and maintain it in the interface.
Citation Information
Cited By
Unified data object deletion processing method and system based on metadata
CN121433756A