Database system construction method and system based on new energy centralized control
By constructing a real-time database through multi-level name domain partitioning and Redis middleware, combined with a secure partitioning design, the real-time and security issues of the new energy centralized control system in the processing of massive data are solved, and efficient and reliable data management and real-time analysis capabilities are achieved.
Patent Information
- Application Number
- CN202511001223.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-21
- Publication Date
- 2025-11-07
AI Technical Summary
Existing databases in new energy centralized control systems struggle to balance efficient processing and real-time requirements when dealing with massive amounts of data. Relational databases experience performance degradation under high frequency and high concurrency, while time-series databases have limited capabilities in cross-system data correlation analysis and complex business logic processing.
A real-time database is built using multi-level name domain partitioning and Redis middleware. Combined with a secure partitioning design and a synchronization service module, data is partitioned by defining database tables and domains to achieve flexible conversion and on-demand scheduling of historical and real-time data, ensuring system scalability, security, and real-time performance.
It enables efficient and reliable processing of data in the new energy centralized control system, improves data organization logic and retrieval efficiency, meets the power system's requirements for data timeliness, security and integrity, supports equipment control and automated process execution, and ensures the system's functionality and intelligence level.
Smart Images

Figure CN120910046A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a database system construction method and system based on new energy centralized control. BACKGROUND
[0002] In recent years, with the global energy structure transforming towards clean and low-carbon, the scale of new energy power generation (such as wind power and photovoltaic) and new type of power consumption load (such as electric vehicles and energy storage systems) has rapidly grown. The new energy power system presents the characteristics of high decentralization, volatility and diversification, and its operation data volume grows exponentially, covering all links of power generation, energy storage, power transmission and distribution and power consumption. At the same time, the popularization of smart grid, Internet of Things and 5G technology greatly improves the interconnection degree between new energy equipment and the demand for data interaction has surged. These changes have brought new challenges to traditional power monitoring systems in data processing, storage and real-time analysis, and higher efficiency and more intelligent data management technology is urgently needed.
[0003] At present, the new energy centralized control system mainly uses relational databases (such as MySQL and Oracle) or time series databases (such as InfluxDB and TimescaleDB) for data storage and management. The relational database stores data through structured tables, supports complex queries and transaction processing, while the time series database is optimized for time series data (such as power, voltage and other monitoring data), and has high write and query efficiency.
[0004] However, the most obvious disadvantage of the prior art is that it is difficult to balance the efficient processing of massive data and real-time requirements. The performance of the relational database decreases significantly when facing high-frequency and high-concurrency time series data writing, while the time series database, although optimized for time series data storage, has limited capabilities in cross-system data correlation analysis and complex business logic processing. SUMMARY
[0005] The purpose of the present application is to provide a database system construction method based on new energy centralized control, which can balance the efficient processing of massive data and real-time requirements. On the other hand, a database system construction system based on new energy centralized control is provided.
[0006] Technical solution: The database system construction method according to the present application comprises the following steps:
[0007] (1) Divide the new energy centralized control system data by application, and define the data table and domain of the database to define the system historical database data, wherein the historical database adopts MySQL or PostgreSQL open source relational database cluster deployment;
[0008] (2) The hierarchical structure of data is divided by defining the alias domain of the data points collected by the system, and the data alias collected by the centralized control system is divided into multiple levels, each level defines a serial number and a type;
[0009] (3) The real-time database is constructed through the Redis middleware module, and the on-demand conversion operation of the database content is realized through the conversion service module of the historical database and the real-time database, the conversion operation including importing the data of multiple tables or a single table of a specified station;
[0010] (4) The database system is divided into I area and IV area according to the safety requirements, and the database systems of I area and IV area are constructed respectively, and the data synchronization update of the two safety partitions is realized through the data processing and synchronization service module, the synchronization update including data configuration content and data real-time change content.
[0011] Through hierarchical design and safety partition, a high-efficiency and reliable new energy centralized control database system is constructed: first, the structured storage of historical data is realized based on the data table domain definition of application division, and the open source database cluster is used to ensure the scalability and economy of the system; second, the hierarchical data management system is established through multi-level alias domain division, which improves the logicality and retrieval efficiency of data organization; third, the real-time database is constructed by using Redis middleware and the conversion service module is developed, realizing flexible conversion and on-demand scheduling of historical data and real-time data; finally, through the safety partition design and synchronization service mechanism, the bidirectional safety synchronization of configuration parameters and real-time data is realized on the premise of ensuring the physical isolation of I / IV area, fully meeting the requirements of the power system on data timeliness, safety and integrity.
[0012] Preferably, in step 1, the data and application of new energy centralized control are divided by using a multi-table structure, including:
[0013] The station table, interval table, device table and signal table for data monitoring and collection function, the device table including switch knife switch table, transformer table and unit table, the signal table including telemetering table, remote signaling table and remote pulse table;
[0014] The remote control table, remote adjustment table, anti-misoperation logic table and sequence control operation ticket table for device control operation, sequence control and anti-misoperation locking function;
[0015] The protection signaling substation table, protection signal table, protection setting value area number table, protection setting value table and protection software pressure plate table for relay protection information collection function;
[0016] The formula calculation table, limit value table and linkage table for system data calculation, telemetering limit and linkage alarm function.
[0017] The fine classification and functional organization of the new energy centralized control system data are realized through the multi-table structure design: the plant station table, the interval table and the equipment table (including switch knife, transformer, unit, etc.) construct a hierarchical monitoring and collection system, combined with the remote measurement, remote signaling and remote pulse signal table to realize efficient storage and rapid positioning of full-quantity data; through the remote control table, remote adjustment table and anti-misoperation logic table, and the sequential control operation ticket table, the system supports flexible equipment control and automatic process execution under the premise of ensuring operation safety; the protection signaling substation table, protection signal table and value related table form a complete relay protection information management chain, ensuring accurate tracing and dynamic maintenance of protection data; and the formula calculation table, limit value table and linkage table provide the system with the core capabilities of real-time calculation, over-limit warning and intelligent linkage, ultimately constructing an integrated data architecture covering monitoring, control, protection and analysis of all business scenarios, significantly improving the functionality, safety and intelligent level of the system.
[0018] Preferably, in step 2, the dependency definition of the data hierarchy structure is established by defining an alias field of the database data record, including equipment dependency, measurement point dependency and protection value dependency; the alias field is defined in a multi-level structure, and for monitoring data, a five-level structure of plant station-voltage level-interval-equipment-measurement point is defined, and for protection data, a four-level structure of plant station-protection signaling substation-protection equipment-measurement point is defined.
[0019] The fine hierarchical management of the new energy centralized control system data is realized through the multi-level alias field definition: for monitoring data, a five-level structure of “plant station-voltage level-interval-equipment-measurement point” is adopted, clearly depicting the physical topology relationship of the power system, so that the equipment dependency and measurement point attribution are clear at a glance; for protection data, a four-level structure of “plant station-protection signaling substation-protection equipment-measurement point” is designed, fully presenting the logical architecture of the protection system, ensuring accurate positioning of protection values and signals. This hierarchical alias field design not only establishes a strict data dependency system, realizing standardized coding and rapid retrieval of equipment, measurement points and protection values, but also greatly improves data correlation and readability through structured naming rules, providing an intuitive data navigation path for system monitoring, fault analysis, protection verification and other businesses, laying a unified semantic foundation for cross-system data interaction, and significantly improving data governance level and application efficiency.
[0020] Preferably, each level of the alias field is defined in the type+serial number manner, and different type strings are used to realize differential processing of functional applications.
[0021] Through the standardized naming rule of "type + serial number", the highly structured and intelligent management of the data alias domain of the new energy centralized control system is realized: in each level definition, the type identifier clearly distinguishes the business attributes of different devices, measurement points and protection functions, providing a semantic basis for automatic identification and classification processing for the system; the serial number code establishes the unique identification of elements of the same type, ensuring the accuracy of data positioning. This naming method not only supports the system to automatically adapt to the differentiated processing logic (such as monitoring strategy, alarm rule or control authority) according to the type string, but also realizes the unified analysis and matching of cross-station data through the standardized coding system, greatly improving the data retrieval efficiency and processing accuracy. At the same time, the combination design of type and serial number not only retains the intuitiveness of the hierarchical relationship of data, but also leaves flexible space for system function expansion, so that when new device types or function modules are added, the existing architecture does not need to be restructured, significantly enhancing the adaptability and maintainability of the system, and providing a reliable data foundation for intelligent operation and maintenance and advanced applications.
[0022] Preferably, the data import operation of step 3 comprises:
[0023] Single-station multi-table import mode is used to load multiple data tables associated with a specific station, and only the real-time library data corresponding to the target station is updated in this mode, without affecting the real-time library configuration of other stations;
[0024] Single-table import mode is used to independently load a single data table, and this mode supports selective import by station dimension;
[0025] Among them, both import modes are configured with real-time value domain processing strategies, which can selectively ignore the loading of real-time value domains according to import instructions.
[0026] Through the flexible data import mechanism, efficient and accurate updating of the real-time library of the new energy centralized control system is realized: the single-station multi-table import mode realizes atomic updating of batch data for a specific station, ensuring the consistency of the full data of the station, while avoiding interference with the running data of other stations through isolation mechanism, significantly improving the safety and efficiency of regional data maintenance; the single-table import mode provides fine-grained data loading control, supporting flexible selection of a single data table of a specific station for updating according to business needs, meeting the needs of differentiated operation scenarios. Both modes are equipped with intelligent real-time value domain processing strategies, which can independently choose whether to carry out real-time value updating according to business scenarios, maintaining the stability of historical configuration during system debugging, and ensuring the timeliness of data during production operation. This multi-dimensional import mechanism not only greatly reduces the operation risk of data migration and system upgrade, but also optimizes the resource utilization of the real-time library through precise data updating strategies, providing strong support for the stable operation and agile maintenance of the centralized control system, while meeting the dual needs of data accuracy and system availability in different business scenarios.
[0027] Preferably, the data storage structure of the real-time database in step 3 is constructed by the following method:
[0028] The data table is organized in a key / hash manner;
[0029] The generation of the key adopts a dual discrimination mechanism of alias and id, and the alias field in the data table is preferentially used as the basis for generation;
[0030] When there is no alias field in the data table structure, the id field is automatically switched to as the basis for generation;
[0031] The specific generation rule of the key follows the combination of prefix + table name + identifier, where the identifier is an alias or an id.
[0032] Through the intelligent key / hash storage structure design, the efficient organization and rapid retrieval of the real-time database of the new energy centralized control system are realized: the dual discrimination mechanism of alias and ID is used to dynamically generate the key value, the alias field with business semantics is preferentially used to enhance data readability, and the ID field is automatically switched to ensure data storage reliability when there is no alias; through the standardized key generation rule of "prefix + table name + identifier", the systematicness and standardization of key naming are maintained, and rapid differentiation and accurate positioning of different types of data are realized. This storage structure not only fully utilizes the advantages of Redis high-performance key-value storage, but also greatly improves the data access efficiency and maintainability through the organic combination of business semantics and system identification, so that the system can quickly locate data based on the business level and ensure the accuracy of data operation through technical identification. At the same time, the flexible dual discrimination mechanism takes into account the differences of different data sources, providing stronger compatibility and expandability for the system, effectively supporting the high-concurrency read-write demand of massive real-time data, and providing a solid data foundation for real-time monitoring, rapid control and intelligent analysis of the new energy centralized control system.
[0033] Preferably, step 4 includes:
[0034] Configure the I and IV dual-partition database architecture that meets the requirements of power grid safety isolation, and independently deploy the history database and real-time database in each partition;
[0035] Set up a data synchronization service module for cross-partition data synchronization;
[0036] The data configuration and update operation is actively notified to the data synchronization service module by the data processing service module of each partition through interface calling;
[0037] The data synchronization service module realizes data interaction in the following manner: when synchronizing from the I area to the IV area, unidirectional data packets are transmitted through a forward isolation device; when synchronizing from the IV area to the I area, e-format files are transmitted through a reverse isolation device.
[0038] By strict security partition design and intelligent data synchronization mechanism, a new energy centralized control database system conforming to the highest safety standard of the power grid is constructed: a physical isolated I / IV area dual-partition architecture is adopted, complete isolation between security domains is realized through independently deployed historical database and real-time database, and the absolute safety of the production control area is ensured; an innovative data synchronization service module adopts differentiated transmission strategies: I area to IV area through unidirectional data packets via a forward isolation device, and IV area to I area through e-format files via a reverse isolation device, which not only meets the safety protection regulations of the power monitoring system, but also realizes the bidirectional controllable synchronization of configuration parameters and real-time data. The data processing service modules in each partition actively trigger the synchronization mechanism through standardized interfaces, which not only ensures the timeliness and accuracy of data updates, but also forms a complete operation audit chain. This design not only perfectly solves the contradiction between safety isolation and data sharing, but also optimizes the cross-area data exchange efficiency through intelligent transmission strategies, providing a data support system for the centralized control system that meets the requirements of the cybersecurity protection and has business flexibility, effectively ensuring the data security and system reliability of the key business of the power grid.
[0039] Preferably, the data synchronization process of the historical database includes:
[0040] After the historical database data in the current partition is modified, the data synchronization service module first synchronizes the historical database update of the opposite partition;
[0041] Then, a database conversion service command is sent to the opposite partition;
[0042] After receiving the command, the opposite partition performs the conversion operation from the historical database to the real-time database, and completes the synchronization update of the real-time database in the dual-partition.
[0043] Through the intelligent two-stage synchronization mechanism, high reliable and consistent update of the cross-security partition database is realized: after the historical database in the source partition is modified, the system first ensures the complete synchronization of the historical database in the opposite partition, and establishes the consistency basis of the data version; then, the triggered database conversion service command accurately converts the historical data of the opposite partition into the real-time database format, and realizes the final consistency of the real-time database in the dual-partition. This step-by-step synchronization strategy not only strictly follows the data management principle of "historical database first" of the power system, but also eliminates the risk of manual operation through the automatic conversion process, ensuring the real-time cooperation of the I / IV area database status on the premise of strict isolation of cross-area data, providing a safe and reliable full-partition data support capability for the new energy centralized control system, effectively meeting the stringent requirements of the power grid operation on data timeliness and consistency.
[0044] Preferably, the data synchronization of the real-time library works in parallel in the following two modes:
[0045] Timing full synchronization mode: the data synchronization service module periodically reads the current partition full data, and updates the opposite partition real-time library;
[0046] Change triggered synchronization mode: when the data changes, the change data processing service module notifies the data synchronization service module in real time, and only the change data value is synchronized to the opposite partition real-time library.
[0047] Through the dual-mode parallel real-time library synchronization mechanism, efficient updating and reliable guarantee of cross-partition data of the new energy centralized control system are realized: the timing full synchronization mode provides basic data consistency verification for the system through periodic complete data comparison, and ensures that there is no cumulative deviation in long-term operation; the change triggered synchronization mode realizes millisecond-level fast synchronization of incremental data by real-time monitoring of data change events, and maximizes the timeliness of key data. The two modes complement each other, not only establishing a safety barrier for data integrity through full synchronization, but also realizing low-latency updating of key data with the help of the change triggering mechanism, achieving an optimal balance between system resource occupation and synchronization real-time, providing a high-reliability and high-efficiency synchronization solution for safe partition data interaction of the new energy centralized control system, and fully meeting the dual needs of data accuracy and real-time of power grid operation.
[0048] In a second aspect, the database system construction system comprises:
[0049] A data division module is configured to divide the data of the new energy centralized control system according to applications, and define the historical database data of the system by defining the data tables and domains of the database, wherein the historical database is deployed by using a MySQL or PostgreSQL open source relational database cluster;
[0050] A hierarchical structure construction module is configured to divide the hierarchical structure of the data by defining the alias domains of the system data points, wherein the alias domains are divided in multiple levels, and each level defines a serial number and a type;
[0051] A real-time database module comprises a Redis middleware and a conversion service submodule, wherein the Redis middleware is configured to construct a real-time database, and the conversion service submodule is configured to realize on-demand data conversion between the historical database and the real-time database, and support importing the data of multiple tables or a single table of a specified power station;
[0052] The security partition module is used for dividing the database system into the I area and the IV area, and comprises independent database systems respectively arranged in the I area and the IV area, and a data processing and synchronization service submodule, wherein the synchronization service submodule is used for realizing data synchronization and update between the two security partitions, including synchronization of data configuration content and real-time change content.
[0053] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program capable of being loaded and executed by the processor to implement the database system construction method based on new energy centralized control.
[0054] In a fourth aspect, the present application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the database system construction method based on new energy centralized control.
[0055] Advantages: Compared with the prior art, the present application has the following remarkable advantages: 1. Through the collaborative architecture of the relational database cluster and the in-memory database, the large-scale storage demand of the new energy centralized control system for historical data is met, and the fast response capability of real-time data is guaranteed, so that the balance between data processing efficiency and real-time performance is achieved; 2. The structured alias field definition and the standardized data classification method are adopted to establish a complete data hierarchical system, so as to support fast retrieval and accurate positioning of various types of device data in a complex power grid environment; 3. Through the bidirectional isolation transmission mechanism and the intelligent synchronization strategy, the reliable synchronization and consistency maintenance of the data of the production control area and the information management area are realized under the premise of ensuring the security partition requirements of the power grid; 4. The modularized data table design and the configurable data import mechanism support flexible expansion of new device types and data sources in the system, and adapt to the data access demand of the continuous development of the new energy station. BRIEF DESCRIPTION OF DRAWINGS
[0056] Figure 1 The figure is a method flowchart of the present application;
[0057] Figure 2 The figure is a database table field construction and application data construction flowchart of the present application;
[0058] Figure 3 The figure is a database historical real-time database conversion flowchart of the present application;
[0059] Figure 4 The figure is a database configuration data cross-area synchronization flowchart of the present application;
[0060] Figure 5 The figure is a database real-time data cross-area synchronization flowchart of the present application. DETAILED DESCRIPTION
[0061] The technical solutions of the present application will be further described below with reference to the drawings.
[0062] As Figure 1 shown, the database system construction method of the present application comprises the following steps:
[0063] Step 1, in a multi-machine system, a new energy centralized control mysql or postgres historical database cluster system and a redis real-time database cluster system are constructed, the historical database cluster adopts a master-slave scheme to ensure system reliability and read-write performance, and after the construction of the historical database cluster, the historical database table, domain information and table data information of the system are imported by using an installation script or a backup recovery method.
[0064] Further, the construction of the system default table domain structure in step 1 is mainly based on the modeling of each application of the system according to the application scene to construct the corresponding table and domain structure, for example, the signal table is divided into alarm state class, analog measurement class, control class, anti-misoperation locking class, data calculation class, etc. according to the characteristics and purposes of the collected signals, respectively, to construct the remote signaling table, the remote measurement table, the remote control table, the locking logic table, the formula calculation table, and the like, and to define the table domain information according to the application requirements, for example, the alarm signal table needs to define the alarm name, the alarm mode, the alarm level, the alarm sound, etc. domain information, and the calculation table needs to define the formula content, the data source, the calculation period, etc. domain information.
[0065] As Figure 2 can be seen, the import of the system table domain information during initial installation adopts the initial installation script method, the script realizes the construction of each table and domain information of the system, the table name table, the domain name table, the menu table and the like are constructed for the system class, and the data content in the table is constructed, and only the table domain structure is constructed for the application class table, and the data of the system class table and the application class table is imported through the backup dump file during the recovery installation so as to quickly recover the environment of a certain application.
[0066] Step 2, during installation, the default data table records of the system are imported, such as the table name table, the domain name table, the menu table and the like, the data content of these records is irrelevant to the specific engineering configuration, and is the data content that must exist for the system establishment, and is the basic structure for the system operation.
[0067] Further, the default system table data in step 2 includes the data content of several classified tables such as the table name table, the domain name table, the menu table, etc., for example, the table name table defines the name, the table number, the maximum number of records, etc. of all the data tables used by the system, the domain name table defines the name, the ID, the length range, the memory type, etc. of the domain of each data table, and the menu table defines the content of the menu selection for the domain, defines the corresponding menu name, the menu item name, the menu item value, the value range, etc.
[0068] Step 3, the data of the database application table is constructed by the database configuration tool provided by the system, the alias field of the data is defined according to the point number separated by the levels of the station, voltage level, interval, equipment, etc. to which the measuring point belongs, and the alias is in the form of combination of letters and numbers, and the letters or numbers can express specific meaning in the form of simple English or Pinyin initial character.
[0069] For example, a one-level structure F001 is defined for the station class data alias, a one-level structure V110 is defined for the voltage level data alias, a three-level structure (station-voltage-interval) F001.V110.L001 is defined for the interval class data alias, a four-level structure (station-voltage-interval-equipment) F001.V110.L001.DL001 is defined for the primary equipment class data alias, a five-level structure (station-voltage-interval-equipment-measuring point) F001.V110.L001.DL001.YX0001 is used for the data point uploaded by the gateway machine on the substation side, and a four-level structure (station-protection substation-protection equipment-measuring point) F001.BX001.RLY001.EVENT0001 is used for the data point collected by the relay protection class equipment on the protection information substation. In this way, for the measuring points from different equipment, the equipment level and the relationship between the measuring point and the primary and secondary equipment can be established when the database is defined, and the application processing can be realized according to the meaning and level of the corresponding alias in the later stage.
[0070] Further, the construction of the application table data in step 3 mainly includes the content of the data information related to the collection and processing functions in the application scene, and the alias field can be defined for the table data with large data volume to speed up the mapping speed in the later stage. The alias field has a related level relationship, such as a five-level structure (station, voltage, interval, equipment, measuring point) or a four-level structure (station, protection substation, protection equipment, measuring point). The definition of the level is determined according to the application needs and the actual logical or physical meaning, and the alias field can be used to establish the mapping relationship when the real-time database is mapped.
[0071] Step 4, after the data of the database application table is defined by the configuration tool of the system, the data is loaded into the real-time database through the RPC command. Figure 3 It can be seen that the button of the configuration tool calls the RPC command to inform the historical real-time database conversion service to complete the loading and conversion of the historical database data to the real-time database data. The historical real-time database conversion service can load different parts of the historical database into the real-time database through the options of the command, so that the content of each modification does not affect the application processing and refreshing of the content of the real-time database that has not been loaded, and the stability of the running data is ensured.
[0072] The station serial number and table number are specified in the loading conversion command, and the value domain flag is loaded. When the station serial number is specified but the table number is not, the contents corresponding to the station in the station-related tables (such as the station table, interval table, device table, measurement point table, formula table, etc.) will be loaded in turn, that is, the effect of loading the modification contents of multiple tables at a time can be achieved. When the station serial number and the table number are both specified, the contents containing the specified station serial number in the specified table will be loaded, that is, the loading of the data of the specified station in the single table is achieved. When the station serial number is not specified and only the table number is specified, all the data contents in the specified table will be loaded, that is, the full loading of the single table data is achieved. When the table contains an application real-time data value refreshing domain (value domain), for the case of specifying the loading value domain, all domain values in the table data will be loaded and updated to the real-time library, and for the case of not specifying the loading value domain, the value domain loading will be ignored, that is, only the configuration-related domain values will be loaded to the real-time library.
[0073] The library conversion service first reads the data content matching the loading and conversion command from the real-time library as the source data for comparison, and then reads the related data to be loaded from the historical library as the comparison data for this loading, and when the source data and the comparison data are inconsistent, the redundant part of the source data is deleted based on the comparison data, the existing part is updated, and the incremental part is inserted, so as to ensure the consistency of the data in the historical library and the real-time library. The loading is performed through the alias domain of the data to construct the KEY part of the real-time library, through the VALUE (HASH table) to construct the domain information of the real-time library, and through the association of KEY and VALUE to load all the data information of the table to the real-time library.
[0074] For the case that the amount of monitored data in the centralized control application scenario reaches millions to tens of millions, the library conversion service automatically creates a mapping relationship between the data record alias (alias) and the database marker (id) for the data table containing a large number of records (such as the telemetry and remote signaling tables), and the mapping relationship is implemented through the specified fixed KEY and HASH (id, alias) value pair. In this way, in the processing of the real-time application, the information can be transmitted through the id, and the corresponding record alias can be automatically obtained through the mapping relationship, and then the database KEY can be obtained through the alias to quickly read or write the domain information of the related record.
[0075] The library conversion service can also establish different data simulation spaces according to application requirements, and the simulation space data and the real-time space data are distinguished by different KEY prefixes. The simulation space data mainly includes data points (such as device table and measurement point table records) loaded synchronously under the application simulation state. When loaded, they are in different real-time library memories, so as not to affect each other in application processing and operation. When the application needs, the simulation space can load the real-time space data to the simulation space to realize the mirroring of the current specified section real-time data and the specific application of the mirrored data (such as anti-misoperation rehearsal and student learning).
[0076] According to the content of the loaded table, the library conversion service can further notify the related application service to re-read and load the data after the real-time library data is loaded, such as reloading the formula table configuration (loading the changed formula definition and formula data source) for the calculation application service, and reloading the logic node table for the front channel management service (loading the changed channel parameter and channel protocol configuration). In this way, the system service application process can be reloaded without feeling after the system configuration parameters are changed, preventing the interruption and abnormal alarm of the process data processing, and realizing the non-impact processing of each plant station to other plant station business.
[0077] Step 5, according to the requirements of power monitoring data partition management, the centralized control database service host is divided into I area host cluster and IV area host cluster, and the cluster historical database and real-time database system are arranged on the data hosts of the two partitions, and the initial system historical database data and real-time library data are constructed by the way in steps 1 and 2.
[0078] Further, the loading and importing of the real-time library in step 5 adopts a notification calling mode. The system configuration tool notifies the database conversion service module of the options to be loaded and imported by using RPC calling mode. The database conversion service module comprehensively judges the called command, including the following steps:
[0079] (5.1) If the single plant station importing mode is adopted, the tables related to the plant station are loaded in sequence, and only the records of the specified plant station related tables are loaded. If the single table loading mode is adopted, it is judged whether to load by plant station in the command. If not, all records of the table are loaded. Otherwise, only the specified plant station part of the table is loaded.
[0080] (5.2) Before loading, the data records of the tables in the real-time library that need to be loaded are searched and retrieved. It is judged whether the data records of the tables in the real-time library are consistent with the data records of the tables to be loaded. If not, the redundant part in the real-time library is deleted, and the record is updated to ensure that the real-time library and the historical library table record data remain consistent.
[0081] (5.3) Generate real-time library table record data key, using record key (ID) and alias (ALIAS) dual judgment mode, first judge whether the record alias field ALIAS exists, if it exists, the real-time library KEY is established using ALIAS, otherwise ID is used, the KEY establishment principle is to use a fixed prefix + table name + ALIAS / ID, and the table field content uses HASH mode.
[0082] (5.4) For tables with more record data, such as station, interval, device, and measurement point related tables, establish the mapping MAP corresponding relationship of ALIAS and ID, and use the fixed prefix + (ID, ALIAS) HASH key-value pair mode, which can improve the speed and efficiency of application lookup ID / ALIAS corresponding mapping relationship and reading domain value.
[0083] (5.5) For signal table loading, load signal channel table according to ID, in order to consider the case of multiple channel data access of single station in the centralized control system, automatically establish the real-time fields of multiple channel data values, data change time and data quality in the channel table when loading the signal channel table, to ensure the data storage situation under the condition of multiple channel access of the station end.
[0084] From the attached Figure 4 It can be seen that through the configuration tool of the I area host for the increase, deletion and modification of the historical database engineering application table data, the database modification service module is notified by the configuration tool, and the historical database in the partition is modified according to the notification command, and after the modification is completed, the modification command is sent to the data synchronization service through notification, and the data synchronization service transmits the modification command to the synchronization service of the IV area in the form of unidirectional communication data packet through the unidirectional isolation device of the I / IV area, and the synchronization service of the IV area receives the modification command and calls the database modification service module of the IV area to complete the data modification and update of the historical database of the IV area. In order to ensure the uniqueness of the configuration data modification source, the configuration data is synchronized from the I area to the IV area, and the modification of the related configuration data in the IV area is not supported.
[0085] After the modification of the historical database configuration of the I area host is completed, the conversion command is notified to the historical real-time library conversion service module of the I area by the configuration tool, the conversion service module synchronously updates the configuration data of the real-time database in the I area after the modified configuration data in the historical library is synchronized, and then sends the command to the data synchronization service through notification, and the data synchronization service transmits the conversion command to the synchronization service module of the IV area in the form of unidirectional communication data packet through the unidirectional isolation device of the I / IV area, and the synchronization service module of the IV area receives the conversion command and calls the interface of the historical real-time library conversion service module of the IV area to synchronously update the content of the modified real-time library configuration data of the IV area.
[0086] From the attached Figure 5It can be seen that for the synchronization of the data of the real-time refreshing part of the I, IV area, after the data processing service of each sub-area completes the update of the real-time data range of the area, the interface of the synchronization service is called to send the data refreshing value, refreshing time and other data needing synchronization to the synchronization service of the opposite side sub-area, and the synchronization service of the opposite side sub-area receives and updates the real-time database value range of the opposite side sub-area. According to the characteristics of the partition isolation device, the data synchronization content from the I area to the IV area adopts one-way data packet transmission, and the data synchronization content from the IV area to the I area adopts the e format file ferry method. Considering the actual application scene, the number of data generated by the IV area and needing to be synchronized to the I area is small, and the data refreshing frequency of the I area is not high, so the data processing service e file of the IV area adopts the method of generating files in batches and periodically, thereby reducing the number of file generation and the running frequency of file ferry operation. At the same time, since the data transmission from the I area to the IV area adopts the one-way UDP packet data transmission mode of non-reliable connection, in order to prevent the loss of the real-time change data value of synchronization, the full data value of the real-time library of the I area is periodically synchronized to the real-time library of the IV area by the automatic synchronization mode of the synchronization service reading the full data value of the related table field in the I area.
[0087] Based on the similar inventive concept, the embodiment of the application also provides a database system construction system corresponding to the database system construction method, comprising:
[0088] A data division module is configured to divide new energy centralized control system data according to applications, and define system historical database data by defining data tables and fields of the database, wherein the historical database is deployed by using a MySQL or PostgreSQL open source relational database cluster.
[0089] A hierarchical structure construction module is configured to divide the hierarchical structure of data by defining alias fields of system collected data points, wherein the alias fields are divided in multiple levels, and each level is defined by a serial number and a type.
[0090] A real-time database module comprises a Redis middleware and a conversion service submodule, wherein the Redis middleware is configured to construct a real-time database, and the conversion service submodule is configured to realize on-demand data conversion between the historical database and the real-time database, and support importing data of multiple tables or a single table of a specified station.
[0091] A security partition module is configured to divide the database system into an I area and an IV area, and comprises independent database systems respectively deployed in the I area and the IV area, and data processing and synchronization service submodules, wherein the synchronization service submodules are configured to realize data synchronization and update between the two security partitions, including synchronization of data configuration content and real-time change content.
[0092] The application further discloses an electronic device.
[0093] In particular, the electronic device can be a computer device such as a desktop computer, a notebook computer, a palm computer, and a cloud server. The computer device can include, but is not limited to, a processor and a memory. The processor and the memory can be connected by a bus or other means. The processor can be a central processing unit (CPU). The processor can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, graphics processing units (GPUs), embedded neural-network processing units (NPUs) or other dedicated deep learning co-processors, discrete gates or transistor logic, discrete hardware components, or combinations thereof.
[0094] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs and modules. The processor performs various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory. The memory can include a program storage area and a data storage area, wherein the program storage area can store application programs required by the control unit and at least one function; the data storage area can store data created by the processor and the like. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0095] The application further discloses a computer-readable storage medium.
[0096] In particular, the computer-readable storage medium is used to store a computer program, and the computer program is executed by the processor to implement the method in the above method embodiments.
[0097] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments of the method of the present application can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments of the method. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc. The storage medium can also include a combination of the above-mentioned types of memories.
Claims
1. A database system construction method based on new energy centralized control, characterized in that, Comprise the following steps: (1) The new energy centralized control system data is divided according to application, the data table and the domain of the definition database are used to define the system historical database data, wherein the historical database uses MySQL or PostgreSQL open source relational database cluster deployment; (2) The data hierarchy is divided by defining the alias domain of the system data point, and the alias of the data collected by the centralized control system is divided into multiple levels, and each level is defined as a serial number and a type; (3) The real-time database is constructed through the Redis middleware module, and the conversion service module of the historical database and the real-time database is used to realize the on-demand conversion operation of the database content, the conversion operation includes importing multiple tables or single table data of a specified station; (4) According to the safety requirements, the database system is divided into I area and IV area, and the database systems of I area and IV area are constructed respectively, and the data synchronization update of the two safety partitions is realized through the data processing and synchronization service module, the synchronization update includes data configuration content and data real-time change content.
2. The database system construction method according to claim 1, wherein, In step 1, the data and application of new energy centralized control are divided by adopting multi-table structure, including: The station table, interval table, device table and signal table for data monitoring and collection function, the device table includes switch knife switch table, transformer table and unit table, the signal table includes telemetry table, remote signal table and remote pulse table; The remote control table, remote adjustment table, anti-misoperation logic table and sequence control operation ticket table for device control operation, sequence control and anti-misoperation locking function; The protection signal table, protection signal table, protection signal table, protection value table and protection soft pressure plate table for relay protection information collection function; The formula calculation table, limit value table and linkage table for system data calculation, remote limit and linkage alarm function.
3. The database system construction method according to claim 1, wherein In step 2, the alias domain of the database data record is defined to establish the dependent relationship definition of the data hierarchy, including device dependent relationship, measurement point dependent relationship and protection value dependent relationship; The alias domain adopts multi-level structure definition, single level structure is defined for station data and voltage level data, three level structure is defined for interval data, five level structure is defined for monitoring data, and four level structure is defined for protection data.
4. The database system construction method according to claim 3, wherein Each level of the alias domain is defined by type+serial number, and different type strings are used to realize the difference processing of functional application.
5. The database system construction method according to claim 1, wherein The data import operation of step 3 includes: Single station multi-table import mode, used to load multiple data tables associated with a specific station, only the real-time library data corresponding to the target station is updated in this mode, and the real-time library configuration of other stations is not affected; Single table import mode, used to load a single data table independently, this mode supports selective import according to station dimension; Among them, the two import modes are configured with real-time value domain processing strategy, which can selectively ignore the loading of real-time value domain according to the import instruction.
6. The database system construction method according to claim 1, wherein The data storage structure of the real-time database in step 3 is constructed by the following way: The data table is organized by key / hash method; The generation of the key adopts an alias and id dual discrimination mechanism, and preferentially uses an alias field in a data table as a generation basis; When the alias field does not exist in the data table structure, the id field is automatically switched to be used as a generation basis; The specific generation rule of the key follows a combination form of prefix+table name+identifier, wherein the identifier is an alias or id.
7. The database system construction method according to claim 1, wherein Step 4 comprises: An I area and IV area dual-partition database architecture conforming to the power grid safety isolation requirement is configured, and a historical database and a real-time database are independently deployed in each partition; A data synchronization service module is set, which is used to realize cross-partition data synchronization; Data configuration and update operations are actively notified to the data synchronization service module by a data processing service module in each partition through an interface calling mode; The data synchronization service module realizes data interaction in the following manner: when the I area synchronizes to the IV area, a unidirectional data packet is transmitted through a forward isolation device; when the IV area synchronizes to the I area, an e format file is transmitted through a reverse isolation device.
8. The database system construction method according to claim 7, wherein, The data synchronization process of the historical database comprises: After the historical database data in the current partition is modified, the data synchronization service module first synchronously updates the historical database in the opposite partition; Then, a database conversion service command is sent to the opposite partition; After receiving the command, the opposite partition executes a conversion operation from the historical database to the real-time database, and completes the synchronous update of the real-time database in the dual-partition.
9. The database system construction method according to claim 7, wherein, The data synchronization of the real-time database works in the following two modes in parallel: A timing full-amount synchronization mode: the data synchronization service module periodically reads full-amount data in the current partition, and updates the real-time database in the opposite partition; A change triggering synchronization mode: when data changes, the change data processing service module notifies the data synchronization service module in real time, and only synchronizes the change data value to the real-time database in the opposite partition.
10. A database system construction system based on new energy centralized control, characterized in that, Comprise: A data division module is used to divide new energy centralized control system data according to applications, and define system historical database data by defining data tables and fields of a database, wherein the historical database adopts a MySQL or PostgreSQL open source relational database cluster deployment; A hierarchical structure construction module is used to divide data in a hierarchical structure by defining alias fields of system collected data points, wherein the alias field adopts a multi-level division mode, and each level defines a serial number and a type; A real-time database module comprises a Redis middleware and a conversion service submodule, wherein the Redis middleware is used to construct a real-time database, and the conversion service submodule is used to realize on-demand data conversion between a historical database and a real-time database, and supports importing data of multiple tables or a single table of a specified station; A security partition module is used to divide a database system into an I area and an IV area, and comprises independent database systems respectively deployed in the I area and the IV area, and data processing and synchronization service submodules, wherein the synchronization service submodule is used to realize data synchronization and update between the two security partitions, and comprises synchronization of data configuration contents and real-time change contents.
Citation Information
Cited By
Guide type database cluster deployment method, equipment and medium
CN122086422A