Distribution network data real-time synchronization method and system

By adopting adaptive data synchronization methods in the distribution network, the shortcomings of massive real-time data processing and synchronous backup in the distribution network in the prior art are solved, and efficient and reliable data synchronization and abnormal recovery are achieved.

CN113672681BActive Publication Date: 2025-03-11ZHUHAI XUJIZHI ELECTRIFIED WIRE NETING AUTOMATIONCO +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110863679.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-29
Publication Date
2025-03-11
Estimated Expiration
2041-07-29

Smart Images

  • Figure CN113672681B_ABST
    Figure CN113672681B_ABST
Patent Text Reader

Abstract

The present invention discloses a real-time data synchronization method and system for a power distribution network. The method includes the following steps: a main server detects whether an abnormality has occurred in a database or a side server connection; if the database connection is normal, the main server selects a corresponding data synchronization mode according to the synchronization mode configuration of the database, and notifies the side server to perform data synchronization; if an abnormality has occurred in the database connection, the main server packages and compresses all database files and sends them to the side server, so that the side server receives the corresponding files and expands them to the corresponding database. The present invention not only guarantees the performance requirements of the power distribution system for real-time data through the classification processing of real-time data, but also ensures that the data update equivalence has the least impact on other functions in the case of large data volume, and at the same time, in the case of system abnormality, data can be restored safely and reliably; the real-time hot standby capability of the power distribution network system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of distribution network data synchronization, and in particular to a distribution network data real-time synchronization method and system. Background Art

[0002] The distribution network is at the end of the power system, with the characteristics of wide geographical distribution, large grid scale, many types of equipment, diverse network connections, and changeable operation modes. With the growth of urbanization and electricity demand, the distribution network is constantly being transformed and expanded, and its scale is also constantly expanding. The scale of the distribution network has reached thousands of feeders, and the number of devices connected under each feeder is showing a geometric growth pattern. Therefore, data processing and synchronous backup based on this face severe tests.

[0003] If the existing real-time data processing only relies on the backup equivalent function of commercial databases (real-time or relational) databases, it is far from meeting the requirements of massive real-time processing and synchronous backup of power systems. Therefore, it is urgent to develop a more efficient and reliable real-time processing and synchronous backup mode. Summary of the invention

[0004] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a real-time synchronization method for distribution network data, which can provide an efficient and reliable real-time synchronization backup method for the distribution network.

[0005] The present invention also provides a distribution network data real-time synchronization system having the above distribution network data real-time synchronization method.

[0006] The present invention also proposes a computer-readable storage medium having the above-mentioned real-time synchronization method for distribution network data.

[0007] According to the first aspect of the present invention, the real-time synchronization method of distribution network data includes the following steps: the main server detects whether there has been an abnormality in the database or side server connection; if the database connection is normal, the main server selects the corresponding data synchronization mode according to the synchronization mode configuration of the database, and notifies the side server to perform data synchronization; if the database connection has been abnormal, the main server packages and compresses all database files and sends them to the side server, so that the side server receives the corresponding files and expands them to the corresponding database.

[0008] The real-time synchronization method of distribution network data according to the embodiment of the present invention has at least the following beneficial effects: by classifying and processing real-time data, it not only ensures the performance requirements of the distribution system for real-time data, but also ensures that the impact of data update equivalence on other functions in the case of large amounts of data is minimized, and at the same time, in the event of system abnormalities, data can be restored safely and reliably; the real-time hot standby capability of the distribution network system is improved, ensuring that important data can still be updated and backed up efficiently and orderly when the system's equipment capacity becomes larger and larger, and at the same time providing safe and reliable data support for functions deployed in other databases, ensuring that the real-time processing of the distribution network system is efficient, the database load is balanced, and the anti-abnormal processing capability is greatly improved.

[0009] According to some embodiments of the present invention, the configuration method of the mode classification configuration of the database includes: configuring the synchronization mode to be one of a differential equivalence mode, a service equivalence mode or a broadcast equivalence mode according to the type of data to be synchronized.

[0010] According to some embodiments of the present invention, the differential equivalent data synchronization task has a higher priority than the service equivalent data synchronization task and the broadcast equivalent data synchronization task.

[0011] According to some embodiments of the present invention, the method in which the main server notifies the side server to perform data synchronization in differential equivalence mode includes: the main server obtains the field address of the data to be synchronized, obtains the change result field, and notifies the side server to perform data synchronization through shared memory; the main server determines whether the side server is synchronized correctly through handshake.

[0012] According to some embodiments of the present invention, the method in which the main server notifies the side server to perform data synchronization in a business equivalence mode includes: the main server obtains the address segment and size of the data to be synchronized based on the database block size of the data to be synchronized sent by the business program and the initialization address of each business database, and sends it to the side server through shared memory; the main server determines whether the side server is synchronized correctly through handshake.

[0013] According to some embodiments of the present invention, the method in which the main server notifies the side server to perform data synchronization in a broadcast equivalence mode includes: the main server periodically obtains the address segment and size of the changed database, creates a broadcast task, and sends it to the side server; and the multiple side servers receive the corresponding database change content according to the broadcast task.

[0014] According to some embodiments of the present invention, the data synchronization mode of telesignaling change data and control operation is configured as a differential equivalence mode; and the telemetry processing data is configured as a service equivalence mode.

[0015] According to the second aspect of the embodiment of the present invention, the real-time synchronization system of distribution network data includes: a detection module, which is used to detect whether there is an abnormality in the connection between the main server and the database or the side server; a first synchronization module, which is used to select the corresponding data synchronization mode according to the synchronization mode configuration of the database when the connection between the main server and the database is normal, and notify the side server to perform data synchronization; a second synchronization module, which is used to package and compress all database files and send them to the side server after an abnormality occurs in the connection between the main server and the database, so that the side server receives the corresponding files and expands them to the corresponding database.

[0016] The real-time synchronization system for distribution network data according to the embodiment of the present invention has at least the following beneficial effects: by classifying and processing real-time data, it not only ensures the performance requirements of the distribution system for real-time data, but also ensures that the impact of data update equivalence on other functions in the case of large amounts of data is minimized, and at the same time, in the event of system abnormalities, data can be restored safely and reliably; the real-time hot standby capability of the distribution network system is improved, ensuring that important data can still be updated and backed up efficiently and orderly when the system's equipment capacity becomes larger and larger, and at the same time providing safe and reliable data support for functions deployed in other databases, ensuring that the real-time processing of the distribution network system is efficient, the database load is balanced, and the anti-abnormal processing capability is greatly improved.

[0017] The computer-readable storage medium according to the third aspect of the present invention has a computer program stored thereon, and when the computer program is executed by a processor, the method according to the first aspect of the present invention is implemented.

[0018] The computer-readable storage medium according to the embodiment of the present invention has at least the same beneficial effects as the method of the embodiment of the first aspect of the present invention.

[0019] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0021] Figure 1 A schematic diagram of a method according to an embodiment of the present invention;

[0022] Figure 2 This is a schematic diagram of data synchronization under normal database connection in the method of an embodiment of the present invention;

[0023] Figure 3 A schematic diagram of data synchronization after a database is disconnected in a method according to an embodiment of the present invention;

[0024] Figure 4 A schematic diagram of data synchronization in a differential equivalence mode in a method according to an embodiment of the present invention;

[0025] Figure 5 A schematic diagram of data synchronization in a service equivalence mode in a method according to an embodiment of the present invention;

[0026] Figure 6 A schematic diagram of data synchronization in a broadcast equivalent mode in a method according to an embodiment of the present invention;

[0027] Figure 7 A schematic diagram of data synchronization in an extended equivalent mode in a method according to an embodiment of the present invention;

[0028] Figure 8 The module schematic block diagram of the system according to the embodiment of the present invention.

[0029] Reference numerals:

[0030] Detection module 100 , first synchronization module 200 , second synchronization module 300 . DETAILED DESCRIPTION

