A disaster recovery processing method, device, system, equipment and medium

By detecting data and dynamically switching the read and write requests of the primary storage database to the heterogeneous backup storage, it solves the stability problem of the remote multi-machine room disaster recovery solution when traffic surges and backup storage fails, and achieves rapid recovery and business continuity of the primary storage. sex.

CN112559258BActive Publication Date: 2024-10-18DOUYIN VISION CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202011404476.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-02
Publication Date
2024-10-18
Estimated Expiration
2040-12-02

AI Technical Summary

Technical Problem

Existing off-site multi-machine room disaster recovery solutions are difficult to ensure stable operation when traffic suddenly increases. Failure of backup storage may cause an avalanche, and the unavailability time or recovery time after the main storage goes down is long.

Method used

By obtaining the detection data of the main storage database, it is determined whether the read switching conditions and write switching conditions are met, the traffic is dynamically adjusted, and the read requests and write requests are switched to the heterogeneous backup storage database to achieve offloading and rapid recovery.

Benefits of technology

It improves the stability of primary storage, reduces fault recovery time, avoids avalanches of backup storage, and ensures business continuity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112559258B_ABST
    Figure CN112559258B_ABST
Patent Text Reader

Abstract

The disclosed embodiments relate to a disaster recovery processing method, apparatus, system, device and medium, wherein the method comprises: obtaining detection data of a data access request from a primary storage database, and if it is determined based on the detection data that a target switching condition is satisfied, then switching the target request corresponding to the target switching condition in the data access request to a heterogeneous backup storage database; wherein the target switching condition comprises a read switching condition and a write switching condition, the target request corresponding to the read switching condition is a read request, and the target request corresponding to the write switching condition is a read request and a write request. By adopting the above technical solution, the read request and the write request in the data access request can be switched separately through the heterogeneous backup storage, and the switching of the read request of the primary storage can achieve diversion, thereby ensuring the normal operation of the primary storage and improving stability. When a failure occurs in the primary storage, all data access requests are switched, effectively reducing the failure recovery time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to a disaster recovery processing method, device, system, system, equipment and medium. Background Art

[0002] There are currently many mainstream disaster recovery solutions, the most common of which is multi-computer room disaster recovery in different locations. The Raft protocol is used to ensure data consistency between the main computer room and the backup computer room. When a failure occurs in the main computer room, the traffic can be quickly switched to the backup computer room through the Domain Name System (DNS).

[0003] The above-mentioned disaster recovery solution based on multiple remote computer rooms is applied to online business scenarios by setting up primary and backup storage for disaster recovery. However, it has the following defects: when traffic suddenly increases, stable operation can only be guaranteed through lossy operations, and when one backup storage fails, other backup storages are prone to avalanche, and the unavailability time or recovery time after the primary storage goes down is long. Summary of the invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a disaster recovery processing method, apparatus, system, equipment and medium.

[0005] The present disclosure provides a disaster recovery processing method, the method comprising:

[0006] Obtain detection data of data access requests from the primary storage database;

[0007] If it is determined based on the detection data that the target switching condition is met, the target request corresponding to the target switching condition in the data access request is switched to the heterogeneous storage database; wherein the target switching condition includes a read switching condition and a write switching condition, the target request corresponding to the read switching condition is a read request, and the target request corresponding to the write switching condition is a read request and a write request.

[0008] The present disclosure also provides a disaster recovery processing method and device, the device comprising:

[0009] A detection data module is used to obtain detection data of a data access request from a main storage database;

[0010] A switching module is used to switch the target request corresponding to the target switching condition in the data access request to a heterogeneous storage database if it is determined based on the detection data that the target switching condition is met; wherein the target switching condition includes a read switching condition and a write switching condition, the target request corresponding to the read switching condition is a read request, and the target request corresponding to the write switching condition is a read request and a write request.

[0011] The embodiment of the present disclosure also provides a disaster recovery processing system, which includes a control center and a main storage database and a heterogeneous backup storage database connected to the control center. The control center is used to execute the disaster recovery processing method provided in the embodiment of the present disclosure.

[0012] An embodiment of the present disclosure also provides an electronic device, which includes: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the disaster recovery processing method provided by the embodiment of the present disclosure.

[0013] The embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the disaster recovery processing method provided by the embodiment of the present disclosure.

[0014] The technical solution provided by the embodiments of the present disclosure has the following advantages over the prior art: the disaster recovery processing method provided by the embodiments of the present disclosure obtains the detection data of the main storage database for the data access request, and if it is determined based on the detection data that the target switching condition is met, the target request corresponding to the target switching condition in the data access request is switched to the heterogeneous backup storage database; wherein the target switching condition includes a read switching condition and a write switching condition, the target request corresponding to the read switching condition is a read request, and the target request corresponding to the write switching condition is a read request and a write request. With the above technical solution, the read request and the write request in the data access request can be switched separately through the heterogeneous backup storage, and the switching of the read request of the main storage can achieve diversion, thereby ensuring the normal operation of the main storage and improving stability. When the main storage fails, all data access requests are switched, effectively reducing the fault recovery time. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0016] Figure 1 A schematic diagram of a process flow of a disaster recovery processing method provided by an embodiment of the present disclosure;

[0017] Figure 2 A flowchart of another disaster recovery processing method provided by an embodiment of the present disclosure;

[0018] Figure 3 A schematic diagram of a write request switching process provided by an embodiment of the present disclosure;

[0019] Figure 4A schematic diagram of a structure after a write request is switched according to an embodiment of the present disclosure;

[0020] Figure 5 A schematic diagram of the structure of a disaster recovery processing system provided by an embodiment of the present disclosure;

[0021] Figure 6 A schematic diagram of a disaster recovery process provided by an embodiment of the present disclosure;

