Business data synchronization method and device based on different-place multi-activity and server

By constructing a replication backlog buffer and a multi-active buffer in the data center, and using identification parameters to automatically synchronize data, the problem of high cost and low efficiency in remote multi-active data synchronization in the existing technology is solved, and efficient and reliable data synchronization is achieved. .

CN118760720AActive Publication Date: 2024-10-11INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410535400.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-30
Publication Date
2024-10-11
Estimated Expiration
2044-04-30

AI Technical Summary

Technical Problem

Existing methods need to introduce additional synchronization components when synchronizing business data between multi-active data centers in remote locations, which increases deployment costs and affects efficiency and reliability.

Method used

Adopt a business data synchronization method based on remote multi-active, use preset construction rules to build a copy backlog buffer and a multi-active input/output buffer in the data center, automatically distinguish the synchronization type, and use the identification parameters in the copy backlog buffer Efficiently synchronize data.

Benefits of technology

There is no need to introduce additional synchronization components, which reduces deployment costs, improves the efficiency and reliability of business data synchronization, and is suitable for complex big data synchronization scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760720A_ABST
    Figure CN118760720A_ABST
Patent Text Reader

Abstract

The invention provides a service data synchronization method and device based on remote multi-activity and a server, and is applied to the technical field of big data. Based on the method, deployment of a first master cache service node and a first slave cache service node can be completed in advance according to a preset construction rule and a preset processing rule. When a target business data synchronization request is received, determining a synchronization type of business data; according to the synchronization type of the service data, distinguishing different conditions, and extracting required identification information from the target service data synchronization request; according to the identification information, determining to-be-synchronized target service data by querying and utilizing a cache service data group of a copy backlog buffer area in a current time period; and completing the synchronization of the target business data by using the corresponding output buffer area. Therefore, the method can be well suitable for complex big data synchronization scenes related to remote multi-activity synchronization, different situations can be automatically distinguished, and related service data synchronization can be efficiently and accurately achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data technology, and in particular to a method, device and server for synchronizing business data based on multi-site active-active. Background Art

[0002] In the financial business field, in order to efficiently process massive transaction business data and better serve users, most trading platforms will deploy corresponding data centers in multiple different regions. Then, through the data centers in different regions, they will provide corresponding services for the massive transaction business data accessed by the trading platform at the same time and complete the consistency synchronization of related transaction business data.

[0003] However, based on the existing methods, when synchronizing transaction business data of data centers in different regions, it is often necessary to introduce additional synchronization components between data centers in different regions. When the above method is implemented, on the one hand, it will increase the deployment cost, and on the other hand, it will also affect the efficiency and reliability of synchronization of transaction business data between data centers.

[0004] To address the above problems, no effective solution has been proposed yet. Summary of the invention

[0005] The present specification provides a business data synchronization method, device and server based on remote multi-active, which can be well applied to big data synchronization scenarios involving more complex remote multi-active synchronization, and can automatically distinguish different situations and efficiently and accurately synchronize related business data; at the same time, since there is no need to introduce additional synchronization components, it can also effectively reduce deployment costs and improve the reliability of business data synchronization.

[0006] The present specification provides a business data synchronization method based on multi-active in different locations, which is applied to a first server node, wherein the first server node is deployed in a data center in a first region and is connected to a first master cache service node and a first slave cache service node; wherein the first master cache service node at least includes a replication backlog buffer constructed based on a preset construction rule, a slave node output buffer corresponding to the first slave cache service node, and a multi-active input buffer and a multi-active output buffer corresponding to data centers in other regions, and the method includes:

[0007] Receive and respond to the target business data synchronization request, and determine the synchronization type of the business data;

[0008] According to the preset synchronization rule, when it is determined that the synchronization type of the business data is remote multi-active synchronization, at least the node identifier of the first primary cache service node of the synchronization target end, the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end, and the node identifier of the second primary cache service node of the synchronization initiator are extracted from the target business data synchronization request; wherein the second primary cache service node is deployed in a data center of the second area, and the data center of the second area is also deployed with a corresponding second secondary cache service node;

[0009] Detect whether the node identifier of the first primary cache service node of the synchronization target end matches or passes;

[0010] When it is determined that the node identifier of the first primary cache service node of the synchronization target end matches, it is detected whether there is a business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end in the replication backlog buffer; wherein the replication backlog buffer stores a cache business data group of the current time period obtained by processing based on a preset processing rule;

[0011] In the case where it is determined that there is a business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end in the replication backlog buffer, the target business data to be synchronized to the data center of the second area is determined from the cached business data group of the current time period according to the node identifier of the first primary cache service node of the synchronization target end and the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end;

[0012] The target business data is synchronized to the second primary cache service node of the data center of the second area through the multi-active output buffer corresponding to the data center of the second area.

[0013] In one embodiment, after detecting whether the node identifier of the first primary cache service node of the synchronization target end matches or not, the method further includes:

[0014] When it is determined that the node identifier of the first primary cache service node of the synchronization target end fails to match, a first type of full synchronization process is started, the first business database is traversed, and business data whose business processing identifier is greater than the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end is queried and obtained as the target business data;

[0015] Writing the target business data into a target relational database file;

[0016] The target relational database file is synchronized to the second primary cache service node of the data center of the second region through the multi-active output buffer corresponding to the data center of the second region.

[0017] In one embodiment, when it is determined that the synchronization type of the service data is remote multi-active synchronization, the method further includes:

[0018] Detecting whether the target service data synchronization request carries a service processing identifier of existing service data associated with the second primary cache service node of the synchronization initiator;

[0019] In the case where it is determined that the target business data synchronization request carries a business processing identifier of existing business data associated with the second primary cache service node of the synchronization initiator, extracting the business processing identifier of the existing business data associated with the second primary cache service node of the synchronization initiator from the target business data synchronization request;

[0020] Detecting whether there is a service processing identifier of existing service data associated with the second primary cache service node of the synchronization initiator in the replication backlog buffer;

[0021] When it is determined that there is no business processing identifier of existing business data associated with the second primary cache service node of the synchronization initiator in the replication backlog buffer, a second type of full synchronization process is started, the first business database is traversed, and business data whose business processing identifier is greater than the business processing identifier of existing business data associated with the second primary cache service node of the synchronization initiator is queried and obtained as the target business data.

[0022] In one embodiment, after determining the synchronization type of the service data, the method further includes:

[0023] According to the preset synchronization rules, when it is determined that the synchronization type of the business data is local slave node synchronization, the node identifier of the first primary cache service node of the synchronization target end and the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end are extracted from the target business data synchronization request;

[0024] Detect whether the node identifier of the first primary cache service node of the synchronization target end matches or passes;

[0025] When it is determined that the node identifier of the first primary cache service node of the synchronization target end matches, detecting whether there is a business processing identifier of existing business data associated with the first primary cache service node of the synchronization target end in the replication backlog buffer;

[0026] In the case where it is determined that there is a business processing identifier of existing business data associated with the first primary cache service node of the synchronization target end in the replication backlog buffer, the target business data to be synchronized to the first secondary cache service node is determined from the cache business data group of the current time period according to the node identifier of the first primary cache service node of the synchronization target end and the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end;

[0027] The target business data is synchronized to the first slave cache service node through the slave node output buffer corresponding to the first slave cache service node for synchronous backup.

[0028] In one embodiment, after detecting whether the node identifier of the first primary cache service node of the synchronization target end matches or not, the method further includes:

[0029] When it is determined that the node identifier of the first primary cache service node of the synchronization target end fails to match, a third type of full synchronization process is started, the first business database is traversed, and business data whose business processing identifier is greater than the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end is queried and obtained as the target business data;

[0030] Writing the target business data into a target relational database file;

[0031] The target relational database file is synchronized to the first slave cache service node through the slave node output buffer corresponding to the first slave cache service node for synchronous backup.

[0032] In one embodiment, the method further comprises:

[0033] Acquire initial service data of data center access in the first region;

[0034] Determine the data type of the initial business data;

[0035] Determine an identification parameter for the initial business data according to a preset processing rule and the data type of the initial business data; and mark the initial business data using the identification parameter to obtain marked business data;

[0036] According to the preset processing rules, the marked business data is stored in the cached business data group of the current time period of the replication backlog buffer in the form of a node command.

[0037] In one embodiment, the data types include: a first type and a second type;

[0038] Among them, the first type is business data that has completed business processing in a data center in the first area; the second type is business data that has completed business processing in data centers in other areas except the data center in the first area.

[0039] In one embodiment, determining the data type of the initial service data includes:

[0040] Detect whether the initial service data carries the node identifier of the primary cache service node;

[0041] When it is determined that the initial service data carries the node identifier of the primary cache service node, extracting the node identifier of the primary cache service node;

[0042] Detecting whether a difference value between the node identifier of the primary cache service node and the first primary cache service node identifier is less than or equal to a preset first difference threshold;

