Method, device and equipment for checking real-time data of main and standby dispatchers and medium

By acquiring and verifying the consistency of real-time data of the main and backup system in the power system, and triggering data synchronization operations when inconsistencies are inconsistent, the problem of data out of synchronization in the power system is solved, and the reliability and stability of the system are improved.

CN119519875AActive Publication Date: 2025-02-25STATE GRID SICHUAN ELECTRIC POWER CO TIANFU NEW DISTRICT POWER SUPPLY CO
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411663165.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-02-25
Estimated Expiration
2044-11-20

AI Technical Summary

Technical Problem

In the case of emergency of power system, due to frequent rapid data changes, data is not synchronized between the main and backup systems, which affects the rapid response capabilities of the backup dispatch center, and thus affects the safety and reliability of the entire power system.

Method used

By obtaining real-time data of the main and backup system, verifying the consistency of the data based on the timestamp and data identifier. If it is inconsistent, the differential data will be recorded and data synchronization operations will be triggered to ensure that the real-time data of the main and backup system will be consistent.

Benefits of technology

It effectively solves the problem of data from the main and backup system in emergencies in power system, improves the reliability and stability of the system, and ensures the rapid response ability of the backup dispatch center in emergencies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119519875A_ABST
    Figure CN119519875A_ABST
Patent Text Reader

Abstract

The invention discloses a method, a device and equipment for checking real-time data of a main dispatching system and a standby dispatching system, and a medium, and relates to the technical field of power systems, and the key points of the technical scheme are as follows: obtaining real-time data of the main dispatching system and the standby dispatching system; verifying the consistency of the real-time data of the main dispatching system and the standby dispatching system based on the timestamp and the data identifier, and if the real-time data are not consistent, recording difference data; wherein the consistency comprises time consistency and data consistency; and according to the difference data, triggering data synchronization operation of the main scheduling system and the standby scheduling system, so that real-time data of the main scheduling system and the standby scheduling system are consistent. According to the invention, the problem that the data of the main and standby dispatching systems are asynchronous due to rapid and frequent data change under the emergency condition of the power system can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power systems, and more specifically, to a method, device, equipment and medium for checking real-time data of main and standby dispatching. Background Art

[0002] The real-time data verification method for the main and backup dispatching centers refers to ensuring the data consistency between the main dispatching center and the backup dispatching center of the power system through regular or real-time data comparison, thereby ensuring that the backup dispatching center can quickly take over the work of the main dispatching center in the event of an emergency and maintain the stable operation of the system.

[0003] However, this method has some problems in practical application, especially in the case of power system emergencies, due to the rapid and frequent changes in data, data asynchrony may occur between the main and standby dispatch centers. This asynchrony problem will seriously affect the rapid response capability of the standby dispatch center in emergencies, and thus affect the safety and reliability of the entire power system. Summary of the invention

[0004] The purpose of the present invention is to provide a method, device, equipment and medium for checking real-time data between a master and a backup system, so as to solve the problem of real-time data asynchrony occurring during the data synchronization process between the master and backup systems in the prior art.

[0005] A first aspect of the present invention provides a method for checking real-time data of a master and a standby, the method comprising:

[0006] Obtain real-time data of the main dispatching system and the backup dispatching system;

[0007] Verify the consistency of real-time data between the main and backup systems based on timestamps and data identifiers. If they are inconsistent, record the difference data. The consistency includes time consistency and data consistency.

[0008] Based on the difference data, the data synchronization operation between the main dispatching system and the backup dispatching system is triggered to make the real-time data of the main dispatching system and the backup dispatching system consistent.

[0009] In one implementation, the consistency of real-time data of the main calling system and the standby calling system is verified based on the timestamp and the data identifier, including:

[0010] Compare the timestamps of the main and backup systems to verify the consistency of time.

[0011] Compare the real-time data corresponding to the same data identifier in the main dispatching system and the backup dispatching system. When the real-time data of the main dispatching system and the backup dispatching system corresponding to the data identifier are inconsistent, record the specific inconsistent difference data;

[0012] Use consistency detection algorithms to verify the consistency of real-time data.

[0013] In one implementation, the time consistency is verified by comparing the timestamps of the main and backup systems, including:

[0014] Based on the system time calibration of the main dispatching system and the backup dispatching system, the time synchronization of the main dispatching system is ensured;

[0015] Use NTP protocol for time synchronization;

[0016] Calculate the time difference ΔT between the main modulation system and the backup modulation system, where ΔT=T1-T2, T1 represents the time of the main modulation system, and T2 represents the time of the backup modulation system;

[0017] When the time difference exceeds the set tolerance threshold, the time of the backup system is adjusted to be consistent with the main system.

[0018] In one implementation, verifying the consistency of real-time data of the main dispatching system and the backup dispatching system based on the timestamp and the data identifier also includes:

[0019] Verify the consistency of real-time data based on the timestamps and data identifiers of the main and backup systems;

[0020] When the data identifier and timestamp are inconsistent at the same time, the real-time data with inconsistent timestamp is recorded;