[0022] Figure 7 A schematic diagram of the structure of a disaster recovery processing method and device provided by an embodiment of the present disclosure;

[0023] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0024] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0025] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0026] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0027] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0028] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0030] There are currently many mainstream disaster recovery solutions, the most common of which is multi-computer room disaster recovery in different locations. The Raft protocol is used to ensure data consistency between the main computer room and the backup computer room. When a failure occurs in the main computer room, the traffic can be quickly switched to the backup computer room through the Domain Name System (DNS).

[0031] When the above disaster recovery solution based on multiple remote computer rooms is applied in online business scenarios, disaster recovery is performed by setting up primary and secondary storage. For example, you can choose to use the relational database MySQL as the underlying storage, and then use the primary and secondary MySQL for disaster recovery. Since the performance of the primary MySQL itself is prioritized, the most common solution is a one-primary-six-secondary architecture. In addition, since increasing the number of secondary databases may affect the performance of the primary database, it is not recommended to perform disaster recovery by continuously increasing the number of secondary databases.

[0032] The above disaster recovery scheme has the following defects: when the online abnormal high traffic suddenly comes, it will cause all the reading pressure to increase and the service level agreement (SLA) to decrease. SLA can represent the performance and availability of the service. Since the newly added backup databases are all cold backups, it is impossible to quickly increase the backup database to resist the online traffic. Therefore, the business can only request fuse or downgrade strategy to ensure the stable operation of the database, which is lossy; when a backup database or a backup database in a certain area goes down, all traffic will be concentrated in the remaining backup databases, and because there is no other hot backup data storage that can be timely replaced, this may also cause the existing backup database to avalanche; and when the main database goes down, the database administrator (Database Administrator, DBA) is often required to intervene manually, so the online unavailable time and recovery time will increase a lot. In response to the above problems, the embodiment of the present disclosure provides a disaster recovery processing method.

[0033] Figure 1 The present invention provides a flow chart of a disaster recovery processing method provided by an embodiment of the present invention. The method can be executed by a disaster recovery processing method device, wherein the device can be implemented by software and / or hardware and can generally be integrated in an electronic device. Figure 1 As shown, the method is applied to a control center in a disaster recovery processing system, including:

[0034] Step 101: Acquire detection data of a primary storage database for a data access request.

[0035] Among them, the main storage database is the main database in the business scenario. The main storage database can adopt various types of databases. In the embodiment of the present disclosure, MySQL is used as an example for explanation. A data access request refers to a request for data access initiated by a user in a business scenario, which may include a read request and a write request. A read request refers to a request to read data, and a write request refers to a request to write data. The detection data may be monitoring data for data access requests, and may include various indicators. For example, the detection data may include the total number of data access requests, the number of errors in data access requests, and the number of timeouts in data access requests, etc.

[0036] Specifically, the control center monitors the process in which the primary storage database processes the data access request, and obtains the detection data of the primary storage database for the data access request.

[0037] Step 102: If it is determined based on the detection data that the target switching condition is met, the target request corresponding to the target switching condition in the data access request is switched to the heterogeneous standby storage database.

[0038] The target switching condition may include a read switching condition and a write switching condition, the target request corresponds to the target switching condition, the target request corresponding to the read switching condition is a read request, and the target request corresponding to the write switching condition is a read request and a write request. In the disclosed embodiment, the switching of the read request and the write request in the data access request is separated, so as to realize more flexible disaster recovery control.

[0039] The heterogeneous standby storage database is a standby database in the business scenario. The heterogeneous standby storage database and the main storage database use completely different databases to minimize the mutual impact. The heterogeneous standby storage database can also use a variety of different types of databases. The Abase database is used as an example for illustration in the embodiment of the present disclosure. The heterogeneous standby storage database is a hot backup, that is, when processing a write request, a double-write strategy is adopted in the main storage database and the heterogeneous standby storage database to ensure the consistency of incremental data, and consistency verification and repair are used to ensure the consistency of the full data. Optionally, the heterogeneous standby storage database can also set its own standby database according to actual conditions to meet the business needs of actual scenarios.

[0040] In an embodiment of the present disclosure, when the target switching condition is a read switching condition, determining whether the target switching condition is satisfied based on the detection data may include: if the request failure rate of the data access request in the detection data is greater than or equal to the first failure rate threshold, determining that the read switching condition is satisfied. Among them, the request failure rate of the data access request refers to the ratio of the sum of the number of errors and the number of timeouts of the data access request within a period of time to the total number of data access requests. The above-mentioned period of time can be set according to actual conditions. For example, a period of time can be 10 minutes. The first failure rate threshold refers to the threshold corresponding to the request failure rate of the data access request, which can be set in advance. After acquiring the detection data, the request failure rate of the data access request in the detection can be compared with the first failure rate threshold. If the request failure rate of the data access request is greater than or equal to the first failure rate threshold, it can be determined that the read switching condition is satisfied and the read request is diverted.

[0041] Optionally, switching the target request corresponding to the target switching condition in the data access request to the heterogeneous standby storage database may include: switching the read request in the data access request to the heterogeneous standby storage database by dynamically adjusting the traffic ratio within a set time. The traffic ratio is the value of the number of read requests in the data access request sent to the heterogeneous standby storage database to the total number of read requests. The set time is the expected time for the process of switching the read request, that is, it is hoped that all the read requests will be switched within the set time. The set time can be set according to actual conditions, for example, the set time can be 20 seconds. Optionally, a switching template can also be pre-set, and the set time and traffic ratio interval are set in the switching template. For example, a switching template may include a set time of 30 seconds, a traffic ratio interval of 50%, and the read request is switched at a traffic ratio interval of 50% within 30 seconds. When the read switching condition is met, the read request can be switched to the heterogeneous standby storage database by dynamically adjusting the traffic ratio from small to large within the set time. For example, the traffic ratio can be adjusted from 50% to 100% within 20 seconds to complete the switching of the read request.

