Data synchronization method and device

A data synchronization and database technology, which is applied in the computer field, can solve the problems of inability to further improve data synchronization performance and long synchronization time, and achieve the effects of reducing data synchronization time, improving efficiency, and increasing concurrency

Pending Publication Date: 2021-02-02
BEIJING JINGDONG ZHENSHI INFORMATION TECH CO LTD
View PDF0 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] In view of this, the embodiments of the present invention provide a data synchronization method and device, which can at least sol

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 and device
  • Data synchronization method and device
  • Data synchronization method and device

Examples

Experimental program
Comparison scheme
Effect test

Example Embodiment

[0066]The following describes exemplary embodiments of the present invention with reference to the accompanying drawings, which include various details of the embodiments of the present invention to facilitate understanding, and should be regarded as merely exemplary. Therefore, those of ordinary skill in the art should realize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Likewise, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0067]It should be noted that the embodiments of the present invention are applicable to incremental data subscription and consumption components, such as Debezium and Canal, and the present invention mainly takes Canal as an example.

[0068]The present invention is mainly aimed at the master-slave synchronization of incremental data. Incremental data corresponds to historical ...

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 invention discloses a data synchronization method and device, and relates to the technical field of computers. One specific embodiment of the method comprises the steps of monitoring a first database, so as to obtain an updated log file from the first database when a log in the first database changes; analyzing the log file to obtain incremental data, and writing the incremental data into a message queue corresponding to a table name in the incremental data according to the table name in the incremental data; and writing the incremental data in the message queue into a second database through a queue consumption thread corresponding to the message queue. According to the embodiment, the whole data synchronization method has a clear architecture, and the table-level concurrent processing mode is adopted in the parallel implementation stage in the data synchronization process, so that the overall concurrency is greatly improved, the data synchronization efficiency is effectively improved, the data synchronization time is shortened, and meanwhile, the data synchronization consistency is ensured.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a data synchronization method and device. Background technique [0002] Database incremental subscription and consumption middleware, in practical applications, has a wide range of application scenarios, such as for data synchronization across computer rooms, reducing the delay of database synchronization; heterogeneously forming ES (ElasticSearch, search engine) data from mysql database data, improve query performance, etc. [0003] Taking Canal as an example, it adopts a multi-threaded division of labor and multi-stage processing mode. In order to ensure the consistency of the data after synchronization, Canal adopts a relatively conservative strategy: use binlog serial to pull, parse, store and consume data to ensure data consistency. [0004] In the process of realizing the present invention, the inventor finds that there are at least the following problems in the...

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
IPC IPC(8): G06F16/23G06F16/27
CPCG06F16/2365G06F16/27
Inventor 杨坤
Owner BEIJING JINGDONG ZHENSHI INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products