[0031] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0032] In the description of the present invention, the meaning of "several" is one or more, the meaning of "more" is two or more, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of the first and the second, it is only for the purpose of distinguishing the technical features, and it cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features. In the description of the present invention, the step numbers are only used for the convenience of description or citation. The size of the serial number of each step does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0033] Reference Figure 1The method of an embodiment of the present invention includes: the main server detects whether an abnormality has occurred in the database or side server connection; if the database connection is normal, the main server selects a corresponding data synchronization mode according to the synchronization mode configuration of the database, and notifies the side server to perform data synchronization; if an abnormality has occurred in the database connection, the main server packages and compresses all database files and sends them to the side server, so that the side server receives the corresponding files and expands them to the corresponding database.

[0034] In the embodiment of the present invention, the real-time synchronization processing of data is divided into four types of modes: differential equivalence, business equivalence, broadcast equivalence, and one-extension equivalence. Each mode corresponds to a different data type of real-time data of the distribution network, and the real-time data is classified and processed equivalently according to the priority level, and the remote signaling, telemetry, and business data of the distribution network system are classified and processed equivalently.

[0035] In the normal operation mode of the system, the differential equivalence, business equivalence, and broadcast equivalence modes are generally used for real-time data equivalence, such as Figure 2 shown.

[0036] The equivalence in this article refers to real-time data synchronization. In the embodiments of the present invention, different data synchronization modes are configured for different data according to the system's requirements for different data real-time performance; the program will select the corresponding synchronization mode strategy according to the configured data synchronization mode to perform real-time data synchronization. The differential equivalence mode is used for the results of telesignaling processing with high real-time equivalence requirements. For example, differential equivalence is used for data equivalence such as switch closing and opening, and protection action results. The business equivalence mode is mainly used for the data equivalence process of the processing results of each application module. The broadcast equivalence mode is mainly used to ensure data integrity, and periodically broadcast equivalence for large amounts of data changes such as telemetry.

[0037] In the case of abnormal system operation, such as when the side server is disconnected, when the connection is restored, the data is updated to different databases in an equivalent way, such as Figure 3 shown.

[0038] The following figure describes in detail the data synchronization methods in different modes.

[0039] (1) Differential equivalence model processing flow.

[0040] The differential equivalence mode is used for data with performance requirements for the results such as the manual position of the remote signal change of the distribution network and the control operation. Through the shared memory method, only the result field is changed equivalently, the equivalent content is the least, the equivalent efficiency is the highest, and the memory usage is the smallest. Among all equivalent modes, the differential equivalence has the highest priority. This equivalence is performed in an independent channel manner, so as to ensure that when a large amount of data is sent, the above processing results are updated equivalently between servers first to ensure data security.

[0041] For example, for the switch telemetering closing / opening status data, equivalent synchronization is performed through the differential equivalent mode. The program pre-sets the closing / opening telemetering address of each switch, directly obtains the closing / opening field address of the switch during the equivalent process, and synchronizes only one closing / opening result field in the shared memory according to the closing / opening field address of the switch. Figure 4 ,This synchronization mode is a one-to-one synchronization mode. The main server only synchronizes a single field to the side server, and the main server and the side server determine whether the data synchronization is completed correctly through handshake.

[0042] The differential equivalence mode is a safe synchronization mode that can ensure the integrity of the data equivalence process through the program.

[0043] (2) Business equivalence model processing flow.

[0044] It mainly focuses on telemetry processing and the equivalent update process of various business data. The business equivalent processing performance is lower than the differential equivalent processing performance. The amount of data in this equivalent equivalent process is larger, but the performance is not optimal. The business equivalent processing process is also based on shared memory mode processing, so it can meet the business requirements for data performance and telemetry equivalent update requirements.

[0045] During the synchronization process, the main server obtains the equivalent address segment and size through the equivalent database block size given by each business program and the initialization address of each business database, and synchronizes the corresponding data to the database of the side server through shared memory. Figure 5 As shown, the equivalent method is a one-to-one synchronization mode, the main server synchronizes the data block content to the side server through the address segment and size of the data block to be synchronized, and the main server and the side server determine whether the data synchronization is completed correctly through handshake.

[0046] The business equivalence mode is a secure synchronization mode that can ensure the integrity of the data equivalence process through programs.

[0047] (3) Broadcast equivalence mode processing flow.

[0048] This is a periodic data synchronization method. This mode is a supplement to differential equivalence and business equivalence. This mode mainly updates important databases periodically through broadcasting, thereby ensuring that the corresponding database content is updated periodically.

[0049] Reference Figure 6 For example, for real-time telemetry data, when using the broadcast equivalent mode for data synchronization, the master server notifies each server process of the address segment and size of the changed database through the program, and the receiving server process receives the corresponding database change content to complete the synchronization of the data block. This method is a one-to-many mode, and no handshake judgment is performed. Whether the equivalent is correctly received is completed.

[0050] The broadcast equivalence mode is a non-secure synchronization mode. The data to be synchronized is published by broadcasting without judging whether the receiver can receive the data completely and correctly.

[0051] After the communication connection between each server is disconnected and the communication is restored normally, an expansion equivalence needs to be performed. Figure 7 All database files are packaged and compressed through the program, and the opposite server is notified to receive the corresponding packaged files. After receiving the corresponding files, the receiving program expands them into the corresponding database to complete the correct data update. One-expansion equivalence is a one-to-one equivalence method. The correctness of data transmission and expansion is guaranteed by the program, which is a safe synchronization mode.

[0052] One-expansion equivalence is a safe equivalence mode that can ensure the integrity of the data equivalence process through programs.

[0053] The embodiments of the present invention realize the classification processing of real-time data, which not only guarantees the performance requirements of the distribution system for real-time data, but also ensures that the data update equivalence of large data volume has the least impact on other functions. At the same time, in the case of system abnormalities, data can be restored safely and reliably; the real-time hot standby capability of the distribution network system is improved, ensuring that when the equipment capacity of the system becomes larger and larger, important data can still be updated and backed up efficiently and orderly, and at the same time, safe and reliable data support is provided for functions deployed in other databases, ensuring that the real-time processing of the distribution network system is efficient, the database load is balanced, and the anti-abnormal processing capability is greatly improved.

[0054] The system in the embodiment of the present invention refers to Figure 8 , including a detection module 100, which is used to detect whether there is an abnormality in the connection between the main server and the database or the side server; a first synchronization module 200, which is used to select a corresponding data synchronization mode according to the synchronization mode configuration of the database when the connection between the main server and the database is normal, and notify the side server to perform data synchronization; a second synchronization module 300, which is used to package and compress all database files and send them to the side server after an abnormality occurs in the connection between the main server and the database, so that the side server receives the corresponding files and expands them to the corresponding database.

[0055] Although specific embodiments are described herein, those of ordinary skill in the art will recognize that many other modifications or alternative embodiments are also within the scope of the present disclosure. For example, any of the functions and / or processing capabilities described in conjunction with a particular device or component may be performed by any other device or component. In addition, although various exemplary implementations and architectures have been described according to embodiments of the present disclosure, those of ordinary skill in the art will recognize that many other modifications to the exemplary implementations and architectures described herein are also within the scope of the present disclosure.

[0056] Some aspects of the present disclosure are described above with reference to the block diagram and flow chart of the system, method, system and / or computer program product according to the exemplary embodiments.It should be understood that the combination of one or more blocks in the block diagram and the flow chart and the blocks in the block diagram and the flow chart can be realized by executing computer executable program instructions respectively.Equally, according to some embodiments, some blocks in the block diagram and the flow chart may not need to be executed in the order shown, or may not need to be executed in full.In addition, additional components and / or operations beyond those components and / or operations shown in the blocks in the block diagram and the flow chart may be present in certain embodiments.

[0057] Therefore, the blocks in the block diagrams and flow charts support the combination of devices for performing the specified functions, the combination of elements or steps for performing the specified functions, and the program instruction devices for performing the specified functions. It should also be understood that each block in the block diagrams and flow charts and the combination of blocks in the block diagrams and flow charts can be implemented by a special-purpose hardware computer system or a combination of special-purpose hardware and computer instructions that performs a specific function, element or step.

[0058] The program modules, applications, etc. described herein may include one or more software components, including, for example, software objects, methods, data structures, etc. Each such software component may include computer-executable instructions that, in response to execution, cause at least a portion of the functionality described herein (e.g., one or more operations of the illustrative methods described herein) to be performed.