[0042] In the disclosed embodiment, the switching of read requests can be automatically downgraded or manually controlled. The manual mode has a higher priority than the automatic mode. When the mode is performed manually, the control center can provide a console page to the user. The console page can provide a manual policy activation switch and a flow switching process operation interface. The flow switching process operation interface can include a flow switching process configuration interface and a flow switching process switch. The above-mentioned switching template can be selected and configured in the flow switching process configuration interface. The flow switching process switch can start, stop and roll back the switch. In the disclosed embodiment, the switching of read requests in data access requests can be gradually switched in proportion, that is, not all read requests are switched to the heterogeneous standby storage database at one time, which can avoid sudden changes in read traffic and achieve imperceptibility in business, thereby ensuring the normal operation of the main storage database.

[0043] In an embodiment of the present disclosure, when the target switching condition is a write switching condition, determining that the target switching condition is met based on the detection data may include: if the request failure rate of the write request in the data access request in the detection data is greater than or equal to the second failure rate threshold, it is determined that the write switching condition is met. Among them, the request failure rate of the write request in the data access request refers to the ratio of the sum of the number of errors and the number of timeouts of the write request within a period of time to the total number of write requests, and the above period of time can be set according to actual conditions. The second failure rate threshold refers to the threshold corresponding to the request failure rate of the write request of the data access request, which can be set in advance. After obtaining the detection data, the request failure rate of the write request in the data access request in the detection can be compared with the second failure rate threshold. If the request failure rate of the write request is greater than or equal to the second failure rate threshold, it means that the main storage database may have abnormal conditions such as downtime or failure, and it can be determined that the write switching condition is met, and the read request and the write request are switched.

[0044] Optionally, switching the target request corresponding to the target switching condition in the data access request to the heterogeneous standby storage database may include: after fully switching the read request in the data access request to the heterogeneous standby storage database, determining whether the write switching condition is met again; if it is determined that the write switching condition is met again, switching the write request in the data access request to the heterogeneous standby storage database in full. After determining that the write switching condition is met, the read request needs to be switched before the write request is switched. After the read request is fully switched to the heterogeneous standby storage database, the detection data can be obtained again, and it can be determined whether the write switching condition is met again. If so, the write request is fully switched to the heterogeneous standby storage database. The write request is switched in full.

[0045] In the disclosed embodiment, the switching of write requests is a lossy operation, which may affect the downstream binlog log monitoring, and may also affect the processing (dump) of offline data if it spans multiple days. Therefore, after the read request is switched, it is determined whether the write switching condition is met again to determine whether the problem has been solved. If the write switching condition is not met, it means that the problem has been solved, and the write request is not switched, so as to avoid lossy operations as much as possible.

[0046] The disaster recovery processing method provided by the embodiment of the present disclosure obtains the detection data of the main storage database for the data access request. If it is determined based on the detection data that the target switching condition is met, the target request corresponding to the target switching condition in the data access request is switched to the heterogeneous backup storage database; wherein the target switching condition includes a read switching condition and a write switching condition, the target request corresponding to the read switching condition is a read request, and the target request corresponding to the write switching condition is a read request and a write request. With the above technical solution, the read request and the write request in the data access request can be switched separately through the heterogeneous backup storage, and the switching of the read request of the main storage can achieve diversion, thereby ensuring the normal operation of the main storage and improving stability. When the main storage fails, all data access requests are switched, effectively reducing the fault recovery time.

[0047] In some embodiments, after all write requests in data access requests are switched to a heterogeneous standby storage database, it may also include: receiving a repair completion instruction from the primary storage database, and simultaneously writing incremental data to the repaired primary storage database and the heterogeneous standby storage database through a consistent incremental component; and synchronizing the data in the heterogeneous standby storage database to the repaired primary storage database through a consistent full component.

[0048] Among them, the consistent incremental component refers to a component used to synchronize incremental data, and the consistent full component refers to a component used to achieve consistency of existing data, that is, full data. In the disclosed embodiment, after the write request is switched, the main storage database is no longer updated, and the full update is made to the heterogeneous standby storage database. The database administrator can be contacted to repair the main storage database later. After the modification of the main storage database is completed, a modification completion instruction of the main storage database sent by the database administrator can be received, and the repaired main storage database and the heterogeneous standby storage database can be dual-written through the consistent incremental component to ensure the consistency of the incremental data, and the reverse data repair from the heterogeneous standby storage database to the modified main storage database can be performed through the consistent full component, that is, the synchronization of the full data.

[0049] After the repair of the primary storage database is completed, double writing and repair can be used to ensure that the data in the repaired primary storage database is the same as that in the heterogeneous standby storage database, which is beneficial for the subsequent recovery of the primary storage database and switching back all data access requests.

[0050] In some embodiments, the disaster recovery processing method in the embodiment of the present disclosure may also include: switching all write requests in data access requests to the repaired primary storage database; and gradually switching read requests in data access requests to the repaired primary storage database by dynamically adjusting the traffic ratio.

[0051] After the data synchronization in the repaired primary storage database is completed, the write request switch can be turned off, that is, all write requests can be switched to the repaired primary storage database, and then the read requests can be gradually switched to the repaired primary storage database by dynamically adjusting the traffic ratio. The advantage of this setting is that all read and write requests can be switched back to the repaired primary storage database to restore the normal state, and the gradual switching of read requests avoids the repaired primary storage database from being hit by sudden traffic changes.

[0052] In some embodiments, after determining based on the detection data that the target switching condition is met, it may also include: detecting the consistency rate of the main storage database and the heterogeneous standby storage database, and when the consistency rate is greater than or equal to the consistency rate threshold, executing the switching of the target request corresponding to the target switching condition in the data access request to the heterogeneous standby storage database.

[0053] In the disclosed embodiment, before switching the target request, the consistency rate or consistency of the data of the primary storage database and the heterogeneous backup storage database can be detected by the consistency full component. If the consistency rate is greater than or equal to the consistency rate threshold, the switch can be made; if the consistency rate is less than the consistency rate threshold, the repair can be performed until the consistency rate is greater than or equal to the consistency rate threshold, and then the switch is made. The above consistency rate threshold can be set according to actual conditions. For example, the consistency rate threshold can be 99.9%, which means that at most 100 data out of 100,000 data are different. Before switching the data access request, by adding consistency rate detection, the consistency of the primary and backup data can be guaranteed, thereby improving the accuracy of the data access request.

[0054] In some embodiments, the disaster recovery processing method in the embodiment of the present disclosure may also include: obtaining detection data of the main cache database for the data access request; if it is determined based on the detection data that the read switching condition or the write switching condition is met, the read request or the write request in the data access request is switched to the homogeneous backup cache database. In the business scenario, in addition to the storage layer, a cache layer can also be set, and the cache layer can also set the main and backup cache databases for disaster recovery processing. The backup cache database in the embodiment of the present disclosure can be a homogeneous backup cache database that is the same as the main cache database. For example, both the main cache database and the homogeneous backup cache database can use a Redis database.

[0055] The read switching condition corresponds to a read request, and the write switching condition corresponds to a write request. Obtain detection data of the main cache database for data access requests. If the failure rate of the read request in the detection data is greater than the third failure rate threshold, it is determined that the read switching condition is met, and a part of the read requests can be switched to the homogeneous backup cache database to reduce the pressure on the main cache database; if the failure rate of the write request in the monitoring data is greater than the third failure rate threshold, it is determined that the write switching condition is met, and the write request can be switched to the homogeneous backup cache database. The above-mentioned third failure rate threshold and fourth failure rate threshold can be set according to actual conditions.

[0056] When performing disaster recovery on the cache layer, the switching of read requests and write requests can also be separated to achieve more flexible disaster recovery control and improve service stability.

[0057] Figure 2 This is a flow chart of another disaster recovery processing method provided by the embodiment of the present disclosure. Based on the above embodiment, this embodiment further optimizes the above disaster recovery processing method. Figure 2 As shown, the method includes:

[0058] Step 201: Acquire detection data of a primary storage database for a data access request.

[0059] Step 202: Determine whether the target switching condition is met based on the detection data. If so, execute step 203; otherwise, return to execute step 201.

[0060] The target switching condition includes a read switching condition and a write switching condition. The target request corresponding to the read switching condition is a read request, and the target request corresponding to the write switching condition is a read request and a write request.

[0061] In the embodiment of the present disclosure, when the target switching condition is a read switching condition, determining that the target switching condition is satisfied based on the detection data may include: if the request failure rate of the data access request in the detection data is greater than or equal to the first failure rate threshold, then determining that the read switching condition is satisfied. Optionally, when the target switching condition is a write switching condition, determining that the target switching condition is satisfied based on the detection data may include: if the request failure rate of the write request in the data access request in the detection data is greater than or equal to the second failure rate threshold, then determining that the write switching condition is satisfied.

[0062] Step 203: Detect the consistency rate of the primary storage database and the heterogeneous standby storage database.

[0063] Step 204 , determine whether the consistency rate is greater than or equal to the consistency rate threshold, if so, execute step 205 ; otherwise, return to execute step 203 .

[0064] The consistency full component determines whether the consistency rate is greater than or equal to the consistency rate threshold. If so, execute step 205; otherwise, the consistency of the primary storage database and the heterogeneous standby storage database can be repaired, and return to execute step 203.

[0065] Step 205: Switch the target request corresponding to the target switching condition in the data access request to the heterogeneous standby storage database.

[0066] In an embodiment of the present disclosure, when the target switching condition is a read switching condition, the target request is a read request, and the target request corresponding to the target switching condition in the data access request is switched to the heterogeneous standby storage database, which may include: switching the read request in the data access request to the heterogeneous standby storage database by dynamically adjusting the traffic ratio within a set time. Among them, the traffic ratio is the value of the number of read requests in the data access request sent to the heterogeneous standby storage database to the total number of read requests. When the target switching condition is a write switching condition, the target request is a read request and a write request, and the target request corresponding to the target switching condition in the data access request is switched to the heterogeneous standby storage database, which may include: after switching all the read requests in the data access request to the heterogeneous standby storage database, it is determined whether the write switching condition is met again; if it is determined that the write switching condition is met again, then switching all the write requests in the data access request to the heterogeneous standby storage database.

[0067] Optionally, after switching all write requests in the data access request to the heterogeneous backup storage database, it may also include: receiving the repair completion instruction of the primary storage database, writing the incremental data to the repaired primary storage database and the heterogeneous backup storage database at the same time through the consistency incremental component; synchronizing the data in the heterogeneous backup storage database to the repaired primary storage database through the consistency full component. Optionally, the disaster recovery processing method may also include: switching all write requests in the data access request to the repaired primary storage database; and gradually switching the read requests in the data access request to the repaired primary storage database by dynamically adjusting the traffic ratio.

