Data centers and dual-active centers applied to disaster recovery

By setting up a gateway between the access service and application service of the data center, the simplified refresh operation of the dual-active relationship is achieved, the cumbersome operation problems in the existing technology are solved, and the simplicity and speed of operation are improved.

CN116094902BActive Publication Date: 2025-06-13中国邮政储蓄银行股份有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211686704.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-27
Publication Date
2025-06-13
Estimated Expiration
2042-12-27

AI Technical Summary

Technical Problem

In the prior art, the operation of refreshing the dual-active relationship in the data center is relatively cumbersome, and it is necessary to reload the dual-active relationship for each access service.

Method used

Set up a gateway between the access service and application service of the data center. When the gateway receives the handover instruction, it determines the switching object, performs transaction blocking, dual-active switching service and transaction unlocking, simplifying the refresh operation of the dual-active relationship.

Benefits of technology

Transaction blocking, unblocking and double-active refresh operations are achieved through the gateway, avoiding the steps of reloading the double-active relationship for each access service, making the operation easier and faster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116094902B_ABST
    Figure CN116094902B_ABST
Patent Text Reader

Abstract

The present application provides a data center and a dual-active center applied to disaster recovery. The data center includes multiple access services, multiple application services, and a gateway. The access services receive service requests from terminals; the application services process the service requests; one end of the gateway is respectively communicatively connected to each access service, and the other end of the gateway is respectively communicatively connected to each application service. When the gateway receives a switching instruction, it determines a switching object according to the switching instruction, performs a transaction block on the switching object, executes a dual-active switching service, and performs a transaction unlock on the switching object after completing the dual-active switching service. Wherein, the switching instruction is an instruction to request switching the data center of the target terminal, the switching object is at least one of the multiple access services, the transaction block is used to indicate stopping receiving and stopping processing service requests, and the transaction unlock is used to indicate resuming receiving and resuming processing service requests. The present application solves the problem that the operation of refreshing the dual-active relationship is relatively cumbersome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data center disaster recovery construction. Specifically, it relates to a data center and a dual-active center applied to disaster recovery. Background Art

[0002] When the existing dual-active mechanism refreshes the dual-active relationship, it is necessary to first modify the database table and then notify each access service to reload the dual-active relationship, and the operation is relatively cumbersome. Summary of the Invention

[0003] The main purpose of this application is to provide a data center and a dual-active center applied to disaster recovery to solve the problem that the operation of refreshing the dual-active relationship of the data center in the prior art is relatively cumbersome.

[0004] According to one aspect of the embodiments of the present invention, a data center applied to disaster recovery is provided, including a plurality of access services, a plurality of application services, and a gateway. Among them, the access service is used to receive service requests from terminals; the application service is used to process the service requests; one end of the gateway is respectively communicatively connected to each of the access services, and the other end of the gateway is respectively communicatively connected to each of the application services. The gateway is used to determine a switching object according to the switching instruction when receiving the switching instruction, perform transaction locking on the switching object, execute the dual-active switching service, and perform transaction unlocking on the switching object after completing the dual-active switching service. Among them, the switching instruction is an instruction to request to switch the data center of the target terminal, the switching object is at least one of the plurality of access services, the transaction locking is used to represent stopping receiving and stopping processing the service request, and the transaction unlocking is used to represent resuming receiving and resuming processing the service request.

[0005] Optionally, the gateway is used to execute the dual-active switching service, including: the gateway is used to update the dual-active configuration parameters according to the switching instruction to obtain the latest dual-active data; the gateway is used to delete the original dual-active data, and the original dual-active data represents the dual-active relationship corresponding to the target terminal before switching; the gateway controls the application service corresponding to the switching object to load the latest dual-active data.

[0006] Optionally, the data center is the first data center, and the first data center further includes a synchronization service. The synchronization service includes an interceptor, a message queue, and a data synchronization module. Among them, the interceptor is used to intercept the first service data and send out the first service data, where the first service data is the service data that has changed in the first data center; the message queue is communicatively connected to the interceptor, and the message queue is used to receive and store the first service data; the data synchronization module is communicatively connected to the message queue, and the data synchronization module is further used to be communicatively connected to the target synchronization module. The target synchronization module is the data synchronization module of the second data center. The first data center and the second data center form a dual-active center. The data synchronization module is used to read the first service data from the message queue and send the first service data to the target synchronization module, so that the target synchronization module updates the first service data to the database of the second data center.

[0007] Optionally, the data center further includes a monitoring database. The data synchronization module is further used to determine whether the first service data is successfully sent. In the case where the first service data fails to be sent, the data synchronization module is further used to send the first service data to the monitoring database, generate an alarm message and send it out. The monitoring database is used to resend the first service data to the target synchronization module a predetermined number of times.

[0008] Optionally, the data synchronization module is further used to determine whether the first service data is successfully sent, including: the data synchronization module is further used to receive the feedback information sent by the target synchronization module; in the case where the feedback information indicates successful synchronization, the data synchronization module determines that the first service data is successfully sent, and in the case where the feedback information indicates synchronization failure, the data synchronization module determines that the first service data is sent failed.

[0009] Optionally, the data center further includes a relational database and a cache database. The data synchronization module is further used to update the second service data to the relational database when receiving the second service data sent by the target synchronization module. In the case where the second service data is successfully updated to the relational database, the data synchronization module is further used to update the second service data to the cache database. The second service data is the service data that has changed in the second data center.

[0010] Optionally, after updating the second service data to the cache database, the data synchronization module is further used to generate feedback information indicating whether the update is successful and send it to the target synchronization module.

[0011] Optionally, after the data synchronization module reads the first service data from the message queue, the message queue is further configured to delete the stored first service data.

[0012] Optionally, the switching instruction includes a disaster recovery switching instruction, an adjustment switching instruction, and a recovery instruction. The disaster recovery switching instruction is used to indicate switching the data centers of all the terminals. The adjustment switching instruction is used to indicate switching the data centers of some of the terminals. The recovery instruction is used to indicate recovering the data center before the switching.

[0013] According to another aspect of the embodiments of the present invention, there is also provided a dual-active center, including a first data center and a second data center. The first data center is any one of the data centers applied to disaster recovery. The second data center is communicatively connected to the first data center, and the second data center is any one of the data centers applied to disaster recovery.

[0014] In the embodiments of the present invention, multiple access services and multiple application services of the data center applied to disaster recovery are connected through a gateway. When the gateway receives a switching instruction for requesting to switch the data center of the target terminal, it first determines the switching object, that is, determines the access services and application services that need to be switched from multiple access services, then blocks the service transactions of the switching object, and then executes the dual-active switching service. After the dual-active switching service is completed, it unlocks the switching transactions to ensure the normal progress of the service transactions after the switching. Compared with the prior art in which the switching operation needs to act on each access service when refreshing the dual-active relationship, resulting in a cumbersome operation, in this application, by setting a gateway between the access services and application services of the data center, the operations of transaction blocking, unlocking, and dual-active refreshing are all implemented at the gateway, and there is no need for each access service to reload the dual-active relationship, and the operation is relatively simple and fast. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The specification drawings forming a part of the present application are used to provide a further understanding of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:

[0016] Figure 1 Shows a schematic diagram of a data center applied to disaster recovery according to an embodiment of the present application;

[0017] Figure 2 Shows a working flowchart of a gateway according to an embodiment of the present application;

[0018] Figure 3 Shows a working flowchart of a synchronization service according to an embodiment of the present application.

[0019] Among them, the above-mentioned drawings include the following reference numerals:

[0020] 10. Access service; 20. Application service; 30. Gateway; 40. Terminal; 50. Synchronization service. Detailed implementation manners

[0021] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the drawings and in combination with the embodiments.

[0022] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances, so as to implement the embodiments of the present application described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0024] It should be understood that when an element (such as a layer, film, region, or substrate) is described as being "on" another element, the element can be directly on the other element, or there may also be an intermediate element. Moreover, in the specification and claims, when an element is described as "connected" to another element, the element can be "directly connected" to the other element, or "connected" to the other element through a third element.