[0043] When it is determined that the difference value between the node identifier of the primary cache service node and the first primary cache service node identifier is less than or equal to a preset first difference threshold, the data type of the initial service data is determined to be the first type.

[0044] In one embodiment, determining the identification parameter for the initial service data according to a preset processing rule and the data type of the initial service data includes:

[0045] When the data type of the initial service data is the first type, the node identifier of the first primary cache service node is used as the node identifier of the primary cache service node of the initial service data;

[0046] Query and use the processing number when the initial business data is processed as the business processing identifier of the initial business data;

[0047] Query and generate a timestamp identifier of the initial business data according to the receiving time of the initial business data.

[0048] In one embodiment, determining the identification parameter for the initial service data according to the preset processing rule and the data type of the initial service data further includes:

[0049] When the data type of the initial service data is the second type, retaining the node identifier of the primary cache service node and the service processing identifier carried by the initial service data;

[0050] Query and generate a timestamp identifier of the initial business data according to the receiving time of the initial business data;

[0051] Generate a multi-active node synchronization tag for the initial business data.

[0052] In one embodiment, after storing the marked service data in the form of a node command into the cached service data group of the current time period of the replication backlog buffer, the method further includes:

[0053] In the hash table of the replication backlog buffer, the identification parameter associated with the business data after the mark is updated.

[0054] The present specification provides a business data synchronization device based on multi-active in different locations, which is applied to a first server node, wherein the first server node is deployed in a data center in a first region and is connected to a first master cache service node and a first slave cache service node; wherein the first master cache service node at least includes a replication backlog buffer constructed based on a preset construction rule, a slave node output buffer corresponding to the first slave cache service node, and a multi-active input buffer and a multi-active output buffer corresponding to data centers in other regions, including:

[0055] A classification module is used to receive and respond to a target business data synchronization request and determine the synchronization type of the business data;

[0056] An extraction module is used to extract at least a node identifier of a first primary cache service node of a synchronization target end, a business processing identifier of existing business data associated with the first primary cache service node of the synchronization target end, and a node identifier of a second primary cache service node of a synchronization initiator end from a target business data synchronization request according to a preset synchronization rule and when determining that the synchronization type of the business data is remote multi-active synchronization; wherein the second primary cache service node is deployed in a data center of a second region, and a corresponding second secondary cache service node is also deployed in the data center of the second region;

[0057] A first detection module is used to detect whether the node identifier of the first primary cache service node of the synchronization target end matches or passes;

[0058] A second detection module is used to detect whether there is a business processing identifier of existing business data associated with the first primary cache service node of the synchronization target end in the replication backlog buffer when it is determined that the node identifier of the first primary cache service node of the synchronization target end matches; wherein the replication backlog buffer stores a cache business data group of the current time period obtained by processing based on a preset processing rule;

[0059] a determination module, configured to determine, when it is determined that there is a business processing identifier of existing business data associated with the first primary cache service node of the synchronization target end in the replication backlog buffer, target business data to be synchronized to the data center of the second area from the cache business data group of the current time period according to the node identifier of the first primary cache service node of the synchronization target end and the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end;

[0060] The synchronization module is used to synchronize the target business data to the second primary cache service node of the data center of the second area through the multi-active output buffer corresponding to the data center of the second area.

[0061] The present specification provides a server, including a processor and a memory for storing processor executable instructions, and the processor implements the relevant steps of the business data synchronization method based on multi-site active-active when executing the instructions.

[0062] The present specification provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the relevant steps of the business data synchronization method based on multi-site active-active.

[0063] The present specification provides a computer program product, comprising a computer program, which, when executed by a processor, implements the relevant steps of the business data synchronization method based on multi-site active-active.

[0064] Based on the business data synchronization method, device and server based on multi-active in different places provided in this specification, before specific implementation, according to the preset construction rules, the existing functions, structures and advantageous characteristics of the preset cache service can be fully utilized to respectively construct corresponding replication backlog buffers, slave node output buffers corresponding to the slave cache service nodes, and multi-active input buffers, multi-active output buffers, etc. corresponding to the data centers in other regions in the main cache service nodes of the data centers in each region, and complete the relevant deployment of the main cache service nodes and the slave cache service nodes; at the same time, according to the preset processing rules, the business data accessed by the data center can be processed, the identification parameters for the business data can be obtained, and the business data can be marked with the identification parameters and stored in the cache business data group of the current time period of the replication backlog buffer. In specific implementation, after receiving the target business data synchronization request, the synchronization type of the business data can be determined according to the preset synchronization rules; then, according to the synchronization type of the business data, different situations can be distinguished, and the required identification information can be extracted from the target business data synchronization request; and according to the above identification information, the target business data to be synchronized can be efficiently determined by querying and using the cache business data group of the current time period of the replication backlog buffer; and then the synchronization of the target business data can be completed by using the corresponding output buffer. This makes it better suited for complex big data synchronization scenarios involving multi-active synchronization in different locations, automatically distinguishing and efficiently and accurately synchronizing related business data for different situations. At the same time, since there is no need to introduce additional synchronization components, it can also effectively reduce deployment costs and improve the reliability of business data synchronization. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the embodiments of this specification, the drawings required for use in the embodiments will be briefly introduced below. The drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0066] Figure 1 It is a flowchart of a business data synchronization method based on remote multi-active provided by an embodiment of this specification;

[0067] Figure 2 It is a schematic diagram of an embodiment of a business data synchronization method based on multi-active in different locations provided by an embodiment of this specification, in a scenario example;

[0068] Figure 3 It is a schematic diagram of an embodiment of a business data synchronization method based on multi-active in different locations provided by an embodiment of this specification, in a scenario example;

[0069] Figure 4It is a schematic diagram of an embodiment of a business data synchronization method based on multi-active in different locations provided by an embodiment of this specification, in a scenario example;

[0070] Figure 5 It is a schematic diagram of an embodiment of a business data synchronization method based on multi-active in different locations provided by an embodiment of this specification, in a scenario example;

[0071] Figure 6 It is a schematic diagram of an embodiment of a business data synchronization method based on multi-active in different locations provided by an embodiment of this specification, in a scenario example;

[0072] Figure 7 It is a schematic diagram of an embodiment of a business data synchronization method based on multi-active in different locations provided by an embodiment of this specification, in a scenario example;

[0073] Figure 8 It is a schematic diagram of the structure of a server provided by an embodiment of this specification;

[0074] Fig. 9 It is a schematic diagram of the structure of a service data synchronization device based on remote multi-active provided by an embodiment of this specification;

[0075] Fig.10 It is a schematic diagram of an embodiment of a business data synchronization method based on multi-active in different locations provided by an embodiment of this specification, in a scenario example;

[0076] Fig.11 It is a schematic diagram of an embodiment of a business data synchronization method based on multi-active in different locations provided by an embodiment of this specification, in a scenario example;

[0077] Fig.12 It is a schematic diagram of an embodiment of a business data synchronization method based on multi-active in different locations provided by an embodiment of this specification, in a scenario example;

[0078] Fig.13 It is a schematic diagram of an embodiment of a business data synchronization method based on multi-active in different locations provided by an embodiment of this specification, in a scenario example;

[0079] Fig.14 It is a schematic diagram of an embodiment of a business data synchronization method based on multi-site active-active provided by an embodiment of this specification, in a scenario example. DETAILED DESCRIPTION

[0080] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0081] It should be noted that the user-related information and data involved in the embodiments of this specification are all information and data authorized by the user or fully authorized by relevant parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users or relevant parties to choose to authorize or refuse.

[0082] It should also be noted that in the embodiments of this specification, certain software, components, models and other existing solutions in the industry may be mentioned. They should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.

[0083] See also Figure 1 As shown, the embodiment of this specification provides a business data synchronization method based on multi-site active-active. Among them, the method can be specifically applied to the first server node side. Figure 2 As shown, the first server node is deployed in a data center of a first region and is connected to a first master cache service node and a first slave cache service node; wherein the first master cache service node at least includes a replication backlog buffer constructed based on a preset construction rule, a slave node output buffer corresponding to the first slave cache service node, and a multi-active input buffer and a multi-active output buffer corresponding to data centers in other regions. When the method is implemented specifically, it may include the following contents:

[0084] S101: receiving and responding to a target business data synchronization request, and determining a synchronization type of the business data;

[0085] S102: According to a preset synchronization rule, when it is determined that the synchronization type of the business data is remote multi-active synchronization, at least a node identifier (e.g., serverId) of a first primary cache service node of a synchronization target end, a business processing identifier (e.g., optId) of existing business data associated with the first primary cache service node of the synchronization target end, and a node identifier (e.g., pserverId) of a second primary cache service node of a synchronization initiator are extracted from a target business data synchronization request; wherein the second primary cache service node is deployed in a data center of a second region, and a corresponding second secondary cache service node is also deployed in the data center of the second region;

[0086] S103: Detect whether the node identifier of the first primary cache service node of the synchronization target end matches or not;