[0068] For example, Figure 3 A flowchart of a write request switching process provided by an embodiment of the present disclosure is provided. Figure 4 A schematic diagram of a structure after a write request is switched according to an embodiment of the present disclosure, see Figure 3 , after 100% read switching, that is, after all read requests are switched to the heterogeneous standby storage database; the write switching switch is turned on, and all write requests are switched to the heterogeneous standby storage database, see Figure 4 , all read and write requests are sent to the heterogeneous standby storage database; confirm the status of MySQL write database with the DBA, that is, confirm with the database administrator whether the primary storage database has been repaired; when the primary storage database is repaired, dual write can be enabled, such as Figure 4 , through the consistency incremental component, the repaired primary storage database and the heterogeneous standby storage database are dual-written to ensure the consistency of incremental data; through the consistency full component, the MySQL write database error rate is observed, that is, whether the full data of the primary storage database and the heterogeneous standby storage database are consistent; DataEyes repairs MySQL data, such as Figure 4 DataEyes is a full-volume component with consistency. It ensures the consistency of the full data of the primary storage database and the heterogeneous backup storage database through repair. It turns off the write switch and switches all requests to the repaired primary storage database. It slowly switches the read request back to the normal state and gradually switches the read request to the repaired primary storage database by dynamically adjusting the traffic ratio. During the read request switching process, the cache hit rate can be observed to prevent the repaired primary storage database from being penetrated by rapid switching.

[0069] The disaster recovery processing method provided by the embodiment of the present disclosure obtains the detection data of the main storage database for the data access request. If it is determined based on the detection data that the target switching condition is met, the consistency rate of the main storage database and the heterogeneous backup storage database is detected. If the consistency rate is greater than or equal to the consistency rate threshold, the target request corresponding to the target switching condition in the data access request is switched to the heterogeneous backup storage database. With the above technical solution, the read request and the write request in the data access request can be switched separately through the heterogeneous backup storage. The switching of the read request of the main storage can achieve diversion, ensure the normal operation of the main storage, improve stability, and when the main storage fails, all data access requests are switched, effectively reducing the fault recovery time.

[0070] Figure 5 A structural diagram of a disaster recovery processing system provided for an embodiment of the present disclosure, the disaster recovery processing system can control a control center 51 and a main storage database 52 and a heterogeneous backup storage database 53 connected to the control center 51, the control center 51 is used to execute the disaster recovery processing method in the embodiment of the present disclosure, obtain detection data of the main storage database 52 for data access requests, if it is determined based on the detection data that the target switching condition is met, then the target request corresponding to the target switching condition in the data access request is switched to the heterogeneous backup storage database 53; wherein the target switching condition includes a read switching condition and a write switching condition, the target request corresponding to the read switching condition is a read request, and the target request corresponding to the write switching condition is a read request and a write request.

[0071] In the disclosed embodiment, the disaster recovery processing system may further include a primary cache database 54 and a homogeneous backup cache database 55 connected to the control center 51 , and a consistency component connected to the control center 51 , the consistency component including a consistent full component 57 and a consistent incremental component 56 .

[0072] Figure 6 A schematic diagram of a disaster recovery process provided by an embodiment of the present disclosure is shown in FIG. Figure 6 As shown, the disaster recovery of the cache layer is implemented by a main cache database 54 and a homogeneous standby cache database 55. Both the main cache database 54 and the homogeneous standby cache database 55 can be Redis databases. In the read traffic, a certain proportion of bypass detection traffic will be used to perform statistics on the availability and accuracy of the homogeneous standby cache database 55, that is, the availability and data accuracy are judged by determining whether the request failure rate of the homogeneous standby cache database 55 for read requests is greater than a threshold; when the read failure volume of the main cache database 54 is too large, a part of the traffic can be cut to the homogeneous standby cache database 55 to reduce the pressure on the main cache database 54; in the write traffic, a double-write strategy will be adopted to ensure that the homogeneous standby cache database 55 is always in a hot standby state, and when the write failure volume of the main cache database 54 is too large, the main-standby switching can be performed.

[0073] like Figure 6 As shown, the disaster recovery of the storage layer is implemented by a main storage database 52 and a heterogeneous standby storage database 53. The main storage database 52 can be a MySQL database, and the heterogeneous standby storage database 53 can be an Abase database. In the read traffic, a certain proportion of bypass detection traffic will be used to perform statistics on the availability and accuracy of the heterogeneous standby storage database 53, that is, the availability and data accuracy are judged by determining whether the request failure rate of the heterogeneous standby storage database 53 for read requests is greater than a threshold; when the main storage database 52 fails to read, it can be proportionally returned to the heterogeneous standby storage database 53; in the write traffic, a double-write strategy at the bottom layer will be adopted to ensure that the incremental data of the heterogeneous standby storage database 53 is consistent with the main storage database 52. When the main storage database 52 fails to write, the writing is switched to the heterogeneous standby storage database 53. When the main storage database 52 is restored, it is necessary to first perform a double write on the main storage database 52, and then repair the MySQL data, and finally continue to switch back to the main storage database 52. The consistency guarantee of the existing data in the main storage database 52 and the heterogeneous backup storage database 53 needs to be implemented through the consistent full component (DataEyes) 57. When the bypass detection traffic finds that the data inconsistency rate is too large, all the data of the main storage database 52 can be overwritten with the heterogeneous backup storage database 53 for repair, that is, data consistency verification and repair are implemented through the consistent full component 57; the synchronization of incremental data from the main storage database 52 to the heterogeneous backup storage database 53 is implemented through the consistent incremental component (DB Mirror) 56, and the bottom layer performs double writing through a switch.

[0074] The disaster recovery processing system in the disclosed embodiment constructs heterogeneous storage, and allows the heterogeneous storage to maintain a hot standby state for a long time, and can dynamically switch the flow to cope with the situation where abnormal situations occur; through the cooperation between the various modules in the disaster recovery processing system, it has the following beneficial effects: for the problem of increased database pressure and reduced availability caused by cache penetration, the heterogeneous hot standby storage can be well diverted to ensure the normal operation of the main storage, and the diversion can be proportional and slow, and there is no sudden change in traffic, which can be imperceptible to the business; for the situation where some storage is down and the traffic will be pressurized to the remaining storage, the traffic can also be dynamically adjusted to the heterogeneous hot standby storage to ensure the stability of the existing system; for the situation where the main database is down, a write-cut strategy can be implemented to use the heterogeneous storage as the main storage through a switch, effectively reducing the accident recovery time.

[0075] Figure 7 The present invention provides a schematic diagram of a method and device for disaster recovery processing, which can be implemented by software and / or hardware and can generally be integrated into an electronic device. Figure 7 As shown, the device comprises:

[0076] The detection data module 601 is used to obtain the detection data of the main storage database for the data access request;

[0077] The switching module 602 is used to switch the target request corresponding to the target switching condition in the data access request to the heterogeneous storage database if it is determined based on the detection data that the target switching condition is met; wherein the target switching condition includes a read switching condition and a write switching condition, the target request corresponding to the read switching condition is a read request, and the target request corresponding to the write switching condition is a read request and a write request.

[0078] Optionally, when the target switching condition is a read switching condition, the switching module 602 includes a switching judgment unit, which is specifically used to: if the request failure rate of the data access request in the detection data is greater than or equal to a first failure rate threshold, determine that the read switching condition is met.

[0079] Optionally, the switching module 602 includes a switching execution unit, and the switching execution unit is specifically configured to:

[0080] The read request in the data access request is switched to the heterogeneous standby storage database by dynamically adjusting the traffic ratio within a set time.

[0081] Optionally, the traffic ratio is a value in which the number of read requests in the data access request sent to the heterogeneous standby storage database accounts for the total number of read requests.

[0082] Optionally, when the target switching condition is a write switching condition, the switching determination unit is specifically configured to:

[0083] If the request failure rate of write requests in the data access requests in the detection data is greater than or equal to the second failure rate threshold, it is determined that the write switching condition is met.

[0084] Optionally, the switching execution unit is specifically used to:

[0085] After all read requests in the data access request are switched to the heterogeneous standby storage database, determining whether the write switching condition is met again;

[0086] If it is determined that the write switching condition is met again, all write requests in the data access request are switched to the heterogeneous standby storage database.

[0087] Optionally, the device further includes a repair module, which is specifically configured to: after switching all write requests in the data access request to the heterogeneous standby storage database,

[0088] Receiving a repair completion instruction of the primary storage database, and writing the incremental data into the repaired primary storage database and the heterogeneous standby storage database simultaneously through a consistent incremental component;

[0089] The data in the heterogeneous standby storage database is synchronized to the repaired primary storage database through a consistent full-volume component.

[0090] Optionally, the device further includes a repair switching module, which is specifically used to:

[0091] Switching all write requests in the data access request to the repaired primary storage database;

[0092] The read requests in the data access requests are gradually switched to the repaired primary storage database by dynamically adjusting the traffic ratio.

[0093] Optionally, the device further includes a consistency rate module, which is specifically used to: after determining that the target switching condition is met based on the detection data,

[0094] The consistency rate of the main storage database and the heterogeneous standby storage database is detected, and when the consistency rate is greater than or equal to a consistency rate threshold, the target request corresponding to the target switching condition in the data access request is switched to the heterogeneous standby storage database.

[0095] Optionally, the device further includes a cache switching module, which is specifically used to:

[0096] Obtain detection data of data access requests from the primary cache database;

[0097] If it is determined based on the detection data that a read switching condition or a write switching condition is satisfied, the read request or the write request in the data access request is switched to the homogeneous standby cache database.

[0098] The disaster recovery processing method device provided in the embodiments of the present disclosure can execute the disaster recovery processing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0099] Figure 8 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 8 , which shows a schematic diagram of the structure of an electronic device 700 suitable for implementing the embodiment of the present disclosure. The electronic device 700 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0100] like Figure 8 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0101] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0102] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the disaster recovery processing method of the embodiment of the present disclosure are executed.

[0103] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0104] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0105] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0106] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains the detection data of the main storage database for the data access request; if it is determined based on the detection data that the target switching condition is met, the target request corresponding to the target switching condition in the data access request is switched to the heterogeneous standby storage database; wherein the target switching condition includes a read switching condition and a write switching condition, the target request corresponding to the read switching condition is a read request, and the target request corresponding to the write switching condition is a read request and a write request.

[0107] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0108] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0109] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

[0110] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0111] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0112] According to one or more embodiments of the present disclosure, the present disclosure provides a disaster recovery processing method, including:

[0113] Obtain detection data of data access requests from the primary storage database;

[0114] If it is determined based on the detection data that the target switching condition is met, the target request corresponding to the target switching condition in the data access request is switched to the heterogeneous storage database; wherein the target switching condition includes a read switching condition and a write switching condition, the target request corresponding to the read switching condition is a read request, and the target request corresponding to the write switching condition is a read request and a write request.

[0115] According to one or more embodiments of the present disclosure, in the disaster recovery processing method provided by the present disclosure, when the target switching condition is a read switching condition, determining based on the detection data that the target switching condition is satisfied includes:

[0116] If the request failure rate of the data access request in the detection data is greater than or equal to a first failure rate threshold, it is determined that the read switching condition is met.

[0117] According to one or more embodiments of the present disclosure, in the disaster recovery processing method provided by the present disclosure, switching the target request corresponding to the target switching condition in the data access request to the heterogeneous standby storage database includes:

[0118] The read request in the data access request is switched to the heterogeneous standby storage database by dynamically adjusting the traffic ratio within a set time.