[0025] As described in the background art, the operation of refreshing the active-active relationship in the data center in the prior art is relatively cumbersome. To solve the above problems, in a typical implementation manner of the present application, a data center and an active-active center applied to disaster recovery are provided.

[0026] According to a typical embodiment of the present application, a data center applied to disaster recovery is provided, such as Figure 1As shown in the figure, it includes multiple access services 10, multiple application services 20, and a gateway 30. Among them, the above-mentioned access service 10 is used to receive service requests from the terminal 40; the above-mentioned application service 20 is used to process the above-mentioned service requests; one end of the above-mentioned gateway 30 is respectively communicatively connected to each of the above-mentioned access services 10, and the other end of the above-mentioned gateway 30 is respectively communicatively connected to each of the above-mentioned application services 20. The above-mentioned gateway 30 is used to, in the case of receiving a switching instruction, determine a switching object according to the above-mentioned switching instruction, perform a transaction lock on the above-mentioned switching object, execute a dual-active switching service, and perform a transaction unlock on the above-mentioned switching object after completing the above-mentioned dual-active switching service. Among them, the above-mentioned switching instruction is an instruction to request to switch the data center of the target terminal, the above-mentioned switching object is at least one of the multiple above-mentioned access services 10, the above-mentioned transaction lock is used to represent stopping receiving and stopping processing the above-mentioned service requests, and the above-mentioned transaction unlock is used to represent resuming receiving and resuming processing the above-mentioned service requests.

[0027] In the data center applied to disaster recovery, multiple access services and multiple application services are connected through a gateway. In the case of receiving a switching instruction to request to switch the data center of the target terminal, the gateway first determines the switching object, that is, determines the access service and application service that need to be switched from multiple access services, then performs a transaction lock on the service transactions of the switching object, and then executes a dual-active switching service. After completing the dual-active switching service, it performs a transaction unlock on the switching transaction to ensure the normal progress of service transactions after switching. Compared with the prior art, when refreshing the dual-active relationship, the switching operation needs to act on each access service, resulting in a cumbersome operation. In this application, by setting a gateway between the access service and application service in the data center, the transaction lock, unlock, and dual-active refresh operations are all implemented at the gateway, and there is no need for each access service to reload the dual-active relationship, and the operation is relatively simple and fast.

[0028] The above-mentioned access service is a microservice that directly interacts with an external system or a page. One end of the above-mentioned application service is communicatively connected to the above-mentioned gateway, and the other end of the above-mentioned application service is used to be communicatively connected to the terminal. It should be noted that the above-mentioned terminal connected to the access service and the above-mentioned terminal connected to the application service can be the same or different. In this application, the above-mentioned terminal connected to the access service and the above-mentioned terminal connected to the application service are different. Among them, the above-mentioned terminal connected to the access service is an associated system of the data center, such as a unified counter platform or an operation center system, and the above-mentioned terminal connected to the application service is a client.

[0029] In the actual application process, in order to ensure the normal operation of terminal services, the primary and standby data centers are both made to undertake terminal services at the same time, and the data of the two data centers are backed up to each other. The above-mentioned dual-active switching service refers to switching the data center of the terminal.

[0030] According to an embodiment of the present application, the above gateway is used to execute the dual-active switching service, including: the gateway is used to update the dual-active configuration parameters according to the above switching instruction to obtain the latest dual-active data, wherein the dual-active configuration parameters are parameters used for the system to internally determine which center among the dual centers a transaction is sent to, and the dual-active configuration parameters include the corresponding relationship between the province and the data center and the corresponding relationship between the province and the database; the gateway is used to delete the original dual-active data, and the original dual-active data represents the dual-active relationship corresponding to the target terminal before the switching; the gateway controls the above application service corresponding to the switching object to load the above latest dual-active data. By updating the dual-active configuration parameters, deleting the original dual-active data, and loading the latest dual-active data, the gateway realizes the switching of the dual-active relationship. In this way, when receiving the switching instruction, only the configuration center parameters of the gateway need to be adjusted, and it is no longer necessary for each major access service to reload, further ensuring that the switching of the dual-active relationship can be achieved simply and conveniently.

