Cross-available-area disaster recovery backup method, system and device based on read-write separation and storage medium
By adopting a read-write separation architecture and a synchronous dual-write mechanism, the problems of poor data consistency and low fault recovery efficiency in power monitoring systems have been solved. Real-time synchronization of power monitoring data and second-level fault recovery have been achieved. The backup strategies of different data tables have been adapted to improve the security, stability and business continuity of the power grid.
Patent Information
- Application Number
- CN202511737075.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2026-02-24
AI Technical Summary
Traditional power monitoring systems suffer from poor data consistency, inflexible backup strategies, and low fault recovery efficiency in cross-availability zone disaster recovery solutions, leading to data loss and prolonged service interruptions, which affect the safe and stable operation of the power grid.
Adopting a read-write separation architecture, it achieves real-time data synchronization between primary and backup availability zones through synchronous dual-write mechanism and sharded data transmission. Combined with table-level backup frequency and storage location configuration, it automatically cleans up expired data, achieving second-level failover and data integrity verification.
It ensures the accuracy and integrity of power monitoring data, reduces resource waste, achieves second-level fault recovery, reduces power grid security risks, adapts to the business needs of different data tables, and improves the flexibility and reliability of the system.
Smart Images

Figure CN121560646A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field, and in particular to a method, system, device and storage medium for cross-availability zone disaster recovery backup based on read-write separation. Background Technology
[0002] In power monitoring systems, the integrated application of storage-computing resource topology and high-performance network data processing technology is crucial. The system needs to process massive amounts of power data in real time and ensure the security and stability of data storage and transmission. Disaster recovery backup is a core component of data security. Traditional solutions typically use asynchronous replication to achieve cross-availability zone data backup. In this mode, there is a time lag in data synchronization between the primary and backup availability zones, which can easily lead to data inconsistency risks. For example, when the primary availability zone experiences a sudden failure, the backup availability zone may not have synchronized the latest power monitoring data, resulting in the loss of critical data and affecting the accuracy of power dispatch decisions. Furthermore, traditional disaster recovery backup solutions lack the ability to configure granular backup strategies. They can only perform unified backups based on the entire database or storage cluster, failing to set differentiated backup rules for power data under different business scenarios. For example, some core data tables require high-frequency backups to ensure data timeliness, while non-core data tables only require low-frequency backups. A unified backup strategy not only consumes a large amount of storage resources and network bandwidth, resulting in resource waste, but also cannot adapt to diverse business disaster recovery needs, exhibiting a severe lack of flexibility.
[0003] In addition, traditional solutions have low fault recovery efficiency. When the primary availability zone fails, it is necessary to complete the full synchronization and verification of primary and backup data before service migration and reconstruction, resulting in a long recovery time objective (RTO). It usually takes several minutes or even longer to restore power monitoring services. The power system has a very low tolerance for service interruption. Long-term service interruption may cause problems such as grid dispatch delay and untimely equipment fault warning, which seriously threatens the safe and stable operation of the power grid. Summary of the Invention
[0004] In view of the aforementioned existing problems, this invention is proposed. Therefore, this invention provides a cross-availability zone disaster recovery backup method, system, device, and storage medium based on read-write separation to solve the problems of poor data consistency, inflexible backup strategies, and low fault recovery efficiency in existing technologies.
[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, embodiments of the present invention provide a cross-availability zone disaster recovery backup method based on read-write separation, comprising: the read-write separation architecture includes a primary availability zone and a standby availability zone, both the primary availability zone and the standby availability zone deploying a data ingestion manager, a front-end node, a back-end node and a metadata module, the back-end node including a data ingestion node and a data storage node; The method includes: The data ingestion manager of the primary availability zone receives data write requests from clients and issues write instructions to the primary data ingestion node; The primary data ingestion node is configured with a synchronous dual-write mechanism. In response to the write command, it performs a synchronous dual-write operation, simultaneously sending the data to be written to the data storage nodes of the primary and backup availability zones. When both the primary and backup data storage nodes successfully complete the data writing, the primary data ingestion manager submits the write transaction to the client. A metadata synchronization channel is established between the primary metadata module and the backup metadata module, configured to synchronize the changed metadata to the backup metadata module when the metadata in the primary metadata module changes. The backup availability zone is configured such that when a failure is detected in the primary availability zone, the backup front-end node reads the data distribution information stored in the backup metadata module and schedules the backup back-end node to take over the data service.
[0006] As a preferred embodiment of the cross-availability zone disaster recovery backup method based on read-write separation described in this invention, wherein: the step of performing synchronous dual-write operation, which simultaneously sends the data to be written to the data storage nodes of the primary and backup availability zones, includes: The master data ingestion node responds to the write command by sending the data to the master data ingestion node; When the master data ingestion node receives a write request, it triggers a synchronous dual-write process to transfer the data to the master data storage node. The primary data storage node receives the data and synchronously sends the data to the backup data storage node.
[0007] As a preferred embodiment of the cross-availability zone disaster recovery backup method based on read-write separation described in this invention, wherein: when both the primary and backup availability zone data storage nodes successfully complete data writing, the primary data ingestion manager submitting the write transaction to the client further includes: If data writing fails on either the primary or backup data storage node, the transaction is rolled back and the data is rewritten until both the primary and backup data storage nodes successfully complete the data writing.
[0008] As a preferred embodiment of the cross-availability zone disaster recovery backup method based on read-write separation described in this invention, the method further includes: the standby front-end node reading the data distribution information stored in the local backup metadata module and scheduling the standby local storage back-end node to take over the data service; the main front-end node independently setting backup parameters for each data table, the backup parameters including backup frequency, storage location and synchronization mode; the main front-end node automatically triggering backup operations in the standby availability zone according to a preset backup strategy and recording the backup log in the main metadata module.
[0009] As a preferred embodiment of the cross-availability zone disaster recovery backup method based on read-write separation described in this invention, it further includes: configuring the retention time of backup data for each data table in the front-end node, and monitoring the creation time of backup data for each table in the metadata module; If the backup data of any data table exceeds the retention period, the metadata module will automatically generate and issue a cleanup command to delete the corresponding expired backup data and free up storage space. If the backup data of any data table has not exceeded the retention period, it will remain in normal storage status.
[0010] The beneficial effects of this preferred technical solution are that by automatically cleaning up expired data through the metadata module, redundant storage space can be released in a timely manner, preventing storage resource shortages caused by disorderly accumulation of backup data, and reducing the storage operation and maintenance costs of the power monitoring system.
[0011] As a preferred embodiment of the cross-availability zone disaster recovery backup method based on read-write separation described in this invention, the primary availability zone fault detection includes: The backup front-end node monitors the performance metrics of the main data storage node in real time, including disk utilization, CPU load, and network bandwidth. If any indicator does not exceed the preset threshold, the primary availability zone will perform basic operations according to the corresponding rules; if any indicator exceeds the preset threshold, the primary availability zone is determined to be in a sub-healthy state. When the primary availability zone is in a sub-healthy state, some read requests are pre-migrated to the backup availability zone.
[0012] As a preferred embodiment of the cross-availability zone disaster recovery backup method based on read-write separation described in this invention, the following is an example: scheduling the standby backend node to take over the data service: after the standby availability zone switch is completed, the system automatically starts data integrity verification and calculates the data hash value of each data table in the current standby availability zone. The hash value of the data in the data storage node comparison table of the current standby availability zone is compared with the hash value of the last backup before the failure of the primary availability zone. The identified differences are automatically filled in, and a verification report is generated and stored in the metadata module.
[0013] The beneficial effects of this preferred technical solution are that by accurately identifying the differences between primary and backup data and supplementing missing or inconsistent data, it avoids the impact of data gaps on power monitoring services after fault switching and ensures data accuracy. The automatic verification and difference supplementation mechanism can cover occasional omissions that may occur during synchronous dual writing, further eliminating the risk of data loss caused by primary availability zone failures, which meets the high requirements of the power system for zero loss of core data.
[0014] Secondly, the present invention provides a cross-availability zone disaster recovery and backup system based on read-write separation. The read-write separation architecture includes a primary availability zone and a standby availability zone. Both the primary availability zone and the standby availability zone deploy a data ingestion manager, a front-end node, a back-end node, and a metadata module. The back-end node includes a data ingestion node and a data storage node. The system includes: The data writing module is used by the data ingestion manager of the primary availability zone to receive data writing requests from clients and to issue writing instructions to the primary data ingestion node. The synchronous dual-write operation module is used to configure the synchronous dual-write mechanism on the master data ingestion node, respond to the write command, and execute the synchronous dual-write operation, simultaneously sending the data to be written to the data storage nodes of the primary and backup availability zones; when both the primary and backup data storage nodes successfully complete the data writing, the master data ingestion manager submits the write transaction to the client. The metadata synchronization module is used to establish a metadata synchronization channel between the primary metadata module and the backup metadata module, and is configured to synchronize the changed metadata to the backup metadata module when the metadata in the primary metadata module changes. The failover module is configured such that when a failure is detected in the primary availability zone, the backup front-end node reads the data distribution information stored in the backup metadata module and schedules the backup back-end node to take over the data service.
[0015] Thirdly, the present invention provides an electronic device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the cross-availability zone disaster recovery backup method based on read-write separation are implemented.
[0016] Fourthly, the present invention provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the read-write separation-based cross-availability zone disaster recovery backup method.
[0017] Compared with existing technologies, the advantages of this invention are as follows: This invention achieves real-time data synchronization between the primary and backup availability zones through a synchronous dual-write mechanism and fragmented data transmission with integrity verification. Transactions are committed only after successful dual-write, completely eliminating the time lag problem of traditional asynchronous replication, avoiding data loss due to primary availability zone failures, and ensuring the accuracy and integrity of power monitoring data. Furthermore, it provides table-level backup frequency, storage location, and synchronization mode configurations, combined with backup data lifecycle management, to adapt to the business needs of different data tables in the power monitoring system, reducing resource waste. Based on the backup availability zone system metadata, it directly schedules nodes to take over services without requiring full data synchronization, achieving second-level fault switching, far lower than the minute-level recovery time of traditional solutions, ensuring the continuity of power monitoring services and reducing power grid security risks. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 This is a schematic diagram of a method flow for a cross-availability zone disaster recovery backup method based on read-write separation according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a read-write separation architecture for a cross-availability zone disaster recovery backup method based on read-write separation, as described in one embodiment of the present invention. Detailed Implementation
[0019] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0020] Example 1, referring to Figures 1-2 This is an embodiment of the present invention, which provides a cross-availability zone disaster recovery backup method based on read-write separation. The read-write separation architecture includes a primary availability zone and a standby availability zone. Both the primary availability zone and the standby availability zone deploy a data ingestion manager, a front-end node, a back-end node, and a metadata module. The back-end node includes a data ingestion node and a data storage node. The methods include: S100: The data ingestion manager of the primary availability zone receives data write requests from clients and sends write instructions to the primary data ingestion node; S200: The primary data ingestion node is configured with a synchronous dual-write mechanism. In response to a write command, it performs a synchronous dual-write operation, simultaneously sending the data to be written to the data storage nodes in the primary and backup availability zones. When both primary and backup data storage nodes successfully complete the data writing, the primary data ingestion manager submits the write transaction to the client. S300: A metadata synchronization channel is established between the primary metadata module and the backup metadata module. It is configured to synchronize the changed metadata to the backup metadata module when the metadata in the primary metadata module changes. S400: The standby availability zone is configured so that when a failure of the primary availability zone is detected, the standby front-end node reads the data distribution information stored in the standby metadata module and schedules the standby back-end node to take over the data service.
[0021] It should be noted that traditional technical solutions typically use asynchronous replication to achieve cross-availability zone data backup. In this mode, there is a time difference in data synchronization between the primary availability zone and the backup availability zone, which can easily lead to data inconsistency risks. At the same time, traditional disaster recovery backup solutions lack the ability to configure fine-grained backup strategies. They can only perform unified backups based on the entire database or storage cluster and cannot set differentiated backup rules for power data under different business scenarios. In addition, the fault recovery efficiency of traditional solutions is low. When the primary availability zone fails, it is necessary to complete the full synchronization and verification of the primary and backup data before performing service migration and reconstruction. This results in a long recovery time target, which usually takes several minutes or even longer to restore power monitoring services. The power system has a very low tolerance for service interruption. Long-term service interruption may cause problems such as grid dispatch delays and untimely equipment fault warnings, which seriously threaten the safe and stable operation of the power grid. This invention achieves real-time data synchronization between primary and backup availability zones through a synchronous dual-write mechanism and sharded data transmission with integrity verification. Transactions are committed only after successful dual-write, completely eliminating the time lag problem of traditional asynchronous replication, avoiding data loss due to primary availability zone failure, and ensuring the accuracy and integrity of power monitoring data. It provides table-level backup frequency, storage location, and synchronization mode configuration, combined with backup data lifecycle management, to adapt to the business needs of different data tables in the power monitoring system, reducing resource waste. Based on the metadata of the backup availability zone, it directly schedules nodes to take over services without full data synchronization, achieving second-level fault switching, far lower than the minute-level recovery time of traditional solutions, ensuring the continuity of power monitoring services and reducing power grid security risks.
[0022] Furthermore, in step S100 of this embodiment of the invention, the data write request is routed to the primary data ingestion node, and the read request is allocated to the data storage node of the primary availability zone or the backup availability zone as needed. The on-demand allocation is dynamically adjusted based on the read request volume of the primary and backup data storage nodes as statistically analyzed in real time by the front-end node. At the same time, it can also be combined with actual needs, such as business priority, node load threshold, etc., to customize the allocation rules, taking into account both flexibility and resource utilization.
[0023] In this embodiment of the invention, step S200, which involves performing a synchronous dual-write operation and simultaneously sending the data to be written to the data storage nodes in the primary and backup availability zones, includes: The master data ingestion node responds to the write command by sending the data to the master data ingestion node; When the master data ingestion node receives a write request, it triggers a synchronous dual-write process to transfer the data to the master data storage node. The primary data storage node receives the data and synchronously sends it to the backup data storage node.
[0024] It should be noted that in step S200 of the present invention, the synchronous dual-write mechanism adopts fragmented data transmission, which splits the data to be written into multiple data fragments according to preset rules. Each fragment is transmitted independently and its integrity is verified by the CRC32 check algorithm. Only the fragments that fail the verification are retransmitted.
[0025] Specifically, the synchronous dual-write mechanism employs fragmented data transmission, dividing the data to be written into multiple data fragments according to preset rules. This avoids overall inefficiency caused by excessively long transmission times or interruptions in the transmission of a single large data block. A transmission problem in one fragment will not affect other fragments, and only the fragment that failed verification is retransmitted, eliminating the need to repeatedly transmit complete data, reducing the amount of invalid data transmission, and saving network bandwidth. This is particularly suitable for the real-time synchronization needs of massive data in power monitoring systems. Each fragment is transmitted independently and its integrity is verified using the CRC32 check algorithm. This accurately identifies data corruption or loss caused by network fluctuations, hardware anomalies, etc., during transmission, ensuring the accuracy of each fragment's transmission result. This guarantees data integrity at the fragment level, thereby achieving accurate data synchronization between primary and backup availability zones, meeting the high integrity requirements of power monitoring data.
[0026] In this embodiment of the invention, step S200, where both the primary and backup availability zones' data storage nodes have successfully completed data writing, further includes the primary data ingestion manager submitting a write transaction to the client: If data writing fails on either the primary or backup data storage node, the transaction is rolled back and the data is rewritten until both the primary and backup data storage nodes successfully complete the data writing process.
[0027] It should be noted that the primary data ingestion manager will only commit the transaction to the client after both the primary and standby data storage nodes have successfully written the data, ensuring strong data consistency. The standby data ingestion manager does not participate in transaction commits during normal writes; it only takes over the service during failover.
[0028] In one feasible approach, if data writing fails on either the primary or backup data storage node, only the data fragments that failed CRC32 verification or failed to be written to the primary / backup data storage node are retransmitted, rather than the entire data being retransmitted, thus reducing resource consumption.
[0029] In another feasible approach, if the retransmission still fails after one attempt (due to network fluctuations), it can be retried a preset number of times (e.g., 3 times), during which time the data ingestion manager will not commit transactions. In another feasible approach, if shard write failures still occur after multiple retries (e.g., a failure of a standby availability zone node), the data ingestion manager returns the failed write transaction and triggers a fault alarm (e.g., notifying operations and maintenance). This ensures that the external request initiator is fully aware of the final state of the write operation. After the fault is recovered, the difference data can be retransmitted through the logs recorded in the metadata module to ensure eventual data consistency.
[0030] In this embodiment of the invention, step S400, in which the standby front-end node reads the data distribution information stored in the local standby metadata module and schedules the standby local storage back-end node to take over the data service, further includes: The main front-end node independently sets backup parameters for each data table. These backup parameters include backup frequency, storage location, and synchronization mode. The main front-end node automatically triggers backup operations in the standby availability zone according to a preset backup strategy and records the backup logs in the main metadata module.
[0031] Furthermore, the preset backup strategy in this embodiment of the invention mainly includes the following three core parameters, all of which are configured independently at the data table level: Backup frequency: Defines the time interval or triggering condition for performing backups on each data table, such as real-time, every 5 minutes, hourly, etc.
[0032] Storage location: Specifies the specific location or storage resource on which backup data for each data table is stored in the standby availability zone.
[0033] Synchronization mode: Specifies the data synchronization method, such as full-text synchronization, incremental synchronization, etc., to ensure that data is efficiently and accurately synchronized from the primary availability zone to the backup availability zone.
[0034] It should be noted that unified management of backup strategies by the primary availability zone can avoid the chaos caused by inconsistent configurations between the primary and backup ends, ensuring the uniformity and manageability of the system. Once the backup log is recorded in the primary metadata module, the change will be automatically and in real time synchronized to the backup metadata module through the synchronization channel.
[0035] In this embodiment of the invention, step S400 further includes: configuring the retention time of backup data for each data table in the front-end node, and monitoring the creation time of backup data for each table in the metadata module; If the backup data of any data table exceeds the retention period, the metadata module will automatically generate and issue a cleanup command to delete the corresponding expired backup data and free up storage space. If the backup data of any data table has not exceeded the retention period, it will remain in normal storage status.
[0036] Furthermore, the front-end node is configured with a table-level backup strategy, which supports independent configuration of backup parameters (frequency, storage location, etc.) and lifecycle management for each data table.
[0037] It should be noted that, in this embodiment of the invention, the retention period can be flexibly configured by the administrator for each data table when deploying the system, based on factors such as the importance of the data (e.g., longer retention of core business data), business and compliance requirements (e.g., audit requirements for retention of a specific duration), and storage resource costs.
[0038] It should also be noted that by configuring the retention period for backup data of each data table through the front-end node, when the backup data exceeds the retention period, the metadata module automatically triggers a cleanup command to delete the expired data. It supports configuring backup parameters independently for each data table, and can set high-frequency backups for core data tables in the power monitoring system and low-frequency backups for non-core data tables, avoiding the waste of resources from uniform backups and accurately matching the disaster recovery priorities of different data. Combined with the automatic cleanup of expired data by the metadata module, redundant storage space can be released in a timely manner, preventing storage resource shortages caused by disorderly accumulation of backup data and reducing the storage operation and maintenance costs of the power monitoring system.
[0039] In this embodiment of the invention, the primary availability zone fault detection in step S400 includes: The standby front-end node monitors the performance metrics of the main data storage node in real time, including disk utilization, CPU load, and network bandwidth. If any indicator does not exceed the preset threshold, the primary availability zone will perform basic operations according to the corresponding rules; if any indicator exceeds the preset threshold, the primary availability zone is determined to be in a sub-healthy state. When the primary availability zone is in a sub-healthy state, some read requests are pre-migrated to the backup availability zone.
[0040] It should be noted that the front-end node monitors the disk utilization, CPU load, and network bandwidth of the back-end data storage nodes in the primary availability zone in real time. When any indicator exceeds a preset threshold, the primary availability zone is determined to be in a sub-healthy state, and some read requests are migrated to the backup availability zone in advance. By monitoring the core performance indicators of the back-end data storage nodes in the primary availability zone in real time, the sub-healthy state can be identified before the primary availability zone fails completely, avoiding service interruptions caused by the continuous deterioration of indicators. This transforms passive recovery into proactive prevention, ensuring the continuity of power monitoring services. Migrating some read requests to the backup availability zone in advance can quickly divert the operating pressure of the primary availability zone, preventing the sub-healthy state from further aggravating, maintaining the stability of the core write function of the primary availability zone, and meeting the high requirements of power monitoring systems for data processing timeliness.
[0041] In this embodiment of the invention, the preset threshold can be flexibly set in combination with actual business scenarios, such as the business's sensitivity to latency, server hardware configuration, and data read / write peak values.
[0042] In this embodiment of the invention, step S400, which involves scheduling a backup backend node to take over the data service, includes: after the backup availability zone switch is completed, the system automatically starts data integrity verification and calculates the data hash value of each data table in the current backup availability zone; The hash value of the data in the data storage node comparison table of the current standby availability zone is compared with the hash value of the last backup before the failure of the primary availability zone. The identified differences are automatically filled in, and a verification report is generated and stored in the metadata module.
[0043] It should be noted that after the standby availability zone switchover is completed, the system automatically initiates a data integrity verification process. The backend data storage nodes of the standby availability zone compare the current data hash value of the data table with the hash value of the last backup before the primary availability zone failure, complete the difference data, and generate a verification report stored in the metadata module. This can accurately identify the differences between the primary and standby data, complete missing or inconsistent data, avoid the impact of data gaps on power monitoring services after the failure switchover, and ensure data accuracy. The automatic verification and difference completion mechanism can cover the occasional omissions that may occur during synchronous dual writing, further eliminate the risk of data loss caused by the failure of the primary availability zone, and meet the high requirements of the power system for zero loss of core data.
[0044] In a preferred embodiment, the read-write separation architecture supports dynamic read request routing, and the front-end node counts the read request volume of the back-end data storage nodes in the primary and backup availability zones in real time.
[0045] It's worth noting that the read / write separation architecture supports dynamic read request routing. Front-end nodes continuously monitor the read request volume of the back-end data storage nodes in the primary and backup availability zones, dynamically allocating read requests based on actual load. This avoids performance bottlenecks caused by excessive concentration of read requests in a single availability zone, ensuring balanced resource utilization between the primary and backup availability zones and maintaining high efficiency in data reading for the power monitoring system. When the read load on the primary availability zone suddenly increases or experiences slight performance fluctuations, dynamic routing can automatically transfer some read requests to the less loaded backup availability zone. This prevents the primary availability zone from being affected by read pressure, impacting core write functions, and also prevents idle resources in the backup availability zone, improving the overall system's resilience to fluctuations and meeting the high service stability requirements of power monitoring services. The read request allocation strategy can be adjusted based on real-time request volume without manual intervention, fully utilizing the performance of the storage nodes in the primary and backup availability zones. This avoids resource waste or load imbalance issues in fixed routing modes, reducing the operational costs of the power monitoring system and improving the overall return on investment.
[0046] In a preferred embodiment, data transmission between the primary availability zone and the backup availability zone employs an encryption protocol, and the backend data storage nodes use encryption algorithms to encrypt and store data.
[0047] It is worth noting that data transmission between the primary availability zone and the backup availability zone adopts an encryption protocol. When storing data, the backend data storage nodes use encryption algorithms to encrypt the data, which can prevent the data from being stolen, tampered with, or intercepted during cross-zone transmission, avoiding the leakage of sensitive data in the power monitoring system, and meeting the strict requirements of the power industry for data transmission security. The backend data storage nodes use encryption algorithms to store data, which can ensure the security of data when it is stored statically. Even if the storage medium is physically lost or illegally accessed, unauthorized persons cannot decipher the encrypted data, further reducing the risk of leakage of core power data.
[0048] In one specific implementation, during actual use, data write requests are routed to the backend data ingestion node of the primary availability zone, while read requests are allocated to the backend data storage nodes of the primary or standby availability zone as needed. When the backend data ingestion node of the primary availability zone receives a data write request, it triggers a synchronous dual-write mechanism, first writing the data to the local backend data storage node of the primary availability zone, and simultaneously writing it to the backend data storage node of the standby availability zone. Only after both writes are successful does the data ingestion manager commit the write success transaction. Backup parameters are independently set for each data table through the frontend node, including backup frequency, storage location, and synchronization mode. The frontend node automatically triggers the backup operation of the standby availability zone according to the preset backup strategy, and the metadata module records the backup log. The frontend nodes of the primary and standby availability zones monitor the status of the primary availability zone through a heartbeat mechanism. After determining that the primary availability zone has failed, the frontend node of the standby availability zone reads the data distribution information from the local metadata module and schedules the local backend node to take over the service, achieving a second-level switchover.
[0049] This invention achieves real-time data synchronization between primary and backup availability zones through a synchronous dual-write mechanism and sharded data transmission with integrity verification. Transactions are committed only after successful dual-write, completely eliminating the time lag problem of traditional asynchronous replication, avoiding data loss due to primary availability zone failure, and ensuring the accuracy and integrity of power monitoring data. It provides table-level backup frequency, storage location, and synchronization mode configuration, combined with backup data lifecycle management, to adapt to the business needs of different data tables in the power monitoring system, reducing resource waste. Based on the metadata of the backup availability zone, it directly schedules nodes to take over services without full data synchronization, achieving second-level fault switching, far lower than the minute-level recovery time of traditional solutions, ensuring the continuity of power monitoring services and reducing power grid security risks.
[0050] Example 2: The above example is an illustrative scheme of a cross-availability zone disaster recovery backup method based on read-write separation. It should be noted that the technical solution of this cross-availability zone disaster recovery backup system based on read-write separation belongs to the same concept as the technical solution of the above-described cross-availability zone disaster recovery backup method based on read-write separation. Details not described in detail in this example of the cross-availability zone disaster recovery backup system based on read-write separation can be found in the description of the above-described cross-availability zone disaster recovery backup method based on read-write separation.
[0051] This embodiment presents a cross-availability zone disaster recovery and backup system based on read-write separation. The read-write separation architecture includes a primary availability zone and a standby availability zone. Both the primary availability zone and the standby availability zone deploy a data ingestion manager, a front-end node, a back-end node, and a metadata module. The back-end node includes a data ingestion node and a data storage node. The system includes: The data writing module is used by the data ingestion manager of the primary availability zone to receive data writing requests from clients and send writing instructions to the primary data ingestion node. The synchronous dual-write operation module is used to configure the synchronous dual-write mechanism on the primary data ingestion node. In response to the write command, it executes the synchronous dual-write operation, sending the data to be written to the data storage nodes in the primary and backup availability zones simultaneously. When both the primary and backup data storage nodes have successfully completed the data writing, the primary data ingestion manager submits the write transaction to the client. The metadata synchronization module is used to establish a metadata synchronization channel between the primary metadata module and the backup metadata module. It is configured to synchronize the changed metadata to the backup metadata module when the metadata in the primary metadata module changes. The failover module is configured so that when a failure is detected in the primary availability zone, the backup front-end node reads the data distribution information stored in the backup metadata module and schedules the backup back-end node to take over the data service.
[0052] This embodiment also provides an electronic device applicable to cross-availability zone disaster recovery backup methods based on read-write separation, including: The system includes a memory and a processor. The memory stores computer-executable instructions, and the processor executes these instructions to implement the cross-availability zone disaster recovery backup method based on read-write separation, as proposed in the above embodiments.
[0053] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, it implements the cross-availability zone disaster recovery backup method based on read-write separation as proposed in the above embodiments.
[0054] The storage medium proposed in this embodiment and the cross-availability zone disaster recovery backup method based on read-write separation proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0055] From the above description of the embodiments, those skilled in the art will clearly understand that the embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can 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 code. The solutions in the embodiments of this application can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0056] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0057] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0058] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0059] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0060] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
[0061] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A cross-availability zone disaster recovery backup method based on read-write separation, characterized in that, The read-write separation architecture includes a primary availability zone and a backup availability zone. Both the primary and backup availability zones deploy a data ingestion manager, front-end nodes, back-end nodes, and a metadata module. The back-end nodes include data ingestion nodes and data storage nodes. The method includes: The data ingestion manager of the primary availability zone receives data write requests from clients and issues write instructions to the primary data ingestion node; The primary data ingestion node is configured with a synchronous dual-write mechanism. In response to the write command, it performs a synchronous dual-write operation, simultaneously sending the data to be written to the data storage nodes of the primary and backup availability zones. When both the primary and backup data storage nodes successfully complete the data writing, the primary data ingestion manager submits the write transaction to the client. A metadata synchronization channel is established between the primary metadata module and the backup metadata module, configured to synchronize the changed metadata to the backup metadata module when the metadata in the primary metadata module changes. The backup availability zone is configured such that when a failure is detected in the primary availability zone, the backup front-end node reads the data distribution information stored in the backup metadata module and schedules the backup back-end node to take over the data service.
2. The cross-availability zone disaster recovery backup method based on read-write separation as described in claim 1, characterized in that, The step of performing a synchronous dual-write operation, which involves simultaneously sending the data to be written to the data storage nodes of the primary and backup availability zones, includes: The master data ingestion node responds to the write command by sending the data to the master data ingestion node; When the master data ingestion node receives a write request, it triggers a synchronous dual-write process to transfer the data to the master data storage node. The primary data storage node receives the data and synchronously sends the data to the backup data storage node.
3. The cross-availability zone disaster recovery backup method based on read-write separation as described in claim 2, characterized in that, When both the primary and backup availability zones' data storage nodes successfully complete data writing, the primary data ingestion manager's submission of the write transaction to the client also includes: If data writing fails on either the primary or backup data storage node, the transaction is rolled back and the data is rewritten until both the primary and backup data storage nodes successfully complete the data writing.
4. The cross-availability zone disaster recovery backup method based on read-write separation as described in claim 3, characterized in that, The standby front-end node reads the data distribution information stored in the local backup metadata module and schedules the standby local storage back-end node to take over the data service. This also includes: the main front-end node independently sets backup parameters for each data table. The backup parameters include backup frequency, storage location and synchronization mode. The main front-end node automatically triggers the backup operation of the standby availability zone according to the preset backup strategy and records the backup log in the main metadata module.
5. The cross-availability zone disaster recovery backup method based on read-write separation as described in claim 4, characterized in that, Also includes: The front-end node configures the retention period for backup data of each data table, and the metadata module monitors the creation time of backup data of each table. If the backup data of any data table exceeds the retention period, the metadata module will automatically generate and issue a cleanup command to delete the corresponding expired backup data and free up storage space. If the backup data of any data table has not exceeded the retention period, it will remain in normal storage status.
6. The cross-availability zone disaster recovery backup method based on read-write separation as described in claim 5, characterized in that, Fault detection in the primary availability zone includes: The backup front-end node monitors the performance metrics of the main data storage node in real time, including disk utilization, CPU load, and network bandwidth. If any indicator does not exceed the preset threshold, the primary availability zone will perform basic operations according to the corresponding rules; if any indicator exceeds the preset threshold, the primary availability zone is determined to be in a sub-healthy state. When the primary availability zone is in a sub-healthy state, some read requests are pre-migrated to the backup availability zone.
7. The cross-availability zone disaster recovery backup method based on read-write separation as described in claim 6, characterized in that, The process of scheduling backup backend nodes to take over data services includes: after the backup availability zone switch is completed, the system automatically starts data integrity verification and calculates the data hash value of each data table in the current backup availability zone; The hash value of the data in the data storage node comparison table of the current standby availability zone is compared with the hash value of the last backup before the failure of the primary availability zone. The identified differences are automatically filled in, and a verification report is generated and stored in the metadata module.
8. A cross-availability zone disaster recovery and backup system based on read-write separation, applied to the method described in any one of claims 1-7, wherein the read-write separation architecture includes a primary availability zone and a standby availability zone, and both the primary availability zone and the standby availability zone deploy a data ingestion manager, a front-end node, a back-end node, and a metadata module, wherein the back-end node includes a data ingestion node and a data storage node; The system includes: The data writing module is used by the data ingestion manager of the primary availability zone to receive data writing requests from clients and to issue writing instructions to the primary data ingestion node. The synchronous dual-write operation module is used to configure the synchronous dual-write mechanism on the master data ingestion node, respond to the write command, and execute the synchronous dual-write operation, simultaneously sending the data to be written to the data storage nodes of the primary and backup availability zones; when both the primary and backup data storage nodes successfully complete the data writing, the master data ingestion manager submits the write transaction to the client. The metadata synchronization module is used to establish a metadata synchronization channel between the primary metadata module and the backup metadata module, and is configured to synchronize the changed metadata to the backup metadata module when the metadata in the primary metadata module changes. The failover module is configured such that when a failure is detected in the primary availability zone, the backup front-end node reads the data distribution information stored in the backup metadata module and schedules the backup back-end node to take over the data service.
9. An electronic device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the cross-availability zone disaster recovery backup method based on read-write separation as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the cross-availability zone disaster recovery backup method based on read-write separation as described in any one of claims 1 to 7.