[0119] According to one or more embodiments of the present disclosure, in the disaster recovery processing method provided by the present disclosure, the traffic ratio is the value of the number of read requests in the data access request sent to the heterogeneous standby storage database to the total number of read requests.

[0120] According to one or more embodiments of the present disclosure, in the disaster recovery processing method provided by the present disclosure, when the target switching condition is a write switching condition, determining based on the detection data that the target switching condition is satisfied includes:

[0121] If the request failure rate of write requests in the data access requests in the detection data is greater than or equal to the second failure rate threshold, it is determined that the write switching condition is met.

[0122] According to one or more embodiments of the present disclosure, in the disaster recovery processing method provided by the present disclosure, switching the target request corresponding to the target switching condition in the data access request to the heterogeneous standby storage database includes:

[0123] After all read requests in the data access request are switched to the heterogeneous standby storage database, determining whether the write switching condition is met again;

[0124] If it is determined that the write switching condition is met again, all write requests in the data access request are switched to the heterogeneous standby storage database.

[0125] According to one or more embodiments of the present disclosure, in the disaster recovery processing method provided by the present disclosure, after all write requests in the data access request are switched to the heterogeneous standby storage database, the method further includes:

[0126] Receiving a repair completion instruction of the primary storage database, and writing the incremental data into the repaired primary storage database and the heterogeneous standby storage database simultaneously through a consistent incremental component;

[0127] The data in the heterogeneous standby storage database is synchronized to the repaired primary storage database through a consistent full-volume component.

[0128] According to one or more embodiments of the present disclosure, the disaster recovery processing method provided by the present disclosure further includes:

[0129] Switching all write requests in the data access request to the repaired primary storage database;

[0130] The read requests in the data access requests are gradually switched to the repaired primary storage database by dynamically adjusting the traffic ratio.

[0131] According to one or more embodiments of the present disclosure, in the disaster recovery processing method provided by the present disclosure, after determining that the target switching condition is met based on the detection data, the method further includes:

[0132] The consistency rate of the main storage database and the heterogeneous standby storage database is detected, and when the consistency rate is greater than or equal to a consistency rate threshold, the target request corresponding to the target switching condition in the data access request is switched to the heterogeneous standby storage database.

[0133] According to one or more embodiments of the present disclosure, the disaster recovery processing method provided by the present disclosure further includes:

[0134] Obtain detection data of data access requests from the primary cache database;

[0135] If it is determined based on the detection data that a read switching condition or a write switching condition is satisfied, the read request or the write request in the data access request is switched to the homogeneous standby cache database.

[0136] According to one or more embodiments of the present disclosure, the present disclosure provides a disaster recovery processing device, including:

[0137] A detection data module is used to obtain detection data of a data access request from a main storage database;

[0138] A switching module is used to switch the target request corresponding to the target switching condition in the data access request to a heterogeneous storage database if it is determined based on the detection data that the target switching condition is met; wherein the target switching condition includes a read switching condition and a write switching condition, the target request corresponding to the read switching condition is a read request, and the target request corresponding to the write switching condition is a read request and a write request.

[0139] According to one or more embodiments of the present disclosure, in the disaster recovery processing device provided by the present disclosure, when the target switching condition is a read switching condition, the switching module includes a switching judgment unit, and the switching judgment unit is specifically used to: if the request failure rate of the data access request in the detection data is greater than or equal to the first failure rate threshold, determine that the read switching condition is met.

[0140] According to one or more embodiments of the present disclosure, in the disaster recovery processing device provided by the present disclosure, the switching module includes a switching execution unit, and the switching execution unit is specifically used to:

[0141] The read request in the data access request is switched to the heterogeneous standby storage database by dynamically adjusting the traffic ratio within a set time.

[0142] According to one or more embodiments of the present disclosure, in the disaster recovery processing device provided by the present disclosure, the traffic ratio is the value of the number of read requests in the data access request sent to the heterogeneous standby storage database to the total number of read requests.

[0143] According to one or more embodiments of the present disclosure, in the disaster recovery processing device provided by the present disclosure, when the target switching condition is a write switching condition, the switching judgment unit is specifically used to:

[0144] If the request failure rate of write requests in the data access requests in the detection data is greater than or equal to the second failure rate threshold, it is determined that the write switching condition is met.

[0145] According to one or more embodiments of the present disclosure, in the disaster recovery processing device provided by the present disclosure, the switching execution unit is specifically used to:

[0146] After all read requests in the data access request are switched to the heterogeneous standby storage database, determining whether the write switching condition is met again;

[0147] If it is determined that the write switching condition is met again, all write requests in the data access request are switched to the heterogeneous standby storage database.

[0148] According to one or more embodiments of the present disclosure, in the disaster recovery processing device provided by the present disclosure, the device also includes a repair module, which is specifically used to: after switching all write requests in the data access request to the heterogeneous standby storage database,

[0149] Receiving a repair completion instruction of the primary storage database, and writing the incremental data into the repaired primary storage database and the heterogeneous standby storage database simultaneously through a consistent incremental component;

[0150] The data in the heterogeneous standby storage database is synchronized to the repaired primary storage database through a consistent full-volume component.

[0151] According to one or more embodiments of the present disclosure, in the disaster recovery processing device provided by the present disclosure, the device further includes a repair switching module, which is specifically used to:

[0152] Switching all write requests in the data access request to the repaired primary storage database;

[0153] The read requests in the data access requests are gradually switched to the repaired primary storage database by dynamically adjusting the traffic ratio.

[0154] According to one or more embodiments of the present disclosure, in the disaster recovery processing device provided by the present disclosure, the device further includes a consistency rate module, which is specifically used to: after determining that the target switching condition is met based on the detection data,