[0021] Use the sliding window detection algorithm to check the real-time data in the time period adjacent to the timestamp. When the consistency of the real-time data in the sliding window is lower than the preset threshold, increase the data acquisition frequency and re-compare the consistency of the real-time data of the main and backup systems.

[0022] In one implementation, the consistency of real-time data is verified based on the timestamps and data identifiers of the main and backup systems, including:

[0023] Compare real-time data based on the hash value of the data identifier, and compare the specific content one by one after comparing the hash value to ensure data consistency;

[0024] Use a dynamic data change detection algorithm to track the changing trend of real-time data. When the data change trend is abnormal, perform risk assessment using the formula R = (Nc / Nd)*100%, where R represents the risk level, Nc represents the number of abnormal data points, and Nd represents the total number of data points.

[0025] In one implementation, comparing the real-time data based on the hash value of the data identifier includes:

[0026] Calculate the hash values ​​of the data identifiers of the main dispatching system and the backup dispatching system based on the SHA256 hash algorithm;

[0027] Compare the hash values ​​of the main dispatching system and the backup dispatching system to see if they are the same, and record the data identifiers with different hash values ​​and the specific content of the corresponding real-time data;

[0028] The degree of hash value matching of the data identifier is evaluated using the formula C=1-(Hd / Hn), where C represents the degree of matching, Hd represents the number of different hash values, and Hn represents the number of hash values.

[0029] In one implementation, the method further includes:

[0030] Acquire real-time data of the main dispatching system and the standby dispatching system based on preset time intervals;

[0031] When an emergency event is detected, the preset time interval is reduced to increase the frequency of obtaining real-time data;

[0032] The stability of the data in the implementation example is calculated by the data change rate. When the data change rate exceeds a preset threshold, the data comparison and synchronization process is immediately triggered; wherein the data change rate is calculated by the formula Δ=|A(t+1)-A(t)| / A(t), Δ represents the data change rate, A(t+1) represents the data value at the current moment, and A(t) represents the data value at the previous moment.

[0033] A second aspect of the present invention provides a real-time data verification device for a master-slave dispatcher, the device comprising:

[0034] Data acquisition module, used to obtain real-time data of the main adjustment system and the standby adjustment system;

[0035] The consistency verification module is used to verify the consistency of the real-time data of the main calling system and the standby calling system based on the timestamp and data identifier. If there is inconsistency, the difference data is recorded; wherein, the consistency includes time consistency and data consistency;

[0036] The data synchronization module is used to trigger the data synchronization operation between the main modulation system and the backup modulation system according to the difference data, so as to make the real-time data of the main modulation system and the backup modulation system consistent.

[0037] According to a third aspect of the present invention, an electronic device is provided, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of a master-slave real-time data verification method provided in the first aspect of the present invention are implemented.

[0038] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a computer program, and when the computer program is executed by one or more processors, the computer program implements a real-time data verification method for a master-slave dispatcher as provided in the first aspect of the present invention.

[0039] Compared with the prior art, the present invention has the following beneficial effects:

[0040] The embodiment of the present invention provides a method for checking the real-time data of the main and standby systems, which obtains the real-time data of the main and standby systems; verifies the consistency of the real-time data of the main and standby systems based on timestamps and data identifiers, and records the difference data if they are inconsistent; wherein the consistency includes time consistency and data consistency; and triggers the data synchronization operation of the main and standby systems according to the difference data, so that the real-time data of the main and standby systems are consistent. The technical solution of the embodiment of the present invention can solve the problem of data asynchrony between the main and standby systems caused by rapid and frequent changes in data in the event of an emergency in the power system. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:

[0042] Figure 1 It is a flow chart of a method for checking real-time data of a master-slave dispatcher provided by an embodiment of the present invention;

[0043] Figure 2 is a flow chart of a trigger data comparison and synchronization process provided by an embodiment of the present invention;

[0044] Figure 3 is a flowchart of verifying the consistency of real-time data of a main calling system and a standby calling system based on a timestamp and a data identifier provided by an embodiment of the present invention;

[0045] Figure 4 This is a flowchart of verifying the consistency of time based on the comparison of timestamps between the main dispatching system and the backup dispatching system provided by an embodiment of the present invention;

[0046] Figure 5 is a flowchart of verifying the consistency of real-time data of a main calling system and a standby calling system based on a timestamp and a data identifier provided by an embodiment of the present invention;

[0047] Figure 6 This is a flowchart of jointly verifying the consistency of real-time data based on the timestamps and data identifiers of the main calling system and the backup calling system provided by an embodiment of the present invention;

[0048] Figure 7It is a flow chart of comparing real-time data based on hash values ​​of data identifiers provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0049] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.

[0050] It should be noted that the terms "include" or "may include" used in various embodiments of the present application indicate the presence of the function, operation or element applied for, and do not limit the addition of one or more functions, operations or elements. In addition, as used in various embodiments of the present application, the terms "include", "have" and their cognates are only intended to indicate specific features, numbers, steps, operations, elements, components or a combination of the foregoing items, and should not be understood as first excluding the presence of one or more other features, numbers, steps, operations, elements, components or a combination of the foregoing items or the possibility of adding one or more features, numbers, steps, operations, elements, components or a combination of the foregoing items.