[0087] S104: When it is determined that the node identifier of the first primary cache service node of the synchronization target end matches, detecting whether there is a business processing identifier of existing business data associated with the first primary cache service node of the synchronization target end in the replication backlog buffer; wherein the replication backlog buffer stores a cache business data group of the current time period obtained by processing based on a preset processing rule;

[0088] S105: when it is determined that the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end exists in the replication backlog buffer, the target business data to be synchronized to the data center of the second area is determined from the cache business data group of the current time period according to the node identifier of the first primary cache service node of the synchronization target end and the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end;

[0089] S106: Synchronize the target business data to the second primary cache service node of the data center of the second region through the multi-active output buffer corresponding to the data center of the second region.

[0090] Among them, the above-mentioned multi-site active-active can refer to deploying independent data centers in different regions. Different data centers in multiple regions provide services for related business processing at the same time and automatically complete the consistency synchronization of related business data.

[0091] The first server node may be deployed with a preset cache service. Correspondingly, the first master cache service node and the first slave cache service node may be a master cache node and a slave cache node based on the preset cache service.

[0092] Specifically, for example, the cache service may be a Redis-based cache service.

[0093] The above-mentioned Redis (Remote Dictionary Server) can specifically refer to a high-performance key-value database. Correspondingly, the above-mentioned first master cache service node can specifically be recorded as the first Redis master node, and the above-mentioned first slave cache service node can specifically be recorded as the first Redis slave node (or the first Redis standby node).

[0094] Based on the above embodiments, the existing functions and structures of the preset cache service deployed on the first server node can be fully utilized. Without the need to introduce additional synchronization components, it is better suitable for more complex big data synchronization scenarios involving multi-active synchronization in different locations. It can automatically distinguish different situations and efficiently and accurately synchronize related business data.

[0095] In some embodiments, the above-mentioned business data synchronization method based on remote multi-active can be specifically applied to the first service node. The first server node is deployed in the data center of the first region and can be specifically used to access and process transaction business data initiated by the trading platform in the first region and within the jurisdiction of the first region.

[0096] Before implementation, please refer to Figure 2 As shown, according to the preset construction rules, the first master cache service node and the first slave cache service node can be transformed respectively by using the existing functions and structures of the preset cache service, so as to obtain the first master cache service node and the first slave cache service node after transformation suitable for the big data synchronization scenario involving complex multi-active synchronization in different locations. Among them, the preset construction rules can specifically be rules generated according to the existing functions and structures of the preset cache service and the performance characteristics of the preset cache service.

[0097] For details, see Figure 2 As shown, according to the preset construction rules, corresponding replication backlog buffers, slave node output buffers corresponding to the first slave cache service node (also referred to as Slave output buffers), and multi-active input buffers and multi-active output buffers corresponding to data centers in other regions (for example, multi-active input buffers corresponding to the data center in the second region, multi-active input buffers corresponding to the data center in the third region, etc., also referred to as Peer output buffers), etc. can be constructed in the main cache negative nodes of the data center in the first region respectively.

[0098] Specifically, the first master cache service node can be connected to the first slave cache service node through the slave node output buffer. The first master cache service node can be connected to the master cache service nodes of data centers in other corresponding regions through the multi-active input buffer and the multi-active output buffer.

[0099] Among them, the above-mentioned replication backlog buffer is used to temporarily cache the business data that is accessed and completed by the data center in the first area in the current time period (which can be simply referred to as the first type of business data), and the business data that is accessed and completed by the data centers in other areas and obtained by the data center in the first area through synchronization with the data centers in other areas (which can be simply referred to as the second type of business data).

[0100] Specifically, in the above-mentioned replication backlog buffer, according to preset processing rules, business data marked with corresponding identification parameters can be stored in the cached business data group of the current time period of the replication backlog buffer in the form of node commands (for example, cmd commands).

[0101] The first master cache service node may also include a command processing module. Accordingly, the first server node may call the command processing module to execute the relevant node command in the cache service data group of the current time period of the copy backlog buffer to synchronize the corresponding service data in the copy backlog buffer to the first slave cache service node and / or data centers in other regions.

[0102] The multi-active input buffer is used to receive and cache business data synchronized from the corresponding data center in other regions. The multi-active output buffer is used to cache and synchronize relevant business data to the corresponding data center in other regions. The slave node output buffer is used to cache and synchronize relevant business data to the first slave cache service node.

[0103] Furthermore, according to the preset construction rules, the first primary cache service node may also include: a client input buffer and a client output buffer. The client input buffer is used to receive and cache business data (e.g., transaction business data) initiated by a client (which may be denoted as Client). The client output buffer is used to cache and feedback the business data processing results responded by the client.

[0104] In addition, the first main cache service node is also connected to the first service database of the data center of the first region via the command processing module. Accordingly, the first server node can also call the command processing module to execute the relevant node command in the cache service data group of the current time period of the copy backlog buffer to synchronize and update the corresponding service data in the copy backlog buffer to the first service database.

[0105] According to the preset construction rules, the first slave cache service node may also be deployed with a corresponding slave node input buffer and a command processing module. The slave node input buffer is used to receive and cache the business data synchronized from the first master cache service node. The command processing module then synchronizes and updates the business data in the slave node input buffer to the first backup data file maintained by the first slave cache service node.

[0106] Similar to the data center in the first area, similar server nodes, primary cache service nodes, and secondary cache service nodes are deployed in other data centers in other areas according to preset construction rules.

[0107] In this way, without the need to introduce other synchronization components, the existing functions and structures of the preset cache service can be used to build a business data synchronization network system that can reliably connect different data centers in different regions. Subsequently, the business data synchronization processing of multiple active and remote locations can be realized based on the above business data synchronization network system.

[0108] In this embodiment, the server node may specifically include a background server applied to one side of the data processing system, capable of realizing functions such as data transmission and data processing. Specifically, the server node may be, for example, an electronic device having data calculation, storage and network interaction functions. Alternatively, the server node may also be a software program running in the electronic device to provide support for data processing, storage and network interaction. In this embodiment, the number of servers included in the server node is not specifically limited. The server node may specifically be one server, or several servers, or a server cluster formed by several servers.

[0109] In this embodiment, the client may specifically include a front end applied to the user side and capable of realizing functions such as data collection and data transmission. Specifically, the client may be, for example, an electronic device such as a desktop computer, a tablet computer, a laptop computer, a smart phone, etc. Alternatively, the client may also be a software application that can be run in the above electronic devices.

[0110] In some embodiments, the first slave cache service node, or the master cache service node of a data center in another region (for example, the second master cache service node deployed in a data center in the second region), may initiate a corresponding target business data synchronization request to the first server node when detecting that the business data synchronization trigger condition is met. The target business data synchronization request carries at least the IP address of the initiator.

[0111] The synchronization triggering conditions may specifically include at least one of the following: a failure in device hardware or software, a preset synchronization time interval, first connection to a synchronization network system, and the like.

[0112] Correspondingly, in a specific implementation, after receiving the target business data synchronization request, the first server node can first extract the IP address of the initiator; then compare the IP address of the initiator with its own IP address to obtain the corresponding address difference comparison result. According to the address difference comparison result, when it is determined that the address difference value between the two IP addresses is less than or equal to the preset address difference threshold, it is determined that the target business data synchronization request comes from the first slave cache service node, and then it can be determined that the synchronization type of the business data requested by the target business data synchronization request is local slave node synchronization. On the contrary, when it is determined that the address difference value between the two IP addresses is greater than the preset address difference threshold, it is determined that the target business data synchronization request comes from the master cache service node of other data centers in other regions, and then it can be determined that the synchronization type of the business data requested by the target business data synchronization request is remote multi-active synchronization.

[0113] In some embodiments, when it is determined that the synchronization type of the business data is remote multi-active synchronization, it is possible to further detect whether there is an identity credential associated with the synchronization initiator in the target business data synchronization request; when it is detected that there is an identity credential, the identity credential is further decrypted using the node key corresponding to the first primary cache service node according to a preset decryption algorithm to obtain a corresponding node identifier; the node identifier is then verified with the node identifier of the second primary cache service node of the synchronization initiator extracted based on the target business data synchronization request to determine whether the two node identifiers are consistent. If the two node identifiers are consistent, it is determined that the verification is passed. At this time, the synchronization request of the target business data can be responded to and subsequent data processing can be continued. On the contrary, if the two node identifiers are inconsistent, it is determined that the verification is not passed. At this time, it can be determined that the synchronization request of the target business data is highly likely to be forged and there is a security risk. In order to avoid the leakage of business data, the synchronization request of the target business data can be temporarily not responded; and according to the node identifier of the second primary cache service node of the synchronization initiator, an error prompt about the synchronization request of the target business data is sent to the second primary cache service node of the data center of the second area.

[0114] In some embodiments, see Figure 3 As shown, after detecting whether the node identifier of the first primary cache service node of the synchronization target end matches, the method may further include the following contents when it is specifically implemented:

