CN112506702A - Data center disaster tolerance method, device, equipment and storage medium - Google Patents

Data center disaster tolerance method, device, equipment and storage medium Download PDF

Info

Publication number
CN112506702A
CN112506702A CN202011396543.1A CN202011396543A CN112506702A CN 112506702 A CN112506702 A CN 112506702A CN 202011396543 A CN202011396543 A CN 202011396543A CN 112506702 A CN112506702 A CN 112506702A
Authority
CN
China
Prior art keywords
data center
message
target
data
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011396543.1A
Other languages
Chinese (zh)
Other versions
CN112506702B (en
Inventor
刘微明
万书武
张观成
蒋英明
赵楚旋
林琪琛
吴锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202011396543.1A priority Critical patent/CN112506702B/en
Publication of CN112506702A publication Critical patent/CN112506702A/en
Application granted granted Critical
Publication of CN112506702B publication Critical patent/CN112506702B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of information security, and discloses a data center disaster recovery method, a data center disaster recovery device, data center disaster recovery equipment and a data center disaster recovery storage medium, which are used for improving the safety and reliability of data. The data center disaster recovery method comprises the following steps: starting two-way message synchronization service for two preset data centers, and creating a subject message and a corresponding message copy; updating the subject message to a two-way message synchronization service, and performing data synchronization processing on the target data center and the backup data center according to the subject message; when the heartbeat detection result of the target data center is abnormal, target subject data are pushed to the subject message of the backup data center according to the unique identification value; and acquiring the consumption position of the target data center from the backup data center according to the data subscription request, and resetting the message copy corresponding to the backup data center according to the consumption position to obtain the target subscription data. In addition, the invention also relates to a block chain technology, and the subject message can be stored in the block chain node.

Description

Data center disaster tolerance method, device, equipment and storage medium
Technical Field
The present invention relates to the field of access rules of information security technologies, and in particular, to a data center disaster recovery method, apparatus, device, and storage medium.
Background
In a big data application system, asynchronous data transmission is carried out by utilizing a message transmission mechanism with high efficiency and reliability of message middleware, integration of a distributed computing and analyzing system is carried out based on data communication, and real-time analysis of data is realized. The upstream application pushes data such as logs, database data, service messages and the like to the middleware, so that a subsequent open source flow processing framework flink, a computing engine spark or a framework storm can clean and analyze the data, and valuable data can be extracted, and further more economic benefits can be created for enterprises.
The stability and the security of the middleware cluster directly affect the guidance of a result, and may cause system crash or make wrong decisions, so that the multi-data center support and the automatic failover capability of the message middleware cluster are very important. At present, when the whole data center fails, the existing operation and maintenance means are used for switching the standby data center, synchronizing data, resetting offset and restarting all service systems. The whole process is complicated and can cause the service program to be in a breakdown state for a long time, the disaster recovery switching efficiency of the data center is low, and data loss is caused.
Disclosure of Invention
The invention provides a data center disaster recovery method, a data center disaster recovery device, data center disaster recovery equipment and a data center disaster recovery storage medium, which are used for improving the safety reliability and integrity of data and improving the disaster recovery switching efficiency of a data center.
In order to achieve the above object, a first aspect of the present invention provides a data center disaster recovery method, including: starting two-way message synchronization service for two preset data centers, and respectively creating a theme message and a message copy corresponding to each preset data center for each preset data center, wherein the two preset data centers comprise a target data center and a backup data center; updating the subject message to the two-way message synchronization service, and monitoring and data synchronization processing are performed on the target data center and the backup data center through the two-way message synchronization service according to the subject message, wherein the subject message has a corresponding unique identification value; when a data pushing request is received and a heartbeat detection result of a target data center is abnormal, target subject data are obtained and cached from the data pushing request, the target subject data are pushed to a subject message of a backup data center according to the unique identification value, and when the target data center is recovered from a fault, the message copies corresponding to each preset data center are pushed by the bidirectional message synchronization service; when a data subscription request is received and a heartbeat detection result of a target data center is abnormal, acquiring a consumption position of the target data center from the backup data center according to the data subscription request, and resetting a message copy corresponding to the backup data center according to the consumption position to obtain target subscription data.
Optionally, in a first implementation manner of the first aspect of the present invention, the starting a bidirectional message synchronization service for two preset data centers, and respectively creating a theme message and a message copy corresponding to each preset data center for each preset data center, where the two preset data centers include a target data center and a backup data center, includes: starting two-way message synchronization service for two preset data centers through a preset instruction, wherein the two preset data centers comprise a target data center and a backup data center; configuring a first access address for the target data center and configuring a second access address for the backup data center; calling a message middleware cluster interface of a target data center based on the first access address to create a subject message and a message copy corresponding to the target data center, wherein the message copy corresponding to the target data center is used for synchronously storing the subject message corresponding to the backup data center; and calling a message middleware cluster interface of a backup data center based on the second access address to create the theme message and a message copy corresponding to the backup data center, wherein the message copy corresponding to the backup data center is used for synchronously storing the theme message corresponding to the target data center.
Optionally, in a second implementation manner of the first aspect of the present invention, the updating the subject message to the two-way message synchronization service, and performing monitoring and data synchronization processing on the target data center and the backup data center through the two-way message synchronization service according to the subject message, where the subject message has a corresponding unique identification value includes: adding the subject message to a white list of a two-way message synchronization service, and setting a corresponding unique identification value for the subject message, wherein the unique identification value is used for indicating that access flow limitation is performed on a message middleware cluster of each preset data center; the target data center and the standby data center are respectively connected through the bidirectional message synchronization service, the subject message in the target data center is pushed to the message copy corresponding to the standby data center, and the subject message in the standby data center is pushed to the message copy corresponding to the target data center; and acquiring the consumption position of the theme message from the target data center, and pushing the consumption position of the theme message to the configuration theme of the standby data center, wherein the initial value of the consumption position of the theme message is 0.
Optionally, in a third implementation manner of the first aspect of the present invention, when a data pushing request is received and a heartbeat detection result of a target data center is abnormal, obtaining and caching target subject data from the data pushing request, pushing the target subject data to a subject message of a backup data center according to the unique identification value, and when a fault of the target data center is recovered, pushing data to a message copy corresponding to each preset data center through the bidirectional message synchronization service includes: when a data pushing request is received and a heartbeat detection result of a target data center is abnormal, analyzing the data pushing request to obtain target subject data, and storing the target subject data into a memory database to obtain cached subject data; connecting the backup data center to obtain a connection result, and pushing the cached theme data to the theme message of the backup data center according to the unique identification value when the connection result is successful; detecting the target data center through a preset heartbeat detection task, connecting the target data center through the two-way message synchronization service when the target data center is recovered from a fault, and synchronizing the cached subject data to the subject message of the target data center; and pushing the theme message of the target data center to a message copy corresponding to the backup data center, and pushing the theme message of the backup data center to a message copy corresponding to the target data center.
Optionally, in a fourth implementation manner of the first aspect of the present invention, when a data subscription request is received and a heartbeat detection result of a target data center is abnormal, acquiring a consumption position of the target data center from the backup data center according to the data subscription request, and resetting a message copy corresponding to the backup data center according to the consumption position to obtain target subscription data, where the method includes: when a data subscription request is received and a heartbeat detection result of a target data center is abnormal, analyzing the data subscription request to obtain a unique identification value of a subject message; subscribing the theme message of the backup data center and the message copy corresponding to the backup data center according to the unique identification value of the theme message; and reading the consumption position of the target data center from the configuration theme of the standby data center, setting a data reading initial value for the theme message of the target data center according to the consumption position, and extracting target subscription data according to the data reading initial value.
Optionally, in a fifth implementation manner of the first aspect of the present invention, before the starting a bidirectional message synchronization service for two preset data centers, and respectively creating a theme message and a message copy corresponding to each preset data center for each preset data center, where the two preset data centers include a target data center and a backup data center, the data center disaster recovery method further includes: respectively sending socket connection requests to each preset data center through a preset heartbeat detection task, and establishing socket long connection, wherein the socket long connection is used for indicating that information pushing is respectively carried out on each preset data center; and respectively sending heartbeat packets to each preset data center according to a preset frequency so as to perform heartbeat detection, and obtaining a heartbeat detection result, wherein the heartbeat detection result is used for indicating whether each preset data center has abnormal connection.
Optionally, in a sixth implementation manner of the first aspect of the present invention, when a data subscription request is received and a heartbeat detection result of a target data center is abnormal, a consumption position of the target data center is obtained from the backup data center according to the data subscription request, and a message copy corresponding to the backup data center is reset according to the consumption position to obtain target subscription data, where the data center disaster tolerance method further includes: performing data persistence processing on the theme message of each preset data center and the message copy corresponding to each preset data center, and performing statistical analysis on the abnormal quantity of heartbeat detection of each preset data center within a preset time length; when the heartbeat detection abnormal quantity of each preset data center is larger than a preset threshold value, warning information is generated and is pushed to a target terminal, so that the target terminal prompts target personnel to investigate the failed preset data center according to the warning information.
A second aspect of the present invention provides a data center disaster recovery device, including: the system comprises a creating module, a sending module and a receiving module, wherein the creating module is used for starting two-way message synchronization service for two preset data centers, and respectively creating a theme message and a message copy corresponding to each preset data center for each preset data center, and the two preset data centers comprise a target data center and a backup data center; the updating module is used for updating the subject message to the two-way message synchronization service, monitoring and data synchronization processing are carried out on the target data center and the backup data center through the two-way message synchronization service according to the subject message, and the subject message has a corresponding unique identification value; the pushing module is used for acquiring and caching target subject data from the data pushing request when the data pushing request is received and a heartbeat detection result of a target data center is abnormal, pushing the target subject data to a subject message of a backup data center according to the unique identification value, and pushing data to a message copy corresponding to each preset data center through the bidirectional message synchronization service when the target data center is recovered; and the subscription module is used for acquiring the consumption position of the target data center from the backup data center according to the data subscription request and resetting the message copy corresponding to the backup data center according to the consumption position to obtain the target subscription data when the data subscription request is received and the heartbeat detection result of the target data center is abnormal.
Optionally, in a first implementation manner of the second aspect of the present invention, the creating module is specifically configured to: starting two-way message synchronization service for two preset data centers through a preset instruction, wherein the two preset data centers comprise a target data center and a backup data center; configuring a first access address for the target data center and configuring a second access address for the backup data center; calling a message middleware cluster interface of a target data center based on the first access address to create a subject message and a message copy corresponding to the target data center, wherein the message copy corresponding to the target data center is used for synchronously storing the subject message corresponding to the backup data center; and calling a message middleware cluster interface of a backup data center based on the second access address to create the theme message and a message copy corresponding to the backup data center, wherein the message copy corresponding to the backup data center is used for synchronously storing the theme message corresponding to the target data center.
Optionally, in a second implementation manner of the second aspect of the present invention, the update module is specifically configured to: adding the subject message to a white list of a two-way message synchronization service, and setting a corresponding unique identification value for the subject message, wherein the unique identification value is used for indicating that access flow limitation is performed on a message middleware cluster of each preset data center; the target data center and the standby data center are respectively connected through the bidirectional message synchronization service, the subject message in the target data center is pushed to the message copy corresponding to the standby data center, and the subject message in the standby data center is pushed to the message copy corresponding to the target data center; and acquiring the consumption position of the theme message from the target data center, and pushing the consumption position of the theme message to the configuration theme of the standby data center, wherein the initial value of the consumption position of the theme message is 0.
Optionally, in a third implementation manner of the second aspect of the present invention, the pushing module is specifically configured to: when a data pushing request is received and a heartbeat detection result of a target data center is abnormal, analyzing the data pushing request to obtain target subject data, and storing the target subject data into a memory database to obtain cached subject data; connecting the backup data center to obtain a connection result, and pushing the cached theme data to the theme message of the backup data center according to the unique identification value when the connection result is successful; detecting the target data center through a preset heartbeat detection task, connecting the target data center through the two-way message synchronization service when the target data center is recovered from a fault, and synchronizing the cached subject data to the subject message of the target data center; and pushing the theme message of the target data center to a message copy corresponding to the backup data center, and pushing the theme message of the backup data center to a message copy corresponding to the target data center.
Optionally, in a fourth implementation manner of the second aspect of the present invention, the subscription module is specifically configured to: when a data subscription request is received and a heartbeat detection result of a target data center is abnormal, analyzing the data subscription request to obtain a unique identification value of a subject message; subscribing the theme message of the backup data center and the message copy corresponding to the backup data center according to the unique identification value of the theme message; and reading the consumption position of the target data center from the configuration theme of the standby data center, setting a data reading initial value for the theme message of the target data center according to the consumption position, and extracting target subscription data according to the data reading initial value.
Optionally, in a fifth implementation manner of the second aspect of the present invention, the data center disaster recovery apparatus further includes: the system comprises a connection module, a receiving module and a processing module, wherein the connection module is used for respectively sending socket connection requests to each preset data center through a preset heartbeat detection task and establishing socket long connection, and the socket long connection is used for indicating that information is respectively pushed to each preset data center; the detection module is used for sending heartbeat packets to each preset data center according to preset frequency respectively so as to perform heartbeat detection and obtain heartbeat detection results, and the heartbeat detection results are used for indicating whether connection abnormity exists in each preset data center.
Optionally, in a sixth implementation manner of the second aspect of the present invention, the data center disaster recovery apparatus further includes: the statistical module is used for performing data persistence processing on the theme message of each preset data center and the message copy corresponding to each preset data center, and performing statistical analysis on the abnormal quantity of heartbeat detection of each preset data center within a preset time length; and the early warning module is used for generating warning information and pushing the warning information to the target terminal when the heartbeat detection abnormal quantity of each preset data center is greater than a preset threshold value, so that the target terminal prompts target personnel to investigate the failed preset data center according to the warning information.
A third aspect of the present invention provides a data center disaster recovery device, including: a memory and at least one processor, the memory having instructions stored therein; the at least one processor calls the instruction in the memory to enable the data center disaster recovery device to execute the data center disaster recovery method.
A fourth aspect of the present invention provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to execute the above-mentioned data center disaster recovery method.
In the technical scheme provided by the invention, two-way message synchronization service is started for two preset data centers, and a theme message and a message copy corresponding to each preset data center are respectively created for each preset data center, wherein the two preset data centers comprise a target data center and a backup data center; updating the subject message to the two-way message synchronization service, and monitoring and data synchronization processing are performed on the target data center and the backup data center through the two-way message synchronization service according to the subject message, wherein the subject message has a corresponding unique identification value; when a data pushing request is received and a heartbeat detection result of a target data center is abnormal, target subject data are obtained and cached from the data pushing request, the target subject data are pushed to a subject message of a backup data center according to the unique identification value, and when the target data center is recovered from a fault, the message copies corresponding to each preset data center are pushed by the bidirectional message synchronization service; when a data subscription request is received and a heartbeat detection result of a target data center is abnormal, acquiring a consumption position of the target data center from the backup data center according to the data subscription request, and resetting a message copy corresponding to the backup data center according to the consumption position to obtain target subscription data. In the embodiment of the invention, the two-way message synchronization service is started for two preset data centers, and the theme message and the corresponding message copy are created, so that the data synchronization efficiency and the accuracy are improved; when the heartbeat detection result of the target data center is abnormal, target theme data is pushed to the theme message of the backup data center according to the unique identification value, so that the partition resource loss of the data center is reduced; the consumption position of the target data center is obtained from the backup data center according to the data subscription request, the message copy corresponding to the backup data center is reset according to the consumption position, the target subscription data is obtained, the safety reliability and the integrity of the data are improved by adopting the two preset data centers, and the disaster recovery switching efficiency of the data center is improved.
Drawings
Fig. 1 is a schematic diagram of an embodiment of a disaster recovery method for a data center according to an embodiment of the present invention;
fig. 2 is a schematic diagram of another embodiment of a disaster recovery method for a data center according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a data center disaster recovery architecture according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an embodiment of a data center disaster recovery device according to an embodiment of the present invention;
fig. 5 is a schematic diagram of another embodiment of a data center disaster recovery device according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an embodiment of a data center disaster recovery device in an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a data center disaster recovery method, a data center disaster recovery device, data center equipment and a storage medium, which are used for improving the safety reliability and integrity of data by adopting two preset data centers and improving the disaster recovery switching efficiency of the data centers.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a specific flow of the embodiment of the present invention is described below, and referring to fig. 1, an embodiment of a data center disaster recovery method in the embodiment of the present invention includes:
101. and starting a two-way message synchronization service for two preset data centers, and respectively creating a theme message and a message copy corresponding to each preset data center for each preset data center, wherein the two preset data centers comprise a target data center and a backup data center.
The number of the preset data centers is set according to actual service requirements, and may be two or more, and is not limited herein. Specifically, the server starts a two-way message synchronization service for two preset data centers, wherein the two preset data centers comprise a target data center and a backup data center, and the two-way message synchronization service is used for indicating that theme messages needing to be synchronized are automatically matched according to a white list strategy; the server creates a theme message and a message copy corresponding to the target data center in a data model zookeeper where the target data center is located; the server creates a theme message and a message copy corresponding to the backup data center for the zookeeper where the backup data center is located.
It should be noted that the message copy corresponding to each preset data center is used for backing up the same subject message of another preset data center. For example, two pre-provisioned data centers DC1 and DC2, where DC1 is the target data center, DC2 is the backup data center, and two-way message synchronization is enabled between the two pre-provisioned data centers of the server. When the server creates the xxx subject message Topic, it will also create subject message xxx and message copy dc2.xxx corresponding to DC1 in DC1, and create subject message xxx and message copy dc1.xxx corresponding to DC2 in DC2.
Further, the subject message is stored in the blockchain database, which is not limited herein.
It is to be understood that the executing subject of the present invention may be a data center disaster recovery device, and may also be a terminal or a server, which is not limited herein. The embodiment of the present invention is described by taking a server as an execution subject.
102. And updating the subject message into a two-way message synchronization service, and monitoring and data synchronization processing are carried out on the target data center and the backup data center through the two-way message synchronization service according to the subject message, wherein the subject message has a corresponding unique identification value.
Wherein, the two-way message synchronization service is a synchronization service which is secondarily developed by the server based on the open source component mirrormaker 2. Specifically, the server writes the subject message into a white list in the two-way message synchronization service; the server automatically matches the subject messages needing synchronization according to a white list strategy through a bidirectional message synchronization service, and respectively detects whether data change (namely, data change caused by data adding and deleting processing) exists in the subject messages in the zookeeper where the target data center is located and the zookeeper where the backup data center is located according to the matched subject messages; when the server detects that any one preset data center (target data center or backup data center) has data change, the server calls a preset interface of a message middleware cluster of each preset data center to synchronize the data in the subject message with the change in each preset data center to a message copy corresponding to another preset data center.
103. When a data pushing request is received and a heartbeat detection result of a target data center is abnormal, target subject data are obtained from the data pushing request and cached, the target subject data are pushed to subject messages of a backup data center according to a unique identification value, and when the target data center is recovered from a fault, the data are pushed to message copies corresponding to each preset data center through a two-way message synchronization service.
It can be understood that, in the process of pushing the theme data, the server further performs heartbeat detection on the target data center through a preset heartbeat detection task to obtain a heartbeat detection result of the target data center, and the heartbeat detection result of the target data center includes normal heartbeat detection and abnormal heartbeat detection. The data push request is used for instructing a producer to write data into a theme message with a good meaning in each data.
Specifically, when the server receives a data pushing request and a heartbeat detection result of a target data center is abnormal, the server analyzes the data pushing request to obtain target subject data and caches the target subject data; the server pushes the target theme data to the theme message of the backup data center according to the unique identification value; the server performs heartbeat detection on the target data center through a preset heartbeat detection task, and when the target data center is recovered from a fault, the server synchronizes data in the subject message of each preset data center to a message copy corresponding to another preset data center through a bidirectional message synchronization service, so that the consistency and the integrity of the data between the target data center and the backup data center are ensured.
For example, when target theme data is pushed to a xxx theme of the target data center DC1, the server caches the target theme data, when the server detects that the DC1 fails, the server cannot sense the heartbeat of the DC1 at this time, and then the server establishes a connection with the standby data center DC2, and pushes the cached target theme data to the xxx theme of the DC2, so as to ensure that the data is not lost in the production process.
104. When a data subscription request is received and the heartbeat detection result of the target data center is abnormal, acquiring the consumption position of the target data center from the backup data center according to the data subscription request, and resetting a message copy corresponding to the backup data center according to the consumption position to obtain target subscription data.
It should be noted that the heartbeat detection performed by the server on the target data center is similar to the execution process of step 103, and details are not described here again. Wherein the data subscription request is used for instructing a consumer to extract data from the topic message of each data center. Specifically, when the server receives a data subscription request and a heartbeat detection result of a target data center is abnormal, the server determines a topic message and a unique identification value of the topic message according to the data subscription request; and the server extracts the consumption position of the target data center from the backup data center according to the unique identification value, and resets the message copy corresponding to the backup data center according to the consumption position to obtain the target subscription data.
In the embodiment of the invention, the two-way message synchronization service is started for two preset data centers, and the theme message and the corresponding message copy are created, so that the data synchronization efficiency and the accuracy are improved; when the heartbeat detection result of the target data center is abnormal, target theme data is pushed to the theme message of the backup data center according to the unique identification value, so that the partition resource loss of the data center is reduced; the consumption position of the target data center is obtained from the backup data center according to the data subscription request, the message copy corresponding to the backup data center is reset according to the consumption position, the target subscription data is obtained, the safety reliability and the integrity of the data are improved by adopting the two preset data centers, and the disaster recovery switching efficiency of the data center is improved.
Referring to fig. 2, another embodiment of a disaster recovery method for a data center according to an embodiment of the present invention includes:
201. and starting a two-way message synchronization service for two preset data centers, and respectively creating a theme message and a message copy corresponding to each preset data center for each preset data center, wherein the two preset data centers comprise a target data center and a backup data center.
The topic messages can be divided into 1, 2 or more according to different message types. As shown in fig. 3, the two preset data centers are a target data center 301 (i.e., DC1) and a backup data center 302 (i.e., DC2), and the server creates a subject message in DC1, which includes xxx, yyy, and/or zzz, and a corresponding message copy is dc2.xxx, dc2.yy, and/or DC2 zzz; the server creates in DC2 a subject message including xxx, yyy, and/or zzz and corresponding message copies as dc1.xxx, dc1.yyy, and/or DC1 zzz. The server may also create other topic messages and corresponding other message copies, which is not limited herein. The server performs data synchronization processing on the theme messages between the DC1 and the DC2 through a two-way message synchronization service, and the data security in the theme messages is ensured.
Optionally, the server starts a bidirectional message synchronization service for two preset data centers through a preset instruction, where the two preset data centers include a target data center and a backup data center, and the preset instruction may be a preset shell script instruction for starting the service; the server starts bidirectional message synchronization service for two preset data centers through a preset instruction, wherein the two preset data centers comprise a target data center and a backup data center; the server configures a first access address for a target data center and configures a second access address for a backup data center, wherein the first access address and the second access address are different; the server calls a message middleware cluster interface of a target data center based on the first access address to create a theme message and a message copy corresponding to the target data center, wherein the message copy corresponding to the target data center is used for synchronously storing the theme message corresponding to the backup data center; and the server calls a message middleware cluster interface of the backup data center to create a theme message and a message copy corresponding to the backup data center based on the second access address, wherein the message copy corresponding to the backup data center is used for synchronously storing the theme message corresponding to the target data center.
202. And updating the subject message into a two-way message synchronization service, and monitoring and data synchronization processing are carried out on the target data center and the backup data center through the two-way message synchronization service according to the subject message, wherein the subject message has a corresponding unique identification value.
The unique identification value corresponding to the subject message may be a Universal Unique Identifier (UUID) or other identification codes, and is not limited herein. It should be noted that each of the preset data centers (target data center or backup data center) has a corresponding customer interface and a corresponding producer interface.
Optionally, the server adds the theme message to a white list in the bidirectional message synchronization service, sets a corresponding unique identification value for the theme message, further, the server invokes a tool class of a java development kit jdk to generate a target UUID (unique identification value), the server invokes a preset application interface of kafka to configure a current limiting rule of the theme message topic corresponding to the target UUID, and the unique identification value is used to indicate that access traffic is limited to a message middleware cluster of each preset data center. Then, the server is respectively connected with the target data center and the standby data center through a bidirectional message synchronization service, pushes the subject message in the target data center to the message copy corresponding to the standby data center, and pushes the subject message in the standby data center to the message copy corresponding to the target data center; secondly, the server acquires the consumption position of the theme message from the target data center, and pushes the consumption position of the theme message to the configuration theme (namely, the config theme) of the standby data center, wherein the initial value of the consumption position of the theme message is 0.
For example, the server turns on producer and consumer tasks at the backup data center DC2 through a two-way message synchronization service; the server calls a consumer interface of the backup data center DC2 to extract data from a subject message xxx of the target data center DC1 through a consumer task; the server pushes the extracted data into the message copy dc1.xxx of DC2 by the producer task invoking the producer interface of backup data center DC2.
203. When a data pushing request is received and a heartbeat detection result of a target data center is abnormal, target subject data are obtained from the data pushing request and cached, the target subject data are pushed to subject messages of a backup data center according to a unique identification value, and when the target data center is recovered from a fault, the data are pushed to message copies corresponding to each preset data center through a two-way message synchronization service.
It can be understood that, the server performs heartbeat detection on the target data center, optionally, the server sends a socket connection request to each preset data center through a preset heartbeat detection task, and establishes a socket long connection, where the socket long connection is used to indicate that message pushing is performed to each preset data center (including the target data center) respectively; the server sends heartbeat packets to each preset data center according to preset frequency respectively so as to perform heartbeat detection, and a heartbeat detection result is obtained and used for indicating whether connection abnormality exists in each preset data center. Further, the server sends a heartbeat packet to a target data center according to a preset frequency, and simultaneously starts an overtime timer; if the server receives a response packet of the target data center within a preset time length, the server determines that the heartbeat detection result of the target data center is normal, and deletes the overtime timer; and if the overtime timer of the server is overtime and the response packet of the target data center is not received, the server determines that the heartbeat detection result of the target data center is abnormal and reconnects the heartbeat detection result.
Optionally, when the server receives the data pushing request and the heartbeat detection result of the target data center is abnormal, the server analyzes the data pushing request to obtain target subject data, and stores the target subject data into the memory database to obtain cached subject data; the server is connected with the backup data center to obtain a connection result, and when the connection result is successful, the cached theme data is pushed to the theme message of the backup data center according to the unique identification value; the server detects a target data center through a preset heartbeat detection task, is connected with the target data center through a two-way message synchronization service when the target data center is recovered from a fault, and synchronizes the cached theme data to the theme message of the target data center; the service pushes the theme message of the target data center to the message copy corresponding to the backup data center, and pushes the theme message of the backup data center to the message copy corresponding to the target data center.
204. When a data subscription request is received and the heartbeat detection result of the target data center is abnormal, acquiring the consumption position of the target data center from the backup data center according to the data subscription request, and resetting a message copy corresponding to the backup data center according to the consumption position to obtain target subscription data.
The heartbeat detection process in step 204 is similar to the heartbeat detection process in step 203, and details thereof are not repeated here. Optionally, when the server receives the data subscription request and the heartbeat detection result of the target data center is abnormal, the server analyzes the data subscription request to obtain the unique identification value of the topic message; the server subscribes the theme message of the backup data center and the message copy corresponding to the backup data center according to the unique identification value of the theme message; the server reads the consumption position of the target data center from the configuration theme of the standby data center, sets a data reading initial value for the theme message of the target data center according to the consumption position, and extracts the target subscription data according to the data reading initial value.
For example, when the server extracts the target subscription data from the topic message xxx in the target data center DC1, the server also subscribes to the topic message xxx and the corresponding message copy dc2.xxx, when a disaster occurs in DC1, the server establishes a connection with the backup data center DC2 according to the heartbeat detection result, subscribes to the topic message xxx and the corresponding message copy dc1.xxx in DC2, and simultaneously acquires the consumption position offset in DC1 before from the config topic configured in DC2, resets dc1.xxx to offset (data reading start value), and extracts the target subscription data according to the offset. Ensuring that the server continues to consume the data from the location before the disaster occurs and can also consume the newly pushed data.
205. And performing data persistence processing on the theme message of each preset data center and the message copy corresponding to each preset data center, and performing statistical analysis on the abnormal quantity of heartbeat detection of each preset data center within a preset time length.
That is, the server stores the topic message of each preset data center and the message copy corresponding to each preset data center in an in-memory database (e.g., remote dictionary service); further, the server performs persistence processing on the theme message of each preset data center and the message copy corresponding to each preset data center in a remote dictionary service dataBase (RDB) or an additional file (AOF) manner, so as to quickly recover the data in the memory dataBase. When the target data center is abnormal due to faults, the server reloads the data into the memory database by reading the RDB or AOF file. Then, the server statistically analyzes the heartbeat detection abnormal quantity of each preset data center within a preset time length, wherein the heartbeat detection abnormal quantity comprises the heartbeat detection abnormal quantity of the target data center and the heartbeat detection abnormal quantity of the backup data center.
206. When the heartbeat detection abnormal quantity of each preset data center is larger than a preset threshold value, warning information is generated and pushed to the target terminal, so that the target terminal prompts target personnel to check the failed preset data center according to the warning information.
For example, if the number of heartbeat detection anomalies of the target data center is 15, the number of heartbeat detection anomalies of the backup data center is 0, the preset threshold value is 5, and the preset duration is 3 minutes, the server determines that the number of heartbeat detection anomalies of the target data center is greater than the preset threshold value, and the number of heartbeat detection anomalies of the backup data center is less than the preset threshold value. The server generates corresponding warning information for the target data center, and calls a preset interface to send the warning information to the target terminal, so that the target terminal prompts target personnel to investigate the preset data center (namely the target data center) with faults according to the warning information.
Further, the server can also obtain the fault information of each preset data center, and generate a statistical form by the heartbeat detection abnormal quantity of each preset data center and the fault information of each preset data center.
In the embodiment of the invention, the two-way message synchronization service is started for two preset data centers, and the theme message and the corresponding message copy are created, so that the data synchronization efficiency and the accuracy are improved; when the heartbeat detection result of the target data center is abnormal, target theme data is pushed to the theme message of the backup data center according to the unique identification value, so that the partition resource loss of the data center is reduced; the consumption position of the target data center is obtained from the backup data center according to the data subscription request, the message copy corresponding to the backup data center is reset according to the consumption position, the target subscription data is obtained, the safety reliability and the integrity of the data are improved by adopting the two preset data centers, and the disaster recovery switching efficiency of the data center is improved.
With reference to fig. 4, the data center disaster recovery method in the embodiment of the present invention is described above, and a data center disaster recovery device in the embodiment of the present invention is described below, where an embodiment of the data center disaster recovery device in the embodiment of the present invention includes:
the creating module 401 is configured to start a bidirectional message synchronization service for two preset data centers, and create a theme message and a message copy corresponding to each preset data center for each preset data center, where the two preset data centers include a target data center and a backup data center;
an updating module 402, configured to update the subject message to a two-way message synchronization service, and monitor and perform data synchronization processing on the target data center and the backup data center through the two-way message synchronization service according to the subject message, where the subject message has a corresponding unique identification value;
the pushing module 403, when a data pushing request is received and a heartbeat detection result of a target data center is abnormal, is configured to obtain and cache target subject data from the data pushing request, push the target subject data to a subject message of a backup data center according to a unique identification value, and push data to a message copy corresponding to each preset data center through a bidirectional message synchronization service when a fault of the target data center is recovered;
the subscription module 404, when receiving the data subscription request and the heartbeat detection result of the target data center is abnormal, is configured to obtain a consumption position of the target data center from the backup data center according to the data subscription request, and reset a message copy corresponding to the backup data center according to the consumption position to obtain the target subscription data.
Further, the subject message is stored in the blockchain database, which is not limited herein.
In the embodiment of the invention, the two-way message synchronization service is started for two preset data centers, and the theme message and the corresponding message copy are created, so that the data synchronization efficiency and the accuracy are improved; when the heartbeat detection result of the target data center is abnormal, target theme data is pushed to the theme message of the backup data center according to the unique identification value, so that the partition resource loss of the data center is reduced; the consumption position of the target data center is obtained from the backup data center according to the data subscription request, the message copy corresponding to the backup data center is reset according to the consumption position, the target subscription data is obtained, the safety reliability and the integrity of the data are improved by adopting the two preset data centers, and the disaster recovery switching efficiency of the data center is improved.
Referring to fig. 5, another embodiment of the disaster recovery device of the data center according to the embodiment of the present invention includes:
the creating module 401 is configured to start a bidirectional message synchronization service for two preset data centers, and create a theme message and a message copy corresponding to each preset data center for each preset data center, where the two preset data centers include a target data center and a backup data center;
an updating module 402, configured to update the subject message to a two-way message synchronization service, and monitor and perform data synchronization processing on the target data center and the backup data center through the two-way message synchronization service according to the subject message, where the subject message has a corresponding unique identification value;
the pushing module 403, when a data pushing request is received and a heartbeat detection result of a target data center is abnormal, is configured to obtain and cache target subject data from the data pushing request, push the target subject data to a subject message of a backup data center according to a unique identification value, and push data to a message copy corresponding to each preset data center through a bidirectional message synchronization service when a fault of the target data center is recovered;
the subscription module 404, when receiving the data subscription request and the heartbeat detection result of the target data center is abnormal, is configured to obtain a consumption position of the target data center from the backup data center according to the data subscription request, and reset a message copy corresponding to the backup data center according to the consumption position to obtain the target subscription data.
Optionally, the creating module 401 may be further specifically configured to:
starting two-way message synchronization service for two preset data centers through a preset instruction, wherein the two preset data centers comprise a target data center and a backup data center;
configuring a first access address for a target data center and configuring a second access address for a backup data center;
calling a message middleware cluster interface of a target data center based on the first access address to create a subject message and a message copy corresponding to the target data center, wherein the message copy corresponding to the target data center is used for synchronously storing the subject message corresponding to a backup data center;
and calling a message middleware cluster interface of the backup data center to create a theme message and a message copy corresponding to the backup data center based on the second access address, wherein the message copy corresponding to the backup data center is used for synchronously storing the theme message corresponding to the target data center.
Optionally, the updating module 402 may be further specifically configured to:
adding the subject message to a white list of the two-way message synchronization service, and setting a corresponding unique identification value for the subject message, wherein the unique identification value is used for indicating that access flow limitation is performed on a message middleware cluster of each preset data center;
the method comprises the steps that a target data center and a standby data center are respectively connected through a bidirectional message synchronization service, theme messages in the target data center are pushed to message copies corresponding to the standby data center, and the theme messages in the standby data center are pushed to the message copies corresponding to the target data center;
and acquiring the consumption position of the theme message from the target data center, and pushing the consumption position of the theme message to the configuration theme of the standby data center, wherein the initial value of the consumption position of the theme message is 0.
Optionally, the pushing module 403 may be further specifically configured to:
when a data pushing request is received and a heartbeat detection result of a target data center is abnormal, analyzing the data pushing request to obtain target subject data, and storing the target subject data into a memory database to obtain cached subject data;
connecting the backup data center to obtain a connection result, and pushing the cached theme data to the theme message of the backup data center according to the unique identification value when the connection result is successful;
detecting a target data center through a preset heartbeat detection task, connecting the target data center through a two-way message synchronization service when the target data center is recovered from a fault, and synchronizing the cached subject data to the subject message of the target data center;
and pushing the theme message of the target data center to the message copy corresponding to the backup data center, and pushing the theme message of the backup data center to the message copy corresponding to the target data center.
Optionally, the subscription module 404 may be further specifically configured to:
when a data subscription request is received and a heartbeat detection result of a target data center is abnormal, analyzing the data subscription request to obtain a unique identification value of a subject message;
subscribing the theme message of the backup data center and the message copy corresponding to the backup data center according to the unique identification value of the theme message;
and reading the consumption position of the target data center from the configuration theme of the standby data center, setting a data reading initial value for the theme message of the target data center according to the consumption position, and extracting target subscription data according to the data reading initial value.
Optionally, the data center disaster recovery apparatus further includes:
a connection module 405, configured to send a socket connection request to each preset data center through a preset heartbeat detection task, and establish a socket long connection, where the socket long connection is used to indicate that message pushing is performed to each preset data center;
the detection module 406 is configured to send a heartbeat packet to each preset data center according to a preset frequency, so as to perform heartbeat detection, and obtain a heartbeat detection result, where the heartbeat detection result is used to indicate whether there is a connection abnormality in each preset data center.
Optionally, the data center disaster recovery apparatus further includes:
the statistical module 407 is configured to perform data persistence processing on the theme message of each preset data center and the message copy corresponding to each preset data center, and perform statistical analysis on the number of abnormal heartbeat detection of each preset data center within a preset time length;
the early warning module 408 is configured to generate warning information when the number of heartbeat detection anomalies of each preset data center is greater than a preset threshold, and push the warning information to the target terminal, so that the target terminal prompts target personnel to investigate the failed preset data center according to the warning information.
In the embodiment of the invention, the two-way message synchronization service is started for two preset data centers, and the theme message and the corresponding message copy are created, so that the data synchronization efficiency and the accuracy are improved; when the heartbeat detection result of the target data center is abnormal, target theme data is pushed to the theme message of the backup data center according to the unique identification value, so that the partition resource loss of the data center is reduced; the consumption position of the target data center is obtained from the backup data center according to the data subscription request, the message copy corresponding to the backup data center is reset according to the consumption position, the target subscription data is obtained, the safety reliability and the integrity of the data are improved by adopting the two preset data centers, and the disaster recovery switching efficiency of the data center is improved.
Fig. 4 and fig. 5 describe the data center disaster recovery apparatus in the embodiment of the present invention in detail from the perspective of modularization, and the data center disaster recovery device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
Fig. 6 is a schematic structural diagram of a data center disaster recovery device according to an embodiment of the present invention, where the data center disaster recovery device 600 may generate relatively large differences due to different configurations or performances, and may include one or more processors (CPUs) 610 (e.g., one or more processors) and a memory 620, and one or more storage media 630 (e.g., one or more mass storage devices) storing applications 633 or data 632. Memory 620 and storage medium 630 may be, among other things, transient or persistent storage. The program stored in the storage medium 630 may include one or more modules (not shown), each of which may include a series of instructions operating on the data center disaster recovery device 600. Further, processor 610 may be configured to communicate with storage medium 630 to execute a series of instruction operations in storage medium 630 on data center disaster recovery device 600.
The data center disaster recovery device 600 may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input-output interfaces 660, and/or one or more operating systems 631, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, and the like. Those skilled in the art will appreciate that the data center disaster recovery device configuration shown in fig. 6 does not constitute a limitation of the data center disaster recovery device, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, and may also be a volatile computer-readable storage medium, having stored therein instructions, which, when executed on a computer, cause the computer to perform the steps of the data center disaster recovery method.
The invention further provides a data center disaster recovery device, which includes a memory and a processor, where the memory stores instructions, and when the instructions are executed by the processor, the processor executes the steps of the data center disaster recovery method in each of the above embodiments.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A data center disaster recovery method is characterized by comprising the following steps:
starting two-way message synchronization service for two preset data centers, and respectively creating a theme message and a message copy corresponding to each preset data center for each preset data center, wherein the two preset data centers comprise a target data center and a backup data center;
updating the subject message to the two-way message synchronization service, and monitoring and data synchronization processing are performed on the target data center and the backup data center through the two-way message synchronization service according to the subject message, wherein the subject message has a corresponding unique identification value;
when a data pushing request is received and a heartbeat detection result of a target data center is abnormal, target subject data are obtained and cached from the data pushing request, the target subject data are pushed to a subject message of a backup data center according to the unique identification value, and when the target data center is recovered from a fault, the message copies corresponding to each preset data center are pushed by the bidirectional message synchronization service;
when a data subscription request is received and a heartbeat detection result of a target data center is abnormal, acquiring a consumption position of the target data center from the backup data center according to the data subscription request, and resetting a message copy corresponding to the backup data center according to the consumption position to obtain target subscription data.
2. The data center disaster recovery method according to claim 1, wherein the starting of the bidirectional message synchronization service for two preset data centers and the creation of the theme message and the message copy corresponding to each preset data center for each preset data center are performed, and the two preset data centers include a target data center and a backup data center, and the method includes:
starting two-way message synchronization service for two preset data centers through a preset instruction, wherein the two preset data centers comprise a target data center and a backup data center;
configuring a first access address for the target data center and configuring a second access address for the backup data center;
calling a message middleware cluster interface of a target data center based on the first access address to create a subject message and a message copy corresponding to the target data center, wherein the message copy corresponding to the target data center is used for synchronously storing the subject message corresponding to the backup data center;
and calling a message middleware cluster interface of a backup data center based on the second access address to create the theme message and a message copy corresponding to the backup data center, wherein the message copy corresponding to the backup data center is used for synchronously storing the theme message corresponding to the target data center.
3. The data center disaster recovery method according to claim 1, wherein the updating the subject message to the two-way message synchronization service, and performing monitoring and data synchronization processing on the target data center and the backup data center through the two-way message synchronization service according to the subject message, where the subject message has a corresponding unique identification value, includes:
adding the subject message to a white list of a two-way message synchronization service, and setting a corresponding unique identification value for the subject message, wherein the unique identification value is used for indicating that access flow limitation is performed on a message middleware cluster of each preset data center;
the target data center and the standby data center are respectively connected through the bidirectional message synchronization service, the subject message in the target data center is pushed to the message copy corresponding to the standby data center, and the subject message in the standby data center is pushed to the message copy corresponding to the target data center;
and acquiring the consumption position of the theme message from the target data center, and pushing the consumption position of the theme message to the configuration theme of the standby data center, wherein the initial value of the consumption position of the theme message is 0.
4. The data center disaster recovery method according to claim 1, wherein when a data pushing request is received and a heartbeat detection result of a target data center is abnormal, the target subject data is obtained and cached from the data pushing request, the target subject data is pushed to a subject message of a backup data center according to the unique identification value, and when a fault of the target data center is recovered, data is pushed to a message copy corresponding to each preset data center through the bidirectional message synchronization service, including:
when a data pushing request is received and a heartbeat detection result of a target data center is abnormal, analyzing the data pushing request to obtain target subject data, and storing the target subject data into a memory database to obtain cached subject data;
connecting the backup data center to obtain a connection result, and pushing the cached theme data to the theme message of the backup data center according to the unique identification value when the connection result is successful;
detecting the target data center through a preset heartbeat detection task, connecting the target data center through the two-way message synchronization service when the target data center is recovered from a fault, and synchronizing the cached subject data to the subject message of the target data center;
and pushing the theme message of the target data center to a message copy corresponding to the backup data center, and pushing the theme message of the backup data center to a message copy corresponding to the target data center.
5. The data center disaster recovery method according to claim 3, wherein when a data subscription request is received and a heartbeat detection result of a target data center is abnormal, acquiring a consumption position of the target data center from the backup data center according to the data subscription request, and resetting a message copy corresponding to the backup data center according to the consumption position to obtain target subscription data, the method comprising:
when a data subscription request is received and a heartbeat detection result of a target data center is abnormal, analyzing the data subscription request to obtain a unique identification value of a subject message;
subscribing the theme message of the backup data center and the message copy corresponding to the backup data center according to the unique identification value of the theme message;
and reading the consumption position of the target data center from the configuration theme of the standby data center, setting a data reading initial value for the theme message of the target data center according to the consumption position, and extracting target subscription data according to the data reading initial value.
6. The data center disaster recovery method according to any one of claims 1 to 5, wherein before the starting of the bidirectional message synchronization service for two preset data centers and the creation of the theme message and the message copy corresponding to each preset data center for each preset data center, respectively, the data center disaster recovery method further comprises:
respectively sending socket connection requests to each preset data center through a preset heartbeat detection task, and establishing socket long connection, wherein the socket long connection is used for indicating that information pushing is respectively carried out on each preset data center;
and respectively sending heartbeat packets to each preset data center according to a preset frequency so as to perform heartbeat detection, and obtaining a heartbeat detection result, wherein the heartbeat detection result is used for indicating whether each preset data center has abnormal connection.
7. The data center disaster recovery method according to any one of claims 1 to 5, wherein when a data subscription request is received and a heartbeat detection result of a target data center is abnormal, the data center disaster recovery method further includes, after acquiring a consumption location of the target data center from the backup data center according to the data subscription request and resetting a message copy corresponding to the backup data center according to the consumption location to obtain target subscription data:
performing data persistence processing on the theme message of each preset data center and the message copy corresponding to each preset data center, and performing statistical analysis on the abnormal quantity of heartbeat detection of each preset data center within a preset time length;
when the heartbeat detection abnormal quantity of each preset data center is larger than a preset threshold value, warning information is generated and is pushed to a target terminal, so that the target terminal prompts target personnel to investigate the failed preset data center according to the warning information.
8. A data center disaster recovery apparatus, wherein the data center disaster recovery apparatus comprises:
the system comprises a creating module, a sending module and a receiving module, wherein the creating module is used for starting two-way message synchronization service for two preset data centers, and respectively creating a theme message and a message copy corresponding to each preset data center for each preset data center, and the two preset data centers comprise a target data center and a backup data center;
the updating module is used for updating the subject message to the two-way message synchronization service, monitoring and data synchronization processing are carried out on the target data center and the backup data center through the two-way message synchronization service according to the subject message, and the subject message has a corresponding unique identification value;
the pushing module is used for acquiring and caching target subject data from the data pushing request when the data pushing request is received and a heartbeat detection result of a target data center is abnormal, pushing the target subject data to a subject message of a backup data center according to the unique identification value, and pushing data to a message copy corresponding to each preset data center through the bidirectional message synchronization service when the target data center is recovered;
and the subscription module is used for acquiring the consumption position of the target data center from the backup data center according to the data subscription request and resetting the message copy corresponding to the backup data center according to the consumption position to obtain the target subscription data when the data subscription request is received and the heartbeat detection result of the target data center is abnormal.
9. A data center disaster recovery device, wherein the data center disaster recovery device comprises: a memory and at least one processor, the memory having instructions stored therein;
the at least one processor invokes the instructions in the memory to cause the data center disaster recovery device to perform the data center disaster recovery method according to any one of claims 1 to 7.
10. A computer-readable storage medium having instructions stored thereon, wherein the instructions, when executed by a processor, implement the data center disaster recovery method according to any one of claims 1 to 7.
CN202011396543.1A 2020-12-03 2020-12-03 Disaster recovery method, device, equipment and storage medium for data center Active CN112506702B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011396543.1A CN112506702B (en) 2020-12-03 2020-12-03 Disaster recovery method, device, equipment and storage medium for data center

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011396543.1A CN112506702B (en) 2020-12-03 2020-12-03 Disaster recovery method, device, equipment and storage medium for data center

Publications (2)

Publication Number Publication Date
CN112506702A true CN112506702A (en) 2021-03-16
CN112506702B CN112506702B (en) 2024-02-23

Family

ID=74968582

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011396543.1A Active CN112506702B (en) 2020-12-03 2020-12-03 Disaster recovery method, device, equipment and storage medium for data center

Country Status (1)

Country Link
CN (1) CN112506702B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115103011A (en) * 2022-06-24 2022-09-23 北京奥星贝斯科技有限公司 Cross-data-center service processing method, device and equipment
CN115174682A (en) * 2022-06-17 2022-10-11 中国银联股份有限公司 Data distribution method, system, center, device and computer readable storage medium
CN115269235A (en) * 2022-09-28 2022-11-01 深圳华锐分布式技术股份有限公司 Message carrying method, device, equipment and medium based on components of different versions
CN116361038A (en) * 2023-06-02 2023-06-30 山东浪潮科学研究院有限公司 Acceleration computing management method, system, equipment and storage medium
CN116962160A (en) * 2023-09-21 2023-10-27 北京华鲲振宇智能科技有限责任公司 Control method, system, equipment and medium for standby server

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101118509A (en) * 2007-09-12 2008-02-06 华为技术有限公司 Process, device and system for EMS memory data-base remote disaster tolerance
CN101686244A (en) * 2008-09-23 2010-03-31 阿里巴巴集团控股有限公司 Method and system for transmitting service information
CN108667635A (en) * 2017-03-27 2018-10-16 腾讯科技(深圳)有限公司 A kind of method, equipment and the system of disaster tolerance processing
CN110278109A (en) * 2019-05-21 2019-09-24 阿里巴巴集团控股有限公司 A kind of disaster recovery method and system
US20200319982A1 (en) * 2019-04-06 2020-10-08 Sap Se Notification mechanism for disaster recovery events
WO2020211373A1 (en) * 2019-04-19 2020-10-22 平安科技(深圳)有限公司 Heartbeat packet sending method and apparatus based on intermediate server, and computer device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101118509A (en) * 2007-09-12 2008-02-06 华为技术有限公司 Process, device and system for EMS memory data-base remote disaster tolerance
CN101686244A (en) * 2008-09-23 2010-03-31 阿里巴巴集团控股有限公司 Method and system for transmitting service information
CN108667635A (en) * 2017-03-27 2018-10-16 腾讯科技(深圳)有限公司 A kind of method, equipment and the system of disaster tolerance processing
US20200319982A1 (en) * 2019-04-06 2020-10-08 Sap Se Notification mechanism for disaster recovery events
WO2020211373A1 (en) * 2019-04-19 2020-10-22 平安科技(深圳)有限公司 Heartbeat packet sending method and apparatus based on intermediate server, and computer device
CN110278109A (en) * 2019-05-21 2019-09-24 阿里巴巴集团控股有限公司 A kind of disaster recovery method and system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174682A (en) * 2022-06-17 2022-10-11 中国银联股份有限公司 Data distribution method, system, center, device and computer readable storage medium
CN115103011A (en) * 2022-06-24 2022-09-23 北京奥星贝斯科技有限公司 Cross-data-center service processing method, device and equipment
CN115103011B (en) * 2022-06-24 2024-02-09 北京奥星贝斯科技有限公司 Cross-data center service processing method, device and equipment
CN115269235A (en) * 2022-09-28 2022-11-01 深圳华锐分布式技术股份有限公司 Message carrying method, device, equipment and medium based on components of different versions
CN115269235B (en) * 2022-09-28 2022-12-23 深圳华锐分布式技术股份有限公司 Message carrying method, device, equipment and medium based on components of different versions
CN116361038A (en) * 2023-06-02 2023-06-30 山东浪潮科学研究院有限公司 Acceleration computing management method, system, equipment and storage medium
CN116361038B (en) * 2023-06-02 2023-09-08 山东浪潮科学研究院有限公司 Acceleration computing management method, system, equipment and storage medium
CN116962160A (en) * 2023-09-21 2023-10-27 北京华鲲振宇智能科技有限责任公司 Control method, system, equipment and medium for standby server
CN116962160B (en) * 2023-09-21 2024-01-12 北京华鲲振宇智能科技有限责任公司 Control method, system, equipment and medium for standby server

Also Published As

Publication number Publication date
CN112506702B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
CN112506702B (en) Disaster recovery method, device, equipment and storage medium for data center
US10491671B2 (en) Method and apparatus for switching between servers in server cluster
CN106331098B (en) Server cluster system
CN108847982B (en) Distributed storage cluster and node fault switching method and device thereof
CN100426751C (en) Method for ensuring accordant configuration information in cluster system
CN106789306B (en) Method and system for detecting, collecting and recovering software fault of communication equipment
CN107124305A (en) node device operation method and node device
CN107888434B (en) Network equipment configuration synchronization method and device
CN110275793B (en) Detection method and equipment for MongoDB data fragment cluster
CN114064217B (en) OpenStack-based node virtual machine migration method and device
CN116781488A (en) Database high availability implementation method, device, database architecture, equipment and product
CN114554593A (en) Data processing method and device
CN108011783B (en) Backup method and backup system of diagnosis server
JP6421516B2 (en) Server device, redundant server system, information takeover program, and information takeover method
CN113190620A (en) Method, device, equipment and storage medium for synchronizing data between Redis clusters
CN116185697B (en) Container cluster management method, device and system, electronic equipment and storage medium
CN113765690A (en) Cluster switching method, system, device, terminal, server and storage medium
CN116737444A (en) Database server fault processing method and system
CN116264541A (en) Multi-dimension-based database disaster recovery method and device
CN114756410A (en) Data recovery method, device and medium for dual-computer hot standby system
CN111338848B (en) Failure application copy processing method and device, computer equipment and storage medium
CN114039848A (en) Method, device and equipment for realizing high availability of InCloudInsight management platform
CN110113395B (en) Shared file system maintenance method and device
CN114528350A (en) Cluster split brain processing method, device and equipment and readable storage medium
CN111488306A (en) Attack and defense architecture system and construction method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant