CN102970373B - A kind of method of data synchronization, Apparatus and system - Google Patents

A kind of method of data synchronization, Apparatus and system Download PDF

Info

Publication number
CN102970373B
CN102970373B CN201210510333.XA CN201210510333A CN102970373B CN 102970373 B CN102970373 B CN 102970373B CN 201210510333 A CN201210510333 A CN 201210510333A CN 102970373 B CN102970373 B CN 102970373B
Authority
CN
China
Prior art keywords
data
information
synchronous
interface table
statement
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
CN201210510333.XA
Other languages
Chinese (zh)
Other versions
CN102970373A (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.)
Hunan Yaxin Anhui Technology Co Ltd
Original Assignee
Asiainfo Technologies China Inc
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 Asiainfo Technologies China Inc filed Critical Asiainfo Technologies China Inc
Priority to CN201210510333.XA priority Critical patent/CN102970373B/en
Publication of CN102970373A publication Critical patent/CN102970373A/en
Application granted granted Critical
Publication of CN102970373B publication Critical patent/CN102970373B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of method of data synchronization, Apparatus and system.Method is specially: before submission processing transactions, obtain the unique identification of current processing transactions; According to the described unique identification obtained, inquire about the revocation information of current processing transactions; Resolve the described revocation information of inquiry, generate synchrodata information, and described synchrodata information is recorded in synchronous data interface table; Described synchronous data interface table is sent to and needs by synchronous equipment.Method provided by the invention, Apparatus and system, can realize the automatic collection of synchrodata, reduces system complexity, improves Data Collection accuracy rate, improves system processing speed, system is easily safeguarded, realizes Modular Data synchronous.

Description

A kind of method of data synchronization, Apparatus and system
Technical field
The present invention relates to computer realm, particularly a kind of method of data synchronization, Apparatus and system.
Background technology
Along with the sustained and rapid development of internet and the extensively universal of PC, also become increasingly complex to the operation of database, the requirement of people to information sharing is also more and more higher, thus makes data synchronization problems become a hot issue.
Prior art generally adopt as under type: when there being service needed process, the data syn-chronization attribute set arranged by type of service backs up corresponding MSDS, and each in described data syn-chronization attribute set represents the synchronous MSDS of different needs; After Business Processing, according to data syn-chronization attribute set, obtain current up-to-date MSDS, and the MSDS backed up before current up-to-date MSDS and Business Processing is contrasted, generate and need synchronous data, and will synchronous data be needed to insert in synchronous data interface table; Described synchronous data interface table is sent to the equipment needing data syn-chronization by sync cap, the described equipment of data syn-chronization that needs, according to the synchronizing information received, synchronously processes.
But, because the process of existing business to data is complicated and changeable, data volume to be processed is needed also day by day to increase severely, adopt the existing method of synchronization, before the synchronization, need first to back up a large amount of data, thus take a large amount of internal memory, the data before and after contrast backup are formed in the process of synchrodata and also will produce too much system consumption.And, collect at data syn-chronization attribute set in the process of the data before and after backup, easily error in data occurs, so the accuracy rate of data syn-chronization and consistency are difficult to ensure.Thus existing method of data synchronization have impact on processing speed and the systematic function of whole synchro system.
Summary of the invention
In order to solve the problems of the technologies described above, the present invention proposes a kind of method of data synchronization, Apparatus and system, in order to realize the automatic collection of synchrodata, reduce system complexity, improve Data Collection accuracy rate, improve system processing speed, system is easily safeguarded, realizes Modular Data synchronous.
The invention provides a kind of method of data synchronization, comprising:
Before submission processing transactions, obtain the unique identification of current processing transactions;
According to the described unique identification obtained, inquire about the revocation information of current processing transactions;
Resolve the described revocation information of inquiry, generate synchrodata information, and described synchrodata information is recorded in synchronous data interface table;
Described synchronous data interface table is sent to and needs by synchronous equipment.
Preferably, the described described unique identification according to obtaining, inquire about the revocation information of current processing transactions, comprising:
According to the unique identification of the current processing transactions obtained, in system view, search affairs flash back table;
In described affairs flash back table, obtain the revocation information of the tables of data of current amendment affairs.
Preferably, described described revocation information of resolving inquiry, generates synchrodata information, and described synchrodata information is recorded in synchronous data interface table, comprising:
Identify the process statement type in the described revocation information of inquiry, described process statement type comprises: cancel statement, inserts statement and upgrades statement;
According to different process statement types, generate different synchrodata information, and be recorded in synchronous data interface table.
Preferably, described according to different process statement types, generate different synchrodata information, and be recorded in synchronous data interface table, comprising:
When described process statement type is cancel statement, record identification is obtained from revocation information, obtain the insertion recorded information in data MSDS according to record identification, described record identification is used for the information in data information table in unique identification file, data block and this data block;
By in described insertion recorded information write synchronous data interface table, and mark inserts record identification in synchronous data interface table.
Preferably, described according to different process statement types, generate different synchrodata information, and be recorded in synchronous data interface table, comprising:
When described process statement type, when inserting statement, synchronous data table name is replaced to sync cap table name, and perform the statement after resolving, in synchronous data interface table, generate synchrodata;
Deletion record mark is marked in synchronous data interface table.
Preferably, described according to different process statement types, generate different synchrodata information, and be recorded in synchronous data interface table, comprising:
When described process statement is when upgrading statement, record identification is obtained from revocation information, obtain recorded information in data MSDS according to record identification, described record identification is used for a line information in data information table in unique identification file, data block and this data block;
By in synchronous data interface table corresponding for described recorded information write, and in synchronous data interface table, stamp amendment record mark.
Preferably, described being sent to by described synchronous data interface table needs by synchronous equipment, comprising:
By described synchronous data interface table by sync cap, form sync data file;
In file transfer protocol (FTP) mode, described sync data file is sent to and needs by synchronizer.
Preferably, described being sent to by described synchronous data interface table needs by after synchronous equipment, also comprises:
Need the sync data file received by synchronous device scan, according to synchronous data interface table name and record identification synchrodata, complete synchronous rear feedback synchronization result.
Present invention also offers a kind of data synchronization unit, comprising:
Acquisition module, for before submission processing transactions, obtains the unique identification of current processing transactions;
Search module, for according to the described unique identification obtained, inquire about the revocation information of current processing transactions;
Parsing module, for resolving the described revocation information of inquiry, generating synchrodata information, and being recorded in synchronous data interface table by described synchrodata information;
Delivery module, needs by synchronous equipment for being sent to by described synchronous data interface table.
Preferably, described in search module, comprising:
Search submodule, for the unique identification according to the current processing transactions obtained, in system view, search affairs flash back table;
Obtain submodule, in described affairs flash back table, obtain the revocation information that Current transaction relates to the tables of data of amendment.
Preferably, described parsing module, comprising:
Recognin module, for identifying the process statement type in the described revocation information of inquiry, described process statement type comprises: cancel statement, inserts statement and upgrades statement;
Record sub module, for according to different process statement types, generates different synchrodata information, and is recorded in synchronous data interface table.
Preferably, described record sub module, comprising:
Intron module, for when described process statement type is cancel statement, record identification is obtained from revocation information, obtain the insertion recorded information in data MSDS according to record identification, described record identification is used for the information in data information table in unique identification file, data block and this data block;
Newly-increased record sub module, for described insertion recorded information being write in service synchronization data-interface table, and mark inserts record identification in synchronous data interface table.
Preferably, described record sub module, comprising:
Deleting submodule, during for being insertion statement when described process statement type, synchronous data table name being replaced to service synchronization interface table name, and perform the statement after resolving, in synchronous data interface table, generate synchrodata;
Deletion record submodule, for marking deletion record mark in synchronous data interface table.
Preferably, described record sub module, comprising:
Upgrade submodule, during for being renewal statement when described process statement, from revocation information, obtain record identification, obtain recorded information in data MSDS according to record identification, described record identification is used for a line information in data information table in unique identification file, data block and this data block;
Amendment record submodule, for described recorded information being write in corresponding synchronous data interface table, and stamps amendment record mark in synchronous data interface table.
Preferably, described delivery module, comprising:
Generate submodule, for described synchronous data interface table is passed through sync cap, form sync data file;
Transmit submodule, in file transfer protocol (FTP) mode, described sync data file is sent to and needs by synchronous equipment.
Present invention also offers a kind of data synchronous system, comprising:
Device described in above-mentioned any one, synchronization module and by synchronization module,
Described synchronization module, for carrying out transaction;
Described by synchronization module, for scanning the sync data file received, according to synchronous data interface table name and record identification synchrodata, complete feedback synchronization result after data syn-chronization.
A kind of method of data synchronization provided by the present invention, Apparatus and system, by affairs follow-up mechanism, obtain the unique ID of Current transaction before the transaction commits, adopt transaction-level Flashback Technology simultaneously, revocation information is inquired about according to affairs ID, process, obtain and need synchronous data, realize synchronous, avoid and generate synchrodata table by way of contrast, take a large amount of internal memory, affect synchronous processing speed, also can affect the problem of the performance of whole system simultaneously.
And, can collect fast and accurately and need synchronous data, improve data syn-chronization speed, minimizing system pressure store, reduce system performance loss, and data syn-chronization function can be separated with data service function, and when system maintenance or new demand support, automatically newly-increased data variation information can automatic synchronization, accurately keeps data consistency.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the method flow diagram of a kind of method of data synchronization that the embodiment of the present invention one discloses;
Fig. 2 is the method flow diagram of the another kind of method of data synchronization that the embodiment of the present invention two discloses;
Fig. 3 is the structural representation of a kind of data synchronization unit that the embodiment of the present invention three discloses;
Fig. 4 is the structural representation of the another kind of data synchronization unit that the embodiment of the present invention three discloses;
Fig. 5 is the structural representation of the another kind of data synchronization unit that the embodiment of the present invention three discloses;
Fig. 6 is the structural representation of the another kind of data synchronization unit that the embodiment of the present invention three discloses;
Fig. 7 is a kind of data synchronous system frame diagram that the embodiment of the present invention four discloses.
Embodiment
For enabling above-mentioned purpose of the present invention, feature and advantage become apparent more, are described in detail the embodiment of the present invention below in conjunction with accompanying drawing.
Embodiment one
Refer to Fig. 1, it is the method flow diagram of a kind of method of data synchronization that the embodiment of the present invention one discloses, and comprises the following steps:
Step 101: before submission processing transactions, obtain the unique identification of current processing transactions;
Step 102: according to the described unique identification obtained, inquire about the revocation information of current processing transactions;
Step 103: the described revocation information of resolving inquiry, generates synchrodata information, and is recorded in synchronous data interface table by described synchrodata information;
Step 104: described synchronous data interface table is sent to and needs by synchronous equipment.
Preferably, described step 102 comprises:
According to the unique identification of the current processing transactions obtained, in system view, search affairs flash back table;
In described affairs flash back table, obtain the revocation information of the tables of data of current amendment affairs.
Preferably, described step 103 comprises:
Step 103A: identify the process statement type in the described revocation information of inquiry, described process statement type comprises: cancel statement, inserts statement and upgrades statement;
Step 103B: according to different process statement types, generates different synchrodata information, and is recorded in synchronous data interface table.
When described process statement type is cancel statement, preferably, described step 103B is:
From revocation information, obtain record identification, obtain the insertion recorded information in data MSDS according to record identification, described record identification is used for the information in data information table in unique identification file, data block and this data block;
By in described insertion recorded information write service synchronization data-interface table, and mark inserts record identification in synchronous data interface table.When described process statement type is that when inserting statement, preferably, described step 103B is:
Synchronous data table name is replaced to service synchronization interface table name;
Deletion record mark is marked in synchronous data interface table.
When described process statement is that when upgrading statement, preferably, described step 103B is:
Obtain record identification, obtain recorded information in MSDS according to record identification, described record identification is used for a line information in unique identification file, data block and this data block in a database;
By in synchronous data interface table corresponding for described recorded information write, and in synchronous data interface table, stamp amendment record mark.
Preferably, step 104 comprises:
Step 104A: by described synchronous data interface table by sync cap, forms sync data file;
Step 104B: in file transfer protocol (FTP) mode, sends to described sync data file and needs by synchronizer.
Preferably, described method also comprises: need the sync data file received by synchronous device scan, according to synchronous data interface table name and record identification, by the insertion record identification in said method, represents and does insertion process to the data received.Deletion record mark represents does delete processing to data, and amendment record mark represents makes an amendment process to data.By judging that mark synchronously processes the data received, complete synchronous rear feedback synchronization result.
By above-described embodiment one, the method of a kind of data syn-chronization provided by the invention can be found out, adopt Flashback Technology, obtain the revocation information of all changes during transaction, thus the change of data in concrete tables of data is determined by revocation information, realize data syn-chronization, avoid storage mass data table and take ample resources, avoid correction data table information and bring error problem, also improve the performance of data synchronization processing speed and whole system simultaneously.
Embodiment two
In order to better describe the present invention more specifically, below with concrete affairs 1, relating to 3 tables of data synchronizing information scenes is that example is described, and concrete grammar refers to the method for the another kind of data syn-chronization that Fig. 2 discloses, and specifically comprises the following steps:
Step 201: before submission processing transactions 1, obtain the unique ID 1 of current processing transactions;
Step 202: according to the described unique ID 1 obtained, inquire about the revocation information UNDO information of current processing transactions;
Step 203: the described UNDO information of resolving inquiry, generates synchrodata information, and is recorded in synchronous data interface table by described synchrodata information;
Step 204: described synchronous data interface table is sent to and needs by synchronous equipment.
Preferably, described step 202 comprises:
According to the unique identification of the current processing transactions obtained, in system view, search affairs flash back table;
In described affairs flash back table, obtain the revocation information of the tables of data of current amendment affairs.
Preferably, described step 203 comprises:
Step 203A: identify the process statement type in the described revocation information of inquiry, described process statement type comprises: cancel statement, inserts statement and upgrades statement;
Step 203B: according to different process statement types, generates different synchrodata information, and is recorded in synchronous data interface table.
When described process statement type is cancel statement, preferably, described step 203B is:
From revocation information, obtain record identification, obtain the insertion recorded information in data MSDS according to record identification, described record identification is used for the information in data information table in unique identification file, data block and this data block;
By in described insertion recorded information write service synchronization data-interface table, and mark inserts record identification in synchronous data interface table.
When described process statement type is that when inserting statement, preferably, described step 203B is:
Synchronous data table name is replaced to service synchronization interface table name, and performs the statement after resolving, in synchronous data interface table, generate synchrodata;
Deletion record mark is marked in synchronous data interface table.
When described process statement is that when upgrading statement, preferably, described step 203B is:
Obtain record identification, obtain recorded information in data MSDS according to record identification, described record identification is used for a line information in data information table in unique identification file, data block and this data block;
By in synchronous data interface table corresponding for described recorded information write, and in synchronous data interface table, stamp amendment record mark.
Preferably, step 204 comprises:
Step 204A: by described synchronous data interface table by sync cap, forms sync data file;
Step 204B: in file transfer protocol (FTP) mode, sends to described sync data file and needs by synchronizer.
Preferably, described method also comprises: need the sync data file received by synchronous device scan, according to synchronous data interface table name and record identification synchrodata, completes synchronous rear feedback synchronization result.
If when the affairs 1 of process relate to three data MSDSs, data information table 1, data information table 2 and data information table 3.
Such as synchronization scenarios A: before submission processing transactions 1, all delete processing is carried out to three data MSDSs that affairs 1 relate to, the unique identification obtaining current processing transactions is ID1, then pass through Flashback Technology, according to ID1 in system view, what obtain transaction-level cancels UNDO information, and affairs relate to three data table information complete documentation in affairs flash back table of amendment.Because all carry out delete processing to three data MSDSs, three the UNDO information then generated, all insert statement, when resolving statement type for inserting statement, then according to preferably, process described in described step 203B, be specially: data information table name is replaced to sync cap table name, and perform the statement after resolving, in synchronous data interface table, generate synchrodata; Deletion record mark is marked in synchronous data interface table.Then realized the transmission of synchrodata by step 204, be specially: by described synchronous data interface table by sync cap, form sync data file; In file transfer protocol (FTP) mode, described sync data file is sent to and needs by synchronous equipment.The then sync data file that received by synchronous device scan of described needs, according to synchronous data interface table name and record identification, carry out synchrodata, be specially and identify delete flag mark, indicating the data in the data syn-chronization data file received is do delete processing, completes synchronous rear feedback synchronization result.
Such as synchronization scenarios B: before submission processing transactions 1, the insertion of all carrying out of three data MSDSs that affairs 1 relate to is processed, the unique identification obtaining current processing transactions is ID1, according to ID1, inquire about the revocation information of current processing transactions, then by Flashback Technology, according to ID1 in system view, what obtain transaction-level cancels UNDO information, and affairs relate to three data table information complete documentation in affairs flash back table of amendment.Because be all carried out inserting process to three data MSDSs, then three the UNDO information generated are all cancel statements;
When to resolve statement type be cancel statement, then according to preferably, process described in described step 203B, be specially:
From revocation information, obtain record identification ROWID, obtain in data information table according to record identification ROWID indicating positions and insert recorded information, described record identification is used for the information in data information table in unique identification file, data block and this data block; By in described insertion recorded information write synchronous data interface table, and mark inserts record identification in synchronous data interface table.
Then realized the transmission of synchrodata by step 204, be specially: by described synchronous data interface table by sync cap, form sync data file; In file transfer protocol (FTP) mode, described sync data file is sent to and needs by synchronous equipment.The then sync data file that received by synchronous device scan of described needs, according to synchronous data interface table name and record identification, carry out synchrodata, be specially: identify and insert mark mark, indicating the data in the data syn-chronization data file received is do to insert process, completes synchronous rear feedback synchronization result.
Such as synchronization scenarios C: before submission processing transactions 1, to the process of all modifying of three data MSDSs that affairs 1 relate to, the unique identification obtaining current processing transactions is ID1, then pass through Flashback Technology, according to ID1 in system view, what obtain transaction-level cancels UNDO information, and affairs relate to three data table information complete documentation in affairs flash back table of amendment.Because be all carried out revising process, then three the UNDO information generated to three data MSDSs, be all upgrade statement;
When resolving statement type for upgrading statement, then according to preferably, process described in described step 203B, be specially:
Obtain record identification ROWID, the described position according to record identification ROWID instruction obtains recorded information in data information table, and described record identification is used for a line information in data information table in unique identification file, data block and this data block;
By in synchronous data interface table corresponding for described recorded information write, and in synchronous data interface table, stamp amendment record mark.
Then realized the transmission of synchrodata by step 204, be specially: by described synchronous data interface table by sync cap, form sync data file; In file transfer protocol (FTP) mode, described sync data file is sent to and needs by synchronous equipment.The then sync data file that received by synchronous device scan of described needs, according to synchronous data interface table name and record identification, carry out synchrodata, be specially: identify amendment mark mark, indicating the data in the data syn-chronization data file received is make an amendment process, completes synchronous rear feedback synchronization result.
Such as, above-mentioned before submission processing transactions 1, to the inserting respectively of three data MSDSs that affairs 1 relate to, delete, revise process, then synchronously can process according to above-mentioned three kinds of corresponding processing modes, certainly, any one or any two kinds or three kinds of data processing methods all can adopt said method to realize synchronous process.
Same for different affairs, no matter be what affairs, no matter affairs relate to how many data MSDSs, no matter affairs have carried out several data processing method, the method that all can provide according to above-described embodiment, has realized synchronously processing.
In said method, data for any affairs carry out inserting process or delete processing or revising the process that the stationary problem processed all can realize data syn-chronization, also for above-mentioned any one or any two kinds or three kinds of data processing forms, data synchronization processing can be carried out simultaneously.
By above-described embodiment two, can find out, a kind of method of data synchronization provided by the invention, by affairs follow-up mechanism, obtain the ID of Current transaction before the transaction commits, adopt transaction-level Flashback Technology simultaneously, revocation information is inquired about according to affairs ID, process, obtain and need synchronous data, realize synchronous, avoid and generate synchrodata table by way of contrast, take a large amount of internal memory, affect synchronous processing speed, also can affect the problem of the performance of whole system simultaneously.
Embodiment three
Present invention also offers a kind of data synchronization unit, specifically refer to the structural representation of a kind of data synchronization unit that Fig. 3 discloses, specifically comprise: acquisition module 301, search module 302, parsing module 303, delivery module 304,
Acquisition module 301, for before submission processing transactions, obtains the unique identification of current processing transactions;
Search module 302, for according to the described unique identification obtained, inquire about the revocation information of current processing transactions;
Parsing module 303, for resolving the described revocation information of inquiry, generating synchrodata information, and being recorded in synchronous data interface table by described synchrodata information;
Delivery module 304, needs by synchronous equipment for being sent to by described synchronous data interface table.
Preferably, described in search module 302, comprising:
Search submodule 302A, for the unique identification according to the current processing transactions obtained, in system view, search affairs flash back table;
Obtain submodule 302B, in described affairs flash back table, obtain the revocation information that Current transaction relates to the tables of data of amendment.
Preferably, described parsing module 303, comprising:
Recognin module 303A, for identifying the process statement type in the described revocation information of inquiry, described process statement type comprises: cancel statement, inserts statement and upgrades statement;
Record sub module 303B, for according to different process statement types, generates different synchrodata information, and is recorded in synchronous data interface table.
Preferably, described record sub module can be record sub module 403B, specifically as shown in Figure 4, comprising:
Intron modules A 1, for when described process statement type is cancel statement, record identification is obtained from revocation information, obtain the insertion recorded information in data MSDS according to record identification, described record identification is used for the information in data information table in unique identification file, data block and this data block;
Newly-increased record sub module A2, for described insertion recorded information being write in service synchronization data-interface table, and mark inserts record identification in synchronous data interface table.
Preferably, described record sub module can be record sub module 503B, specifically as shown in Figure 5, comprising:
Deleting submodule B1, during for being insertion statement when described process statement type, synchronous data table name being replaced to service synchronization interface table name, and perform the statement after resolving, in synchronous data interface table, generate synchrodata;
Deletion record submodule B2, for marking deletion record mark in synchronous data interface table.
Preferably, described record sub module can be record sub module 603B, specifically comprises as shown in Figure 6:
Upgrade submodule C1, during for being renewal statement when described process statement, record identification is obtained from revocation information, obtain recorded information in data MSDS according to record identification, described record identification is used for a line information in data information table in unique identification file, data block and this data block;
Amendment record submodule C2, for described recorded information being write in corresponding synchronous data interface table, and stamps amendment record mark in synchronous data interface table.
Preferably, described delivery module 604, comprising:
Generate submodule 604A, for described synchronous data interface table is passed through sync cap, form sync data file;
Transmit submodule 604B, in file transfer protocol (FTP) mode, described sync data file is sent to and needs by synchronous equipment.
Record sub module in the device disclosed in above-described embodiment, any one in record sub module 403B, record sub module 503B and record sub module 603B tri-submodules or any two or three can be comprised, to meet the demand realizing different transaction data process types.
Same for different affairs, no matter be what affairs, no matter affairs relate to how many data MSDSs, no matter affairs have carried out several data processing method, the device that all can provide according to above-described embodiment three, has realized synchronously processing.
Known by above-described embodiment, the device of a kind of data syn-chronization provided by the invention, can collect fast and accurately and need synchronous data, improve data syn-chronization speed, reduce system pressure store, reduce system performance loss, and data syn-chronization function can be separated with data service function by this device, and when system maintenance or new demand support, automatically newly-increased data variation information can automatic synchronization, accurately keeps data consistency.
Embodiment four
Present invention also offers a kind of data synchronous system, specifically refer to a kind of data synchronous system frame diagram that Fig. 7 discloses, specifically comprise
Any one data synchronization unit 702 described in synchronization module 701, above-described embodiment three and by synchronization module 703,
Described synchronization module 701, for carrying out transaction;
Described data synchronization unit 702, for realizing synchrodata generating process;
Described by synchronization module 703, for scanning the sync data file received, according to synchrodata by interface table name and record identification synchrodata, complete synchronous rear feedback synchronization result.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (14)

1. a method of data synchronization, is characterized in that, comprising:
Before submission processing transactions, obtain the unique identification of current processing transactions;
According to the described unique identification obtained, inquire about the revocation information of current processing transactions, comprising: according to the unique identification of the current processing transactions obtained, in system view, search affairs flash back table; In described affairs flash back table, obtain the revocation information of the tables of data of current amendment affairs;
Resolve the described revocation information of inquiry, generate synchrodata information, and described synchrodata information is recorded in synchronous data interface table;
Described synchronous data interface table is sent to and needs by synchronous equipment.
2. method according to claim 1, is characterized in that, described described revocation information of resolving inquiry, generates synchrodata information, and described synchrodata information be recorded in synchronous data interface table, comprising:
Identify the process statement type in the described revocation information of inquiry, described process statement type comprises: cancel statement, inserts statement and upgrades statement;
According to different process statement types, generate different synchrodata information, and be recorded in synchronous data interface table.
3. method according to claim 2, is characterized in that, described according to different process statement types, generates different synchrodata information, and is recorded in synchronous data interface table, comprising:
When described process statement type is cancel statement, record identification is obtained from revocation information, obtain the insertion recorded information in data MSDS according to record identification, described record identification is used for the information in data information table in unique identification file, data block and this data block;
By in described insertion recorded information write synchronous data interface table, and mark inserts record identification in synchronous data interface table.
4. method according to claim 2, is characterized in that, described according to different process statement types, generates different synchrodata information, and is recorded in synchronous data interface table, comprising:
When described process statement type, when inserting statement, synchronous data table name is replaced to sync cap table name, and perform the statement after resolving, in synchronous data interface table, generate synchrodata;
Deletion record mark is marked in synchronous data interface table.
5. method according to claim 2, is characterized in that, described according to different process statement types, generates different synchrodata information, and is recorded in synchronous data interface table, comprising:
When described process statement is when upgrading statement, record identification is obtained from revocation information, obtain recorded information in data MSDS according to record identification, described record identification is used for a line information in data information table in unique identification file, data block and this data block;
By in synchronous data interface table corresponding for described recorded information write, and in synchronous data interface table, stamp amendment record mark.
6. method according to claim 1, is characterized in that, described being sent to by described synchronous data interface table needs by synchronous equipment, comprising:
By described synchronous data interface table by sync cap, form sync data file;
In file transfer protocol (FTP) mode, described sync data file is sent to and needs by synchronizer.
7. method according to claim 1, is characterized in that, described being sent to by described synchronous data interface table needs by after synchronous equipment, also comprises:
Need the sync data file received by synchronous device scan, according to synchronous data interface table name and record identification synchrodata, complete synchronous rear feedback synchronization result.
8. a data synchronization unit, is characterized in that, comprising:
Acquisition module, for before submission processing transactions, obtains the unique identification of current processing transactions;
Search module, for according to the described unique identification obtained, inquire about the revocation information of current processing transactions; Describedly search module, comprising: search submodule, for the unique identification according to the current processing transactions obtained, in system view, search affairs flash back table; With, obtain submodule, in described affairs flash back table, obtain the revocation information that Current transaction relates to the tables of data of amendment;
Parsing module, for resolving the described revocation information of inquiry, generating synchrodata information, and being recorded in synchronous data interface table by described synchrodata information;
Delivery module, needs by synchronous equipment for being sent to by described synchronous data interface table.
9. device according to claim 8, is characterized in that, described parsing module, comprising:
Recognin module, for identifying the process statement type in the described revocation information of inquiry, described process statement type comprises: cancel statement, inserts statement and upgrades statement;
Record sub module, for according to different process statement types, generates different synchrodata information, and is recorded in synchronous data interface table.
10. device according to claim 9, is characterized in that, described record sub module, comprising:
Intron module, for when described process statement type is cancel statement, record identification is obtained from revocation information, obtain the insertion recorded information in data MSDS according to record identification, described record identification is used for the information in data information table in unique identification file, data block and this data block;
Newly-increased record sub module, for described insertion recorded information being write in service synchronization data-interface table, and mark inserts record identification in synchronous data interface table.
11. devices according to claim 9, is characterized in that, described record sub module, comprising:
Deleting submodule, during for being insertion statement when described process statement type, synchronous data table name being replaced to service synchronization interface table name, and perform the statement after resolving, in synchronous data interface table, generate synchrodata;
Deletion record submodule, for marking deletion record mark in synchronous data interface table.
12. devices according to claim 9, is characterized in that, described record sub module, comprising:
Upgrade submodule, during for being renewal statement when described process statement, from revocation information, obtain record identification, obtain recorded information in data MSDS according to record identification, described record identification is used for a line information in data information table in unique identification file, data block and this data block;
Amendment record submodule, for described recorded information being write in corresponding synchronous data interface table, and stamps amendment record mark in synchronous data interface table.
13. devices according to claim 8, is characterized in that, described delivery module, comprising:
Generate submodule, for described synchronous data interface table is passed through sync cap, form sync data file;
Transmit submodule, in file transfer protocol (FTP) mode, described sync data file is sent to and needs by synchronous equipment.
14. 1 kinds of data synchronous systems, is characterized in that, comprising:
Data synchronization unit described in the claims 8 to 13 any one, synchronization module and by synchronization module,
Described synchronization module, for carrying out transaction;
Described data synchronization unit, for realizing synchrodata generating process;
Described by synchronization module, for scanning the sync data file received, according to synchronous data interface table name and record identification synchrodata, complete feedback synchronization result after data syn-chronization.
CN201210510333.XA 2012-12-03 2012-12-03 A kind of method of data synchronization, Apparatus and system Active CN102970373B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210510333.XA CN102970373B (en) 2012-12-03 2012-12-03 A kind of method of data synchronization, Apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210510333.XA CN102970373B (en) 2012-12-03 2012-12-03 A kind of method of data synchronization, Apparatus and system

Publications (2)

Publication Number Publication Date
CN102970373A CN102970373A (en) 2013-03-13
CN102970373B true CN102970373B (en) 2015-11-11

Family

ID=47800252

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210510333.XA Active CN102970373B (en) 2012-12-03 2012-12-03 A kind of method of data synchronization, Apparatus and system

Country Status (1)

Country Link
CN (1) CN102970373B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914300B (en) * 2014-03-24 2017-04-05 深圳天珑无线科技有限公司 A kind of implementation method and electronic equipment of software development affairs
CN104317921B (en) * 2014-10-29 2017-10-17 北京思特奇信息技术股份有限公司 A kind of integration across database data synchronous system and method
CN106203970A (en) * 2015-04-29 2016-12-07 阿里巴巴集团控股有限公司 The recording method of issued transaction and device
CN106446107A (en) * 2016-09-05 2017-02-22 努比亚技术有限公司 Processing device and method for configuration files
CN107656970A (en) * 2017-08-31 2018-02-02 郑州云海信息技术有限公司 A kind of method of data synchronization, device and server
CN109284287B (en) * 2018-08-22 2024-02-02 平安科技(深圳)有限公司 Data backtracking and reporting method and device, computer equipment and storage medium
CN111831755B (en) * 2020-07-23 2024-01-16 北京思特奇信息技术股份有限公司 Cross-database data synchronization method, system, medium and device
CN112463810A (en) * 2020-12-08 2021-03-09 佳讯飞鸿(北京)智能科技研究院有限公司 Data processing method, device, equipment and storage medium based on distributed transaction

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464890A (en) * 2008-12-30 2009-06-24 中兴通讯股份有限公司 Mixed log generation method and resolution method
CN101719149A (en) * 2009-12-03 2010-06-02 联动优势科技有限公司 Data synchronization method and device
US7814117B2 (en) * 2007-04-05 2010-10-12 Oracle International Corporation Accessing data from asynchronously maintained index
CN102193938A (en) * 2010-03-01 2011-09-21 深圳市金蝶中间件有限公司 Method and device for acquiring incremental data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7814117B2 (en) * 2007-04-05 2010-10-12 Oracle International Corporation Accessing data from asynchronously maintained index
CN101464890A (en) * 2008-12-30 2009-06-24 中兴通讯股份有限公司 Mixed log generation method and resolution method
CN101719149A (en) * 2009-12-03 2010-06-02 联动优势科技有限公司 Data synchronization method and device
CN102193938A (en) * 2010-03-01 2011-09-21 深圳市金蝶中间件有限公司 Method and device for acquiring incremental data

Also Published As

Publication number Publication date
CN102970373A (en) 2013-03-13

Similar Documents

Publication Publication Date Title
CN102970373B (en) A kind of method of data synchronization, Apparatus and system
CN110489313B (en) Operation log recording method and device based on block chain and storage medium
CN102637214B (en) Method and system for synchronizing general data among database services
CN102272751A (en) Data integrity in a database environment through background synchronization
CN101426026A (en) Method and system for data synchronization between multiple servers
CN104331285A (en) Automatic code generation method and system
CN103049355B (en) Method and equipment for database system recovery
CN105938457A (en) Data filtering method, and device and data reading system
CN107092652A (en) The air navigation aid and device of target pages
CN104346373A (en) Partition log queue synchronization management method and device
CN104462477A (en) Data synchronizing method, device and system based on timestamp
CN106155769A (en) A kind of workflow processing method, device and workflow engine
CN101650744A (en) System and method for processing great data amount based on transport tablespace
CN103970834A (en) Recovery method for incremental data synchronization fault in isomerous database synchronizing system
CN106156227A (en) A kind of data transmission method and device
CN104065752A (en) Synchronization method of data between terminals
CN109299074A (en) A kind of data verification method and system based on templating data base view
CN104156198A (en) Method and device for automatically generating software integration version updating description
CN103186610B (en) Method of data synchronization and device
CN111294413A (en) Method, device and readable medium for determining Internet Protocol (IP) address
CN105069059A (en) Database synchronization method and apparatus
US20140108367A1 (en) Client apparatus and database server for resumable transaction and method thereof
CN103678263A (en) Graphical interface display method and system for incidence relations among document chapters
CN109728886A (en) A kind of method of data synchronization, device, equipment and storage medium suitable for cross-version upgrading
CN105634635A (en) Real-time clock (RTC) sharing method, device and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 100086, three or four floor, CLP information building, 6 South Avenue, Haidian District, Beijing, Zhongguancun