[0051] In various embodiments of the present application, the expression "or" or "at least one of B or / and C" includes any combination or all combinations of the words listed at the same time. For example, the expression "B or C" or "at least one of B or / and C" may include B, may include C, or may include both B and C.

[0052] In the description of the present invention, “plurality” means two or more than two, unless otherwise clearly and specifically defined.

[0053] Next, refer to Figure 1 , describing the various steps of the real-time data verification method of the main and standby dispatchers of the present invention and how to solve the problem of asynchronous main and standby dispatcher data due to frequent rapid changes in data in the event of an emergency in the power system. The method includes:

[0054] S101, obtaining real-time data of the main control system and the backup control system.

[0055] In this embodiment, obtaining real-time data of the main dispatching system refers to obtaining data records at the current time point from the main dispatching system. These data may include important parameters such as grid load, generator output, circuit breaker status, etc. The data is regularly uploaded to the main dispatching system through pre-set data collection points to ensure the accuracy and timeliness of the data. For example, in the power system, the load and power output data of the entire network are collected every 5 minutes and uploaded to the main dispatching system. This step ensures the data benchmark in the subsequent comparison process.

[0056] Acquiring real-time data of the backup dispatch system means obtaining corresponding data records from the backup dispatch system. As a backup solution, the backup dispatch system needs to synchronize its data with the main dispatch system to ensure seamless switching when the main dispatch system fails. Similarly, data is uploaded from various monitoring points and devices to the backup dispatch system at a predetermined time period. In one embodiment, the backup dispatch system synchronizes the main operating parameters of the power grid every 10 seconds to ensure that the latest data can be obtained in a timely manner even when the network is unstable.

[0057] S102, verifying the consistency of real-time data of the main calling system and the standby calling system based on the timestamp and the data identifier, and if they are inconsistent, recording the difference data; wherein the consistency includes time consistency and data consistency.

[0058] In this embodiment, the real-time data of the main dispatching system and the backup dispatching system are compared based on the timestamp and data identifier. After the data of the two systems are acquired, the consistency of the data is verified by comparing their timestamps and specific data identifiers. The timestamp ensures the freshness of the data, and the data identifier is used to identify the specific data type and source. Specifically, by comparing the power grid load data with the same timestamp in the main dispatching system and the backup dispatching system, it can be found whether there is a numerical difference. If the load data at a certain point in time is 10000MW in the main dispatching system and 10010MW in the backup dispatching system, it is considered that the two pieces of data are inconsistent.

[0059] When data inconsistencies are found, the differences are recorded and an alarm message is generated. Once data inconsistencies are detected, the system will immediately record the inconsistent data content and generate an alarm message to notify relevant personnel. This helps to identify potential problems in a timely manner and take measures. For example, in a power dispatch center, if the main dispatch system shows that the status of a line is closed, and the backup dispatch system shows that it is disconnected, the system will generate an alarm and send it to the on-duty personnel for timely inspection and processing.

[0060] S103, triggering a data synchronization operation between the main dispatching system and the backup dispatching system according to the difference data, so as to make the real-time data of the main dispatching system and the backup dispatching system consistent.

[0061] In this embodiment, automatically synchronizing the data of the main calling system and the backup calling system to a consistent state means that when data inconsistency is detected, the system will automatically start the synchronization mechanism to push the correct data in the main calling system to the backup calling system, or update the data in the main calling system from the backup calling system. Through this mechanism, it is ensured that the data of the two systems are consistent at any point in time. Specifically, when data inconsistency is detected at a certain point in time, the system will push the latest and most accurate data in the main calling system to the backup calling system to ensure that the data of the two are consistent. At the same time, it will also check whether certain data in the main calling system needs to be updated to maintain comprehensive data accuracy.

[0062] Throughout the process, timestamps and data identifiers are key elements to ensure the accuracy of comparison and synchronization. This method not only keeps the data of the main and standby dispatching systems synchronized during daily operations, but also can quickly discover and solve problems when emergencies occur, such as sudden short circuits or natural disasters that cause a large number of data changes, thereby improving the reliability and stability of the system. For example, during a severe storm, the data of multiple power grid monitoring points changed frequently. Through the real-time data verification method, the inconsistencies of several data points were discovered in time, and the data synchronization was completed within a few minutes, avoiding scheduling errors caused by inconsistent data and ensuring the safe and stable operation of the power system.

[0063] Next, please refer to Figure 2 In one embodiment, the method provided by the embodiment of the present invention further includes:

[0064] S201, acquiring real-time data of a main control system and real-time data of a standby control system based on a preset time interval.

[0065] In this embodiment, a fixed time interval (e.g., every minute or every second) is set, and real-time data is synchronously collected from the main dispatching system and the backup dispatching system during this interval. For example, in a power dispatching center, the main dispatching system is responsible for data processing in normal operation, and the backup dispatching system serves as a redundant backup. Every 60 seconds, the two systems will synchronize their internal power parameter data to ensure data consistency and accuracy.