[0155] The consistency rate of the main storage database and the heterogeneous standby storage database is detected, and when the consistency rate is greater than or equal to a consistency rate threshold, the target request corresponding to the target switching condition in the data access request is switched to the heterogeneous standby storage database.

[0156] According to one or more embodiments of the present disclosure, in the disaster recovery processing device provided by the present disclosure, the device further includes a cache switching module, which is specifically used to:

[0157] Obtain detection data of data access requests from the primary cache database;

[0158] If it is determined based on the detection data that a read switching condition or a write switching condition is satisfied, the read request or the write request in the data access request is switched to the homogeneous standby cache database.

[0159] According to one or more embodiments of the present disclosure, the present disclosure provides a disaster recovery processing system, including a control center and a main storage database and a heterogeneous backup storage database connected to the control center, and the control center is used to execute any disaster recovery processing method provided by the present disclosure.

[0160] According to one or more embodiments of the present disclosure, the disaster recovery processing system provided by the present disclosure also includes a primary cache database and a homogeneous backup cache database connected to the control center, and a consistency component connected to the control center, and the consistency component includes a consistent full component and a consistent incremental component.

[0161] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:

[0162] processor;

[0163] a memory for storing instructions executable by the processor;

[0164] The processor is used to read the executable instructions from the memory and execute the instructions to implement any disaster recovery processing method provided by the present disclosure.

[0165] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute any of the disaster recovery processing methods provided by the present disclosure.

[0166] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0167] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0168] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A disaster recovery processing method, characterized in that: include: Acquire detection data of a primary storage database for a data access request; wherein the detection data is monitoring data of the data access request; If it is determined based on the detection data that the target switching condition is met, the target request corresponding to the target switching condition in the data access request is switched to the heterogeneous storage database; wherein the target switching condition includes a read switching condition and a write switching condition, the target request corresponding to the read switching condition is a read request, and the target request corresponding to the write switching condition is a read request and a write request.

2. The method according to claim 1, characterized in that When the target switching condition is a read switching condition, determining based on the detection data that the target switching condition is satisfied includes: If the request failure rate of the data access request in the detection data is greater than or equal to a first failure rate threshold, it is determined that the read switching condition is met.

3. The method according to claim 2, characterized in that Switching a target request corresponding to the target switching condition in the data access request to a heterogeneous standby storage database includes: The read request in the data access request is switched to the heterogeneous standby storage database by dynamically adjusting the traffic ratio within a set time.

4. The method according to claim 3, characterized in that The traffic ratio is a value in which the number of read requests in the data access request sent to the heterogeneous standby storage database accounts for the total number of read requests.

5. The method according to claim 1, characterized in that When the target switching condition is a write switching condition, determining based on the detection data that the target switching condition is satisfied includes: If the request failure rate of write requests in the data access requests in the detection data is greater than or equal to the second failure rate threshold, it is determined that the write switching condition is met.

6. The method according to claim 5, characterized in that Switching a target request corresponding to the target switching condition in the data access request to a heterogeneous standby storage database includes: After all read requests in the data access request are switched to the heterogeneous standby storage database, determining whether the write switching condition is met again; If it is determined that the write switching condition is met again, all write requests in the data access request are switched to the heterogeneous standby storage database.

7. The method according to claim 6, characterized in that After all write requests in the data access request are switched to the heterogeneous standby storage database, the method further includes: Receiving a repair completion instruction of the primary storage database, and writing the incremental data into the repaired primary storage database and the heterogeneous standby storage database simultaneously through a consistent incremental component; The data in the heterogeneous standby storage database is synchronized to the repaired primary storage database through a consistent full-volume component.

8. The method according to claim 7, characterized in that Also includes: Switching all write requests in the data access request to the repaired primary storage database; The read requests in the data access requests are gradually switched to the repaired primary storage database by dynamically adjusting the traffic ratio.

9. The method according to claim 1, characterized in that: After determining based on the detection data that the target switching condition is met, the method further includes: The consistency rate of the main storage database and the heterogeneous standby storage database is detected, and when the consistency rate is greater than or equal to a consistency rate threshold, the target request corresponding to the target switching condition in the data access request is switched to the heterogeneous standby storage database.

10. The method according to claim 1, characterized in that Also includes: Obtain detection data of data access requests from the primary cache database; If it is determined based on the detection data that a read switching condition or a write switching condition is satisfied, the read request or the write request in the data access request is switched to the homogeneous standby cache database.

11. A disaster recovery processing device, characterized in that: include: A detection data module, used to obtain detection data of a main storage database for a data access request; wherein the detection data is monitoring data of the data access request; A switching module is used to switch the target request corresponding to the target switching condition in the data access request to a heterogeneous storage database if it is determined based on the detection data that the target switching condition is met; wherein the target switching condition includes a read switching condition and a write switching condition, the target request corresponding to the read switching condition is a read request, and the target request corresponding to the write switching condition is a read request and a write request.

12. A disaster recovery processing system, characterized in that: It includes a control center and a main storage database and a heterogeneous standby storage database connected to the control center, and the control center is used to execute the disaster recovery processing method described in any one of claims 1-10.

13. The disaster recovery processing system according to claim 12, characterized in that: It also includes a main cache database and a homogeneous standby cache database connected to the control center, and a consistency component connected to the control center, wherein the consistency component includes a consistent full component and a consistent incremental component.

14. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the disaster recovery processing method described in any one of claims 1-10 above.

15. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the disaster recovery processing method described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Storage method, device and system

    CN108345515A

  • Idempotent control method and device when database is switched

    CN109062731A

  • File storage method, system and device and computer readable medium

    CN111190538A

  • DYNAMIC I / O LOAD BALANCING FOR zHYPERLINK

    US20200110542A1