Unlock instant, AI-driven research and patent intelligence for your innovation.

Data synchronization method, device, terminal and storage medium

A data synchronization and database technology, applied in the direction of structured data retrieval, database distribution/replication, special data processing applications, etc., can solve problems such as database downtime, affecting user experience, etc., and achieve the effect of smooth and fast transmission

Active Publication Date: 2022-03-15
BEIJING BYTEDANCE NETWORK TECH CO LTD
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The embodiments of the present disclosure provide a data synchronization method, device, terminal and storage medium to solve the technical problem that the existing data synchronization method often needs to shut down the intercommunicated database and affect the user experience, and realize the completion of the synchronization without stopping the database data synchronization

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Data synchronization method, device, terminal and storage medium
  • Data synchronization method, device, terminal and storage medium
  • Data synchronization method, device, terminal and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0045] figure 1 It is a flow chart of a data synchronization method provided by Embodiment 1 of the present disclosure. This embodiment is especially applicable to the situation where two independent databases perform data intercommunication, and can be used to realize multi-active in different places. This method can be executed by a data synchronization device , the data synchronization device may be configured in a terminal or a server to implement the data synchronization method of the embodiment of the present disclosure. Wherein, whether the two databases are in different places may be determined according to a round-trip time delay (Round-TripTime, RTT) between the two databases. That is, according to the total time delay experienced from the time when the sender sends data to when the sender receives the confirmation from the receiver, generally the receiver sends an acknowledgment immediately after receiving the data.

[0046] Such as figure 1 As shown, the method i...

Embodiment 2

[0062] figure 2 It is a schematic flowchart of a data synchronization method provided in Embodiment 2 of the present disclosure. This embodiment is further optimized on the basis of each optional solution in the foregoing embodiments. In this embodiment, optionally, the synchronizing the second data to be synchronized from the first slave database to the second master database includes: The log file Binlog determines the incremental data of the first slave database; and synchronizes the incremental data to the second master database through the distributed publish-subscribe message system kafka message queue.

[0063] Such as figure 2 As shown, the method in this embodiment may specifically include:

[0064] S210. Control the first master database to transmit the data to be synchronized in the first master database to the first slave database of the first master database.

[0065] S220. Determine the incremental data of the first slave database according to the log file B...

Embodiment 3

[0073] image 3 It is a schematic flow diagram of a data synchronization method provided by Embodiment 3 of the present disclosure. This embodiment is especially suitable for data intercommunication between two independent databases, and can be used to realize multi-active in different places. This method can be executed by a data synchronization device , the device may be configured in a terminal or a server to execute the data synchronization method of this embodiment.

[0074] Such as image 3 As shown, the method of this embodiment may specifically include:

[0075] S310. Receive the data to be synchronized transmitted by the first slave database of the first master database through the second master database.

[0076] Wherein, the data to be synchronized comes from the first master database. as mentioned earlier. Wherein, the data to be synchronized includes historical data of the first database and incremental data of the first database. It can be understood that th...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the present disclosure discloses a data synchronization method, device, terminal and storage medium. Wherein, the data synchronization method includes: controlling the first master database to transmit the data to be synchronized in the first master database to the first slave database of the first master database, and controlling the pending data to be received by the first slave database. The synchronization data is synchronized to the second master database; when the preset stop synchronization condition is met, the first master database is controlled to stop transmitting the data to be synchronized to the first slave database; when the preset recovery synchronization condition is satisfied, the first slave database is controlled to The first master database continues to transmit the data to be synchronized to the first slave database, and controls the first slave database to continue to synchronize the received data to be synchronized to the second master database. The technical solution of the embodiments of the present disclosure can solve the technical problem that the existing data synchronization method often needs to shut down the intercommunicated database and affect the user experience, and realize the completion of data synchronization without shutting down.

Description

technical field [0001] Embodiments of the present disclosure relate to the field of computer application technologies, and in particular, to a data synchronization method, device, terminal, and storage medium. Background technique [0002] MySQL is a database management system and a relational database. It is an open source software backed by Oracle and is widely used due to its small size, fast speed, low total cost of ownership, and especially open source. In recent years, multi-activity in different places has become a data management solution adopted by more and more large Internet companies, and it is almost an inevitable choice for large-scale applications to develop to a certain stage. [0003] Multiple activities in different places can generally refer to the establishment of independent data centers in different cities. These computer rooms also need traffic in daily business to provide business support. That is, the data between two computer rooms in different ci...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): H04L67/1095G06F16/27
CPCG06F16/27G06F11/14
Inventor 宋维捷
Owner BEIJING BYTEDANCE NETWORK TECH CO LTD