[0031] In a specific embodiment, as Figure 2 shown, when receiving the above switching instruction, the gateway executes according to the following steps:

[0032] Step 1): At each initiation entry of the transaction, that is, block the transaction for the access service to be switched;

[0033] Step 2): Update the dual-active configuration parameters of the dual centers after the switching;

[0034] Step 3): Delete the original dual-active data of the corresponding terminal;

[0035] Step 4): Control each application service and terminal to load the latest dual-active relationship;

[0036] Step 5): Unblock the transaction at each initiation entry of the transaction.

[0037] In the actual application process, the above switching instruction is an instruction generated in response to a human operation. In the embodiment of the present application, the above switching instruction includes a disaster recovery switching instruction, an adjustment switching instruction, and a recovery instruction. Among them, the disaster recovery switching instruction is used to represent switching the data centers of all the above terminals, the adjustment switching instruction is used to represent switching the data centers of some of the above terminals, and the recovery instruction is used to represent restoring the above data center before the switching.

[0038] The above-mentioned terminals can be divided by region, such as the southern region and the northern region, or by province, or by city, county, etc. In one embodiment, the above-mentioned terminals are each province. By executing the above-mentioned disaster recovery switching instruction, the data centers corresponding to all the affected provinces are switched to another data center; by executing the above-mentioned adjustment switching instruction, the affected data centers of some provinces are switched according to business requirements. The above-mentioned adjustment switching instruction includes an adjustment recovery instruction and a disaster recovery instruction. Among them, the above-mentioned adjustment recovery instruction is used to restore the dual-active relationship after executing the above-mentioned adjustment switching instruction, and the above-mentioned disaster recovery instruction is used to restore the dual-active relationship after executing the above-mentioned disaster recovery switching instruction. Based on the interception and distribution function of the gateway, this application uses the gateway to implement transaction blocking and multi-province switching functions when switching the dual-active relationship of the dual data centers.

[0039] In another specific embodiment of this application, the above-mentioned data center is the first data center. As Figure 1 shown, the above-mentioned first data center further includes a synchronization service 50. The synchronization service includes an interceptor, a message queue, and a data synchronization module. The specific working process of the synchronization service is as Figure 3 shown. Among them, the above-mentioned interceptor is used to intercept the first service data and send out the above-mentioned first service data. The above-mentioned first service data is the service data that has changed in the above-mentioned first data center; the above-mentioned message queue is communicatively connected to the above-mentioned interceptor, and the above-mentioned message queue is used to receive and store the above-mentioned first service data; the above-mentioned data synchronization module is communicatively connected to the above-mentioned message queue, and the above-mentioned data synchronization module is further used to be communicatively connected to the target synchronization module. The above-mentioned target synchronization module is the data synchronization module of the second data center. The above-mentioned first data center and the above-mentioned second data center form a dual-active center. The above-mentioned data synchronization module is used to read the above-mentioned first service data from the above-mentioned message queue and send the above-mentioned first service data to the above-mentioned target synchronization module, so that the above-mentioned target synchronization module updates the above-mentioned first service data to the database of the above-mentioned second data center. In the above-mentioned embodiment, the data to be synchronized is intercepted by the interceptor and sent to the message queue of this data center. The data synchronization module processes the data based on the message queue, and the data synchronization module of the other data center receives the data for service consumption. In this way, the changed data in this data center can be synchronized to another data center in real time, thus maintaining the data consistency of the dual data centers.

[0040] According to another embodiment, before the above-mentioned data synchronization module sends the above-mentioned first service data to the above-mentioned target synchronization module, it is further used to encrypt the above-mentioned first service data. This ensures the security of data transmission.

[0041] To further ensure the data consistency of the dual-active centers, thereby further ensuring that when one data center is affected by a disaster, the other data center can take over normally and ensure the normal progress of business transactions. In another embodiment of the present application, the above data center further includes a monitoring database, and the above data synchronization module is further used to determine whether the above first service data is successfully sent. In the case where the above first service data fails to be sent, the above data synchronization module is further used to send the above first service data to the above monitoring database, generate an alarm message and send it out. The above monitoring database is used to resend the above first service data to the target synchronization module a predetermined number of times. Through the above monitoring database, the resending function of the service data with synchronization failure is realized, which further ensures the data consistency and integrity of the two data centers.

[0042] Specifically, the above data synchronization module is further used to determine whether the above first service data is successfully sent, including: the above data synchronization module is further used to receive the feedback information sent by the above target synchronization module; in the case where the above feedback information indicates successful synchronization, the above data synchronization module determines that the above first service data is successfully sent, and in the case where the above feedback information indicates synchronization failure, the above data synchronization module determines that the above first service data fails to be sent. The data synchronization module of the other data center ensures the data synchronization module of this data center by sending feedback information indicating whether the synchronization is successful, which facilitates the data synchronization module of this data center to determine whether to send the first service data to the monitoring database for resending according to the feedback information, and further avoids the problem of inconsistent service data between the two data centers caused by the failure of service data sending.

[0043] According to another embodiment of the present application, the above data center further includes a relational database and a cache database. The above data synchronization module is further used to update the above second service data to the above relational database when receiving the second service data sent by the above target synchronization module. In the case where the above second service data is successfully updated to the above relational database, the above data synchronization module is further used to update the above second service data to the above cache database. The above second service data is the service data that has changed in the above second data center. When the data synchronization module receives the service data that needs to be synchronized, it first updates the relational database and then updates the cache database, which further ensures the high timeliness of the data in the database of this data center and the database of the other data center.

[0044] In addition, based on the data characteristics of adjustment and disaster recovery, the above data synchronization module of the present application uses the data of loading and modifying the cache database to implement functions such as adjustment notification, multi-province switching, dual-active disaster recovery, and disaster recovery restoration in dual-active.

[0045] To further avoid the problem of inconsistent service data in the two data centers caused by the failure of sending service data, after updating the above-mentioned second service data to the above-mentioned cache database, the above-mentioned data synchronization module is further configured to generate feedback information indicating whether the update is successful and send it to the above-mentioned target synchronization module.

[0046] Exemplarily, in one embodiment, after the above-mentioned data synchronization module reads the above-mentioned first service data from the above-mentioned message queue, the above-mentioned message queue is further configured to delete the stored above-mentioned first service data. This ensures the storage space of the message queue and avoids excessive historical service data in the message queue, which may affect the storage of the latest service data.

[0047] Specifically, the above-mentioned first service data and the above-mentioned second service data respectively include day-time real-time data and end-of-day data. Cross-center data synchronization is achieved through technical means such as day-time real-time data synchronization and end-of-day data synchronization, and the message queue enables high instantaneity of data synchronization between the two data centers.

[0048] The above-mentioned data synchronization module of the present application is further configured to compare the end-of-day data of this data center with the end-of-day data of the other party's data to determine whether the two sets of data are consistent.

[0049] The present application adopts a dual-active deployment of two data centers with consistent resource configurations for the two data centers. Each single data center has the ability to take over all production loads. Through technical means such as load balancing, data synchronization, and monitoring and switching, a perfect dual-active system at the application level of the two data centers is established. The two data centers are effectively balanced and mutually backup, thereby effectively ensuring the continuity of personal counter business operations. When a disaster or other force majeure factor occurs in one of the two data centers, causing the business to be unable to proceed, in order to handle such emergencies, through dual-active disaster recovery adjustment, the business can be migrated to the other data center, and at the same time, technical means such as data synchronization are used to ensure the integrity of the data in the two data centers. Currently, the two data centers support a maximum TPS (Transactions Per Second) of 3000 transactions per second.

[0050] Moreover, in the present application, the data synchronization module realizes data synchronization by intercepting the data that needs to be synchronized and sending it to the message queue of this data center, and the data synchronization module of the other data center consumes it. In this way, the changed data can be synchronized to the other data center in real time, thus maintaining the data consistency between the two data centers. Taking the transaction initiation client accessing the system server as an example, its structure diagram is as Figure 1 shown.

