CN112015601B - Method and device for processing data of multiple data centers - Google Patents

Method and device for processing data of multiple data centers Download PDF

Info

Publication number
CN112015601B
CN112015601B CN202010776981.4A CN202010776981A CN112015601B CN 112015601 B CN112015601 B CN 112015601B CN 202010776981 A CN202010776981 A CN 202010776981A CN 112015601 B CN112015601 B CN 112015601B
Authority
CN
China
Prior art keywords
center
data center
data
service
main
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.)
Active
Application number
CN202010776981.4A
Other languages
Chinese (zh)
Other versions
CN112015601A (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.)
China Unionpay Co Ltd
Original Assignee
China Unionpay 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 China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN202010776981.4A priority Critical patent/CN112015601B/en
Publication of CN112015601A publication Critical patent/CN112015601A/en
Application granted granted Critical
Publication of CN112015601B publication Critical patent/CN112015601B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/202Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
    • G06F11/2023Failover techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a method and a device for processing data of a plurality of data centers, wherein the method comprises the steps that a first data center acquires center setting information and health status of the first data center when confirming that an automatic synchronization function is started, sends notification information to a second data center when confirming that the center setting information is a main center and the health status is a normal status, receives response information of the second data center, confirms whether the first data center is the main center according to stock authorization and/or priority of the second data center when confirming that the response information is the main center conflict response, and starts main center service to process data if the first data center is the main center. The data centers perform main center consensus with other data centers through own center setting information and health states, so that service data of a user is ensured to be acquired by one main center, and service data synchronization is performed to other auxiliary centers, and the problem of logic consistency of synchronous two ends of each center in complex scenes such as center switching is solved.

Description

