# US 2021/0176310 A1 · Data synchronization method and system

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0176310 A1
- Document ID: US20210176310A1
- Status: Published application
- Kind: A1
- Application number: 15/777,575
- Filed: 2017-11-14
- Published: 2021-06-10
- Earliest claimed: 2017-09-29
- Assignees: Wangsu Science & Technology Co., Ltd.
- Applicants: Wangsu Science & Technology Co., Ltd.
- Inventors: Shiping LIANG
- Web page: https://patentgrep.com/patent/US20210176310A1

## CPC

- H04L 67/1095: Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- H04L 41/0668: by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
- H04L 61/4511: using domain name system [DNS]
- H04L 61/5007: Internet protocol [IP] addresses
- H04L 67/1001: for accessing one among a plurality of replicated servers
- H04L 67/1008: based on parameters of servers, e.g. available memory or workload (monitoring of computer activity G06F11/30)
- H04L 67/1029: using data related to the state of servers by a load balancer
- H04L 67/60: Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources (admission control or resource allocation H04L47/70)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for data synchronization, includes: acquiring, by a target terminal, a locally pre-stored service domain name of a target server room, and transmitting, by the target terminal, a service request to the target server room through the service domain name; executing, by the target server room, a service operation corresponding to the service request, updating, by the target server room, a first database, and generating, by the target server room, a data change message; sending, by the target server room, the data change message to an associated server room of the target server room; and performing, by the associated server room, data synchronization based on the received data change message

## Claims

### Claim 1

A method for data synchronization, the method comprising:
acquiring, by a target terminal, a locally pre-stored service domain name of a target server room, and transmitting, by the target terminal, a service request to the target server room through the service domain name;
executing, by the target server room, a service operation corresponding to the service request, updating, by the target server room, a first database, and generating, by the target server room, a data change message;
sending, by the target server room, the data change message to an associated server room of the target server room; and
performing, by the associated server room, data synchronization based on the received data change message.

### Claim 2 (depends on 1)

The method according to claim 1, wherein, before acquiring, by the target terminal, the service domain name of the target server room, the method further includes:
sending, by the target terminal, a domain name acquisition request to a load scheduling cluster, wherein the domain name acquisition request includes a terminal identifier of the target terminal;
determining, by the load scheduling cluster, among externally serving Virtual IP Addresses (VIPs) in all server rooms, the number of healthy VIPs;
determining, by the load scheduling cluster, a target VIP based on the terminal identifier and the number of healthy VIPs, and sending, by the load scheduling cluster, a server domain name of a target server room corresponding to the target VIP to the target terminal; and
receiving and storing, by the target terminal, the service domain name of the target server room sent by the load scheduling cluster.

### Claim 3 (depends on 1)

The method according to claim 1, wherein, after transmitting, by the target terminal, the service request to the target server room through the service domain name, the method further includes:
if a failure of the service request transmission is detected, sending, by the target terminal, a domain name acquisition request including a terminal identifier of the target terminal to a load scheduling cluster;
determining, by the load scheduling cluster, the number of healthy VIPs among externally serving VIPs in all server rooms;
determining, by the load scheduling cluster, a new VIP based on the terminal identifier and the number of healthy VIPs, and sending, by the load scheduling cluster, a service domain name of a new server room corresponding to the new VIP to the target terminal; and
receiving and storing, by the target terminal, the service domain name of the new server room sent by the load scheduling cluster.

### Claim 4 (depends on 1)

The method according to claim 1, wherein executing, by the target server room, the service operation corresponding to the service request, updating, by the target server room, the first database, and generating, by the target server room, the data change message include:
calling, by the target server room, a service processing thread to start processing the service request, and monitoring, by the target server room, whether there is a database operation; and
if there is no database operation, feeding back, by the target server room, a service processing result to the target terminal, and if there is a database operation, determining, by the target server room, whether the database operation involves a data change.

### Claim 5 (depends on 4)