[0066] S202: When an emergency event is detected, the preset time interval is reduced to increase the frequency of acquiring real-time data.

[0067] In this embodiment, when an emergency occurs, the frequency of data acquisition is increased to adapt to rapid changes in data. This step is intended to cope with data fluctuations in emergency situations. In the event of an emergency such as a power grid failure or extreme weather, data may change rapidly, so the time interval for data collection needs to be shortened to capture these changes. For example, when a momentary power outage is detected in the power grid, the system increases the frequency of data collection to once every 5 seconds in order to more quickly grasp and respond to changes in system status.

[0068] S203, calculate the stability of the data of the embodiment through the data change rate, and when the data change rate exceeds the preset threshold, immediately trigger the data comparison and synchronization process; wherein, the data change rate is calculated by the formula Δ=|A(t+1)-A(t)| / A(t), Δ represents the data change rate, A(t+1) represents the data value at the current moment, and A(t) represents the data value at the previous moment.

[0069] In this embodiment, in this formula, Δ is used to measure the difference between two consecutive data points, that is, the change ratio of the current data point relative to the previous data point. The range of the parameter is usually 0 to 1 (or expressed as a percentage of 0% to 100%), and the optimal value varies depending on the specific application scenario, but it is generally considered that less than 0.05 or 5% is a normal fluctuation. The purpose of the design of the formula is to quantify the degree of change of the data and determine whether a significant change has occurred. In power grid monitoring, by calculating the rate of change of power load per minute, it is possible to evaluate whether the power grid is in a stable operating state. When the data change rate exceeds the preset threshold, the data comparison and synchronization process is immediately triggered. This step is intended to take immediate measures when anomalies are found. Once the monitored data change rate exceeds the pre-set safety threshold, it indicates that the system may have problems or face risks, and data comparison and synchronization are required in a timely manner to ensure the data consistency of the main and standby systems. For example, when the power grid load suddenly surges and the change rate exceeds the preset 0.07 (or 7%), the system will automatically trigger a series of safety inspection procedures, including verifying whether the data of the main and standby systems are consistent, and synchronously updating when inconsistent, to ensure the reliable operation of the entire power system.

[0070] In some embodiments, please refer to Figure 3 , describes the method provided by the present invention for verifying the consistency of real-time data of the main calling system and the standby calling system based on timestamp and data identifier, including:

[0071] S301, based on the timestamp comparison between the main dispatching system and the backup dispatching system, to verify the consistency of time.

[0072] In this embodiment, the consistency of time is ensured based on the comparison of the timestamps of the main calling system and the standby calling system. This process involves comparing the timestamp of the main calling system with the timestamp of the standby calling system to ensure that the clocks of the two systems remain synchronized. If they are inconsistent, clock calibration is required to ensure that subsequent data comparisons can be performed under the same time reference. For example, in one embodiment, the timestamp of the main calling system is 2024-11-05 10:00:00, and the timestamp of the standby calling system is 2024-11-05 10:00:01, and the difference between the two is 1 second. In this case, the clock of the standby calling system needs to be adjusted forward by 1 second.

[0073] S302, comparing the real-time data corresponding to the same data identifier in the main dispatching system and the standby dispatching system, when the real-time data of the main dispatching system and the standby dispatching system corresponding to the data identifier are inconsistent, recording the specific inconsistent difference data.

[0074] In this embodiment, the data corresponding to the same data identifier in the two systems are compared. The data identifier is an identifier used to uniquely identify a piece of data. By comparing the data with the same identifier, the difference between the data in different systems can be found. Specifically, assuming that the record with the data identifier 1001 has a value of 500 in the main calling system and a value of 502 in the backup calling system, it is considered that the data in the two systems is inconsistent. In this process, it is necessary to traverse all records with the same data identifier and record the inconsistent content.

[0075] When the two system data corresponding to the data identifier are inconsistent, the specific inconsistent content is recorded. This step is to ensure that the specific data that is inconsistent can be tracked in subsequent processing. Specifically, the recorded content includes information such as the data identifier, the value of the main calling system, the value of the backup system, and the timestamp of the data. For example, if the value of the data identifier 1001 in the main calling system is 500, and the value in the backup system is 502, and the occurrence timestamp is 2024-11-0510:01:00, then this information needs to be recorded in detail.

[0076] S303: Use a consistency detection algorithm to verify the consistency of the real-time data.

[0077] In this embodiment, a consistency detection algorithm is used to further verify the consistency of the data. This algorithm calculates the data consistency percentage by the formula S=(M / N)*100%, where S represents the data consistency percentage, M represents the number of consistent data, and N represents the total amount of data. Parameters M and N are both positive integers, and the value range of M is 0 to N, and the optimal value is N, that is, all data are consistent. The meaning of the formula is to calculate the proportion of consistent records in all data records. Through this ratio, the degree of data consistency of the two systems can be intuitively evaluated. The reason for setting this formula is that the consistency level of the data can be clearly displayed in the form of a percentage, which is convenient for subsequent data management and decision-making. For example, assuming that the total amount of data N is 1000, of which the consistent data records M are 950, the data consistency percentage S is 95%. Such a result can reflect that the data consistency between the main adjustment system and the standby adjustment system is high, but there is still a small amount of inconsistent data that needs further processing.

[0078] In some embodiments, please refer to Figure 4 , describes the timestamp comparison based on the main calling system and the backup calling system provided by the present invention to verify the consistency of time, including:

[0079] S401, based on the system time calibration of the main control system and the backup control system, ensure the time synchronization of the main control system.

[0080] In this embodiment, the system time calibration of the main system and the standby system is performed to ensure the time synchronization of the two systems. The main purpose of this step is to avoid deviations in subsequent timestamp comparisons by ensuring that the time bases of the two systems are consistent. The specific operation can be achieved by an external high-precision time source or dedicated equipment to achieve time calibration.

[0081] S402, using the NTP protocol for time synchronization.

[0082] In this embodiment, NTP (Network Time Protocol) is used for time synchronization. NTP is a widely used protocol for synchronizing the time of computer systems in a network. NTP ensures that the time difference between various systems is within an acceptable range by regularly exchanging time information with a time server. For example, in one embodiment, the main system and the backup system are synchronized once every 5 minutes through NTP to ensure that the time difference is less than 1 second.

[0083] S403, calculating the time difference ΔT between the main modulation system and the backup modulation system, wherein ΔT=T1-T2, T1 represents the time of the main modulation system, and T2 represents the time of the backup modulation system.

[0084] In this embodiment, the time difference ΔT between the two systems is calculated, where ΔT=T1-T2, T1 represents the time of the main system, and T2 represents the time of the standby system. In this formula, the value range of T1 and T2 is usually within the time range allowed by the system, such as the time interval from the Unix epoch to the next few decades. Ideally, the optimal value is that ΔT is close to 0, indicating that the time of the two systems is completely synchronized. Specifically, when the calculated ΔT is not 0, it can be determined that there is a time difference between the two systems.

[0085] S404: When the time difference exceeds a set tolerance threshold, the time of the standby system is adjusted to be consistent with that of the main system.

[0086] In this embodiment, when the time difference ΔT exceeds the set tolerance threshold, the time of the standby system is automatically adjusted to be consistent with the main system. The tolerance threshold is a parameter set according to the specific application scenario, which is used to define the maximum acceptable time difference between the two systems. For example, the tolerance threshold can be set to 100 milliseconds. When ΔT exceeds 100 milliseconds, the standby system will automatically adjust its time to reduce the time difference with the main system to an acceptable range. In a specific example, if the main system time is 10:00:00.000 at a certain moment, and the standby system time is 10:00:00.150, ΔT is 150 milliseconds at this time, which exceeds the set tolerance threshold of 100 milliseconds, so the standby system will automatically adjust its time to 10:00:00.000 to ensure consistency with the main system time.

[0087] Through this embodiment, the time consistency between the main dispatching system and the backup dispatching system can be effectively guaranteed, thereby improving the reliability and accuracy of the main and backup dispatching real-time data verification method.

[0088] In some embodiments, please refer to Figure 5 , describes the verification of the consistency of real-time data of the main calling system and the standby calling system based on timestamp and data identifier provided by the present invention, and also includes:

[0089] S501, jointly verifying the consistency of real-time data based on the timestamps and data identifiers of the main dispatching system and the backup dispatching system.

[0090] In this embodiment, the consistency of the data is verified based on the timestamps and data identifiers of the main calling system and the backup calling system. This step means that when comparing the real-time data of the two systems, not only the content of the data itself is compared, but also the consistency of the data is confirmed by checking the timestamp and data identifier of each data item. The timestamp is used to determine the time when the data is generated, and the data identifier is used to uniquely identify each piece of data. For example, in one embodiment, if the data sent by the main calling system contains a record with an identifier of 123456 and a timestamp of 2024-11-05T12:00:00Z, then the corresponding data in the backup calling system should also have the same identifier and timestamp to be considered consistent.

[0091] S502: When the data identifier and the timestamp are inconsistent at the same time, the real-time data with inconsistent timestamp is recorded.

[0092] In this embodiment, when the data identifier and the timestamp are inconsistent at the same time, the information about the inconsistent timestamp is recorded first. This is because the timestamp can more intuitively reflect the time difference of data generation, making it easier to locate the root cause of the problem. For example, if the data identifier 123456 and the timestamp 2024-11-05T12:00:00Z in the main calling system are inconsistent with the data identifier 123456 and the timestamp 2024-11-05T12:01:00Z in the standby calling system, the system will record the difference in the timestamp first.

[0093] S503, use a sliding window detection algorithm to check the real-time data in the time period adjacent to the timestamp. When the consistency of the real-time data in the sliding window is lower than a preset threshold, increase the data acquisition frequency and re-compare the consistency of the real-time data of the main dispatching system and the standby dispatching system.