Method and device for processing data of multiple data centers
Technical Field
The present invention relates to the field of data synchronization, and in particular, to a method and apparatus for data processing in a multi-data center.
Background
The multi-data center architecture is a common architecture for large-scale applications at present, and multi-center systems are arranged in multiple places to prevent the problem of high availability of the systems caused by unreliability of natural disasters and the like.
Currently, there are many methods for controlling the flow of liquid. When the data synchronization is carried out by the multi-data center, the synchronization function is realized mainly by implanting multi-center data synchronization logic into the application program. The sending end sends the data to be sent to the receiving end through the synchronous request, and the receiving end processes different synchronous requests according to different service requirements after receiving the data. The problem with this approach is that the sender and receiver use separate approaches, and lack unified processing capabilities for the synchronization function.
Disclosure of Invention
The embodiment of the invention provides a method and a device for processing data of multiple data centers, which are used for ensuring logic consistency of each data center in complex scenes such as center switching and the like.
In a first aspect, an embodiment of the present invention provides a method for processing data in a multi-data center, including:
the first data center acquires center setting information and health state of the first data center when confirming that an automatic synchronization function is started;
when the first data center determines that the center setting information is a main center and the health state is a normal state, sending notification information to a second data center, wherein the notification information comprises the first data center as the main center; the second data center is any data center except the first data center in the multiple data centers;
and the first data center receives the response information of the second data center, and when the response information is determined to be the main center conflict response, whether the first data center is the main center is determined according to the share authorization and/or the priority of the second data center, and if so, the main center service is started for data processing.
According to the technical scheme, the data centers perform main center consensus with other data centers through the center setting information and the health state of the data centers, so that the service data of a user is ensured to be acquired by one main center, and the service data is synchronized with other auxiliary centers, and therefore the problem of logic consistency of synchronous two ends of each center in complex scenes such as center switching is solved.
Optionally, the determining whether the first data center is a master center according to the share authorization and/or the priority of the second data center includes:
if the share authorization of the second data center is greater than that of the first data center, the first data center determines that the first data center is a secondary center;
if the share authorization of the second data center is smaller than that of the first data center, the first data center determines that the first data center is a main center;
if the share authorization of the second data center is the same as the share authorization of the second data center, the first data center determines whether the priority of the second data center is smaller than that of the second data center, if yes, the first data center is determined to be a main center, and if not, the first data center is determined to be a secondary center.
According to the technical scheme, the share authorization and the priority of each data center are compared, so that which data center is the main center can be determined.
Optionally, the stock authority of each data center is determined by the health status of the subsystem associated with each data center and the duration of service provided by each data center.
Optionally, the method further comprises:
and when the first data center determines that the center setting information is a main center and the health state is a downtime state or the center setting information is a secondary center, setting the center setting information of the first data center as the secondary center, and starting secondary center service to perform data processing.
Optionally, the method further comprises:
and when the first data center determines that the response information is a confirmation response, enabling a main center service to perform data processing.
Optionally, the method further comprises:
and if the first data center is determined to be the auxiliary center according to the stock authorization and/or the priority of the second data center, the first data center sets the center setting information of the first data center as the auxiliary center, and the auxiliary center service is started to perform data processing.
Optionally, after the first data center enables the secondary center service, the method further includes:
the first data center receives a synchronous task of a third data center, wherein the synchronous task comprises synchronous data of each service customized by a user; the third data center is a main center;
and the first data center synchronizes the synchronous data and feeds back a synchronous result to the third data center.
Optionally, after the first data center enables the main center service to perform data processing, the method further includes:
the first data center acquires synchronous data of each service customized by a user;
the first data center sends the customized synchronous data of each service to the second data center; so that the second data center executes a synchronization task according to the customized synchronization data of each service;
and the first data center receives the synchronous result of the second data center and confirms the synchronous result.
Optionally, the method further comprises:
and when the first data center determines that the synchronization result of the second data center is the synchronization failure, the first data center resends the customized synchronization data of each service to the second data center until the times of determining that the synchronization result fed back by the second data center is the synchronization failure exceeds a preset threshold or is manually interfered.
In a second aspect, an embodiment of the present invention provides an apparatus for data processing in a multi-data center, including:
the acquisition unit is used for acquiring the center setting information and the health state of the user at the current moment when the automatic synchronization function is confirmed to be started;
the processing unit is used for sending notification information to the second data center when the center setting information is determined to be the main center and the health state is determined to be the normal state, wherein the notification information comprises the first data center as the main center; the second data center is any data center except the first data center in the multiple data centers; and receiving response information of the second data center, and when the response information is determined to be a main center conflict response, determining whether the first data center is a main center according to the share authorization and/or the priority of the second data center, if so, starting a main center service to perform data processing.
Optionally, the processing unit is specifically configured to:
if the share authorization of the second data center is greater than that of the first data center, determining that the first data center is a secondary center;
if the share authorization of the second data center is smaller than that of the first data center, determining that the first data center is a main center;
if the share authorization of the second data center is the same as the share authorization of the second data center, determining whether the priority of the second data center is smaller than that of the second data center, if so, determining that the first data center is a main center, otherwise, determining that the first data center is a secondary center.
Optionally, the stock authority of each data center is determined by the health status of the subsystem associated with each data center and the duration of service provided by each data center.
Optionally, the processing unit is further configured to:
and when the center setting information is determined to be a main center and the health state is a downtime state or the center setting information is determined to be an auxiliary center, setting the center setting information of the first data center as the auxiliary center, and starting auxiliary center service to perform data processing.
Optionally, the processing unit is further configured to:
and when the response information is determined to be a confirmation response, enabling the main center service to conduct data processing.
Optionally, the processing unit is further configured to:
and if the first data center is determined to be the auxiliary center according to the stock authorization and/or the priority of the second data center, setting the center setting information of the first data center as the auxiliary center, and starting auxiliary center service to perform data processing.
Optionally, the processing unit is further configured to:
after the auxiliary center service is started, receiving a synchronous task of a third data center, wherein the synchronous task comprises synchronous data of each service customized by a user; the third data center is a main center;
and synchronizing the synchronous data and feeding back a synchronization result to the third data center.
Optionally, the processing unit is further configured to:
after the main center service is started to process data, synchronous data of each service customized by a user are obtained;
transmitting the customized synchronous data of each service to the second data center; so that the second data center executes a synchronization task according to the customized synchronization data of each service;
and receiving the synchronization result of the second data center and confirming.
Optionally, the processing unit is further configured to:
and when the synchronization result of the second data center is determined to be failed in synchronization, the customized synchronization data of each service is sent to the second data center again until the number of times of the synchronization result fed back by the second data center is determined to be failed in synchronization exceeds a preset threshold or is manually interfered.
In a third aspect, embodiments of the present invention also provide a computing device, comprising:
a memory for storing program instructions;
and the processor is used for calling the program instructions stored in the memory and executing the method for processing the data of the multi-data center according to the obtained program.
In a fourth aspect, embodiments of the present invention further provide a computer-readable nonvolatile storage medium, including computer-readable instructions, which when read and executed by a computer, cause the computer to perform the above-described method for data processing in a multi-data center.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a data center according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a data packet format according to an embodiment of the present invention;
FIG. 4 is a flow chart of a method for data processing in a multi-data center according to an embodiment of the present invention;
FIG. 5 is a flow chart of a method for data processing in a multi-data center according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a device for data processing in a multi-data center according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a system architecture according to an embodiment of the present invention. As shown in fig. 1, the system architecture may include n data centers 100. The n data centers 100 may communicate with each other through a network.
The structure of each data center 100 may include a multi-center link management module 101, a multi-center status management module 102, a multi-center synchronous spin module 103, a service data customization processing module 104, and a synchronous task monitoring and redo module 105, as shown in fig. 2.
Multi-center link management module 101: and maintaining a connection link among the centers, and sending a main center synchronous request to the auxiliary center and feeding back the processing result of the auxiliary center to the main center.
The multi-center state management module 102: and maintaining the central state of each center, wherein in the multi-center architecture, any fixed service only has one main center, and other centers are auxiliary centers. The module is responsible for maintaining the uniqueness of the main center, ensuring the uniqueness of the main center in scenes such as downtime, drilling and the like and the consensus of each center to the main center.
The multi-center synchronous spin module 103 is a core module of each data center. Each data center has the same multi-center synchronous spin module, and the module takes the judging result of the multi-center state management module 102 on the main center and the auxiliary center as input, and automatically selects and switches the responsibilities of the data center in multi-center synchronization.
The service data customizing and processing module 104 is responsible for organizing and constructing service data to be synchronized when the main center receives the synchronization trigger request, and distinguishing the data synchronization process of different services after the auxiliary center receives the synchronization request. The independent module design solves the problem of expansion of service data and processing on synchronous service functions, namely, different services can complete corresponding data synchronization only by customizing respective personalized data synchronous contents and processing modes in the module. The format of the data packets synchronized by each data center may be as shown in fig. 3.
Assume that there are four centers in Shanghai, beijing, huangshan, guizhou. The four centers are all in a working state, shanghai is the main center, and Beijing, huangshan and Guizhou are auxiliary centers. And when the operation staff performs the service operation A in the Shanghai center, the data of the A function are packaged and sent to each auxiliary center through the service data customizing module. After receiving the synchronous request, the secondary center analyzes and synchronizes the data packet sent by the primary center according to the requirement of the A module.
The synchronous task monitoring and redoing module 105 is responsible for monitoring the synchronous task of the main center and timely redoing the task with synchronous failure so as to ensure the availability of multiple centers. And is also responsible for maintaining the decision and handling of invalid tasks generated during the hub handoff process.
It should be noted that the structures shown in fig. 1, 2 and 3 are only examples, and the embodiment of the present invention is not limited thereto.
Based on the above description, fig. 4 shows in detail a flow of a method for data processing in a multi-data center according to an embodiment of the present invention, where the flow may be executed by an apparatus for data processing in the multi-data center.
As shown in fig. 4, the process specifically includes:
in step 401, the first data center acquires the center setting information and the health status of the first data center at the current moment when the automatic synchronization function is confirmed to be started.
Each data center is provided with center setting information and health status, the first data center is a data center which is started with an automatic synchronization function currently, and after the first data center starts with the automatic synchronization function, local settings can be scanned to acquire the center setting information and health status of the first data center at the current moment. The center setting information may include two kinds of information, namely a main center or a secondary center, and the health state may include a normal state and a downtime state.
In step 402, the first data center sends notification information to the second data center when it is determined that the center setting information is a main center and the health status is a normal status.
When it is determined that the center setting information is the main center and the health state is the normal state, notification information may be transmitted to the second data center. The notification information includes information about the primary center of the first data center. For informing the second data center that the first data center is the master center at the current time. And the second data center is any one of the data centers except the first data center.
Step 403, the first data center receives the response information of the second data center, and when determining that the response information is a main center conflict response, determines whether the first data center is a main center according to the share authorization and/or the priority of the second data center, if yes, starts the main center service to perform data processing.
And after receiving the notification information of the first data center, the second data center performs consensus confirmation, if the second data center is a secondary center, the sent response information is a confirmation response, and if the second data center is a primary center, the sent response information is a primary center conflict response. Therefore, it is possible to determine whether there is a problem of the primary center conflict at present by judging the response information.
When the first data center determines that the response information is a confirmation response, the main center service can be directly started to process data.
When the first data center determines that the response information is a confirmation primary center conflict response, whether the first data center is the primary center or not needs to be determined according to the share authorization and/or the priority of the second data center, specifically, the judgment can be performed in the following ways:
mode one
If the share authorization of the second data center is greater than the share authorization of the first data center, the first data center determines that the first data center is a secondary center.
Mode two
If the share authorization of the second data center is smaller than the share authorization of the first data center, the first data center determines that the first data center is the main center.
Mode three
If the share authorization of the second data center is the same as the share authorization of the second data center, the first data center determines whether the priority of the second data center is smaller than that of the second data center, if so, the first data center is determined to be a main center, and otherwise, the first data center is determined to be a secondary center.
It should be noted that, in the embodiment of the present invention, the share authorization of each data center is determined by the health status of the subsystem associated with each data center and the duration of service provided by each data center.
For example, when a data center is forcedly set as a main center through a manual interactive interface, the share authority of the data center is forcedly set to 100%.
When the associated subsystem of the data center fails, the share authorization is reduced by 50%; in contrast, the associated subsystem resumes a 50% increase in share authorization.
It may also be determined from the product of the ratio of the total duration service time by the duration of the service time and the threshold. The threshold may be empirically set, for example, at 50%. If the service time is continuously provided by 4 centers and is respectively 10, 20, 30 and 40, the obtained stock rights are respectively 5%, 10%, 15% and 20%.
In addition, when the first data center determines that the center setting information is a main center and the health state is a downtime state or the center setting information is a sub-center, the center setting information of the first data center may be set as the sub-center, and the sub-center service may be started to perform data processing.
When the first data center is determined to be the auxiliary center according to the share authorization and/or the priority of the second data center, the center setting information of the first data center can be set as the auxiliary center, and the auxiliary center service is started to perform data processing.
After the secondary center service is started, the first data center may receive a synchronization task of a third data center, which is the primary center. And then synchronizing the synchronous data and feeding back a synchronous result to the third data center.
After the main center service is started, the first data center can acquire the synchronous data of each service customized by the user, and then the synchronous data of each customized service is sent to the second data center; so that the second data center performs the synchronization task according to the customized synchronization data of each service. And finally, receiving the synchronization result of the second data center and confirming.
It should be noted that, in the embodiment of the present invention, a synchronization task monitoring and redoing mechanism is also provided, where when the first data center determines that the synchronization result of the second data center is a synchronization failure, the first data center resends the customized synchronization data of each service to the second data center until it is determined that the number of times of the synchronization result fed back by the second data center exceeds a preset threshold or is manually interfered. The preset threshold may be empirically set. Wherein, the manual intervention refers to that a worker decides whether the synchronous task is finished or not, namely, an instruction of stopping the synchronous task of the worker is received.
In order to better explain the flow of data processing of multiple data centers provided by the embodiment of the present invention, the workflow of data processing of multiple data centers will be described below in a specific implementation scenario.
In connection with the structure of the data center shown in fig. 2, the workflow shown in fig. 5 is as follows: it is evident that the entire workflow is presented to perform a different workflow with the middle black dashed line as an axis switch due to the design on the spin structure.
The multi-center state management module 102 confirms the states of the data center and other data centers and agrees with the states of all the data centers; according to the state of the data center, confirming the role of the data center in the synchronization of the multiple data centers, namely, the data center is used as a main center or a secondary center; and when the current data center is judged to be the main center, executing the following steps 3, 4 and 8, customizing the synchronous data of each service after receiving the trigger, sending the synchronous data to the auxiliary center, and finally summarizing and confirming the synchronous results of a plurality of data centers. When the current data center is judged to be the auxiliary center, the follow-up steps are executed 5, 6 and 7, namely, the synchronous request is received, the processing is started, and the feedback of the result is processed. In addition, the sync task monitoring and redo module 105 is responsible for reinitiating and continuing to monitor execution of failed tasks until a time limit or manual intervention is exceeded when a failed sync task is found, independent of both flows.
In the embodiment of the invention, when the first data center confirms that the automatic synchronization function is started, the center setting information and the health state of the first data center are acquired at the current moment, when the center setting information is determined to be a main center and the health state is a normal state, notification information is sent to the second data center, response information of the second data center is received, when the response information is determined to be a main center conflict response, whether the first data center is the main center is determined according to stock authorization and/or priority of the second data center, and if yes, the main center service is started for data processing. The data centers perform main center consensus with other data centers through own center setting information and health states, so that service data of a user is ensured to be acquired by one main center, and service data synchronization is performed to other auxiliary centers, and the problem of logic consistency of synchronous two ends of each center in complex scenes such as center switching is solved.
Based on the same technical concept, fig. 6 illustrates an exemplary structure of an apparatus for data processing of a multi-data center, which may perform a flow of data processing of the multi-data center, according to an embodiment of the present invention.
As shown in fig. 6, the apparatus specifically includes:
an obtaining unit 601, configured to obtain center setting information and a health state of the user at the current moment when the automatic synchronization function is confirmed to be enabled;
a processing unit 602, configured to send notification information to a second data center when it is determined that the center setting information is a primary center and the health status is a normal status, where the notification information includes a first data center as a primary center; the second data center is any data center except the first data center in the multiple data centers; and receiving response information of the second data center, and when the response information is determined to be a main center conflict response, determining whether the first data center is a main center according to the share authorization and/or the priority of the second data center, if so, starting a main center service to perform data processing.
Optionally, the processing unit 602 is specifically configured to:
if the share authorization of the second data center is greater than that of the first data center, determining that the first data center is a secondary center;
if the share authorization of the second data center is smaller than that of the first data center, determining that the first data center is a main center;
if the share authorization of the second data center is the same as the share authorization of the second data center, determining whether the priority of the second data center is smaller than that of the second data center, if so, determining that the first data center is a main center, otherwise, determining that the first data center is a secondary center.
Optionally, the stock authority of each data center is determined by the health status of the subsystem associated with each data center and the duration of service provided by each data center.
Optionally, the processing unit 602 is further configured to:
and when the center setting information is determined to be a main center and the health state is a downtime state or the center setting information is determined to be an auxiliary center, setting the center setting information of the first data center as the auxiliary center, and starting auxiliary center service to perform data processing.
Optionally, the processing unit 602 is further configured to:
and when the response information is determined to be a confirmation response, enabling the main center service to conduct data processing.
Optionally, the processing unit 602 is further configured to:
and if the first data center is determined to be the auxiliary center according to the stock authorization and/or the priority of the second data center, setting the center setting information of the first data center as the auxiliary center, and starting auxiliary center service to perform data processing.
Optionally, the processing unit 602 is further configured to:
after the auxiliary center service is started, receiving a synchronous task of a third data center, wherein the synchronous task comprises synchronous data of each service customized by a user; the third data center is a main center;
and synchronizing the synchronous data and feeding back a synchronization result to the third data center.
Optionally, the processing unit 602 is further configured to:
after the main center service is started to process data, synchronous data of each service customized by a user are obtained;
transmitting the customized synchronous data of each service to the second data center; so that the second data center executes a synchronization task according to the customized synchronization data of each service;
and receiving the synchronization result of the second data center and confirming.
Optionally, the processing unit 602 is further configured to:
and when the synchronization result of the second data center is determined to be failed in synchronization, the customized synchronization data of each service is sent to the second data center again until the number of times of the synchronization result fed back by the second data center is determined to be failed in synchronization exceeds a preset threshold or is manually interfered.
Based on the same technical concept, the embodiment of the invention further provides a computing device, which comprises:
a memory for storing program instructions;
and the processor is used for calling the program instructions stored in the memory and executing the method for processing the data of the multi-data center according to the obtained program.
Based on the same technical concept, the embodiment of the invention also provides a computer readable nonvolatile storage medium, which comprises computer readable instructions, wherein when the computer reads and executes the computer readable instructions, the computer executes the method for processing the data of the multiple data centers.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (20)

