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

Data synchronization method and device

A data synchronization and database technology, applied in the computer field, can solve the problems of data loss, timing value reaching the expiration time, loss, etc., to achieve the effect of improving reliability, avoiding loss, and improving data synchronization technology

Active Publication Date: 2020-08-14
ALIBABA GRP HLDG LTD
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] 1. The data with no change in the indicators in the memory database will be lost; that is, if the indicators obtained by each statistics have not changed, the corresponding indicators in the memory database will not be updated, so that the expiration time of the corresponding data in the memory database will be fixed. The timing value will not be updated, and the corresponding data in the memory database will be lost because the timing value reaches the expiration time; a specific example, set the indicator as the number of cities the user has visited within 90 days, and a user has been In the same city, the number of cities the user has visited on the first day is 1. Since there is no corresponding record in the memory database, the corresponding data containing this indicator is synchronized to the memory database, and its expiration time is It is set to 90 days later; since the number of cities visited by the user on the 2nd, 3rd...91st day is all 1, the corresponding data containing this index in the memory database will not be synchronized, so that the memory database The timing value of the expiration time of the corresponding data containing this indicator in will not be updated, therefore, on the 91st day, the corresponding data containing this indicator in the memory database will be lost due to invalidation

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

[0040] Embodiment 1. Data synchronization method.

[0041] figure 1 This is a flowchart of the data synchronization method of this embodiment. figure 1 In this embodiment, the method of this embodiment mainly includes: step S100, step S110, and step S120. The method in this embodiment is usually executed by a device (such as a computer or a server) that can access the source database and the target database.

[0042] The steps included in the method of this embodiment will be described separately below.

[0043] S100. Acquire a first data set that has been synchronized and a second data set to be synchronized.

[0044] As an example, the first data set based on the indicator that has been synchronized last time and the second data set based on the indicator to be synchronized this time can be obtained from the source database, and the corresponding data containing indicators in the data warehouse can be synchronized to the memory database In the application scenario in this embodimen...

Embodiment 2

[0096] The second embodiment is the data synchronization method.

[0097] Figure 5 This is a flowchart of the data synchronization method of this embodiment. The method in this embodiment is usually executed by a device (such as a computer or a server) capable of accessing a data warehouse and a memory database.

[0098] The steps included in the method of this embodiment will be described separately below.

[0099] S500: Perform index calculation on the data in the data warehouse, and obtain a data table of the current day to be synchronized based on the index after the index calculation.

[0100] S510. Obtain a data table of the previous day based on the indicator that has been synchronized last time from the data warehouse.

[0101] S520: According to the primary key of the data table of the current day and the data table of the previous day, the data table of the current day and the data package of the previous day are fully associated.

[0102] S530. Mark the delta1, delta2, del o...

Embodiment 3

[0110] The third embodiment is a data synchronization device.

[0111] Image 6 This is a schematic diagram of the structure of the data synchronization device of this embodiment. Image 6 In this embodiment, the apparatus of this embodiment mainly includes: a first acquisition module 600, a second acquisition module 610, and a first synchronization module 620. The device of this embodiment is usually set in a device (such as a computer or a server) that can access the source database and the target database. In addition, the device of this embodiment may also optionally include: a setting module 630, a third acquisition module 640, a second synchronization module 650, a fourth acquisition module 660, and a third synchronization module 670 (such as Figure 7 Shown).

[0112] The modules included in the device of this embodiment will be described below.

[0113] The first obtaining module 600 is mainly used to obtain the first data set that has been synchronized and the second data s...

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 provides a data synchronization method and device. The method comprises the following steps that: obtaining a first dataset which is synchronously processed and a second dataset to be synchronously processed; according to a main keyword, obtaining indexes which are in the presence in the first dataset and the second dataset and do not change; and under a situation that the no-change duration of the current value of the index is judged to achieve a preset threshold value corresponding to the index, synchronizing the corresponding data of a record where the index is positioned in the second dataset to a target database. By use of the technical scheme provided by the invention, a data synchronization technology is perfected, and data synchronization reliability is improved.

Description

Technical field [0001] The present invention relates to computer technology, in particular to a data synchronization method and a data synchronization device. Background technique [0002] Online application systems often need to use indicators in the data warehouse (an indicator is a calculation result obtained by performing aggregation statistics on data based on one dimension or multiple dimensions) in order to provide the demander with corresponding data analysis and other services. Because online application systems have high requirements for response time, it is usually necessary to synchronize the corresponding data including indicators in the data warehouse to the memory database, and the synchronization frequency is usually consistent with the indicator calculation frequency in the data warehouse. [0003] At present, the data synchronization method usually adopts index-based database incremental synchronization method, that is, data synchronization is performed for the ch...

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): G06F16/27
CPCG06F16/275
Inventor 丁明峰
Owner ALIBABA GRP HLDG LTD