[0094] In this embodiment, a sliding window mechanism is used to check the data in the recent period of time to ensure the continuity and integrity of the data. The sliding window is a dynamically adjusted time period used to continuously monitor the consistency and continuity of data. For example, the length of the sliding window can be set to 5 minutes, which means that the system will check the consistency of all data in the past 5 minutes. If a large amount of data inconsistency is found during this period, further measures will be taken. When the consistency of the data in the sliding window is lower than the preset threshold, the data acquisition frequency is increased and the data is re-compared. The preset threshold is a key parameter that indicates the level of data consistency in the sliding window that is considered acceptable. For example, if the preset threshold is 95%, it means that at least 95% of the data in the past 5 minutes should be consistent. If the proportion of inconsistent data exceeds 5%, the system will increase the frequency of data acquisition from once every 10 seconds to once every 5 seconds, and re-compare the data to ensure that data inconsistencies are discovered and resolved as early as possible.

[0095] Throughout the process, key parameters include the length of the sliding window (such as 5 minutes) and the preset threshold (such as 95%), which need to be optimized according to specific business needs. In the formula, the optimal value of the sliding window length T is usually determined by the data update frequency, and the preset threshold is based on the business's tolerance for data consistency. Specifically, if the business has high requirements for data consistency, the preset threshold can be appropriately lowered to ensure data quality.

[0096] In some embodiments, please refer to Figure 6 , describes the method provided by the present invention for jointly verifying the consistency of real-time data based on the timestamps and data identifiers of the main calling system and the backup calling system, including:

[0097] S601, compare the real-time data based on the hash value of the data identifier, and compare the specific contents one by one after comparing the hash values ​​to ensure the consistency of the data.

[0098] In this embodiment, the efficiency of data comparison is improved based on the hash value comparison of the data identifier; after comparing the hash value, the specific content is compared one by one to ensure the consistency of the data; a dynamic data change detection algorithm is used to track the change trend of the data; when the data change trend is abnormal, a risk assessment is performed using the formula R=(Nc / Nd)*100%, where R represents the risk level, Nc represents the number of abnormal data points, and Nd represents the total number of data points.

[0099] For example, if the main system has a piece of data with an identifier of 12345, the generated hash value may be abc123. Similarly, the hash value of the same data entry in the backup system also needs to be calculated. Hash values ​​have high hashability and uniqueness, so by comparing hash values, it is possible to quickly determine whether most of the data is consistent without having to perform a detailed content comparison. After comparing the hash values, the specific contents are compared one by one to ensure data consistency. If the hash values ​​of some data entries are found to be inconsistent in the first step, these data entries will be marked as potential differences. For example, in the above example, if the hash value of 12345 is abc123 in the main system and xyz789 in the backup system, the data entry will be further checked. The system will extract the specific contents of the two data entries for one-to-one comparison to check whether the content of each field is exactly the same, thereby ensuring data consistency.

[0100] S602, use the dynamic data change detection algorithm to track the change trend of real-time data. When the data change trend is abnormal, perform risk assessment through the formula R = (Nc / Nd)*100%, where R represents the risk level, Nc represents the number of abnormal data points, and Nd represents the total number of data points.

[0101] In this embodiment, a dynamic data change detection algorithm is used to track the change trend of data. The dynamic data change detection algorithm can monitor the data update status in the main call system and the backup call system in real time. Specifically, the algorithm regularly collects and analyzes the changes in data to form a change trend chart. In one embodiment, assuming that the data changes are detected every five minutes, if the data update frequency of a specific field suddenly increases within a certain period of time, the system will automatically mark these changes for further analysis.

[0102] When the data change trend is abnormal, the risk assessment is performed using the formula R = (Nc / Nd)*100%, where R represents the risk level, Nc represents the number of abnormal data points, and Nd represents the total number of data points. If the change trend chart shows that there are many data points showing abnormal changes in a certain period of time, the formula will be used to calculate the risk level. Nc is the number of abnormal data points in this period of time, and Nd is the total number of data points in this period of time. The value range of R is 0% to 100%, and the higher the value, the greater the risk. For example, if there are 10 abnormal data points in an hour and the total number of updated data points is 100, then R = (10 / 100)*100% = 10%, indicating a low risk. If the values ​​of Nc and Nd are both positive integers, in the best case, Nc should be as small as possible to reduce the risk level. This formula is set to quantify the proportion of abnormal data to help administrators quickly understand the health of the system and take necessary measures to repair or optimize it.

[0103] In some embodiments, please refer to Figure 7 , describes the hash value comparison of real-time data based on data identifier provided by the present invention, including:

[0104] S701, calculating hash values ​​of data identifiers of the main dispatching system and the backup dispatching system based on the SHA256 hash algorithm.

[0105] In this embodiment, the SHA256 hash algorithm is used to calculate the hash values ​​of the data identifiers of the main calling system and the backup calling system. This step is to convert the complex identifier into a unique identifier of fixed length for subsequent quick comparison. The hash algorithm can convert inputs of any size into outputs of fixed length, and different inputs generally generate different outputs.

[0106] S702, comparing the hash values ​​of the main dispatching system and the backup dispatching system to see if they are the same, and recording data identifiers with different hash values ​​and specific contents of their corresponding real-time data.

[0107] In this embodiment, the hash values ​​of the two systems are compared to see if they are the same. This step is to determine the consistency of the data of the two systems by comparing the hash values ​​generated by the same data identifiers in the main and backup systems one by one. If all hash values ​​are the same, it means that the data of the two systems are consistent; otherwise, there are differences and further analysis is required. After finding mismatched hash values, record the data identifiers with different hash values ​​and the specific content of their corresponding data. This process not only marks the inconsistencies, but also records the specific data in detail for subsequent correction and analysis.

[0108] S703, using the formula C=1-(Hd / Hn) to evaluate the matching degree of the hash values ​​of the data identifiers, where C represents the matching degree, Hd represents the number of different hash values, and Hn represents the number of hash values.

[0109] In this embodiment, the formula C=1-(Hd / Hn) is used to evaluate the degree of match of the hash values ​​of the data identifier. In this formula, C represents the degree of match, ranging from 0 to 1, with the optimal value being 1, indicating a complete match. Hd represents the number of different hash values, and Hn represents the number of total hash values. This formula is designed to quantify the degree of consistency of the data, where Hd / Hn reflects the proportion of different hash values, and taking 1 minus this proportion is the degree of match.

[0110] In one embodiment, assume that the main call system and the backup call system each have 1000 data identifiers. The hash value of each identifier is calculated using the SHA256 algorithm, and the hash values ​​of the two systems are compared one by one. The results show that 10 hash values ​​are different, and the remaining 990 hash values ​​are the same. These different hash values ​​and their corresponding original data are recorded for subsequent investigation. The degree of match is calculated according to the above formula: C = 1-10 / 1000 = 0.99. This means that the hash value match degree of the data identifier is 99%, which is a very high match, but the inconsistent parts still need to be checked to ensure the integrity of the data.

[0111] Based on the verification method described in the above embodiments, it can be seen that the present invention effectively solves the problem of asynchronous data between the main and standby dispatching systems in the event of an emergency in the power system through real-time data collection, accurate comparison and automatic data synchronization, thereby improving the reliability and stability of the system. Even in a highly dynamic environment, it can ensure that the data of the main and standby dispatching systems remain highly consistent, thereby improving the safety and operation and maintenance efficiency of the overall system.

[0112] The embodiment of the present invention further provides a main-standby real-time data verification device, the device comprising:

[0113] Data acquisition module, used to obtain real-time data of the main adjustment system and the standby adjustment system;

[0114] The consistency verification module is used to verify the consistency of the real-time data of the main calling system and the standby calling system based on the timestamp and data identifier. If there is inconsistency, the difference data is recorded; wherein, the consistency includes time consistency and data consistency;

[0115] The data synchronization module is used to trigger the data synchronization operation between the main modulation system and the backup modulation system according to the difference data, so as to make the real-time data of the main modulation system and the backup modulation system consistent.

[0116] A real-time data verification device for master and standby dispatch in an embodiment of the present application is similar to the above Figure 1 The main and standby real-time data verification method shown is an invention based on the same concept. Through the detailed description of the main and standby real-time data verification method provided in the above embodiment, those skilled in the art can clearly understand the implementation process of a main and standby real-time data verification device in this embodiment, so for the sake of brevity of the specification, it will not be repeated here.

[0117] Accordingly, the present embodiment provides a main and standby real-time data verification device, which obtains the real-time data of the main and standby systems; verifies the consistency of the real-time data of the main and standby systems based on timestamps and data identifiers, and records the difference data if they are inconsistent; wherein consistency includes time consistency and data consistency; and triggers the data synchronization operation of the main and standby systems according to the difference data, so as to make the real-time data of the main and standby systems consistent. The technical solution of the embodiment of the present invention can solve the problem of data asynchrony between the main and standby systems caused by rapid and frequent changes in data in the event of an emergency in the power system.

[0118] An embodiment of the present invention also provides an electronic device. The electronic device includes a processor, a memory, a communication interface, and at least one communication bus for connecting the processor, the memory, and the communication interface. The memory includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (PROM), or a portable CD-ROM, and the memory is used for related instructions and data.

[0119] The communication interface is used to receive and send data. The processor can be one or more CPUs. When the processor is a CPU, the CPU can be a single-core CPU or a multi-core CPU. The processor in the electronic device is used to read one or more programs stored in the memory and perform the following operations: obtain the real-time data of the main modulation system and the backup modulation system; verify the consistency of the real-time data of the main modulation system and the backup modulation system based on the timestamp and data identifier, and if there is inconsistency, record the difference data; wherein the consistency includes time consistency and data consistency; according to the difference data, trigger the data synchronization operation of the main modulation system and the backup modulation system to make the real-time data of the main modulation system and the backup modulation system consistent.

[0120] It should be noted that the specific implementation of each operation can be Figure 1 The corresponding description of the method embodiment shown, the host computer can be used to execute a master-slave real-time data verification method of the above method embodiment of the present application, which will not be described in detail here.