[0059] Software components can be encoded with any of various programming languages. An exemplary programming language can be a low-level programming language, such as an assembly language associated with a specific hardware architecture and / or an operating system platform. The software component comprising assembly language instructions may need to be converted to executable machine code by an assembler before being executed by hardware architecture and / or platform. Another exemplary programming language can be a higher-level programming language, which can be transplanted across multiple architectures. The software component comprising a higher-level programming language may need to be converted to an intermediate representation by an interpreter or a compiler before execution. Other examples of programming languages ​​include but are not limited to macro languages, shells or command languages, job control languages, scripting languages, database queries or search languages ​​or report writing languages. In one or more exemplary embodiments, the software component comprising the instruction of one of the above-mentioned programming language examples can be directly executed by an operating system or other software components, without first being converted into another form.

[0060] Software components may be stored as files or other data storage structures. Software components of similar type or related functions may be stored together, such as in a specific directory, folder, or library. Software components may be static (e.g., preset or fixed) or dynamic (e.g., created or modified at execution time).

[0061] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in the relevant technical field without departing from the purpose of the present invention.

Claims

1. A method for real-time synchronization of distribution network data, characterized in that: The following steps are involved: Check whether there is any abnormality in the connection between the main server and the database; If the database connection is normal, the main server selects the corresponding data synchronization mode according to the synchronization mode configuration of the database, notifies the side server to perform data synchronization to correspond to different data types of the real-time data of the power distribution network, and performs real-time data synchronization according to the priority classification processing of the real-time data. The synchronization mode is configured as one of the differential equivalence mode, the business equivalence mode or the broadcast equivalence mode according to the type of data to be synchronized. The priority of the differential equivalence data synchronization task is higher than that of the business equivalence data synchronization task and the broadcast equivalence data synchronization task; According to the system's requirements for different data real-time performance, different data synchronization modes are configured for different data; according to the configured data synchronization mode, the corresponding synchronization mode strategy is selected to perform real-time data synchronization; the differential equivalent mode is used for the results of the telemetering processing process with high real-time equivalent requirements; the business equivalent mode is mainly used for the data equivalent process of the processing results of each application module; the broadcast equivalent mode is used to ensure data integrity, and periodically broadcast equivalent changes to a large number of data such as telemetry; If the database connection has been abnormal, the main server will package and compress all database files and send them to the side server, so that the side server receives the corresponding files and expands them to the corresponding database.

2. The method for real-time synchronization of distribution network data according to claim 1, characterized in that: The method in which the main server notifies the side server to perform data synchronization in a differential equivalent mode includes: The main server obtains the field address of the data to be synchronized, obtains the change result field, and notifies the side server to synchronize the data through the shared memory; The main server determines whether the side server is synchronized correctly through handshake.

3. The method for real-time synchronization of distribution network data according to claim 1, characterized in that: The method in which the main server notifies the side server to perform data synchronization in a service equivalent mode includes: The main server obtains the address segment and size of the data to be synchronized according to the database block size of the data to be synchronized sent by the business program and the initialization address of each business database, and sends it to the side server through the shared memory; The main server determines whether the side server is synchronized correctly through handshake.

4. The method for real-time synchronization of distribution network data according to claim 1, characterized in that: The method for the main server to notify the side server to perform data synchronization in a broadcast equivalent mode includes: The main server periodically obtains the address segment and size of the changed database, creates a broadcast task, and sends it to the side server; The plurality of side servers receive corresponding database change content according to the broadcast task.

5. A real-time synchronization system for distribution network data, used to execute the method according to any one of claims 1 to 4, characterized in that: include: The detection module is used to detect whether there is any abnormality in the connection between the main server and the database; The first synchronization module is used to select a corresponding data synchronization mode according to the synchronization mode configuration of the database when the main server is connected to the database normally, and notify the side server to perform data synchronization; The second synchronization module is used to pack and compress all database files and send them to the side server after an abnormality occurs in the connection between the main server and the database, so that the side server receives the corresponding files and expands them to the corresponding database.

6. A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method according to any one of claims 1 to 4 when executed by a processor.

Citation Information

Patent Citations

  • MySQL master-slave database synchronization method and synchronization system

    CN108052623A

  • Master-slave hot backup data synchronization method and a storage medium

    CN109739685A