[0051] This application is based on a dual - data - center deployment. Through technical means such as daytime real - time data synchronization, end - of - day data synchronization, and dual - data - center data verification, cross - data - center data synchronization is achieved. Through the provincial parameters, operation monitoring, and active - active switchover in the data - center routing mechanism, effective balance and mutual backup of the dual data centers are realized, a perfect application - level active - active is established, and off - site application - level disaster recovery is achieved. National clients access by province and establish connections with both data centers simultaneously. When any data center fails, all connections to the faulty data center can be switched to the other normal data center to ensure that transactions continue. Transaction processing during the switchover needs to be resubmitted. This application establishes a connection between the national data center and the associated system, and regularly checks the health status of the link with the associated system through heartbeat detection to support automatic switchover of the associated system.

[0052] According to another typical embodiment of the present application, a dual - active center is further provided, which includes a first data center and a second data center. Among them, the first data center is any one of the above - mentioned data centers applied to disaster recovery; the second data center is communicatively connected to the first data center, and the second data center is any one of the above - mentioned data centers applied to disaster recovery.

[0053] In the above - mentioned dual - active center, both the first data center and the second data center in the communication connection are the above - mentioned data centers applied to disaster recovery. In the above - mentioned data centers applied to disaster recovery, multiple access services and multiple application services are connected through a gateway. When the gateway receives a switchover instruction for requesting to switch the target terminal's data center, it first determines the switchover object, that is, determines the access service and application service that need to be switched from multiple access services, then blocks the business transactions of the switchover object, and then executes the active - active switchover service. After completing the active - active switchover service, it unlocks the switchover transactions to ensure the normal progress of business transactions after the switchover. Compared with the prior art where the switchover operation needs to act on each access service when refreshing the active - active relationship, resulting in cumbersome operations, in this application, by setting a gateway between the access services and application services in the data center, the operations of transaction blocking, unlocking, and active - active refreshing are all implemented at the gateway, and there is no need for each access service to reload the active - active relationship, and the operation is relatively simple and fast.

[0054] The dual - active center of this application has high dual - active real - time performance and convenient operation. The active - active switchover realizes the effective balance and mutual backup of the dual data centers, establishes a perfect application - level active - active, and can achieve off - site application - level disaster recovery.

[0055] In the above - mentioned embodiments of the present invention, the descriptions of each embodiment have their own focuses. For parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0056] In several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the above division of units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings or direct couplings or communication connections shown or discussed with each other can be through some interfaces. The indirect couplings or communication connections of units or modules can be in electrical or other forms.

[0057] The units described above as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0058] In addition, each functional unit in various embodiments of the present invention can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0059] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs that can store program codes.

[0060] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0061] 1) In the data center for disaster recovery applied in the present application, multiple access services and multiple application services are connected through a gateway. When the gateway receives a switching instruction for requesting to switch the target terminal's data center, it first determines the switching objects, that is, determines the access services and application services that need to be switched from multiple access services. Then it blocks the business transactions of the switching objects, and then executes the active-active switching service. After completing the active-active switching service, it unlocks the switching transactions to ensure the normal progress of business transactions after switching. Compared with the prior art where the switching operation needs to act on each access service when refreshing the active-active relationship, resulting in a cumbersome operation, in the present application, by setting a gateway between the access services and application services in the data center, the operations of transaction blocking, unlocking, and active-active refreshing are all implemented at the gateway, without each access service having to reload the active-active relationship, and the operation is relatively simple and fast.

[0062] 2) In the active-active center of the present application, both the first data center and the second data center connected by communication are the data centers for disaster recovery applied above. In the data center for disaster recovery applied above, multiple access services and multiple application services are connected through a gateway. When the gateway receives a switching instruction for requesting to switch the target terminal's data center, it first determines the switching objects, that is, determines the access services and application services that need to be switched from multiple access services. Then it blocks the business transactions of the switching objects, and then executes the active-active switching service. After completing the active-active switching service, it unlocks the switching transactions to ensure the normal progress of business transactions after switching. Compared with the prior art where the switching operation needs to act on each access service when refreshing the active-active relationship, resulting in a cumbersome operation, in the present application, by setting a gateway between the access services and application services in the data center, the operations of transaction blocking, unlocking, and active-active refreshing are all implemented at the gateway, without each access service having to reload the active-active relationship, and the operation is relatively simple and fast.