1. A method of data processing in a multi-data center, comprising:
the first data center acquires center setting information and health state of the first data center when confirming that an automatic synchronization function is started;
when the first data center determines that the center setting information is a main center and the health state is a normal state, sending notification information to a second data center, wherein the notification information comprises the first data center as the main center; the second data center is any data center except the first data center in the multiple data centers;
the first data center receives the response information of the second data center, when the response information is determined to be a main center conflict response, whether the first data center is a main center is determined according to the share authorization and/or the priority of the second data center, and if yes, main center service is started for data processing; wherein the stock authority of the second data center is determined by a health status of a subsystem associated with the second data center and a duration of service provided by the second data center.
2. The method of claim 1, wherein the determining whether the first data center is a primary center based on the share authorization and/or priority of the second data center comprises:
if the share authorization of the second data center is greater than that of the first data center, the first data center determines that the first data center is a secondary center;
if the share authorization of the second data center is smaller than that of the first data center, the first data center determines that the first data center is a main center;
if the share authorization of the second data center is the same as the share authorization of the second data center, the first data center determines whether the priority of the second data center is smaller than that of the second data center, if yes, the first data center is determined to be a main center, and if not, the first data center is determined to be a secondary center.
3. The method of claim 1, wherein the share authorization of each data center is determined by a health status of a subsystem associated with each data center and a duration of service provided by each data center.
4. The method of claim 1, wherein the method further comprises:
and when the first data center determines that the center setting information is a main center and the health state is a downtime state or the center setting information is a secondary center, setting the center setting information of the first data center as the secondary center, and starting secondary center service to perform data processing.
5. The method of claim 1, wherein the method further comprises:
and when the first data center determines that the response information is a confirmation response, enabling a main center service to perform data processing.
6. The method of claim 1, wherein the method further comprises:
and if the first data center is determined to be the auxiliary center according to the stock authorization and/or the priority of the second data center, the first data center sets the center setting information of the first data center as the auxiliary center, and the auxiliary center service is started to perform data processing.
7. The method of claim 6, further comprising, after the first data center enables secondary center services:
the first data center receives a synchronous task of a third data center, wherein the synchronous task comprises synchronous data of each service customized by a user; the third data center is a main center;
and the first data center synchronizes the synchronous data and feeds back a synchronous result to the third data center.
8. The method of any of claims 1 to 7, further comprising, after the first data center enables a primary center service for data processing:
the first data center acquires synchronous data of each service customized by a user;
the first data center sends the customized synchronous data of each service to the second data center; so that the second data center executes a synchronization task according to the customized synchronization data of each service;
and the first data center receives the synchronous result of the second data center and confirms the synchronous result.
9. The method of claim 8, wherein the method further comprises:
and when the first data center determines that the synchronization result of the second data center is the synchronization failure, the first data center resends the customized synchronization data of each service to the second data center until the times of determining that the synchronization result fed back by the second data center is the synchronization failure exceeds a preset threshold or is manually interfered.
10. An apparatus for data processing in a multi-data center, comprising:
the acquisition unit is used for acquiring the center setting information and the health state of the user at the current moment when the automatic synchronization function is confirmed to be started;
the processing unit is used for sending notification information to the second data center when the center setting information is determined to be the main center and the health state is determined to be the normal state, wherein the notification information comprises the first data center as the main center; the second data center is any data center except the first data center in the multiple data centers; receiving response information of the second data center, and when the response information is determined to be a main center conflict response, determining whether the first data center is a main center according to share authorization and/or priority of the second data center, if so, starting main center service to perform data processing; wherein the stock authority of the second data center is determined by a health status of a subsystem associated with the second data center and a duration of service provided by the second data center.
11. The apparatus of claim 10, wherein the processing unit is specifically configured to:
if the share authorization of the second data center is greater than that of the first data center, determining that the first data center is a secondary center;
if the share authorization of the second data center is smaller than that of the first data center, determining that the first data center is a main center;
if the share authorization of the second data center is the same as the share authorization of the second data center, determining whether the priority of the second data center is smaller than that of the second data center, if so, determining that the first data center is a main center, otherwise, determining that the first data center is a secondary center.
12. The apparatus of claim 10, wherein the share authorization for each data center is determined by a health status of a subsystem associated with each data center and a duration of service provided by each data center.
13. The apparatus of claim 10, wherein the processing unit is further to:
and when the center setting information is determined to be a main center and the health state is a downtime state or the center setting information is determined to be an auxiliary center, setting the center setting information of the first data center as the auxiliary center, and starting auxiliary center service to perform data processing.
14. The apparatus of claim 10, wherein the processing unit is further to:
and when the response information is determined to be a confirmation response, enabling the main center service to conduct data processing.
15. The apparatus of claim 10, wherein the processing unit is further to:
and if the first data center is determined to be the auxiliary center according to the stock authorization and/or the priority of the second data center, setting the center setting information of the first data center as the auxiliary center, and starting auxiliary center service to perform data processing.
16. The apparatus of claim 15, wherein the processing unit is further to:
after the auxiliary center service is started, receiving a synchronous task of a third data center, wherein the synchronous task comprises synchronous data of each service customized by a user; the third data center is a main center;
and synchronizing the synchronous data and feeding back a synchronization result to the third data center.
17. The apparatus of any one of claims 10 to 16, wherein the processing unit is further configured to:
after the main center service is started to process data, synchronous data of each service customized by a user are obtained;
transmitting the customized synchronous data of each service to the second data center; so that the second data center executes a synchronization task according to the customized synchronization data of each service;
and receiving the synchronization result of the second data center and confirming.
18. The apparatus of claim 17, wherein the processing unit is further to:
and when the synchronization result of the second data center is determined to be failed in synchronization, the customized synchronization data of each service is sent to the second data center again until the number of times of the synchronization result fed back by the second data center is determined to be failed in synchronization exceeds a preset threshold or is manually interfered.
19. A computing device, comprising:
a memory for storing program instructions;
a processor for invoking program instructions stored in said memory to perform the method of any of claims 1 to 9 in accordance with the obtained program.
20. A computer readable non-transitory storage medium comprising computer readable instructions which, when read and executed by a computer, cause the computer to perform the method of any of claims 1 to 9.
CN202010776981.4A 2020-08-05 2020-08-05 Method and device for processing data of multiple data centers Active CN112015601B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010776981.4A CN112015601B (en) 2020-08-05 2020-08-05 Method and device for processing data of multiple data centers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010776981.4A CN112015601B (en) 2020-08-05 2020-08-05 Method and device for processing data of multiple data centers