Applicant after: AsiaInfo Science & Technology (China) Co., Ltd.

Address before: 100086, three or four floor, CLP information building, 6 South Avenue, Haidian District, Beijing, Zhongguancun

Applicant before: AsiaInfo LIAN Technology (China) Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: ASIAINFO-LINKAGE (CHINA) CO., LTD. TO: ASIAINFO SCIENCE + TECHNOLOGY (CHINA) CO., LTD.

C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 100193 Beijing city northwest of Haidian District Wang Road No. 10 hospital of eastern Asia LIAN's global R & D center headquarters building

Applicant after: AsiaInfo Science & Technology (China) Co., Ltd.

Address before: 100086, three or four floor, CLP information building, 6 South Avenue, Haidian District, Beijing, Zhongguancun

Applicant before: AsiaInfo Science & Technology (China) Co., Ltd.

C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20191031

Address after: 410000 102, building 7, phase I, CEC Software Park, No. 39, Jianshan Road, Changsha high tech Development Zone, Hunan Province

Patentee after: Hunan Yaxin Anhui Technology Co., Ltd

Address before: 100193, Beijing, Haidian District East Road, No. 10 East Hospital, AsiaInfo LIAN global headquarters R & D center building

Patentee before: AsiaInfo Science & Technology (China) Co., Ltd.

TR01 Transfer of patent right