Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Data synchronization method and device

A data synchronization and data technology, applied in the field of data processing, can solve problems such as adverse impact of service nodes, errors in business processing, and inability to obtain business data in time, so as to avoid data processing problems.

Active Publication Date: 2020-05-19
BEIJING HUAWEI DIGITAL TECH
View PDF10 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] This data synchronization method leads to the fact that the real-time data cannot be pushed to the newly launched service node in time. For the aforementioned two kinds of real-time data, if the first type of data cannot be pushed in time, the service node will make mistakes in the existing business processing, because the historical data is usually it's wrong
The failure of the second type of data to be pushed in time will result in the inability of business data to be processed by the service node in time
No matter which of the above situations is caused, it will have an adverse impact on the newly launched service nodes

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

Embodiment 1

[0066] Next, the data synchronization method provided by the embodiment of the present application will be described in detail with reference to the accompanying drawings.

[0067] see figure 2 , figure 2 A flow chart of a data synchronization method is shown, the method includes:

[0068] S201. Obtain a synchronization request of a service node.

[0069] According to its own data processing requirements, the service node needs to obtain the latest data required to realize its functions in the system. Therefore, the service node can send a synchronization request to the MQ BROKER 102 to obtain the required synchronization data from the MQ BROKER 102. At this point, it can be considered that MQ BROKER 102 enters the data recovery state.

[0070] S202. Obtain a snapshot copy generated according to the data set to be synchronized from the key-value database by using the identifier.

[0071] The MQ BROKER 102 needs to specify the set of data to be synchronized that should be...

Embodiment 2

[0100] Based on the data synchronization method provided in the first embodiment, this embodiment provides a data synchronization device. Figure 4 A structural diagram of a data synchronization device provided in this embodiment, the data synchronization device 400 includes a first acquisition unit 401, a second acquisition unit 402, a modification unit 403 and a synchronization unit 404:

[0101] The first acquiring unit 401 is configured to acquire a synchronization request of a service node, where the synchronization request includes an identifier of a data set to be synchronized;

[0102] The second obtaining unit 402 is configured to obtain a snapshot copy generated according to the data set to be synchronized from the key-value database through the identification, and the key information corresponding to the data in the snapshot copy is set with a version number, wherein, The version number of a key information is used to identify the update information of the data corr...

Embodiment 3

[0116] refer to Figure 5 , Figure 5 It is a schematic diagram of the hardware structure of a device for data synchronization provided in the embodiment of the present application. The device 500 includes a memory 501, a receiver 502, and a transmitter 503, and is connected to the memory 501, the receiver 502, and the transmitter 503, respectively. The processor 504 connected to the transmitter 503, the memory 501 is used to store a set of program instructions, and the processor 504 is used to call the program instructions stored in the memory 501 to perform the following operations:

[0117] Triggering the receiver 502 to obtain a synchronization request from the service node, where the synchronization request includes an identifier of the data set to be synchronized;

[0118] The snapshot copy generated according to the data set to be synchronized is obtained from the key-value database through the identification, and the key information corresponding to the data in the sn...

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 invention discloses a data synchronization method and a related device, and the method comprises the steps: obtaining a snapshot copy of a to-be-synchronized data set corresponding to an identification from a key value database based on the identification in a synchronization request when the synchronization request of a service node is obtained, during data synchronization on the service node according to the snapshot copy, if update data for the to-be-synchronized data set is received, changing the version number of the target key information corresponding to the updatedata in an incremental manner, taking the updated data as data corresponding to the target key information, and synchronizing the updated data to the service node, updating the read version number ofthe target key information into the version number after the target key information is changed so that the situation that new data corresponding to the key information is covered by old data is eradicated, the updated data is directly synchronized to the service node in the data synchronization process, waiting for completion of historical data synchronization is not needed, the updated data is pushed to the service node in time, and the data processing problem of the service node is avoided.

Description

technical field [0001] The present application relates to the field of data processing, in particular to a data synchronization method and device. Background technique [0002] In a distributed system, when a service node goes online, in order to ensure that the new service goes online without affecting the normal operation of existing services, the distributed system will synchronize the corresponding subscription relationship for the service node according to the subscription relationship of the service node to the data. A synchronized data set generally includes two parts, one part is the historical data of the data set before data synchronization, and the other is the real-time data updated to the data set during the data synchronization process. [0003] In a possible implementation, when the service node goes online, the distributed system uses a message queue (Message Queue, MQ) and a key-value (Key-Value, KV) database to synchronize data of the service node. Among t...

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): H04L29/08
CPCH04L67/1095H04L67/60
Inventor 姜戎徐海军张旭东熊怡郭锋
Owner BEIJING HUAWEI DIGITAL TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products