Publications (2)

Publication Number Publication Date
CN112015601A CN112015601A (en) 2020-12-01
CN112015601B true CN112015601B (en) 2023-08-08

Family

ID=73499214

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010776981.4A Active CN112015601B (en) 2020-08-05 2020-08-05 Method and device for processing data of multiple data centers

Country Status (1)

Country Link
CN (1) CN112015601B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104794028A (en) * 2014-01-16 2015-07-22 中国移动通信集团浙江有限公司 Disaster tolerance processing method and device, main data center and backup data center
CN109560903A (en) * 2019-02-14 2019-04-02 湖南智领通信科技有限公司 A kind of vehicle-mounted command communications system of complete disaster tolerance
CN109995554A (en) * 2017-12-29 2019-07-09 中国移动通信集团吉林有限公司 The control method and cloud dispatch control device of multi-stage data center active-standby switch
CN110557413A (en) * 2018-05-30 2019-12-10 中国人民财产保险股份有限公司 Business service system and method for providing business service
CN111147567A (en) * 2019-12-23 2020-05-12 中国银联股份有限公司 Service calling method, device, equipment and medium
CN111459724A (en) * 2020-03-06 2020-07-28 中国人民财产保险股份有限公司 Node switching method, device, equipment and computer readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8291036B2 (en) * 2009-03-16 2012-10-16 Microsoft Corporation Datacenter synchronization
US8938521B2 (en) * 2012-08-29 2015-01-20 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Bi-directional synchronization enabling active-active redundancy for load-balancing switches
US9971660B2 (en) * 2014-09-12 2018-05-15 Vmware, Inc. Virtual machine network loss detection and recovery for high availability
US9846624B2 (en) * 2014-09-26 2017-12-19 Microsoft Technology Licensing, Llc Fast single-master failover

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104794028A (en) * 2014-01-16 2015-07-22 中国移动通信集团浙江有限公司 Disaster tolerance processing method and device, main data center and backup data center
CN109995554A (en) * 2017-12-29 2019-07-09 中国移动通信集团吉林有限公司 The control method and cloud dispatch control device of multi-stage data center active-standby switch
CN110557413A (en) * 2018-05-30 2019-12-10 中国人民财产保险股份有限公司 Business service system and method for providing business service
CN109560903A (en) * 2019-02-14 2019-04-02 湖南智领通信科技有限公司 A kind of vehicle-mounted command communications system of complete disaster tolerance
CN111147567A (en) * 2019-12-23 2020-05-12 中国银联股份有限公司 Service calling method, device, equipment and medium
CN111459724A (en) * 2020-03-06 2020-07-28 中国人民财产保险股份有限公司 Node switching method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN112015601A (en) 2020-12-01