[0121] In the embodiments of the present disclosure, a computer-readable storage medium is also provided, and the computer-readable storage medium is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include both built-in storage media in a computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by a processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of a real-time data verification method for a master-standby adjustment in the above embodiment. It should be understood by those skilled in the art that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0122] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for checking real-time data of master and backup, characterized in that: include: Obtain real-time data of the main dispatching system and the backup dispatching system; Verify the consistency of real-time data between the main and backup systems based on timestamps and data identifiers. If they are inconsistent, record the difference data. The consistency includes time consistency and data consistency. Based on the difference data, the data synchronization operation between the main dispatching system and the backup dispatching system is triggered to make the real-time data of the main dispatching system and the backup dispatching system consistent.

2. The method according to claim 1, characterized in that Verify the consistency of real-time data between the main and backup systems based on timestamps and data identifiers, including: Compare the timestamps of the main and backup systems to verify the consistency of time. Compare the real-time data corresponding to the same data identifier in the main dispatching system and the backup dispatching system. When the real-time data of the main dispatching system and the backup dispatching system corresponding to the data identifier are inconsistent, record the specific inconsistent difference data; Use consistency detection algorithms to verify the consistency of real-time data.

3. The method according to claim 2, characterized in that Compare the timestamps of the main and backup systems to verify the consistency of time, including: Based on the system time calibration of the main dispatching system and the backup dispatching system, the time synchronization of the main dispatching system is ensured; Use NTP protocol for time synchronization; Calculate the time difference ΔT between the main modulation system and the backup modulation system, where ΔT=T1-T2, T1 represents the time of the main modulation system, and T2 represents the time of the backup modulation system; When the time difference exceeds the set tolerance threshold, the time of the backup system is adjusted to be consistent with the main system.

4. The method according to claim 1, characterized in that Verify the consistency of real-time data between the main dispatching system and the backup dispatching system based on timestamps and data identifiers, including: Verify the consistency of real-time data based on the timestamps and data identifiers of the main and backup systems; When the data identifier and timestamp are inconsistent at the same time, the real-time data with inconsistent timestamp is recorded; Use the sliding window detection algorithm to check the real-time data in the time period adjacent to the timestamp. When the consistency of the real-time data in the sliding window is lower than the preset threshold, increase the data acquisition frequency and re-compare the consistency of the real-time data of the main and backup systems.

5. The method according to claim 4, characterized in that The consistency of real-time data is verified based on the timestamps and data identifiers of the main and backup systems, including: Compare real-time data based on the hash value of the data identifier, and compare the specific content one by one after comparing the hash value to ensure data consistency; Use a dynamic data change detection algorithm to track the changing trend of real-time data. When the data change trend is abnormal, perform risk assessment using the formula R = (Nc / Nd)*100%, where R represents the risk level, Nc represents the number of abnormal data points, and Nd represents the total number of data points.

6. The method according to claim 5, characterized in that Compare live data based on hash values ​​of data identifiers, including: Calculate the hash values ​​of the data identifiers of the main dispatching system and the backup dispatching system based on the SHA256 hash algorithm; Compare the hash values ​​of the main dispatching system and the backup dispatching system to see if they are the same, and record the data identifiers with different hash values ​​and the specific content of their corresponding real-time data; The degree of hash value matching of the data identifier is evaluated using the formula C=1-(Hd / Hn), where C represents the degree of matching, Hd represents the number of different hash values, and Hn represents the number of hash values.

7. The method according to claim 1, characterized in that The method further comprises: Acquire real-time data of the main dispatching system and the standby dispatching system based on preset time intervals; When an emergency event is detected, the preset time interval is reduced to increase the frequency of obtaining real-time data; The stability of the data in the implementation example is calculated by the data change rate. When the data change rate exceeds a preset threshold, the data comparison and synchronization process is immediately triggered; wherein the data change rate is calculated by the formula Δ=|A(t+1)-A(t)| / A(t), Δ represents the data change rate, A(t+1) represents the data value at the current moment, and A(t) represents the data value at the previous moment.

8. A real-time data verification device for main and standby dispatching, characterized in that: The device includes: Data acquisition module, used to obtain real-time data of the main adjustment system and the standby adjustment system; The consistency verification module is used to verify the consistency of the real-time data of the main calling system and the standby calling system based on the timestamp and data identifier. If there is inconsistency, the difference data is recorded; wherein, the consistency includes time consistency and data consistency; The data synchronization module is used to trigger the data synchronization operation between the main modulation system and the backup modulation system according to the difference data, so as to make the real-time data of the main modulation system and the backup modulation system consistent.

9. An electronic device, characterized in that: The electronic device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of a main-standby real-time data verification method as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a computer program, and when the computer program is executed by one or more processors, the computer program implements a main-standby real-time data verification method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data consistency verification method based on Oracle database

    CN104346454A

  • Timestamp-based data synchronization method and device, and computer equipment

    CN111245548A

  • Automatic comparison system for main and standby dispatching data and graph model based on EMS (Energy Management System)

    CN115395649A

  • Electric power measurement data verification system and method based on block chain

    CN118074991A

  • Data synchronization method and apparatus, storage medium and electronic device

    WO2024114342A1