The method according to claim 4, wherein, if no data change is involved, the target server room performs the database operation in the first database, continues processing the service request based on a result of the database operation, and feeds back the service processing result to the target terminal.

### Claim 6 (depends on 4)

The method according to claim 4, wherein, if a data change is involved, the target server room performs a data change operation in the first database, continues processing the service request based on a result of the data change, feeds back the service processing result to the target terminal, and generates the data change message based on the data change operation and stores the data change message in a preset message queue.

### Claim 7 (depends on 1)

The method according to claim 1, wherein performing, by the associated server room, data synchronization based on the received data change message includes:
receiving, by the associated server room, the data change message sent by the target server room, and determining, by the associated server room, a terminal identifier of a target terminal corresponding to the data change message;
determining, by the associated server room, a target data change thread corresponding to the terminal identifier based on the terminal identifier; and
calling, by the associated server room, the target data change thread to perform data synchronization in a second database based on the data change message.

### Claim 8

A system for data synchronization, the system comprising a target terminal, a target server room, and an associated server room of the target server room, wherein:
the target terminal is configured to acquire a locally pre-stored service domain name of the target server room and transmit a service request to the target server room through the service domain name;
the target server room is configured to execute a service operation corresponding to the service request, update a first database, and generate a data change message;
the target server room is further configured to send the data change message to the associated server room; and
the associated server room is configured to perform data synchronization based on the received data change message.

### Claim 9 (depends on 8)

The system according to claim 8, further comprising a load scheduling cluster, wherein:
the target terminal is further configured to send a domain name acquisition request to the load scheduling cluster, wherein the domain name acquisition request includes a terminal identifier of the target terminal;
the load scheduling cluster is configured to determine the number of healthy VIPs among externally serving VIPs in all server rooms;
the load scheduling cluster is further configured to determine a target VIP based on the terminal identifier and the number of the health VIPs, and send a service domain name of a target server room corresponding to the target VIP to the target terminal; and
the target terminal is further configured to receive and store the service domain name of the target server room sent by the load scheduling cluster.

### Claim 10 (depends on 8)

The system according to claim 8, wherein the target terminal is further configured to send a domain name acquisition request including a terminal identifier of the target terminal to a load scheduling cluster if a failure of the service request transmission is detected.

### Claim 11 (depends on 10)

The system according to claim 10, wherein:
the load scheduling cluster is further configured to determine the number of healthy VIPs among externally serving VIPs in all server rooms;
the load scheduling cluster is further configured to determine a new VIP based on the terminal identifier and the number of healthy VIPs, and send a service domain name of a new server room corresponding to the new VIP to the target terminal; and
the target terminal is further configured to receive and store the service domain name of the new server room sent by the load scheduling cluster.

### Claim 12 (depends on 8)

The system according to claim 8, wherein the target server room is specifically configured to:
call a service processing thread to start processing the service request, and monitor whether there is a database operation; and
if there is no database operation, feed back a service processing result to the target terminal, and if there is a database operation, determine whether the database operation involves a data change.

### Claim 13 (depends on 12)

The system according to claim 12, wherein, if no data change is involved, the database operation is performed in the first database, and the service request continues to be processed based on a result of the database operation, and the service processing result is fed back to the target terminal.

### Claim 14 (depends on 12)

The system according to claim 12, wherein, if a data change is involved, a data change operation is performed in the first database, the service request continues to be processed based on a result of the data change, the service processing result is fed back to the target terminal, and the data change message is generated based on the data change operation and the data change message is stored in a preset message queue.

### Claim 15 (depends on 8)

The system according to claim 8, wherein the associated server room is specifically configured to:
receive the data change message sent by the target server room, and determine a terminal identifier of a target terminal corresponding to the data change message;
determine a target data change thread corresponding to the terminal identifier based on the terminal identifier; and
call the target data change thread to perform data synchronization in a second database based on the data change message.