[0115] S1: when it is determined that the node identifier of the first primary cache service node of the synchronization target end fails to match, start the first type of full synchronization process, traverse the first business database, query and obtain business data whose business processing identifier is greater than the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end as the target business data;

[0116] S2: writing the target business data into a target relational database file;

[0117] S3: Synchronize the target relational database file to the second primary cache service node of the data center of the second region through the multi-active output buffer corresponding to the data center of the second region.

[0118] Based on the above embodiment, for remote multi-active synchronization, according to the preset synchronization rules, when it is determined that the node identifier match of the first main cache service node of the synchronization target end fails, the first business database can be switched to complete the synchronization of relevant business data efficiently and accurately.

[0119] In some embodiments, when specifically detecting whether the node identifier of the first primary cache service node of the synchronization target end matches or not, it may include: first detecting whether the node identifier of the first primary cache service node of the synchronization target end obtained based on the target business data synchronization request is the same as the node identifier of the local first primary cache service node; if it is determined to be the same, further detecting whether the node identifier of the first primary cache service node of the synchronization target end exists in the cache business data group of the current time period of the replication backlog buffer, and if so, determining that the node identifier of the first primary cache service node of the synchronization target end matches or not. Otherwise, determining that the node identifier of the first primary cache service node of the synchronization target end does not match or not.

[0120] In some embodiments, when it is determined that the node identifier match of the first primary cache service node of the synchronization target end fails, it can be determined that the data center of the second area may be synchronizing business data with the data center of the first area for the first time; or, a long time has passed since the last business data synchronization between the data center of the second area and the data center of the first area, and in the current time period, the data center of the first area does not directly access and process business data. At this time, the first business database can be accessed and queried through the first type of full synchronization process to generate a corresponding target relationship data file (for example, an rdb file) to complete the synchronization of related business data.

[0121] In some embodiments, when it is determined that the synchronization type of the service data is remote multi-active synchronization, refer to Figure 4 As shown, when the method is implemented specifically, it may also include the following contents:

[0122] S1: Detect whether the target service data synchronization request carries a service processing identifier of existing service data associated with the second primary cache service node of the synchronization initiator;

[0123] S2: when it is determined that the target service data synchronization request carries the service processing identifier of the existing service data associated with the second primary cache service node of the synchronization initiator, extract the service processing identifier of the existing service data associated with the second primary cache service node of the synchronization initiator from the target service data synchronization request;

[0124] S3: Detect whether there is a business processing identifier of existing business data associated with the second primary cache service node of the synchronization initiator in the replication backlog buffer;

[0125] S4: When it is determined that there is no business processing identifier of the existing business data associated with the second primary cache service node of the synchronization initiator in the replication backlog buffer, start the second type of full synchronization process, traverse the first business database, query and obtain business data whose business processing identifier is greater than the business processing identifier of the existing business data associated with the second primary cache service node of the synchronization initiator, as the target business data.

[0126] Based on the above embodiment, according to the preset synchronization rules, the target business data to be synchronized can be accurately and completely determined by jointly using the replication backlog buffer and the first business database, so as to accurately complete the business data synchronization.

[0127] In some embodiments, after determining the synchronization type of the service data, refer to Figure 5 As shown, when the method is implemented specifically, it may also include the following contents:

[0128] S1: According to a preset synchronization rule, when it is determined that the synchronization type of the business data is local slave node synchronization, extracting from the target business data synchronization request the node identifier of the first primary cache service node of the synchronization target end and the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end;

[0129] S2: Detect whether the node identifier of the first primary cache service node of the synchronization target end matches or not;

[0130] S3: when it is determined that the node identifier of the first primary cache service node of the synchronization target end matches, detecting whether there is a business processing identifier of existing business data associated with the first primary cache service node of the synchronization target end in the replication backlog buffer;

[0131] S4: when it is determined that there is a business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end in the replication backlog buffer, determine the target business data to be synchronized to the first secondary cache service node from the cache business data group in the current time period according to the node identifier of the first primary cache service node of the synchronization target end and the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end;

[0132] S5: Synchronize the target business data to the first slave cache service node through the slave node output buffer corresponding to the first slave cache service node for synchronous backup.

[0133] Based on the above embodiment, for local slave node synchronization, the synchronization backup of relevant business data can be efficiently completed by using the replication backlog cache according to the preset synchronization rules.

[0134] In some embodiments, see Figure 6 As shown, after detecting whether the node identifier of the first primary cache service node of the synchronization target end matches, the method may further include:

[0135] S1: when it is determined that the node identifier of the first primary cache service node of the synchronization target end fails to match, start the third type of full synchronization process, traverse the first business database, query and obtain business data whose business processing identifier is greater than the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end as the target business data;

[0136] S2: writing the target business data into a target relational database file;

[0137] S3: Synchronize the target relational database file to the first slave cache service node through the slave node output buffer corresponding to the first slave cache service node for synchronous backup.

[0138] Based on the above embodiment, for local slave node synchronization, according to the preset synchronization rules, when it is determined that the node identifier match of the first main cache service node of the synchronization target end fails, the first business database can be switched to complete the synchronization of relevant business data efficiently and accurately.

[0139] Wherein, when it is determined that the node identification match of the first master cache service node of the synchronization target end fails, it can be determined that the first slave cache service node synchronizes business data with the first master cache service node for the first time; or, a long time has passed since the last time the first slave cache service node synchronized business data with the first master cache service node, and in the current time period, the data center of the first area does not directly access and process business data. At this time, the first business database can be accessed and queried through the first type of all synchronization processes to generate a corresponding target relationship data file (for example, an rdb file) to complete the synchronization of related business data.

[0140] In some embodiments, see Figure 7 As shown, when the method is implemented specifically, it may also include the following contents:

[0141] S1: Acquire initial service data of data center access in the first area;

[0142] S2: Determine the data type of the initial business data;

[0143] S3: determining an identification parameter for the initial business data according to a preset processing rule and the data type of the initial business data; and marking the initial business data using the identification parameter to obtain marked business data;

[0144] S4: According to a preset processing rule, the marked business data is stored in the cached business data group of the current time period of the replication backlog buffer in the form of a node command.

[0145] Based on the above embodiment, the newly accessed initial business data can be processed accordingly according to the preset processing rules to obtain the marked business data that meets the requirements; the marked business data is then stored in the cached business data group of the current time period of the replication backlog buffer in the form of a node command, so as to facilitate the subsequent efficient and accurate synchronization of business data with the first slave cache service node, and / or with data centers in other regions.

[0146] In some embodiments, according to the preset processing rules, the identification parameters generated for the initial business data may specifically include at least one of the following: the node identification of the primary cache service node (e.g., serverId), the business processing identification (e.g., optId), the timestamp identification (e.g., Timestamp), and the multi-active node synchronization tag (e.g., !!!). The multi-active node synchronization tag is used to indicate that the initial business data is business data synchronized after being directly accessed and processed by data centers in other regions.

[0147] In some embodiments, the data types may specifically include: a first type and a second type, etc.;

[0148] Among them, the first type is business data that has completed business processing in a data center in the first area; the second type is business data that has completed business processing in data centers in other areas except the data center in the first area.

[0149] Specifically, the first type mentioned above can also be understood as business data that is not synchronized from data centers in other regions. The second type mentioned above can also be understood as business data that is synchronized from data centers in other regions.

[0150] Based on the above embodiment, different types of business data can be distinguished so that the synchronization of related business data can be completed more precisely and specifically according to the holding of different types of business data by the main cache service node and the first slave cache service node of the data center in other areas.

[0151] In some embodiments, the above determination of the data type of the initial service data may include the following contents during specific implementation:

[0152] S1: Detect whether the initial service data carries the node identifier of the primary cache service node;

[0153] S2: when it is determined that the initial service data carries the node identifier of the primary cache service node, extract the node identifier of the primary cache service node;

[0154] S3: Detect whether the difference between the node identifier of the primary cache service node and the first primary cache service node identifier is less than or equal to a preset first difference threshold;

[0155] S4: When it is determined that the difference value between the node identifier of the primary cache service node and the first primary cache service node identifier is less than or equal to a preset first difference threshold, determine that the data type of the initial service data is the first type.

[0156] On the contrary, when it is determined that the difference value between the node identifier of the primary cache service node and the first primary cache service node identifier is greater than a preset first difference threshold, the data type of the initial service data is determined to be the second type.

[0157] Based on the above embodiment, the type of the initial business data can be automatically and accurately determined.

[0158] In some embodiments, the above-mentioned determining the identification parameter for the initial business data according to the preset processing rule and the data type of the initial business data may include the following contents during specific implementation:

[0159] S1: when the data type of the initial service data is the first type, the node identifier of the first primary cache service node is used as the node identifier of the primary cache service node of the initial service data;

[0160] S2: query and use the processing number when the initial business data is processed as the business processing identifier of the initial business data;

[0161] S3: Query and generate a timestamp identifier of the initial business data according to the receiving time of the initial business data.

[0162] Based on the above embodiment, for initial business data belonging to the first type, relevant identification parameters can be accurately determined according to preset processing rules, and then the initial business data can be marked according to the identification parameters to obtain marked business data that meets the requirements.

[0163] In some embodiments, the above-mentioned determination of the identification parameter for the initial business data according to the preset processing rule and the data type of the initial business data may also include the following contents during specific implementation:

[0164] S1: when the data type of the initial service data is the second type, retaining the node identifier of the primary cache service node and the service processing identifier carried by the initial service data;

[0165] S2: Query and generate a timestamp identifier of the initial service data according to the receiving time of the initial service data;

[0166] S3: Generate a multi-active node synchronization tag for the initial business data.

[0167] Based on the above embodiment, for initial business data belonging to the second type, relevant identification parameters can be accurately determined according to preset processing rules, and then the initial business data can be marked according to the identification parameters to obtain marked business data that meets the requirements.

[0168] In some embodiments, after the marked service data is stored in the cached service data group of the current time period of the replication backlog buffer in the form of a node command, the method may further include:

[0169] In the hash table of the replication backlog buffer, the identification parameter associated with the business data after the mark is updated.

[0170] Here, by analyzing a large number of historical business data synchronization requests, combined with specific business data synchronization requirements, it is found that data centers in other regions are more likely to synchronize the first type of business data that is directly accessed and processed by the data center in the first region. In contrast, for the first server node, the synchronization processing frequency of the first type of business data is much higher than that of the second type of business data.

[0171] Therefore, in order to further improve the synchronization efficiency of the first type of business data, the identification parameters of the first type of business data, such as the node identification of the main cache service node, the business processing identification, etc., can be synchronously stored in the corresponding hash table; and a mapping relationship between the identification parameters of the first type of business data in the hash table and the business data in the cache business data group of the current time period of the copy backlog buffer can be established.

[0172] Correspondingly, when the first type of business data needs to be synchronized, the synchronization of the relevant business data can be completed more efficiently and conveniently by querying the hash table.

[0173] Based on the above embodiments, the synchronization efficiency of the first type of business data can be further improved, thereby improving the overall business data synchronization efficiency.

[0174] In some embodiments, during specific implementation, the earliest marked business data in the cached business data group of the current time period of the copy backlog buffer can be overwritten with the newly generated marked business data at every preset time period or every accumulated specified business data volume, so as to update the cached business data group of the current time period. In this way, the limited cache resources of the copy buffer can be better utilized, and the business data that is more likely to be synchronized in the future can be cached as much as possible.

[0175] In some embodiments, during specific implementation, the first business database may be updated at intervals of a preset first time period by copying the cached business data group of the current time period in the backlog buffer, thereby achieving data synchronization of the first business database.

[0176] It is also possible to generate a corresponding AOF file by copying the cached business data group of the current time period in the backlog buffer at intervals of a preset second time period; and store the AOF file in the corresponding disk according to the time information as an index to achieve persistent storage, which is convenient for subsequent backtracking queries and disaster recovery.

[0177] In some embodiments, when the method is implemented, it may also include: detecting whether the business data synchronization trigger condition is currently met; when it is determined that the business data synchronization trigger condition is currently met, determining the data center that needs to be synchronized as the synchronization target end; obtaining the node identifier of the primary cache service node of the synchronization target end by querying the preset data center information list; at the same time, according to the node identifier of the primary cache service node of the synchronization target end, querying the cached business data group of the current time period in the replication backlog buffer, and determining the business processing identifier of the existing business data associated with the primary cache service node of the synchronization target end; and then generating a corresponding target business data synchronization request according to the node identifier of the primary cache service node of the synchronization target end and the business processing identifier of the existing business data associated with the primary cache service node of the synchronization target end; and then sending the target business data synchronization request to the server node of the synchronization target end to automatically synchronize the business data with the data center.

[0178] As can be seen from the above, the business data synchronization method based on multi-active in different locations provided by the embodiment of this specification can be fully utilized according to the preset construction rules before specific implementation. The advantages and characteristics of the relevant cache service can be fully utilized to respectively construct the corresponding replication backlog buffer, the slave node output buffer corresponding to the slave cache service node, and the multi-active input buffer and multi-active output buffer corresponding to the data center in other regions in the main cache service node of the data center in each region; at the same time, the accessed business data can be processed according to the preset processing rules, and the identification parameters for the business data can be obtained. After the business data is marked with the identification parameters, it is stored in the cache business data group of the current time period of the replication backlog buffer to complete the relevant deployment. In specific implementation, after receiving the target business data synchronization request, the synchronization type of the business data can be determined according to the preset synchronization rules; according to the synchronization type of the business data, different situations can be distinguished, and the required identification information can be extracted from the target business data synchronization request; then, according to the above identification information, by querying and using the cache business data group of the current time period in the replication backlog buffer, the target business data to be synchronized can be efficiently determined; and then the synchronization of the target business data is completed by using the corresponding output buffer. This makes it better suited for complex big data synchronization scenarios involving multi-site active-active synchronization, automatically distinguishing different situations and efficiently and accurately synchronizing related business data. At the same time, since there is no need to introduce additional synchronization components, it effectively reduces deployment costs and improves the reliability of business data synchronization.

[0179] See also Figure 8 As shown, the embodiment of this specification also provides a server, wherein the server includes a network communication port 801, a processor 802 and a memory 803, and the above structures are connected through internal cables so that each structure can perform specific data interaction.

[0180] The network communication port 801 may be specifically used to receive a target business data synchronization request.

[0181] The processor 802 can be specifically used to respond to a target business data synchronization request and determine the synchronization type of the business data; according to a preset synchronization rule, when it is determined that the synchronization type of the business data is remote multi-active synchronization, at least the node identifier of the first primary cache service node of the synchronization target end, the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end, and the node identifier of the second primary cache service node of the synchronization initiator are extracted from the target business data synchronization request; wherein the second primary cache service node is deployed in a data center in the second area, and a corresponding second secondary cache service node is also deployed in the data center in the second area; detect whether the node identifier of the first primary cache service node of the synchronization target end matches; and when it is determined that the node identifier of the first primary cache service node of the synchronization target end matches, detect the replication backlog. Whether there is a business processing identifier of existing business data associated with the first primary cache service node of the synchronization target end in the buffer; wherein the replication backlog buffer stores a cache business data group of the current time period obtained based on a preset processing rule; when it is determined that there is a business processing identifier of existing business data associated with the first primary cache service node of the synchronization target end in the replication backlog buffer, according to the node identifier of the first primary cache service node of the synchronization target end and the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end, determine the target business data to be synchronized to the data center of the second area from the cache business data group of the current time period; synchronize the target business data to the second primary cache service node of the data center of the second area through the multi-active output buffer corresponding to the data center of the second area.

[0182] The memory 803 may be specifically used to store corresponding instruction programs and intermediately generated target business data.

[0183] Based on the above algorithm, the relevant structural performance of the server can be effectively utilized, the data processing speed of electronic equipment can be improved, and data processing based on multi-site active-active business data synchronization can be efficiently realized.

[0184] In this embodiment, the network communication port 801 can be a virtual port that is bound to different communication protocols so that different data can be sent or received. For example, the network communication port can be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for email data communication. In addition, the network communication port can also be a physical communication interface or communication chip. For example, it can be a wireless mobile network communication chip, such as GSM, CDMA, etc.; it can also be a Wifi chip; it can also be a Bluetooth chip.

[0185] In this embodiment, the processor 802 may be implemented in any appropriate manner. For example, the processor may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc. This specification does not limit this.

[0186] In this embodiment, the memory 803 may include multiple levels. In a digital system, anything that can store binary data can be a memory; in an integrated circuit, a circuit with a storage function but no physical form is also called a memory, such as RAM, FIFO, etc.; in a system, a storage device with a physical form is also called a memory, such as a memory stick, TF card, etc.

[0187] The embodiment of the present specification also provides a computer-readable storage medium based on the above-mentioned business data synchronization method based on multi-active remote locations, wherein the computer-readable storage medium stores computer program instructions, which, when executed, implement: receiving and responding to a target business data synchronization request, and determining the synchronization type of the business data; according to a preset synchronization rule, when determining that the synchronization type of the business data is multi-active remote location synchronization, extracting at least the node identifier of the first primary cache service node of the synchronization target end, the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end, and the node identifier of the second primary cache service node of the synchronization initiator from the target business data synchronization request; wherein the second primary cache service node is deployed in a data center of a second region, and a corresponding second secondary cache service node is also deployed in the data center of the second region; detecting whether the node identifier of the first primary cache service node of the synchronization target end matches; and after determining When the node identifier of the first primary cache service node of the synchronization target end matches, it is detected whether there is a business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end in the replication backlog buffer; wherein the replication backlog buffer stores a cache business data group of the current time period obtained based on a preset processing rule; when it is determined that there is a business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end in the replication backlog buffer, the target business data to be synchronized to the data center of the second area is determined from the cache business data group of the current time period according to the node identifier of the first primary cache service node of the synchronization target end and the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end; the target business data is synchronized to the second primary cache service node of the data center of the second area through the multi-active output buffer corresponding to the data center of the second area.

[0188] In this embodiment, the storage medium includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a cache, a hard disk (HDD), or a memory card. The memory may be used to store computer program instructions. The network communication unit may be an interface for network connection communication set in accordance with the standard specified by the communication protocol.

[0189] In this embodiment, the functions and effects specifically implemented by the program instructions stored in the computer-readable storage medium can be explained in comparison with other implementations and will not be described in detail here.

[0190] The embodiments of the present specification also provide a computer program product, which at least includes a computer program, and when the computer program is executed by a processor, the following method steps are implemented: receiving and responding to a target business data synchronization request, and determining the synchronization type of the business data; according to a preset synchronization rule, when determining that the synchronization type of the business data is remote multi-active synchronization, extracting at least the node identifier of the first primary cache service node of the synchronization target end, the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end, and the node identifier of the second primary cache service node of the synchronization initiator from the target business data synchronization request; wherein the second primary cache service node is deployed in a data center of a second area, and a corresponding second secondary cache service node is also deployed in the data center of the second area; detecting whether the node identifier of the first primary cache service node of the synchronization target end matches; and when determining that the first primary cache service node of the synchronization target end matches the first primary cache service node of the synchronization target end, the node identifier of the second primary cache service node of the synchronization initiator is detected; When the node identifier of the node matches, it is detected whether there is a business processing identifier of the existing business data associated with the first main cache service node of the synchronization target end in the replication backlog buffer; wherein the replication backlog buffer stores the cache business data group of the current time period obtained based on the preset processing rules; when it is determined that there is a business processing identifier of the existing business data associated with the first main cache service node of the synchronization target end in the replication backlog buffer, the target business data to be synchronized to the data center of the second area is determined from the cache business data group of the current time period according to the node identifier of the first main cache service node of the synchronization target end and the business processing identifier of the existing business data associated with the first main cache service node of the synchronization target end; the target business data is synchronized to the second main cache service node of the data center of the second area through the multi-active output buffer corresponding to the data center of the second area.

[0191] See also Fig. 9 As shown, at the software level, the embodiment of the present specification also provides a business data synchronization device based on multi-active in different locations, which is applied to a first server node, and the first server node is deployed in a data center in a first region, and is connected to a first master cache service node and a first slave cache service node; wherein the first master cache service node at least includes a replication backlog buffer constructed based on a preset construction rule, a slave node output buffer corresponding to the first slave cache service node, and a multi-active input buffer and a multi-active output buffer corresponding to data centers in other regions, and may include:

[0192] The classification module 901 may be specifically configured to receive and respond to a target business data synchronization request and determine a synchronization type of the business data;

[0193] The extraction module 902 may be specifically configured to extract at least the node identifier of the first primary cache service node of the synchronization target end, the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end, and the node identifier of the second primary cache service node of the synchronization initiator end from the target business data synchronization request according to the preset synchronization rule, when it is determined that the synchronization type of the business data is remote multi-active synchronization; wherein the second primary cache service node is deployed in a data center of the second region, and a corresponding second secondary cache service node is also deployed in the data center of the second region;

[0194] The first detection module 903 may be specifically used to detect whether the node identifier of the first primary cache service node of the synchronization target end matches or passes;

[0195] The second detection module 904 may be specifically configured to detect whether there is a business processing identifier of existing business data associated with the first primary cache service node of the synchronization target end in the replication backlog buffer when it is determined that the node identifier of the first primary cache service node of the synchronization target end matches; wherein the replication backlog buffer stores a cache business data group of the current time period obtained by processing based on a preset processing rule;

[0196] The determination module 905 may be specifically used to determine the target business data to be synchronized to the data center of the second area from the cached business data group in the current time period according to the node identifier of the first primary cache service node of the synchronization target end and the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end when it is determined that the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end exists in the replication backlog buffer;

[0197] The synchronization module 906 may be specifically configured to synchronize the target business data to the second primary cache service node of the data center of the second region through the multi-active output buffer corresponding to the data center of the second region.

[0198] In some embodiments, after detecting whether the node identifier of the first primary cache service node of the synchronization target end matches or not, when the device is specifically implemented, it can also be used to: when it is determined that the node identifier of the first primary cache service node of the synchronization target end does not match or not, start a first type of full synchronization process, traverse the first business database, query and obtain business data whose business processing identifier is greater than the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end as the target business data; write the target business data into a target relational database file; synchronize the target relational database file to the second primary cache service node in the data center of the second area through a multi-active output buffer corresponding to the data center of the second area.

[0199] In some embodiments, when it is determined that the synchronization type of business data is off-site multi-active synchronization, the device can also be used, when implemented, to: detect whether the target business data synchronization request carries a business processing identifier of existing business data associated with the second primary cache service node of the synchronization initiator; when it is determined that the target business data synchronization request carries a business processing identifier of existing business data associated with the second primary cache service node of the synchronization initiator, extract the business processing identifier of the existing business data associated with the second primary cache service node of the synchronization initiator from the target business data synchronization request; detect whether there is a business processing identifier of existing business data associated with the second primary cache service node of the synchronization initiator in the replication backlog buffer; when it is determined that there is no business processing identifier of existing business data associated with the second primary cache service node of the synchronization initiator in the replication backlog buffer, start a second type of full synchronization process, traverse the first business database, query and obtain business data whose business processing identifier is greater than the business processing identifier of existing business data associated with the second primary cache service node of the synchronization initiator as the target business data.

[0200] In some embodiments, after determining the synchronization type of the business data, when the device is specifically implemented, it can also be used to: according to a preset synchronization rule, when determining that the synchronization type of the business data is local slave node synchronization, extract from the target business data synchronization request the node identifier of the first primary cache service node of the synchronization target end and the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end; detect whether the node identifier of the first primary cache service node of the synchronization target end matches; and when determining that the node identifier of the first primary cache service node of the synchronization target end matches, detect whether there is a business processing identifier of the existing business data associated with the synchronization target end in the replication backlog buffer. the business processing identifier of the existing business data associated with the first master cache service node of the synchronization target end; when it is determined that the business processing identifier of the existing business data associated with the first master cache service node of the synchronization target end exists in the replication backlog buffer, according to the node identifier of the first master cache service node of the synchronization target end, and the business processing identifier of the existing business data associated with the first master cache service node of the synchronization target end, determine the target business data to be synchronized to the first slave cache service node from the cache business data group of the current time period; synchronize the target business data to the first slave cache service node through the slave node output buffer corresponding to the first slave cache service node for synchronization backup.

[0201] In some embodiments, after detecting whether the node identifier of the first primary cache service node of the synchronization target end matches or not, when the device is specifically implemented, it can also be used to: when it is determined that the node identifier of the first primary cache service node of the synchronization target end does not match or not, start a third type of full synchronization process, traverse the first business database, query and obtain business data whose business processing identifier is greater than the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end as the target business data; write the target business data into a target relational database file; synchronize the target relational database file to the first slave cache service node through the slave node output buffer corresponding to the first slave cache service node for synchronization backup.

[0202] In some embodiments, when the device is implemented, it can also be used to: obtain initial business data accessed by a data center in a first area; determine the data type of the initial business data; determine an identification parameter for the initial business data based on a preset processing rule and the data type of the initial business data; and use the identification parameter to mark the initial business data to obtain marked business data; according to the preset processing rule, store the marked business data in the form of a node command into the cached business data group of the current time period of the replication backlog buffer.

[0203] In some embodiments, the data types may specifically include: a first type and a second type, etc.;

[0204] Among them, the first type is business data that has completed business processing in a data center in the first area; the second type is business data that has completed business processing in data centers in other areas except the data center in the first area.

[0205] In some embodiments, the device can specifically determine the data type of the initial business data in the following manner: detect whether the initial business data carries the node identifier of the primary cache service node; if it is determined that the initial business data carries the node identifier of the primary cache service node, extract the node identifier of the primary cache service node; detect whether the difference value between the node identifier of the primary cache service node and the first primary cache service node identifier is less than or equal to a preset first difference threshold; if it is determined that the difference value between the node identifier of the primary cache service node and the first primary cache service node identifier is less than or equal to the preset first difference threshold, determine that the data type of the initial business data is the first type.

[0206] In some embodiments, the device can specifically determine the identification parameters for the initial business data according to preset processing rules and the data type of the initial business data in the following manner: when the data type of the initial business data is of the first type, use the node identifier of the first primary cache service node as the node identifier of the primary cache service node of the initial business data; query and use the processing number when performing business processing on the initial business data as the business processing identifier of the initial business data; query and generate a timestamp identifier of the initial business data based on the reception time of the initial business data.

[0207] In some embodiments, the device can also specifically determine the identification parameters for the initial business data according to preset processing rules and the data type of the initial business data in the following manner: when the data type of the initial business data is the second type, retain the node identifier of the primary cache service node carried by the initial business data, and the business processing identifier; query and generate a timestamp identifier for the initial business data based on the reception time of the initial business data; and generate a multi-active node synchronization tag for the initial business data.

[0208] In some embodiments, after the marked business data is stored in the cached business data group of the current time period of the replication backlog buffer in the form of a node command, the device, when implemented, can also be used to: update the identification parameters associated with the marked business data in the hash table of the replication backlog buffer.

[0209] It should be noted that the units, devices or modules described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described separately by functions divided into various modules. Of course, when implementing this specification, the functions of each module can be implemented in the same or more software and / or hardware, or the modules that implement the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0210] It can be seen from the above that the business data synchronization device based on remote multi-active provided in the embodiment of this specification can be well applied to big data synchronization scenarios involving more complex remote multi-active synchronization, automatically distinguish different situations, and efficiently and accurately realize the synchronization of related business data; at the same time, since there is no need to introduce additional synchronization components, the deployment cost is effectively reduced and the reliability of business data synchronization is improved.

[0211] In a specific scenario example, the business data synchronization method based on multi-active in different locations provided in this specification can be applied to implement data synchronization based on multi-active in different locations based on Redis. For the specific implementation process, please refer to the following content.

[0212] In this scenario example, considering that most existing synchronization methods introduce an intermediate component between the nodes of two data centers to synchronize data in both directions, you can refer to Fig.10 shown.

[0213] When the above method is implemented, the following disadvantages often exist: 1) it increases the difficulty of cluster deployment; 2) it increases the synchronization delay; 3) it increases the difficulty of operation and maintenance troubleshooting.

[0214] In response to the above problems, this scenario example considers using Redis as the storage node. In view of the defects and shortcomings in the existing methods, based on the community Redis source code, the master-slave data synchronization process is modified. Without introducing third-party components, the Redis node itself has the function of two-way synchronization between multiple active nodes in different locations (that is, the master cache service node and slave cache service node based on the preset cache service in the data center are built according to the preset construction rules).

[0215] In this scenario example, the overall synchronization architecture can be found in Fig.11 As shown, each Redis master node in the cluster (for example, the first master cache service node) receives two types of data, including: 1. request data from normal clients (first type), and 2. synchronization data from Redis nodes in other data centers (second type).

[0216] Accordingly, the command module can be used to process the two types of data 1 and 2, update the user data (for example, update the first business database), and save the data in the replication backlog buffer. At the same time, the data in the replication backlog buffer can also be synchronized to the aof file and the Redis standby node (for example, the first slave cache service node). In addition, the type 1 data in the replication backlog buffer can also be synchronized to the Redis master node of other data centers (for example, the second master cache service node).

[0217] In this scenario example, when constructing the copy buffer, you can refer to Fig.12When the command processing module processes the normal client command (business data), 4 additional information (identification parameters) will be added, including: Timestamp (timestamp parameter), the timestamp of receiving the request; serverId (node ​​identifier of the primary cache service node), the Redis identifier of the first processing of the request; optId (business processing identifier), the sequence number of processing the request. Every time the Redis node processes a normal write request, optId increases by 1, and this sequence number increases monotonically; !!! (multi-active node synchronization label), indicating that the request has been processed by other nodes. When the processing module processes a request ending with !!!, it knows that the request is synchronized from other Redis multi-active nodes.

[0218] In specific implementation, requests processed by the command processing module will be saved in the replication backlog buffer, and all slave nodes and multi-active nodes will use the same synchronization data.

[0219] In addition, Redis (for example, the first primary cache service node) maintains an output buffer structure (Peer output buffer) for each multi-active node, which is used to record the optId that has been sent to the multi-active node and the optId that the multi-active node has confirmed the application. Only requests processed for the first time by this node are synchronized to the multi-active node.

[0220] Redis also maintains an output buffer structure (Slave output buffer) for each slave node (for example, the first slave cache service node) to record the offset that has been sent to the slave node and the offset that the slave node has confirmed to apply (based on the offset of optId).

[0221] Specifically, the above-mentioned replication backlog buffer can be a linked list composed of buffer blocks (bufferBlock). In addition, each buffer block is configured according to the following parameters: capacity is 1Mb, that is, 1Mb for data fragmentation; initialOffset records the initial offset; length records the length of valid data; cmds is a hash table that records the offset and length of each command processed by this node in the buffer.

[0222] In this scenario example, the above synchronization architecture can be used to achieve data synchronization between different nodes. It includes the following: the Redis master node synchronizes data with the standby node and the corresponding multi-active node in real time; the synchronized data is only cached in the backlog buffer; all data in the backlog buffer will be synchronized to each slave node; only the requests processed by this node in the backlog buffer will be synchronized to each multi-active node, and these requests are marked by the hash table (cmds) of each cache block.

[0223] During specific implementation, different synchronization types such as the standby node synchronization request processing flow (corresponding to local slave node synchronization) and the multi-active node synchronization request processing flow (corresponding to remote multi-active synchronization) can be distinguished to perform specific synchronization processing.

[0224] For the standby node synchronization request processing process, please refer to Fig.13 As shown, the following processing contents may be included:

[0225] S1: This process is triggered when the standby node connects to the master node. The parameters carried are the master node identifier (serverId) to be synchronized and the offset (offset) that has been copied.

[0226] S2: When serverId matches the local node identifier and the requested offset is in the replication backlog buffer, incremental synchronization is performed: the portion of the replication backlog buffer that is greater than the offset is sent to the standby node.

[0227] S3: Otherwise, the full synchronization process is performed with the standby node, including: S3-1, creating a child process to generate a dump.rdb file of the entire database and sending it to the standby node; S3-2, waiting for the standby node to load the rdb file; S3-3, sending the newly processed request during the full synchronization process.

[0228] For the multi-active node synchronization request processing process, please refer to Fig.14 As shown, the following processing contents may be included:

[0229] S1: This process is triggered when a multi-active node connects to a master node, and the parameters carried include: (1) serverId, the identifier of the master node to be synchronized (the node identifier of the first master cache service node at the synchronization target end); (2) optId, the offset that has been copied from the node (the business processing identifier of the existing business data associated with the first master cache service node at the synchronization target end); (3) pServerId, the identifier of the multi-active node (the node identifier of the second master cache service node at the synchronization initiator end); (4) pOptId, the existing offset in the multi-active node (the business processing identifier of the existing business data associated with the second master cache service node at the synchronization initiator end).

[0230] S2: When serverId matches the identifier of this node and the requested offset is in the replication backlog buffer, incremental synchronization is performed: the data processed by this node in the replication backlog buffer that is greater than optId is sent to the multi-active node.

[0231] S3: Otherwise, a full synchronization process with multiple active nodes is performed, including: S3-1, traversing the database in the child process; S3-2, writing the keys greater than optId processed by this node and the keys greater than pOptId from pServerId into the rdb file; S3-3, sending the rdb file and waiting for the loading of multiple active nodes to be completed; S3-4, sending the requests processed by this node during the full synchronization process.

[0232] Through the above scenario examples, it is verified that the business data synchronization method based on multi-active in different locations provided in this specification can reduce multi-active in different locations data synchronization components, simplify the operation and maintenance deployment costs, and improve data synchronization efficiency and reliability; it can reduce memory consumption by using the same data through the standby node output buffer, multi-active node output buffer, and backlog buffer; it can integrate the multi-active in different locations function into the Redis service for easy deployment and operation and maintenance; it can introduce the node identifier (serverId) when using request processing to avoid circular replication; it can also introduce the logical clock (optId) when processing requests to realize the function of breakpoint resumption, and there is no need to copy the full amount of user data when the multi-active nodes are fully synchronized.

[0233] Although the present specification provides method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps, and does not represent a unique execution order. When the device or client product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. The first, second, etc. words are used to represent the name, and do not represent any particular order.

[0234] Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code, the controller can be made to implement the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.

[0235] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer-readable storage media including storage devices.

[0236] Through the description of the above embodiments, it can be known that those skilled in the art can clearly understand that the present specification can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present specification can essentially be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in each embodiment of the present specification or some parts of the embodiments.

[0237] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. This specification can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc.

[0238] Although the present specification is described through embodiments, those skilled in the art will appreciate that many modifications and changes may be made to the present specification without departing from the spirit of the present specification, and it is intended that the appended claims include these modifications and changes without departing from the spirit of the present specification.

Claims

1. A business data synchronization method based on multi-site active-active, characterized in that: Applied to a first server node, the first server node is deployed in a data center of a first region and is connected to a first master cache service node and a first slave cache service node; wherein the first master cache service node at least includes a replication backlog buffer constructed based on a preset construction rule, a slave node output buffer corresponding to the first slave cache service node, and a multi-active input buffer and a multi-active output buffer corresponding to data centers in other regions, the method comprising: Receive and respond to the target business data synchronization request, and determine the synchronization type of the business data; According to the preset synchronization rule, when it is determined that the synchronization type of the business data is remote multi-active synchronization, at least the node identifier of the first primary cache service node of the synchronization target end, the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end, and the node identifier of the second primary cache service node of the synchronization initiator are extracted from the target business data synchronization request; wherein the second primary cache service node is deployed in a data center of the second area, and the data center of the second area is also deployed with a corresponding second secondary cache service node; Detect whether the node identifier of the first primary cache service node of the synchronization target end matches or passes; When it is determined that the node identifier of the first primary cache service node of the synchronization target end matches, it is detected whether there is a business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end in the replication backlog buffer; wherein the replication backlog buffer stores a cache business data group of the current time period obtained by processing based on a preset processing rule; In the case where it is determined that there is a business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end in the replication backlog buffer, the target business data to be synchronized to the data center of the second area is determined from the cached business data group of the current time period according to the node identifier of the first primary cache service node of the synchronization target end and the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end; The target business data is synchronized to the second primary cache service node of the data center of the second area through the multi-active output buffer corresponding to the data center of the second area.

2. The method according to claim 1, characterized in that After detecting whether the node identifier of the first primary cache service node of the synchronization target end matches or not, the method further includes: When it is determined that the node identifier of the first primary cache service node of the synchronization target end fails to match, a first type of full synchronization process is started, the first business database is traversed, and business data whose business processing identifier is greater than the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end is queried and obtained as the target business data; Writing the target business data into a target relational database file; The target relational database file is synchronized to the second primary cache service node of the data center of the second region through the multi-active output buffer corresponding to the data center of the second region.

3. The method according to claim 1, characterized in that: When it is determined that the synchronization type of the service data is remote multi-active synchronization, the method further includes: Detecting whether the target service data synchronization request carries a service processing identifier of existing service data associated with the second primary cache service node of the synchronization initiator; In the case where it is determined that the target business data synchronization request carries a business processing identifier of existing business data associated with the second primary cache service node of the synchronization initiator, extracting the business processing identifier of the existing business data associated with the second primary cache service node of the synchronization initiator from the target business data synchronization request; Detecting whether there is a service processing identifier of existing service data associated with the second primary cache service node of the synchronization initiator in the replication backlog buffer; When it is determined that there is no business processing identifier of existing business data associated with the second primary cache service node of the synchronization initiator in the replication backlog buffer, a second type of full synchronization process is started, the first business database is traversed, and business data whose business processing identifier is greater than the business processing identifier of existing business data associated with the second primary cache service node of the synchronization initiator is queried and obtained as the target business data.

4. The method according to claim 1, characterized in that: After determining the synchronization type of the service data, the method further includes: According to the preset synchronization rules, when it is determined that the synchronization type of the business data is local slave node synchronization, the node identifier of the first primary cache service node of the synchronization target end and the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end are extracted from the target business data synchronization request; Detect whether the node identifier of the first primary cache service node of the synchronization target end matches or passes; When it is determined that the node identifier of the first primary cache service node of the synchronization target end matches, detecting whether there is a business processing identifier of existing business data associated with the first primary cache service node of the synchronization target end in the replication backlog buffer; In the case where it is determined that there is a business processing identifier of existing business data associated with the first primary cache service node of the synchronization target end in the replication backlog buffer, the target business data to be synchronized to the first secondary cache service node is determined from the cache business data group of the current time period according to the node identifier of the first primary cache service node of the synchronization target end and the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end; The target business data is synchronized to the first slave cache service node through the slave node output buffer corresponding to the first slave cache service node for synchronous backup.

5. The method according to claim 4, characterized in that After detecting whether the node identifier of the first primary cache service node of the synchronization target end matches or not, the method further includes: When it is determined that the node identifier of the first primary cache service node of the synchronization target end fails to match, a third type of full synchronization process is started, the first business database is traversed, and business data whose business processing identifier is greater than the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end is queried and obtained as the target business data; Writing the target business data into a target relational database file; The target relational database file is synchronized to the first slave cache service node through the slave node output buffer corresponding to the first slave cache service node for synchronous backup.

6. The method according to claim 1, characterized in that The method further comprises: Acquire initial service data of data center access in the first region; Determine the data type of the initial business data; Determine an identification parameter for the initial business data according to a preset processing rule and the data type of the initial business data; and mark the initial business data using the identification parameter to obtain marked business data; According to the preset processing rules, the marked business data is stored in the cached business data group of the current time period of the replication backlog buffer in the form of a node command.

7. The method according to claim 6, characterized in that The data types include: a first type and a second type; Among them, the first type is business data that has completed business processing in a data center in the first area; the second type is business data that has completed business processing in data centers in other areas except the data center in the first area.

8. The method according to claim 7, characterized in that Determine the data type of the initial business data, including: Detect whether the initial service data carries the node identifier of the primary cache service node; When it is determined that the initial service data carries the node identifier of the primary cache service node, extracting the node identifier of the primary cache service node; Detecting whether a difference value between the node identifier of the primary cache service node and the first primary cache service node identifier is less than or equal to a preset first difference threshold; When it is determined that the difference value between the node identifier of the primary cache service node and the first primary cache service node identifier is less than or equal to a preset first difference threshold, the data type of the initial service data is determined to be the first type.

9. The method according to claim 6, characterized in that According to the preset processing rules and the data type of the initial business data, an identification parameter for the initial business data is determined, including: When the data type of the initial service data is the first type, the node identifier of the first primary cache service node is used as the node identifier of the primary cache service node of the initial service data; Query and use the processing number when the initial business data is processed as the business processing identifier of the initial business data; Query and generate a timestamp identifier of the initial business data according to the receiving time of the initial business data.

10. The method according to claim 6, characterized in that Determining identification parameters for the initial business data according to a preset processing rule and the data type of the initial business data also includes: When the data type of the initial service data is the second type, retaining the node identifier of the primary cache service node and the service processing identifier carried by the initial service data; Query and generate a timestamp identifier of the initial business data according to the receiving time of the initial business data; Generate a multi-active node synchronization tag for the initial business data.

11. The method according to claim 9, characterized in that After storing the marked service data in the form of a node command into the cache service data group of the current time period of the replication backlog buffer, the method further includes: In the hash table of the replication backlog buffer, the identification parameter associated with the business data after the mark is updated.

12. A business data synchronization device based on remote multi-active, characterized in that: Applied to a first server node, the first server node is deployed in a data center of a first region and is connected to a first master cache service node and a first slave cache service node; wherein the first master cache service node at least includes a replication backlog buffer constructed based on a preset construction rule, a slave node output buffer corresponding to the first slave cache service node, and a multi-active input buffer and a multi-active output buffer corresponding to data centers in other regions, including: A classification module is used to receive and respond to a target business data synchronization request and determine the synchronization type of the business data; An extraction module is used to extract at least a node identifier of a first primary cache service node of a synchronization target end, a business processing identifier of existing business data associated with the first primary cache service node of the synchronization target end, and a node identifier of a second primary cache service node of a synchronization initiator end from a target business data synchronization request according to a preset synchronization rule and when determining that the synchronization type of the business data is remote multi-active synchronization; wherein the second primary cache service node is deployed in a data center of a second region, and a corresponding second secondary cache service node is also deployed in the data center of the second region; A first detection module is used to detect whether the node identifier of the first primary cache service node of the synchronization target end matches or passes; A second detection module is used to detect whether there is a business processing identifier of existing business data associated with the first primary cache service node of the synchronization target end in the replication backlog buffer when it is determined that the node identifier of the first primary cache service node of the synchronization target end matches; wherein the replication backlog buffer stores a cache business data group of the current time period obtained by processing based on a preset processing rule; a determination module, configured to determine, when it is determined that there is a business processing identifier of existing business data associated with the first primary cache service node of the synchronization target end in the replication backlog buffer, target business data to be synchronized to the data center of the second area from the cache business data group of the current time period according to the node identifier of the first primary cache service node of the synchronization target end and the business processing identifier of the existing business data associated with the first primary cache service node of the synchronization target end; The synchronization module is used to synchronize the target business data to the second primary cache service node of the data center of the second area through the multi-active output buffer corresponding to the data center of the second area.

13. A server, characterized in that: The method comprises a processor and a memory for storing processor-executable instructions, wherein the processor implements the steps of the method according to any one of claims 1 to 11 when executing the instructions.

14. A computer-readable storage medium, characterized in that: Computer instructions are stored thereon, and when the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

15. A computer program product, characterized in that The invention comprises a computer program, which implements the steps of the method according to any one of claims 1 to 11 when being executed by a processor.

Citation Information

Patent Citations

  • Data synchronization method and system, main server, synchronization client and medium

    CN110149382A

  • Data processing method based on remote multi-activity system, related equipment and storage medium

    CN113010549A

  • Remote multi-activity system, information processing method thereof and configuration server

    CN116233245A

  • Data synchronization method and system for multiple data centers

    CN117851511A

  • Data processing method and apparatus, and device and storage medium

    WO2022193985A1