[0063] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.

Claims

1. A data center applied to disaster recovery and backup, characterized in that, it includes: Multiple access services, which are used to receive service requests from terminals; Multiple application services, which are used to process the service requests; A gateway, one end of the gateway is respectively communicatively connected to each of the access services, the other end of the gateway is respectively communicatively connected to each of the application services, the gateway is used to determine a switching object according to the switching instruction when receiving the switching instruction, perform transaction blocking on the switching object, execute a dual-active switching service, and perform transaction unlocking on the switching object after completing the dual-active switching service, wherein, the switching instruction is an instruction to request to switch the data center of the target terminal, the switching object is at least one of the multiple access services, the transaction blocking is used to represent stopping receiving and stopping processing the service request, and the transaction unlocking is used to represent resuming receiving and resuming processing the service request; The data center is the first data center, and the first data center further includes a synchronization service, and the synchronization service includes: An interceptor, which is used to intercept the first service data and send out the first service data, and the first service data is the service data that has changed in the first data center; A message queue, which is communicatively connected to the interceptor, and the message queue is used to receive and store the first service data; A data synchronization module, which is communicatively connected to the message queue, and the data synchronization module is further used to be communicatively connected to a target synchronization module, and the target synchronization module is the data synchronization module of the second data center, and the first data center and the second data center form a dual-active center. The data synchronization module is used to read the first service data from the message queue and send the first service data to the target synchronization module, so that the target synchronization module updates the first service data to the database of the second data center.

2. The data center according to claim 1, characterized in that, The gateway is used to execute the dual-active switching service, including: The gateway is used to update the dual-active configuration parameters according to the switching instruction to obtain the latest dual-active data; The gateway is used to delete the original dual-active data, and the original dual-active data represents the dual-active relationship corresponding to the target terminal before switching; The gateway controls the application service corresponding to the switching object to load the latest dual-active data.

3. The data center according to claim 1, characterized in that, The data center further includes a monitoring database, and the data synchronization module is further used to determine whether the first service data is successfully sent. In the case where the first service data is sent fails, the data synchronization module is further used to send the first service data to the monitoring database, generate an alarm message and send it out, and the monitoring database is used to resend the first service data to the target synchronization module a predetermined number of times.

4. The data center according to claim 1, characterized in that, The data synchronization module is further used to determine whether the first service data is successfully sent, including: The data synchronization module is further configured to receive feedback information sent by the target synchronization module; In the case where the feedback information indicates successful synchronization, the data synchronization module determines that the first service data is successfully sent. In the case where the feedback information indicates failed synchronization, the data synchronization module determines that the first service data is sent failed.

5. The data center according to claim 1, characterized in that, The data center further includes a relational database and a cache database. The data synchronization module is further configured to update the second service data to the relational database when receiving the second service data sent by the target synchronization module. In the case where the second service data is successfully updated to the relational database, the data synchronization module is further configured to update the second service data to the cache database. The second service data is the service data that has changed in the second data center.

6. The data center according to claim 5, characterized in that, After updating the second service data to the cache database, the data synchronization module is further configured to generate feedback information indicating whether the update is successful and send it to the target synchronization module.

7. The data center according to claim 1, characterized in that, After the data synchronization module reads the first service data from the message queue, the message queue is further configured to delete the stored first service data.

8. The data center according to any one of claims 1 to 7, characterized in that, The switching instruction includes a disaster recovery switching instruction, an adjustment switching instruction, and a recovery instruction. Among them, the disaster recovery switching instruction is used to indicate switching the data center of all the terminals, the adjustment switching instruction is used to indicate switching the data center of some of the terminals, and the recovery instruction is used to indicate recovering the data center before the switching.

9. A dual-active center, characterized in that, comprising: A first data center, which is the data center for disaster recovery according to any one of claims 1 to 8; A second data center, which is communicatively connected to the first data center and is the data center for disaster recovery according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Dual-center dual-live data process system and method

    CN109101364A

  • Service processing system and method across different data centers

    CN113051588A