Similar Documents

Publication Publication Date Title
CN107465767B (en) Data synchronization method and system
CN102377686B (en) Message subscription system, method and device
CN112104720B (en) MQTT double-Broker data interaction method and system suitable for edge internet of things terminal
CN112272291B (en) Video storage method, device, management equipment and readable storage medium
CN104092774A (en) Software defined network connection establishment control method and device
CN105487413A (en) Main/standby control system and main/standby switching method of urban railway transit
CN105701159A (en) Data synchronization device and method
CN111654384A (en) Main/standby switching method, BRAS (broadband remote Access Server) equipment and storage medium
CN107948063B (en) Method for establishing aggregation link and access equipment
CN109298981A (en) Method of data synchronization, system between a kind of PCIE dual redundant chip
CN110912805B (en) Message reading state synchronization method, terminal, server and system
CN112015601B (en) Method and device for processing data of multiple data centers
CN114285695A (en) Communication method, device, equipment, system and storage medium
CN110958139B (en) Network control method, orchestrator, controller, and computer-readable storage medium
CN108667640B (en) Communication method and device, and network access system
CN114884805B (en) Data transmission method, device, terminal and storage medium
CN104793896B (en) Single the dual control switching method and device of a kind of dual control equipment
CN102377478A (en) Information processing device, communication system, and information processing method
JP6091333B2 (en) Network management apparatus and network management method
CN106255960A (en) Redundant system and communication unit
CN107968718B (en) Method, device and equipment for confirming main standby state
CN114726711A (en) Method and system for cooperative processing service between devices
CN115640096A (en) Application management method and device based on kubernets and storage medium
CN105591776A (en) Method and device for main and standby link switching in SDN (Software Defined Network) device
CN115134220B (en) Master-slave server switching method and device, computing equipment and storage medium

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