CN106709066B - Data synchronization method and device - Google Patents

Data synchronization method and device Download PDF

Info

Publication number
CN106709066B
CN106709066B CN201710038990.1A CN201710038990A CN106709066B CN 106709066 B CN106709066 B CN 106709066B CN 201710038990 A CN201710038990 A CN 201710038990A CN 106709066 B CN106709066 B CN 106709066B
Authority
CN
China
Prior art keywords
data
synchronized
change table
identifier
change
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710038990.1A
Other languages
Chinese (zh)
Other versions
CN106709066A (en
Inventor
张友先
孙策
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Dt Dream Technology Co Ltd
Original Assignee
Hangzhou Dt Dream Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Dt Dream Technology Co Ltd filed Critical Hangzhou Dt Dream Technology Co Ltd
Priority to CN201710038990.1A priority Critical patent/CN106709066B/en
Publication of CN106709066A publication Critical patent/CN106709066A/en
Application granted granted Critical
Publication of CN106709066B publication Critical patent/CN106709066B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication

Abstract

The application provides a data synchronization method and a data synchronization device, wherein the method comprises the following steps: after the data in the source data table is synchronized to the target data table, the synchronized data is determined; searching the synchronized data from the change table, and setting a preset mark for the searched synchronized data in the change table; and determining the data without the preset marks in the change table as unsynchronized data, and synchronizing the unsynchronized data to the target data table. According to the embodiment of the application, the change table is used for recording the changed data in the source data table, and in the service operation process, if the data in the source data table changes, the change table can also record the changed data, so that the synchronized data is not synchronized by setting the preset mark for the synchronized data in the change table, further, the data synchronized to the target data table cannot generate repeated data, and in the data synchronization process, the problem of service interruption cannot be caused.

Description

Data synchronization method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data synchronization method and apparatus.
Background
During the operation of the device, a process of synchronizing data between data tables is usually involved, that is, data in a source data table is synchronized into a destination data table, so as to process the data in the destination data table.
In the related art, since the source data table is used for recording data generated during the operation of the service, the data in the source data table changes from moment to moment as long as the service is operated, and in order to keep the data in the source data table consistent with the data in the destination data table, the data synchronization process of the service needs to be stopped during the data synchronization process. However, in an actual application environment, if the service is stopped, the problem of service interruption is caused.
Disclosure of Invention
In view of this, the present application provides a data synchronization method and apparatus, so as to solve the problem that a process of stopping a service to perform data synchronization may cause service interruption.
According to a first aspect of embodiments of the present application, there is provided a data synchronization method, which is applied to a system including a source data table, a change table corresponding to the source data table, and a destination data table, where the change table is used to record changed data in the source data table, the method including:
synchronizing the data in the source data table to the target data table, and determining the synchronized data;
looking up the synchronized data from the change table;
setting a preset mark for the searched synchronized data in the change table;
and determining the data without the preset mark in the change table as unsynchronized data, and synchronizing the unsynchronized data to the target data table.
According to a second aspect of the embodiments of the present application, there is provided a data synchronization apparatus, where the apparatus is applied to a system including a source data table, a change table corresponding to the source data table, and a destination data table, the change table is used to record changed data in the source data table, the apparatus includes:
the first synchronization module is used for synchronizing the data in the source data table to the target data table and determining the synchronized data;
a look-up module for looking up the synchronized data from the change table;
the setting module is used for setting a preset mark for the searched synchronous data in the change table;
the determining module is used for determining the data without the preset mark in the change table as unsynchronized data;
and the second synchronization module is used for synchronizing the unsynchronized data to the target data table.
By applying the embodiment of the application, the network equipment synchronizes the data in the source data table to the target data table, determines the synchronized data, searches the synchronized data from the change table, and sets the preset mark for the searched synchronized data in the change table, so that the data without the preset mark in the change table can be determined as the unsynchronized data, and the unsynchronized data is synchronized to the target data table, thereby realizing the process of data synchronization under the condition of not stopping the service. Based on the implementation manner, since the change table is used for recording changed data in the source data table, in the service operation process, if the data in the source data table changes, the change table also records the changed data, so that the synchronized data is ensured not to be synchronized by setting a preset flag for the synchronized data in the change table, further, the data synchronized to the destination data table is ensured not to have repeated data, and in the data synchronization process, the problem of service interruption is not caused.
Drawings
FIG. 1 is a flow chart illustrating an embodiment of a method for data synchronization according to an exemplary embodiment of the present application;
FIG. 2 is a diagram illustrating a hardware configuration of a network device according to an exemplary embodiment of the present application;
fig. 3 is a block diagram of an embodiment of a data synchronization apparatus according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Fig. 1 is a flowchart of an embodiment of a data synchronization method according to an exemplary embodiment of the present application, where the embodiment may be applied to a system including a source data table, a change table corresponding to the source data table, and a destination data table, where the source data table and the destination data table may be located on one network device or two different network devices, and the source data table is used to record data generated in a service operation process; the target data table is used for recording the data synchronized by the source data table and the data synchronized by the change table; the change table is generated after the network device establishes the data synchronization task for the source data table, and is used for recording changed data in the source data table, that is, after the data synchronization task is established, if data in the source data table changes, the changed data is recorded in the change table. In the embodiment of the present application, taking an example that the source data table and the destination data table are located in one network device for explanation, as shown in fig. 1, the data synchronization method may include two processes: a full data synchronization process and an incremental data synchronization process, wherein the full data synchronization process refers to synchronizing all data in a source data table into a destination data table, the full data synchronization process is performed in steps 101-103, the incremental data synchronization process refers to synchronizing data changed in the source data table into the destination data table, the incremental data synchronization process is performed in steps 104-105, and before the incremental data synchronization process is performed, the full data synchronization process needs to be performed once to ensure that the data in the source data table and the data in the destination data table are consistent, the steps 101-105 are as follows:
step 101: and synchronizing the data in the source data table to the destination data table, and determining the synchronized data.
In an embodiment, the source data table may be a data table established by the network device during service initialization to record data generated during service operation, and the network device further performs a reading operation on the source data table for service processing use. The target data table can be a data table generated by the network equipment when establishing a data synchronization task so as to record data synchronized from the source data table, so that the network equipment can operate the target data table when needing to operate and count the data according to service requirements, and the service operation and the operation are separately performed through the two tables, thereby ensuring the normal operation of the service.
In another embodiment, the network device may determine data in the source data table that has been successfully synchronized into the destination data table as synchronized data.
Step 102: the synchronized data is looked up from the change table.
In an embodiment, the network device may first determine a data identifier corresponding to the synchronized data, search for data including the data identifier from a change table, match the synchronized data with each piece of searched data if the number of the searched data exceeds a preset value, and determine the successfully matched data as the searched synchronized data; otherwise, the searched data can be directly determined as the searched synchronized data.
The change table may record a corresponding relationship between a data identifier and data, where the data identifier may be an address for storing data, a number or a character, or a combination of a number and a character. Since there may be a case where multiple pieces of data are found when the data including the data identifier is found from the change table by using the data identifier corresponding to the synchronized data, in order to ensure that the found data is real synchronized data, when the multiple pieces of data are found by using the data identifier, the real synchronized data is further determined in a manner that the synchronized data are matched with the found multiple pieces of data one by one, and the preset value may be 2. For example, after the data synchronization task is established, the source data table records data a, and the corresponding address is 1, that is, the data identifier is 1, at this time, the data a and the data identifier 1 are also recorded in the change table, after the data a in the source data table is synchronized to the destination data table, the data a in the source data table is changed to data AA, and the data identifier corresponding to the data AA is still 1, so that the data AA and the data identifier 1 are recorded in the change table, at this time, there are 2 pieces of data in the change table: the data a and the data AA are both 1, and therefore, after the data a in the source data table is synchronized to the destination data table, the synchronized data is the data a, and then the change table is searched by using the data identifier 1 corresponding to the data a, and two pieces of data can be found: and the data a and the data AA need to be further matched with the two data by using the data a respectively, and the successfully matched data (data a) is determined as the searched synchronized data.
In another embodiment, the network device may also directly match the synchronized data with each piece of data in the change table, and determine the matched data as the searched synchronized data.
Step 103: and setting a preset mark for the searched synchronized data in the change table.
In an embodiment, the preset mark may be a number or a character, or may be a combination of a number and a character, and the application is not limited herein as long as it can be determined that the data provided with the preset mark represents synchronized data. For example, a list of state values may be added to the change table, where the preset flag may be 1, that is, the state value corresponding to the data initially recorded in the change table is 0 or null, which indicates that the data is not synchronized, and after the data is found, the state value corresponding to the found data is set from 0 or null to 1, which indicates that the data is synchronized.
In an exemplary scenario, table 1 is an exemplary source data table, table 2 is an exemplary change table, an address of the stored data is used as a data identifier in table 2, table 1 records two pieces of data (AAA, BBB, CCC) and (DDD, EEE, FFF), where the address corresponding to (AAA, BBB, CCC) is 1, and the address corresponding to (DDD, EEE, FFF) is 2; table 2 records three pieces of data (DDD, EEE, FFF), (WWW, UUU, III), (VVV, NNN, MMM), where the address corresponding to (WWW, UUU, III) is 3 and the address corresponding to (VVV, NNN, MMM) is 4. After the data (AAA, BBB, CCC) and (DDD, EEE, FFF) in table 1 are synchronized to the destination data table, the data identifier 1 corresponding to (AAA, BBB, CCC) is utilized, the data including the data identifier 1 is not found from table 2, the data identifier 2 corresponding to (DDD, EEE, FFF) is reused, one piece of data (DDD, EEE, FFF) including the data identifier 2 can be found from table 2, and then the state value corresponding to (DDD, EEE, FFF) can be set to 1, so that table 3 is obtained.
Is listed as one Column two Column three
AAA BBB CCC
DDD EEE FFF
TABLE 1
Data identification Status value Is listed as one Column two Column three
2 0 DDD EEE FFF
3 0 WWW UUU III
4 0 VVV NNN MMM
TABLE 2
Data identification Status value Is listed as one Column two Column three
2 1 DDD EEE FFF
3 0 WWW UUU III
4 0 VVV NNN MMM
TABLE 3
It should be noted that the network device may delete the data with the preset mark from the change table within the preset time period, so as to maintain the change table, and further, the change table is not greatly expanded
Step 104: and determining the data without the preset mark in the change table as the unsynchronized data.
In an embodiment, during the full data synchronization process of the network device, since the service is still running, the data in the source data table may change, after the change table is created, the change data may be recorded in the change table while being recorded in the source data table, and the change data may not be completely synchronized from the source data table to the destination data table during the full data synchronization process, so that it is necessary to determine the unsynchronized data (data without a preset flag) other than the synchronized data (data with a preset flag) from the change table, and resynchronize the unsynchronized data to the destination data table, for example, during the full data synchronization process, the source data table has data a recorded therein, the change table has data a recorded therein, after the full data synchronization, a new piece of data B is added behind the data a in the source data table, and the change table records data B; since the data A is synchronized and the data B is not synchronized, the unsynchronized data B can be synchronized to the target data table from the change table only in the incremental data synchronization process.
In the exemplary scenario shown in step 103, as shown in table 3, the preset flag is 1, and since the corresponding state value of (DDD, EEE, FFF) is 1, it indicates that the data is synchronized data; the state value corresponding to (WWW, UUU, III), (VVV, NNN, MMM) is 0, indicating that it is unsynchronized data, and therefore, (WWW, UUU, III), (VVV, NNN, MMM) can be determined as unsynchronized data.
Step 105: the unsynchronized data is synchronized to the destination data table.
In an embodiment, the change table may further record an operation identifier, and when data in the source data table changes, the network device may determine a data identifier and an operation identifier corresponding to the changed data, and then record the data identifier, the changed data, and the operation identifier to the change table correspondingly, where the operation identifier may include an update identifier, an insertion identifier, and a deletion identifier. In the synchronization process, the network device may search for an operation identifier corresponding to the unsynchronized data from the change table, and synchronize the unsynchronized data to the destination data table according to the operation identifier.
The description of the network device searching for the operation identifier corresponding to the unsynchronized data may refer to the searching process in step 102, and after the unsynchronized data is found, the corresponding operation identifier is obtained. If the operation identifier is an update identifier, inquiring corresponding data from the target data table according to the data identifier of the unsynchronized data, and updating the inquired data by utilizing the unsynchronized data; if the operation identifier is an insertion identifier, inserting the unsynchronized data and the data identifier of the unsynchronized data into a target data table; and if the operation identifier is a deletion identifier, inquiring corresponding data from the target data table according to the data identifier of the unsynchronized data, and deleting the inquired data from the target data table.
In an exemplary scenario, table 4 is another exemplary change table, table 5 is a destination data table, the state values of three pieces of data in table 4 are all 0, that is, all the three pieces of data are unsynchronized data, and the operation identifier a is a deletion identifier, the operation identifier b is an update identifier, and the operation identifier c is an insertion identifier, in the process of synchronizing each piece of unsynchronized data in table 4 to table 5 according to the operation identifier, because the operation identifier a corresponding to the first piece of data is a deletion identifier, the corresponding data (AA, BB) is queried from table 5 according to the data identifier 1 of the first piece of data, and (AA, BB) is deleted from table 5; because the operation identifier b corresponding to the second piece of data is an update identifier, the corresponding data (CC, FF) is queried from the table 5 according to the data identifier 2 of the second piece of data, and the data (CC, FF) is updated to (CC, DD); since the operation identifier c corresponding to the third piece of data is an insertion identifier, the data identifier 3 and the data (EE, EE) are inserted into table 5, and the target data table is finally obtained as table 6.
Data identification Status value Operation mark Is listed as one Column two
1 0 a AA BB
2 0 b CC DD
3 0 c EE EE
TABLE 4
Data identification Is listed as one Column two
1 AA BB
2 CC FF
TABLE 5
Data identification Is listed as one Column two
1 AA BB
2 CC DD
3 EE EE
TABLE 6
It should be noted that, the network device may further record an operation time for each piece of data in the change table, that is, a time for recording the piece of data into the change table, and in a process of synchronizing unsynchronized data in the change table to the destination data table, when the synchronization process stops executing, the network device may record an operation time corresponding to the data being synchronized, and when the synchronization process starts executing again, the network device may find corresponding data according to the recorded operation time, and continue synchronizing the data from the piece of data into the destination data table in the change table. Therefore, the data synchronization task can be ensured to be continuously completed, and the data synchronization task cannot be re-executed due to the intermediate pause.
It should be further noted that, after the network device synchronizes the unsynchronized data to the destination data table, a preset flag may be set for the unsynchronized data in the change table to ensure that all data recorded in the change table later is data without a preset flag, so as long as the network device synchronizes the data without a preset flag in the change table to the destination data table at regular time, it may be ensured that the data in the destination data table and the data in the source data table are consistent, and duplicate data does not occur in the destination data table.
In this embodiment, the network device synchronizes data in the source data table to the destination data table, determines synchronized data, searches the synchronized data from the change table, and sets a preset flag for the searched synchronized data in the change table, so that data without the preset flag in the change table can be determined as unsynchronized data, and the unsynchronized data is synchronized to the destination data table, thereby implementing a process of data synchronization without stopping a service. Based on the implementation manner, since the change table is used for recording changed data in the source data table, in the service operation process, if the data in the source data table changes, the change table also records the changed data, so that the synchronized data is ensured not to be synchronized by setting a preset flag for the synchronized data in the change table, further, the data synchronized to the destination data table is ensured not to have repeated data, and in the data synchronization process, the problem of service interruption is not caused.
Corresponding to the embodiment of the data synchronization method, the application also provides an embodiment of a data synchronization device.
The embodiment of the data synchronization device can be applied to network equipment. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for operation through the processor of the device where the software implementation is located as a logical means. From a hardware aspect, as shown in fig. 2, a hardware structure diagram of a network device according to an exemplary embodiment is shown in this application, except for the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 2, a device where the apparatus in the embodiment is located may also include other hardware according to an actual function of the device, which is not described again.
Fig. 3 is a block diagram of an embodiment of a data synchronization apparatus according to an exemplary embodiment of the present application, where the embodiment may be applied to a system including a source data table, a change table corresponding to the source data table, and a destination data table, where the change table is used to record changed data in the source data table, and the data synchronization apparatus includes: a first synchronization module 310, a lookup module 320, a setup module 330, a determination module 340, and a second synchronization module 350.
The first synchronization module 310 is configured to synchronize data in the source data table to the destination data table, and determine synchronized data;
a lookup module 320 for looking up synchronized data from the change table;
a setting module 330, configured to set a preset flag for the searched synchronized data in the change table;
a determining module 340, configured to determine data in the change table without setting a preset flag as unsynchronized data;
a second synchronization module 350, configured to synchronize unsynchronized data to the destination data table.
In an embodiment, the apparatus further comprises (not shown in fig. 3):
and the deleting module is used for deleting the data with the preset marks from the change table within a preset time period.
In an embodiment, the searching module 320 is specifically configured to determine a data identifier corresponding to the synchronized data; searching data corresponding to the data identification from the change table; if the number of the searched data exceeds a preset value, matching the synchronized data with each searched data, and determining the successfully matched data as the synchronized data; otherwise, the searched data is determined as synchronized data.
In an embodiment, the apparatus may further comprise (not shown in fig. 3):
the first maintenance change table module is used for determining a data identifier and an operation identifier corresponding to changed data when the data in the source data table are changed; correspondingly recording the data identification, the change data and the operation identification into a change table;
the second synchronization module 350 is specifically configured to search, from the change table, an operation identifier corresponding to unsynchronized data; and synchronizing the unsynchronized data to a target data table according to the operation identifier, wherein the operation identifier comprises an updating identifier, an inserting identifier and a deleting identifier.
In an embodiment, the setting module 330 is further configured to set a preset flag for the unsynchronized data in the change table after the second synchronization module 350 synchronizes the unsynchronized data in the change table to the destination data table.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
As described in the foregoing embodiment, the network device synchronizes data in the source data table to the destination data table, determines synchronized data, searches the synchronized data from the change table, and sets a preset flag for the searched synchronized data in the change table, so that data without a preset flag set in the change table can be determined as unsynchronized data, and synchronizes the unsynchronized data to the destination data table, thereby implementing a process of data synchronization without stopping a service. Based on the implementation manner, since the change table is used for recording changed data in the source data table, in the service operation process, if the data in the source data table changes, the change table also records the changed data, so that the synchronized data is ensured not to be synchronized by setting a preset flag for the synchronized data in the change table, further, the data synchronized to the destination data table is ensured not to have repeated data, and in the data synchronization process, the problem of service interruption is not caused.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (8)

1. A data synchronization method is applied to a system comprising a source data table, a change table corresponding to the source data table and a destination data table, wherein the change table is used for recording changed data in the source data table, and the method comprises the following steps:
synchronizing the data in the source data table to the target data table, and determining the synchronized data;
determining a data identifier corresponding to the synchronized data; searching the data comprising the data identification from the change table; if the number of the searched data exceeds a preset value, matching the synchronized data with each searched data, and determining the successfully matched data as the searched synchronized data, otherwise, determining the searched data as the searched synchronized data, so as to search the synchronized data from the change table;
setting a preset mark for the searched synchronized data in the change table, wherein the preset mark is used for indicating that the corresponding data is synchronized data;
and determining the data without the preset mark in the change table as unsynchronized data, and synchronizing the unsynchronized data in the change table to the target data table.
2. The method of claim 1, further comprising:
and deleting the data with the preset marks from the change table within a preset time period.
3. The method of claim 1, further comprising:
when data in the source data table changes, determining a data identifier and an operation identifier corresponding to the changed data;
correspondingly recording the data identification, the change data and the operation identification into the change table;
the synchronizing the unsynchronized data to the destination data table comprises:
searching an operation identifier corresponding to the unsynchronized data from the change table;
and synchronizing the unsynchronized data to the target data table according to the operation identifier, wherein the operation identifier comprises an updating identifier, an inserting identifier and a deleting identifier.
4. The method of claim 1, wherein after synchronizing the unsynchronized data to the destination data table, the method further comprises:
and setting the preset mark for the unsynchronized data in the change table.
5. A data synchronization apparatus, wherein the apparatus is applied to a system including a source data table, a change table corresponding to the source data table, and a destination data table, the change table is used to record changed data in the source data table, the apparatus includes:
the first synchronization module is used for synchronizing the data in the source data table to the target data table and determining the synchronized data;
a lookup module, configured to lookup the synchronized data from the change table, wherein the lookup module is specifically configured to: determining a data identifier corresponding to the synchronized data; searching data corresponding to the data identification from the change table; if the number of the searched data exceeds a preset value, matching the synchronized data with each searched data, and determining the successfully matched data as the synchronized data; otherwise, determining the searched data as the synchronized data;
the setting module is used for setting a preset mark for the searched synchronized data in the change table, wherein the preset mark is used for indicating that the corresponding data is the synchronized data;
the determining module is used for determining the data without the preset mark in the change table as unsynchronized data;
and the second synchronization module is used for synchronizing the unsynchronized data in the change table to the target data table.
6. The apparatus of claim 5, further comprising:
and the deleting module is used for deleting the data provided with the preset mark from the change table within a preset time period.
7. The apparatus of claim 5, further comprising:
the first maintenance change table module is used for determining a data identifier and an operation identifier corresponding to changed data when the data in the source data table are changed; correspondingly recording the data identification, the change data and the operation identification into the change table;
the second synchronization module is specifically configured to search the change table for an operation identifier corresponding to the unsynchronized data; and synchronizing the unsynchronized data to the target data table according to the operation identifier, wherein the operation identifier comprises an updating identifier, an inserting identifier and a deleting identifier.
8. The apparatus of claim 5,
the setting module is further configured to set the preset flag for the unsynchronized data in the change table after the second synchronization module synchronizes the unsynchronized data to the destination data table.
CN201710038990.1A 2017-01-19 2017-01-19 Data synchronization method and device Active CN106709066B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710038990.1A CN106709066B (en) 2017-01-19 2017-01-19 Data synchronization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710038990.1A CN106709066B (en) 2017-01-19 2017-01-19 Data synchronization method and device

Publications (2)

Publication Number Publication Date
CN106709066A CN106709066A (en) 2017-05-24
CN106709066B true CN106709066B (en) 2020-05-19

Family

ID=58908721

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710038990.1A Active CN106709066B (en) 2017-01-19 2017-01-19 Data synchronization method and device

Country Status (1)

Country Link
CN (1) CN106709066B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110019512A (en) * 2017-10-11 2019-07-16 北京国双科技有限公司 A kind of data processing method and device
CN109597687B (en) * 2018-10-31 2020-11-13 东软集团股份有限公司 Resource allocation method and device for data synchronization, storage medium and electronic equipment
CN109726243A (en) * 2019-01-03 2019-05-07 中国银行股份有限公司 A kind of purpose data classifying method, apparatus and system
CN110413690A (en) * 2019-07-03 2019-11-05 杭州数梦工场科技有限公司 Method of data synchronization, server, electronic equipment, the storage medium of database
CN111241198B (en) * 2020-01-02 2024-02-27 广州虎牙科技有限公司 Data synchronization method and device and data processing equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725186A (en) * 2004-07-23 2006-01-25 中兴通讯股份有限公司 Multiple data base data syne method
CN102495910A (en) * 2011-12-28 2012-06-13 畅捷通信息技术股份有限公司 Device and method for data timing synchronization of heterogeneous system
CN104572672A (en) * 2013-10-15 2015-04-29 北大方正集团有限公司 Heterogeneous database synchronization method and application system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101436209B (en) * 2008-12-15 2011-01-05 中兴通讯股份有限公司 Method and apparatus for synchronizing multiple databases
CN102202073B (en) * 2010-03-24 2014-05-07 杭州华三通信技术有限公司 Distributed system and data synchronization method thereof
CN104809200B (en) * 2015-04-24 2018-11-16 联动优势科技有限公司 A kind of method and apparatus of database synchronization

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725186A (en) * 2004-07-23 2006-01-25 中兴通讯股份有限公司 Multiple data base data syne method
CN102495910A (en) * 2011-12-28 2012-06-13 畅捷通信息技术股份有限公司 Device and method for data timing synchronization of heterogeneous system
CN104572672A (en) * 2013-10-15 2015-04-29 北大方正集团有限公司 Heterogeneous database synchronization method and application system

Also Published As

Publication number Publication date
CN106709066A (en) 2017-05-24

Similar Documents

Publication Publication Date Title
CN106709066B (en) Data synchronization method and device
US9372908B2 (en) Merging an out of synchronization indicator and a change recording indicator in response to a failure in consistency group formation
CN106777225B (en) Data migration method and system
CN108536752B (en) Data synchronization method, device and equipment
CN106815218B (en) Database access method and device and database system
US9836361B2 (en) Data replicating system, data replicating method, node device, management device and computer readable medium
US9251230B2 (en) Exchanging locations of an out of synchronization indicator and a change recording indicator via pointers
CN107590207B (en) Data synchronization method and device and electronic equipment
US20110258160A1 (en) Data synchronization methods for synchronizing data in communication system and communication systems
CN104346479A (en) Database synchronization method and database synchronization device
CN111400407B (en) Data synchronization method and device, storage medium and electronic device
CN104346373A (en) Partition log queue synchronization management method and device
CN113204598B (en) Data synchronization method, system and storage medium
CN104301233A (en) Route access method, route access system and user terminal
CN106933703A (en) A kind of method of database data backup, device and electronic equipment
CN106294769B (en) The mthods, systems and devices of synchronous engineering data
CN102202087A (en) Method for identifying storage equipment and system thereof
CN104092726A (en) Automatic replacing method and apparatus of same-name file
CN104462342B (en) database snapshot synchronization processing method and device
CN102024040A (en) Database synchronization method, device and system
CN106201772A (en) The backup of a kind of operating system based on data center, restoration methods and device
KR20180012436A (en) The database management system and method for preventing performance degradation of transaction when table reconfiguring
CN105511808B (en) Data operation method, system and related device
CN111061740A (en) Data synchronization method, equipment and storage medium
CN113934742B (en) Data updating method, node information storage method, electronic device and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant