Power grid data synchronization method, device and equipment, readable storage medium and program product
By establishing a dual-computer room switching mechanism and data detection mechanism in the power grid system, the problem of low data recovery accuracy in the existing technology is solved, efficient, accurate synchronization and recovery of power grid data is achieved, and the high availability of the system is ensured.
Patent Information
- Application Number
- CN202510102279.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-05-16
AI Technical Summary
The existing grid data synchronization methods have the problem of low data recovery accuracy, especially when the grid system faces failures, it is difficult to ensure that data and services can be restored quickly and continue to operate.
By establishing a dual-computer room switching mechanism in the power grid system, predicting its working status based on the status data of the first computer room. If abnormal, the data will be synchronized to the second computer room, and determining the data synchronization is completed by detecting the consistency of the key fields of the data feature.
It improves the accuracy and efficiency of data recovery, and can quickly synchronize data to the second computer room under abnormal conditions in the first computer room, ensuring high availability and data integrity of the power grid system.
Smart Images

Figure CN120011141A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data management technology, and in particular to a method, device, equipment, readable storage medium and program product for synchronizing power grid data. Background Art
[0002] When the power grid data center faces various risks, various services of the power grid will face the risk of interruption, which will cause huge losses to society. Therefore, there is an urgent need for a data synchronization method that ensures that data and services can be quickly restored and continue to operate when the power grid system faces failures (for example, disasters or other emergencies).
[0003] However, existing methods for synchronizing power grid data suffer from low data recovery accuracy. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, equipment, readable storage medium and program product for synchronizing power grid data that can improve data recovery accuracy in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for synchronizing power grid data, which is applied to a power grid system, comprising:
[0006] Predicting the working status of the first computer room according to the status data of the first computer room in the power grid system;
[0007] If the working state of the first computer room indicates abnormality, synchronizing the first data of the first computer room to the second computer room in the power grid system;
[0008] Acquire synchronized second data from the second computer room, and detect the second data according to the first data to obtain a detection result;
[0009] The data synchronization is completed based on the detection results.
[0010] In one embodiment, synchronizing the first data in the first computer room to the second computer room in the power grid system includes:
[0011] Determining the priority of the first data according to the attribute of the first data;
[0012] The first data is synchronized to the second computer room of the power grid system according to the priority of the first data.
[0013] In one embodiment, synchronizing the first data to the second computer room of the power grid system according to the priority of the first data includes:
[0014] Encrypting the first data according to the priority of the first data to obtain encrypted first data;
[0015] The encrypted first data is synchronized to the second computer room of the power grid system according to the priority of the first data.
[0016] In one embodiment, the detecting the second data according to the first data to obtain the detection result includes:
[0017] Extracting a first characteristic key field from the first data, and extracting a second characteristic key field from the second data;
[0018] Determine whether the first feature key field and the second feature key field are consistent, and when the first feature key field and the second feature key field are consistent, obtain a detection result of data synchronization completion.
[0019] In one embodiment, the method further comprises:
[0020] When the first characteristic key field and the second characteristic key field are inconsistent, obtaining the starting position of the difference data of the first computer room;
[0021] Determine the unsynchronized data according to the starting position of the difference data;
[0022] Synchronize the unsynchronized data to the second computer room, and return to the step of determining whether the first feature key field and the second feature key field are consistent, and when the first feature key field and the second feature key field are consistent, obtain the detection result of data synchronization completion.
[0023] In one embodiment, the method further comprises:
[0024] Monitor the data synchronization link between the first computer room and the second computer room to obtain the data synchronization status;
[0025] When the data synchronization state is a delayed state, determining a delay type of the first data;
[0026] Processing the first data according to the delay type of the first data to obtain processed first data;
[0027] Synchronizing first data in a first computer room to a second computer room in a power grid system includes:
[0028] The processed first data is synchronized to the second computer room of the power grid system.
[0029] In a second aspect, the present application further provides a power grid data synchronization device, which is applied to a power grid system, comprising:
[0030] A prediction module, used for predicting the working state of the first computer room according to the state data of the first computer room in the power grid system;
[0031] A synchronization module, used for synchronizing the first data of the first computer room to the second computer room in the power grid system when the working state of the first computer room indicates abnormality;
[0032] A monitoring module, used for acquiring synchronized second data from the second computer room, and detecting the second data according to the first data to obtain a detection result;
[0033] The determination module is used to determine whether data synchronization is completed according to the detection result.
[0034] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0035] Predicting the working status of the first computer room according to the status data of the first computer room in the power grid system;
[0036] If the working state of the first computer room indicates abnormality, synchronizing the first data of the first computer room to the second computer room in the power grid system;
[0037] Acquire synchronized second data from the second computer room, and detect the second data according to the first data to obtain a detection result;
[0038] The data synchronization is completed based on the detection results.
[0039] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0040] Predicting the working status of the first computer room according to the status data of the first computer room in the power grid system;
[0041] If the working state of the first computer room indicates abnormality, synchronizing the first data of the first computer room to the second computer room in the power grid system;
[0042] Acquire synchronized second data from the second computer room, and detect the second data according to the first data to obtain a detection result;
[0043] The data synchronization is completed based on the detection results.
[0044] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0045] Predicting the working status of the first computer room according to the status data of the first computer room in the power grid system;
[0046] If the working state of the first computer room indicates abnormality, synchronizing the first data of the first computer room to the second computer room in the power grid system;
[0047] Acquire synchronized second data from the second computer room, and detect the second data according to the first data to obtain a detection result;
[0048] The data synchronization is completed based on the detection results.
[0049] The above-mentioned method, device, equipment, readable storage medium and program product for synchronizing power grid data are applied to the power grid system, and the working status of the first computer room is predicted based on the status data of the first computer room in the power grid system. If the working status of the first computer room indicates an abnormality, the first data of the first computer room is synchronized to the second computer room in the power grid system, and the synchronized second data is obtained from the second computer room, and the second data is detected based on the first data to obtain the detection result, and the data synchronization is determined to be completed based on the detection result. The above-mentioned method for synchronizing power grid data constructs a dual-computer room switching mechanism, that is, in the case of an abnormality in the first computer room, the data of the first computer room can be synchronized to the second computer room, which improves the data synchronization efficiency to a certain extent; in addition, the second data needs to be detected based on the first data, and it is determined whether the data synchronization is completed based on the detection result, which ensures the accuracy of data synchronization. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0051] Figure 1 A diagram showing an application environment of a method for synchronizing power grid data in an embodiment;
[0052] Figure 2 A schematic diagram of a flow chart of a method for synchronizing power grid data in one embodiment;
[0053] Figure 3 A schematic diagram of a flow chart of a method for synchronizing power grid data in another embodiment;
[0054] Figure 4 A schematic diagram of a flow chart of a method for synchronizing power grid data in another embodiment;
[0055] Figure 5 A schematic diagram of a flow chart of a method for synchronizing power grid data in another embodiment;
[0056] Figure 6 A schematic diagram of a flow chart of a method for synchronizing power grid data in another embodiment;
[0057] Figure 7 A schematic diagram of a flow chart of a method for synchronizing power grid data in another embodiment;
[0058] Figure 8 A schematic diagram of a flow chart of a method for synchronizing power grid data in another embodiment;
[0059] Fig. 9 A structural block diagram of a device for synchronizing power grid data in one embodiment;
[0060] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0062] With the rapid development and widespread application of the China Southern Power Grid Cloud Microservice Platform, the China Southern Power Grid Cloud Microservice Platform faces the challenge of cross-computer room disaster recovery. At present, the China Southern Power Grid Cloud Microservice Platform lacks a reliable disaster recovery solution. When a computer room fails, it is difficult to achieve imperceptible switching and high-availability operation.
[0063] In the power grid industry, efficient data management and integrated processing are the key to ensuring the stable operation of the cloud microservice platform. Existing power grid data management systems usually face the following technical deficiencies:
[0064] Traditional power grid data backup methods are mostly regular backups, usually full or incremental backups are performed daily or weekly, and the backup data is stored in local or remote storage media. This backup method takes a long time to recover when facing a room-level failure, because the backup system needs to be started first, and then the data is restored from the backup media. This process may take hours or even days, which is far from meeting the high availability requirements of power grid services. In addition, data generated or changed during the backup cycle may be lost, resulting in incomplete data, affecting the subsequent normal operation and analysis decisions of the power grid system.
[0065] With the development of information technology, power grid data center computer rooms are facing various risks. On the one hand, natural disasters may directly destroy computer room facilities, damage hardware such as servers and storage devices in the computer room, and make it impossible to access data. On the other hand, human factors, including misoperation, network hacker attacks, and virus infections, may also cause system failures or data leakage and damage in the computer room. In addition, internal technical problems such as equipment aging, power failures, and network failures will also pose a threat to the normal operation of the computer room. Under a single computer room architecture, once the above risk events occur, the power grid business will face the risk of interruption, causing huge losses to society.
[0066] Therefore, there is an urgent need for a data synchronization method that ensures that data and services can be quickly restored and continue to operate when the power grid system faces a failure (for example, a disaster or other emergency). However, the existing power grid data synchronization method has the problem of low data recovery accuracy. This application aims to solve this problem.
[0067] After introducing the background technology of the method for synchronizing power grid data provided by the embodiment of the present application, the implementation environment involved in the method for synchronizing power grid data provided by the embodiment of the present application will be briefly described below. The method for synchronizing power grid data provided by the embodiment of the present application can be applied to Figure 1 In the implementation environment shown, the implementation environment includes a control terminal 10, a first computer room 20 and a second computer room 30, wherein the control terminal 10, the first computer room 20 and the second computer room 30 are connected to each other by communication, that is, the control terminal 10 is connected to both the first computer room 20 and the second computer room 30, and the first computer room 20 is also connected to the third computer room 30.
[0068] It should be noted that the control terminal 10 can control the first machine room 20 and the second machine room 30 to switch at will, and there needs to be one machine room in operation and one standby machine room in the first machine room 20 and the second machine room 30, that is, when the first machine room 20 is the operating machine room, the second machine room 30 is the standby machine room, and when the first machine room 20 is the standby machine room, the second machine room 30 is the operating machine room. It should be noted that the first machine room 20 and the second machine room 30 need to be equipped with the same communication resources.
[0069] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific terminal may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0070] After introducing the application scenarios of the method for synchronizing power grid data provided by the embodiments of the present application, the following focuses on introducing the method for synchronizing power grid data described in the present application.
[0071] In one embodiment, Figure 2 As shown, a method for synchronizing power grid data is provided, and the method is applied to Figure 1 The control terminal 10 in the example is used as an example to illustrate, and the following steps are included:
[0072] S201. Predicting the working status of the first computer room according to the status data of the first computer room in the power grid system.
[0073] In an embodiment of the present application, the control end in the power grid system can monitor (including real-time monitoring, periodic monitoring and other forms of monitoring) the status data of the first computer room, and predict the working status of the first computer room based on the status data of the first computer room.
[0074] Optionally, after acquiring the status data of the first computer room, the status data of the first computer room may be input into a pre-trained status prediction model to perform status prediction, so as to predict the working status of the first computer room.
[0075] Optionally, after acquiring the status data of the first computer room, the status data of the first computer room may be manually analyzed based on experience to obtain the working status of the first computer room.
[0076] S202: If the working status of the first computer room indicates an abnormality, synchronize the first data of the first computer room to the second computer room in the power grid system.
[0077] The first data in the first computer room refers to the data stored in the first computer room.
[0078] It should be noted that two computer rooms, namely the first computer room and the second computer room, can be built in the same city. The location of the computer rooms must fully consider geographical factors to avoid the computer rooms being in the same earthquake zone, flood zone, or areas susceptible to other common natural disasters. The computer room infrastructure includes storage devices and network equipment. In addition, the network bandwidth provided by different operators is configured for the computer room based on the data traffic estimate during the peak period of the power grid business. The two computer rooms are equipped with the same power grid business system and data management system to ensure that the initial state of the system in the two computer rooms is completely consistent in terms of storage parameters and data content. A secure network transmission channel is established between the two computer rooms to perform end-to-end encryption protection on the data to prevent the data from being stolen or tampered with during transmission.
[0079] In an embodiment of the present application, after the working status of the first computer room is obtained by the above prediction, it is determined whether the working status of the first computer room is abnormal, and when the working status of the first computer room indicates that the first computer room is normal, no processing is performed; and when the working status of the first computer room indicates that the first computer room is abnormal, the first data of the first computer room is synchronized to the second computer room in the power grid system.
[0080] Optionally, in the database of the first computer room, Redo Log is used to capture data change states in real time, where these data change states include data insertion, update, and deletion.
[0081] S203: Acquire synchronized second data from the second computer room, and detect the second data according to the first data to obtain a detection result.
[0082] The detection results include detection results of completed data synchronization and detection results of incomplete data synchronization.
[0083] In an embodiment of the present application, after synchronizing the first data of the first computer room to the second computer room of the power grid system, the control end can obtain the second data received by the second computer room from the second computer room, and detect the second data based on the first data of the first computer room to obtain a detection result.
[0084] S204: Determine that data synchronization is completed according to the detection result.
[0085] In an embodiment of the present application, after the detection result is obtained as described above, if the detection result is a detection result that data synchronization is completed, it means that data synchronization is completed; if the detection result is a detection result that data synchronization is not completed, it means that data synchronization is not completed and data synchronization needs to be performed again.
[0086] Optionally, after data synchronization is completed, the first computer room is changed to a disaster recovery state, and the second computer room maintains a normal operation state. The roles of the two are swapped to perform the aforementioned steps, and the state between the first computer room and the second computer room is exchanged again until the next fault switching.
[0087] The method for synchronizing power grid data provided in the embodiment of the present application is applied to the power grid system, and the working status of the first computer room is predicted based on the status data of the first computer room in the power grid system. If the working status of the first computer room indicates an abnormality, the first data of the first computer room is synchronized to the second computer room in the power grid system, and the synchronized second data is obtained from the second computer room, and the second data is detected based on the first data to obtain the detection result, and the completion of data synchronization is determined based on the detection result. The above-mentioned method for synchronizing power grid data constructs a dual-computer room switching mechanism, that is, in the case of an abnormality in the first computer room, the data of the first computer room can be synchronized to the second computer room, which improves the data synchronization efficiency to a certain extent; in addition, it is also necessary to detect the second data based on the first data, and determine whether the data synchronization is completed based on the detection result, which ensures the accuracy of data synchronization.
[0088] In one embodiment, Figure 2 Based on the embodiment shown, the process of synchronizing the first data in the first computer room to the second computer room can be described as follows: Figure 3 As shown, the above S202 “synchronizing the first data of the first computer room to the second computer room in the power grid system” includes:
[0089] S301. Determine the priority of first data according to an attribute of first data.
[0090] In the embodiment of the present application, when it is determined that the working status of the first computer room indicates that the first computer room is abnormal, the attributes of each first data of the first computer room are determined, and the priority of each first data is determined according to the attributes of the first data.
[0091] S302: Synchronize the first data to a second computer room of the power grid system according to the priority of the first data.
[0092] In the embodiment of the present application, after the priority of each first data is determined as above, the first data can be synchronized to the second computer room of the power grid system according to the priority of each first data. Optionally, data with high priority can be transmitted to the second computer room of the power grid system first, and data with medium priority can be transmitted to the second computer room of the power grid system, and data with low priority can be transmitted to the second computer room of the power grid system.
[0093] Optionally, the process of synchronizing data according to data priority can be further described, see Figure 4 , that is, the above S302 “synchronizing the first data to the second computer room of the power grid system according to the priority of the first data” includes:
[0094] S401. Encrypt the first data according to the priority of the first data to obtain the encrypted first data.
[0095] In the embodiment of the present application, after the priority of each first data is obtained as described above, each first data may be encrypted according to the priority of each first data, so as to obtain each encrypted first data.
[0096] Optionally, the captured first data is compressed and encrypted to varying degrees according to the priority and sensitivity of the data. For data with high real-time requirements but relatively low confidentiality requirements, the LZ4 algorithm is used for compression to reduce the amount of data transmitted over the network. For data containing user privacy information or key control instructions of the power grid, the AES-256 encryption algorithm is used for encryption after compression to ensure the security of the data during transmission.
[0097] S402. Synchronize the encrypted first data to a second computer room of the power grid system according to the priority of the first data.
[0098] In the embodiment of the present application, after each encrypted first data is acquired as described above, the encrypted first data can be synchronized to the second computer room of the power grid system according to the priority of each first data.
[0099] Optionally, a data priority queue management mechanism is established to assign different priority levels to different data according to the data type and business urgency, and network transmission resources are allocated according to the level to ensure that the data level reaches the second computer room quickly and accurately from the first computer room.
[0100] The method for synchronizing power grid data provided in the embodiment of the present application analyzes the priority of each data, encrypts each data based on the priority of each data, and then synchronizes the data to the second computer room of the power grid system based on the encrypted data and the priority of the data, thereby improving the security of the data and ensuring that data with higher priority is transmitted to the second computer room first, thereby ensuring the security of data with high importance.
[0101] In one embodiment, Figure 2-Figure 4 Based on the embodiment shown, the process of detecting the second data according to the first data and obtaining the detection result can be described as follows: Figure 5 As shown, the above S203 "detecting the second data according to the first data to obtain a detection result" includes:
[0102] S501: extract a first characteristic key field from the first data, and extract a second characteristic key field from the second data.
[0103] In the embodiment of the present application, after the first data of the first computer room and the second data of the second computer room are acquired, the first characteristic key field can be extracted from the first data, and the second characteristic key field can be extracted from the second data.
[0104] Optionally, the first data may be input into a feature extraction network for feature extraction to obtain a first feature key field, and the second data may be input into a feature extraction network for feature extraction to obtain a second feature key field.
[0105] S502: Determine whether the first feature key field and the second feature key field are consistent, and if the first feature key field and the second feature key field are consistent, obtain a detection result of data synchronization completion.
[0106] In an embodiment of the present application, after obtaining the first feature key field corresponding to the first data and the second feature key field corresponding to the second data, it can be further determined whether the first feature key field and the second feature key field are consistent. If the first feature key field and the second feature key field are consistent, a detection result of data synchronization completion is obtained.
[0107] Optionally, the transmission traffic of data of different sizes on the network channel can be monitored in real time to promptly detect abnormal transmission traffic growth, which means that there is a malicious attack on the system or a data synchronization failure. In addition, the data management systems of the first computer room and the second computer room are regularly compared. The comparison frequency can be set according to business needs. If data consistency anomalies are found, the system logs of the first computer room and the second computer room are compared in detail to find the starting point and possible causes of the data inconsistency, and the still valid data is screened out for re-synchronization according to the above steps.
[0108] Optionally, the following also provides a process for obtaining a detection result when the first feature key field and the second feature key field are inconsistent, see Figure 6 , that is, the above method further includes:
[0109] S503: When the first characteristic key field and the second characteristic key field are inconsistent, obtain the starting position of the difference data of the first computer room.
[0110] The difference data refers to the data in the first computer room that has not been transmitted to the second computer room.
[0111] In the embodiment of the present application, when it is determined that the first feature key field and the second feature key field are inconsistent, the starting position of the difference data of the first computer room can be determined based on the inconsistency information of the first feature key field and the second feature key field.
[0112] S504: Determine the unsynchronized data according to the starting position of the difference data.
[0113] In the embodiment of the present application, after the starting position of the difference data in the first computer room is obtained, the unsynchronized data in the first computer room can be determined according to the starting position of the difference data.
[0114] S505: Synchronize the unsynchronized data to the second computer room, and return to execute the above S502.
[0115] In an embodiment of the present application, after the unsynchronized data in the first computer room is acquired as described above, the unsynchronized data in the first computer room can be synchronized to the second computer room, and after the synchronization is completed, it is determined again whether the first feature key field and the second feature key field are consistent, and when the first feature key field and the second feature key field are consistent, a detection result indicating that data synchronization is complete is obtained.
[0116] The method for synchronizing power grid data provided in the embodiment of the present application determines whether data synchronization is completed by determining whether the data in the second computer room is consistent with the data in the first computer room, thereby ensuring the integrity and accuracy of data synchronization.
[0117] In one embodiment, Figure 2-Figure 4 Based on the embodiment shown, Figure 7 As shown, the above method also includes:
[0118] S205: Monitor the data synchronization link between the first computer room and the second computer room to obtain a data synchronization status.
[0119] In the embodiment of the present application, during the process of synchronizing data from the first computer room to the second computer room, the data synchronization link between the first computer room and the second computer room can be monitored to obtain the data synchronization status of the transmitted data.
[0120] It should be noted that during the switching of computer rooms, the second computer room records in detail the time and type of the failure in the first computer room, including server downtime, network interruption, and data management system failure, and records relevant data status information, including the transaction information being processed by the first computer room at the moment of the failure and the progress of data synchronization, so as to perform data synchronization and system recovery operations after the failure is restored; in addition, after the failure of the first computer room is restored, the data management system logs of the first and second computer rooms are compared based on the information recorded during the failure to determine the data content that was not synchronized between the first and second computer rooms during the failure, and these data contents are gradually synchronized according to the data synchronization process to ensure that the data of the two computer rooms are consistent again.
[0121] Optionally, the first computer room and the second computer room can be monitored by deploying monitoring tools, including using OpenHardware Monitor to monitor the operating data of key hardware components of the server in real time, and using network monitoring tools to monitor the system network status.
[0122] Furthermore, a virtual router redundancy protocol can be pre-configured for the first computer room and the second computer room. When it is detected that the first computer room has a fault and cannot work normally, the network equipment in the second computer room will automatically take over the virtual IP address and continue to process network requests. After the second computer room takes over the virtual IP address, it will switch from the disaster recovery state to the normal operation state, enhance data processing permissions, and begin to independently handle daily power grid operations.
[0123] S206: When the data synchronization state is a delayed state, determine a delay type of the first data.
[0124] In the embodiment of the present application, when the data synchronization status of the data is obtained as described above, it can be further determined whether the data synchronization status is a data delay status, and when the data synchronization status is not a delay status, the delay type of the first data is determined.
[0125] Optionally, monitor the data transmission time and status. When transmission is delayed, analyze the cause of the delay. For delays caused by network congestion, limit the flow rate of low-priority data or temporarily cache it, give priority to the transmission of high-priority data, and automatically switch to redundant network links for delays caused by physical link failures, and promptly notify operation and maintenance personnel to repair the faulty links.
[0126] S207: Process the first data according to the delay type of the first data to obtain processed first data.
[0127] In the embodiment of the present application, after the delay type of the first data is acquired as described above, the first data may be processed according to the delay type of the first data to obtain processed first data.
[0128] The above-mentioned S202 “synchronizing the first data of the first computer room to the second computer room in the power grid system” includes:
[0129] S202: Synchronize the processed first data to a second computer room of the power grid system.
[0130] In the embodiment of the present application, after the processed first data is acquired as described above, the processed first data may be synchronized to the second computer room of the power grid system.
[0131] The power grid data synchronization method provided in the embodiment of the present application analyzes the data on the data synchronization link and processes the stored data of different types to obtain the processed first data, thereby ensuring that the data can be efficiently synchronized from the first computer room to the second computer room.
[0132] In one embodiment, see Figure 8 , the above-mentioned method for synchronizing power grid data further includes:
[0133] S10, predicting the working status of the first computer room according to the status data of the first computer room in the power grid system;
[0134] S11. If the working state of the first computer room indicates abnormality, determining the priority of the first data according to the attribute of the first data;
[0135] S12. Encrypt the first data according to the priority of the first data to obtain encrypted first data;
[0136] S13. Synchronizing the encrypted first data to a second computer room of the power grid system according to the priority of the first data;
[0137] S14, obtaining synchronized second data from the second computer room, extracting a first characteristic key field from the first data, and extracting a second characteristic key field from the second data;
[0138] S15, determining whether the first feature key field and the second feature key field are consistent, and if the first feature key field and the second feature key field are consistent, executing S16-S17, and if the first feature key field and the second feature key field are inconsistent, executing S18-S20;
[0139] S16, obtaining the detection result of data synchronization completion;
[0140] S17, determining that data synchronization is completed according to the detection result;
[0141] S18, obtaining the starting position of the difference data of the first computer room;
[0142] S19, determining the unsynchronized data according to the starting position of the difference data;
[0143] S20, synchronizing the unsynchronized data to the second computer room, and returning to execute S15.
[0144] The above-mentioned method for synchronizing power grid data constructs a dual-computer room switching mechanism, that is, when the first computer room is abnormal, the data of the first computer room can be synchronized to the second computer room, which improves the data synchronization efficiency to a certain extent; in addition, it is necessary to detect the second data based on the first data, and determine whether the data synchronization is completed based on the detection result, which ensures the accuracy of data synchronization.
[0145] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0146] Based on the same inventive concept, the embodiment of the present application also provides a power grid data synchronization device for implementing the power grid data synchronization method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in the embodiments of one or more power grid data synchronization devices provided below can refer to the limitations of the power grid data synchronization method above, and will not be repeated here.
[0147] In an exemplary embodiment, Fig. 9 As shown, a synchronization device for power grid data is provided, comprising: a prediction module 10, a synchronization module 11, a detection module 12 and a determination module 13, wherein:
[0148] A prediction module 10, configured to predict the working state of the first computer room according to the state data of the first computer room in the power grid system;
[0149] A synchronization module 11, configured to synchronize first data in the first computer room to a second computer room in the power grid system when the working state of the first computer room indicates an abnormality;
[0150] The detection module 12 is used to obtain synchronized second data from the second computer room, and detect the second data according to the first data to obtain a detection result;
[0151] The determination module 13 is used to determine whether data synchronization is completed according to the detection result.
[0152] In an exemplary embodiment, the synchronization module 11 includes: a determination unit and a synchronization unit, wherein:
[0153] a determining unit, specifically configured to determine a priority of the first data according to an attribute of the first data;
[0154] The synchronization unit is specifically configured to synchronize the first data to the second computer room of the power grid system according to the priority of the first data.
[0155] In an exemplary embodiment, the synchronization unit is further used to encrypt the first data according to the priority of the first data to obtain the encrypted first data; and synchronize the encrypted first data to the second computer room of the power grid system according to the priority of the first data.
[0156] In an exemplary embodiment, the detection module 12 includes: an extraction unit and a determination unit, wherein:
[0157] An extraction unit, specifically used to extract a first characteristic key field from the first data, and to extract a second characteristic key field from the second data;
[0158] The determination unit is specifically used to determine whether the first feature key field and the second feature key field are consistent, and when the first feature key field and the second feature key field are consistent, obtain a detection result of data synchronization completion.
[0159] In an exemplary embodiment, the detection module 12 further includes: an acquisition unit, a determination unit and a detection unit, wherein:
[0160] The acquisition unit is further configured to acquire the starting position of the difference data of the first computer room when the first characteristic key field and the second characteristic key field are inconsistent;
[0161] A determination unit, specifically used to determine the unsynchronized data according to the starting position of the difference data;
[0162] The detection unit is specifically used to synchronize the unsynchronized data to the second computer room, and return to execute the step of determining whether the first feature key field and the second feature key field are consistent, and when the first feature key field and the second feature key field are consistent, obtain the detection result of data synchronization completion.
[0163] In an exemplary embodiment, the above modules further include: a monitoring module, a determination module and a processing module, wherein:
[0164] A monitoring module, used to monitor the data synchronization link between the first computer room and the second computer room to obtain the data synchronization status;
[0165] A determination module, configured to determine a delay type of the first data when the data synchronization state is a delay state;
[0166] a processing module, configured to process the first data according to a delay type of the first data to obtain processed first data;
[0167] The synchronization module is also used to synchronize the processed first data to the second computer room of the power grid system.
[0168] Each module in the above-mentioned power grid data synchronization device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0169] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store status data in the computer room. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for synchronizing power grid data is implemented.
[0170] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0171] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0172] Predicting the working status of the first computer room according to the status data of the first computer room in the power grid system;
[0173] If the working state of the first computer room indicates abnormality, synchronizing the first data of the first computer room to the second computer room in the power grid system;
[0174] Acquire synchronized second data from the second computer room, and detect the second data according to the first data to obtain a detection result;
[0175] The data synchronization is completed based on the detection results.
[0176] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0177] Determining the priority of the first data according to the attribute of the first data;
[0178] The first data is synchronized to the second computer room of the power grid system according to the priority of the first data.
[0179] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0180] Encrypting the first data according to the priority of the first data to obtain encrypted first data;
[0181] The encrypted first data is synchronized to the second computer room of the power grid system according to the priority of the first data.
[0182] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0183] Extracting a first characteristic key field from the first data, and extracting a second characteristic key field from the second data;
[0184] Determine whether the first feature key field and the second feature key field are consistent, and when the first feature key field and the second feature key field are consistent, obtain a detection result of data synchronization completion.
[0185] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0186] When the first characteristic key field and the second characteristic key field are inconsistent, obtaining the starting position of the difference data of the first computer room;
[0187] Determine the unsynchronized data according to the starting position of the difference data;
[0188] Synchronize the unsynchronized data to the second computer room, and return to the step of determining whether the first feature key field and the second feature key field are consistent, and when the first feature key field and the second feature key field are consistent, obtain the detection result of data synchronization completion.
[0189] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0190] Monitor the data synchronization link between the first computer room and the second computer room to obtain the data synchronization status;
[0191] When the data synchronization state is a delayed state, determining a delay type of the first data;
[0192] Processing the first data according to the delay type of the first data to obtain processed first data;
[0193] Synchronizing first data in a first computer room to a second computer room in a power grid system includes:
[0194] The processed first data is synchronized to the second computer room of the power grid system.
[0195] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0196] Predicting the working status of the first computer room according to the status data of the first computer room in the power grid system;
[0197] If the working state of the first computer room indicates abnormality, synchronizing the first data of the first computer room to the second computer room in the power grid system;
[0198] Acquire synchronized second data from the second computer room, and detect the second data according to the first data to obtain a detection result;
[0199] The data synchronization is completed based on the detection results.
[0200] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0201] Determining the priority of the first data according to the attribute of the first data;
[0202] The first data is synchronized to the second computer room of the power grid system according to the priority of the first data.
[0203] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0204] Encrypting the first data according to the priority of the first data to obtain encrypted first data;
[0205] The encrypted first data is synchronized to the second computer room of the power grid system according to the priority of the first data.
[0206] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0207] Extracting a first characteristic key field from the first data, and extracting a second characteristic key field from the second data;
[0208] Determine whether the first feature key field and the second feature key field are consistent, and when the first feature key field and the second feature key field are consistent, obtain a detection result of data synchronization completion.
[0209] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0210] When the first characteristic key field and the second characteristic key field are inconsistent, obtaining the starting position of the difference data of the first computer room;
[0211] Determine the unsynchronized data according to the starting position of the difference data;
[0212] Synchronize the unsynchronized data to the second computer room, and return to the step of determining whether the first feature key field and the second feature key field are consistent, and when the first feature key field and the second feature key field are consistent, obtain the detection result of data synchronization completion.
[0213] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0214] Monitor the data synchronization link between the first computer room and the second computer room to obtain the data synchronization status;
[0215] When the data synchronization state is a delayed state, determining a delay type of the first data;
[0216] Processing the first data according to the delay type of the first data to obtain processed first data;
[0217] Synchronizing first data in a first computer room to a second computer room in a power grid system includes:
[0218] The processed first data is synchronized to the second computer room of the power grid system.
[0219] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0220] Predicting the working status of the first computer room according to the status data of the first computer room in the power grid system;
[0221] If the working state of the first computer room indicates abnormality, synchronizing the first data of the first computer room to the second computer room in the power grid system;
[0222] Acquire synchronized second data from the second computer room, and detect the second data according to the first data to obtain a detection result;
[0223] The data synchronization is completed based on the detection results.
[0224] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0225] Determining the priority of the first data according to the attribute of the first data;
[0226] The first data is synchronized to the second computer room of the power grid system according to the priority of the first data.
[0227] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0228] Encrypting the first data according to the priority of the first data to obtain encrypted first data;
[0229] The encrypted first data is synchronized to the second computer room of the power grid system according to the priority of the first data.
[0230] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0231] Extracting a first characteristic key field from the first data, and extracting a second characteristic key field from the second data;
[0232] Determine whether the first feature key field and the second feature key field are consistent, and when the first feature key field and the second feature key field are consistent, obtain a detection result of data synchronization completion.
[0233] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0234] When the first characteristic key field and the second characteristic key field are inconsistent, obtaining the starting position of the difference data of the first computer room;
[0235] Determine the unsynchronized data according to the starting position of the difference data;
[0236] Synchronize the unsynchronized data to the second computer room, and return to the step of determining whether the first feature key field and the second feature key field are consistent, and when the first feature key field and the second feature key field are consistent, obtain the detection result of data synchronization completion.
[0237] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0238] Monitor the data synchronization link between the first computer room and the second computer room to obtain the data synchronization status;
[0239] When the data synchronization state is a delayed state, determining a delay type of the first data;
[0240] Processing the first data according to the delay type of the first data to obtain processed first data;
[0241] Synchronizing first data in a first computer room to a second computer room in a power grid system includes:
[0242] The processed first data is synchronized to the second computer room of the power grid system.
[0243] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0244] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0245] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0246] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for synchronizing power grid data, characterized in that: Applied to a power grid system, the method comprises: Predicting the working status of the first computer room according to the status data of the first computer room in the power grid system; If the working state of the first computer room indicates abnormality, synchronizing the first data of the first computer room to the second computer room in the power grid system; Acquire synchronized second data from the second computer room, and detect the second data according to the first data to obtain a detection result; The data synchronization is completed according to the detection result.
2. The method according to claim 1, characterized in that: The step of synchronizing the first data in the first computer room to the second computer room in the power grid system includes: determining a priority of the first data according to an attribute of the first data; The first data is synchronized to a second computer room of the power grid system according to a priority of the first data.
3. The method according to claim 2, characterized in that The step of synchronizing the first data to the second computer room of the power grid system according to the priority of the first data includes: encrypting the first data according to the priority of the first data to obtain encrypted first data; The encrypted first data is synchronized to a second computer room of the power grid system according to the priority of the first data.
4. The method according to any one of claims 1 to 3, characterized in that: The detecting the second data according to the first data to obtain a detection result includes: Extracting a first characteristic key field from the first data, and extracting a second characteristic key field from the second data; Determine whether the first feature key field and the second feature key field are consistent, and when the first feature key field and the second feature key field are consistent, obtain a detection result of data synchronization completion.
5. The method according to claim 4, characterized in that The method further comprises: When the first characteristic key field and the second characteristic key field are inconsistent, obtaining the starting position of the difference data of the first computer room; Determine the unsynchronized data according to the starting position of the difference data; Synchronize the unsynchronized data to the second computer room, and return to execute the step of determining whether the first feature key field and the second feature key field are consistent, and when the first feature key field and the second feature key field are consistent, obtain the detection result of data synchronization completion.
6. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Monitoring a data synchronization link between the first computer room and the second computer room to obtain a data synchronization status; When the data synchronization state is a delayed state, determining a delay type of the first data; Processing the first data according to the delay type of the first data to obtain processed first data; The step of synchronizing the first data in the first computer room to the second computer room in the power grid system includes: The processed first data is synchronized to a second computer room of the power grid system.
7. A device for synchronizing power grid data, characterized in that: Applied to a power grid system, the device comprises: A prediction module, configured to predict the working state of the first computer room according to the state data of the first computer room in the power grid system; A synchronization module, configured to synchronize the first data of the first computer room to the second computer room in the power grid system when the working state of the first computer room indicates an abnormality; A monitoring module, used for acquiring synchronized second data from the second computer room, and detecting the second data according to the first data to obtain a detection result; A determination module is used to determine whether data synchronization is completed according to the detection result.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.