CN102970373A - Data synchronization method, device and system - Google Patents

Data synchronization method, device and system Download PDF

Info

Publication number
CN102970373A
CN102970373A CN201210510333XA CN201210510333A CN102970373A CN 102970373 A CN102970373 A CN 102970373A CN 201210510333X A CN201210510333X A CN 201210510333XA CN 201210510333 A CN201210510333 A CN 201210510333A CN 102970373 A CN102970373 A CN 102970373A
Authority
CN
China
Prior art keywords
information
data
synchronous
statement
interface table
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.)
Granted
Application number
CN201210510333XA
Other languages
Chinese (zh)
Other versions
CN102970373B (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 Lian Technology (china) 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 Asiainfo Lian Technology (china) Co Ltd filed Critical Asiainfo Lian Technology (china) Co Ltd
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

Images

Abstract

The invention discloses a data synchronization method, device and system. The data synchronization method comprises the steps of: before submitting a transaction, obtaining a unique identification of the current transaction; according to the obtained unique identification, inquiring cancel information of the current transaction; analyzing the inquired cancel information, generating synchronization data information, recording the synchronization data information in a synchronization data interface table; and transmitting the synchronization data interface table to a device to be synchronized. The data synchronization method, device and system provided by the invention have the advantages of automatically collecting synchronization data, reducing system complexity, improving data collection accuracy rate, increasing system processing speed, enabling the system to be easily maintained, and realizing modularized data synchronization.

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 extensively popularizing of the sustained and rapid development of internet and PC, the operation of database is also become increasingly complex, people are also more and more higher to the requirement of information sharing, thus so that data synchronization problems becomes a hot issue.
The general following mode that adopts of prior art: when having service needed to process, back up by the corresponding MSDS of data synchronous mark set pair of type of service setting, described data synchronous mark concentrate each represent a MSDS that different needs are synchronous; After the Business Processing, according to data synchronous mark collection, obtain current up-to-date MSDS, and current up-to-date MSDS and the MSDS of the front backup of Business Processing are compared, generating needs synchronous data, and will need synchronous data to insert in the synchronous data interface table; Described synchronous data interface table is sent to the equipment that needs data synchronous by sync cap, and the described synchronous equipment of data that needs is processed synchronously according to the synchronizing information that receives.
But, because existing business is complicated and changeable to the processing of data, need data volume to be processed also day by day to increase severely, adopt the existing method of synchronization, before synchronously, need to back up first a large amount of data, thereby take a large amount of internal memories, also will produce too much system consumption in the process of the data formation synchrodata before and after the contrast backup.And, in the process of the data before and after data synchronous mark collection is collected backup, error in data occurs easily, so synchronous accuracy rate and the consistency of data is difficult to guarantee.Thereby existing method of data synchronization has affected 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 the Data Collection accuracy rate, improve system's processing speed, system is safeguarded easily, realize that Modular Data is synchronous.
The invention provides a kind of method of data synchronization, comprising:
Before submitting processing transactions to, obtain the unique identification of current processing transactions;
According to the described unique identification that obtains, inquire about the revocation information of current processing transactions;
Resolve the described revocation information of inquiry, generate synchrodata information, and with described synchrodata information recording/in the synchronous data interface table;
Described synchronous data interface table is sent to need to be by synchronous equipment.
Preferably, described described unique identification according to obtaining is inquired about the revocation information of current processing transactions, comprising:
According to the unique identification of the current processing transactions of obtaining, 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 modification affairs.
Preferably, the described revocation information of described parsing inquiry generates synchrodata information, and with described synchrodata information recording/in the synchronous data interface table, comprising:
Processing statement type in the described revocation information of identification inquiry, described processing statement type comprises: cancel statement, insert statement and upgrade statement;
According to different processing statement types, generate different synchrodata information, and be recorded in the synchronous data interface table.
Preferably, described according to different processing statement types, generate different synchrodata information, and be recorded in the synchronous data interface table, comprising:
When described processing statement type is cancel statement, from revocation information, obtain record identification, obtain insertion recorded information in the data information table according to record identification, described record identification is used for the information in data information table unique identification file, data block and this data block;
Described insertion recorded information is write in the synchronous data interface table, and mark inserts record identification in the synchronous data interface table.
Preferably, described according to different processing statement types, generate different synchrodata information, and be recorded in the synchronous data interface table, comprising:
When described processing statement type is the insertion statement, synchronous data table name is replaced to the sync cap table name, and carry out the statement after resolving, in the synchronous data interface table, generate synchrodata;
Mark deletion record sign in the synchronous data interface table.
Preferably, described according to different processing statement types, generate different synchrodata information, and be recorded in the synchronous data interface table, comprising:
When described processing statement is when upgrading statement, from revocation information, obtain record identification, obtain recorded information in the data information table according to record identification, described record identification is used for the delegation's information in data information table unique identification file, data block and this data block;
Described recorded information is write in the corresponding synchronous data interface table, and in the synchronous data interface table, stamp the amendment record sign.
Preferably, described described synchronous data interface table sent to and need to by synchronous equipment, comprise:
Described synchronous data interface table by sync cap, is formed sync data file;
In the file transfer protocol (FTP) mode, described sync data file is sent to need to be by synchronizer.
Preferably, described described synchronous data interface table sent to and need to by after the synchronous equipment, also comprise:
The sync data file that need to be received by synchronous device scan according to synchronous data interface table name and record identification synchrodata, is finished synchronously rear feedback synchronized result.
The present invention also provides a kind of data synchronization unit, comprising:
Acquisition module is used for obtaining the unique identification of current processing transactions before submitting processing transactions to;
Search module, be used for according to the described unique identification that obtains, inquire about the revocation information of current processing transactions;
Parsing module be used for to be resolved the described revocation information of inquiry, generates synchrodata information, and with described synchrodata information recording/in the synchronous data interface table;
Delivery module, being used for described synchronous data interface table is sent to need to be by synchronous equipment.
Preferably, the described module of searching comprises:
Search submodule, be used for the unique identification according to the current processing transactions of obtaining, in system view, search affairs flash back table;
Obtain submodule, be used for obtaining the revocation information that current affairs relate to the tables of data of modification at described affairs flash back table.
Preferably, described parsing module comprises:
The recognin module, for the processing statement type of the described revocation information of identifying inquiry, described processing statement type comprises: cancel statement, insert statement and renewal statement;
Record sub module is used for according to different processing statement types, generates different synchrodata information, and is recorded in the synchronous data interface table.
Preferably, described record sub module comprises:
The intron module, be used for when described processing statement type is cancel statement, from revocation information, obtain record identification, obtain insertion recorded information in the data information table according to record identification, described record identification is used for the information in data information table unique identification file, data block and this data block;
Newly-increased record sub module be used for described insertion recorded information is write service synchronization data-interface table, and mark is inserted record identification in the synchronous data interface table.
Preferably, described record sub module comprises:
The deletion submodule is used for synchronous data table name being replaced to service synchronization interface table name, and carrying out the statement after resolving when described processing statement type is the insertion statement, generates synchrodata in the synchronous data interface table;
The deletion record submodule is used for identifying in the deletion record of synchronous data interface table mark.
Preferably, described record sub module comprises:
Updating submodule, be used for when described processing statement is the renewal statement, obtain record identification from revocation information, obtain recorded information in the data information table according to record identification, described record identification is used for the delegation's information in data information table unique identification file, data block and this data block;
The amendment record submodule is used for described recorded information is write corresponding synchronous data interface table, and stamps the amendment record sign in the synchronous data interface table.
Preferably, described delivery module comprises:
Generate submodule, be used for described synchronous data interface table is passed through sync cap, form sync data file;
Transmit submodule, be used in the file transfer protocol (FTP) mode, described sync data file is sent to need to be by synchronous equipment.
The present invention also provides a kind of data synchronous system, comprising:
The described device of above-mentioned any one, synchronization module and by synchronization module,
Described synchronization module is used for carrying out transaction;
Described by synchronization module, be used for the sync data file that scanning receives, according to synchronous data interface table name and record identification synchrodata, finish data and feed back synchronized result synchronously.
A kind of method of data synchronization provided by the present invention, Apparatus and system, by the affairs follow-up mechanism, before submitting to, affairs obtain the unique ID of current affairs, adopt simultaneously the transaction-level Flashback Technology, according to affairs ID inquiry revocation information, process, need to obtain synchronous data, realize synchronously, avoided generating the synchrodata table by the mode of contrast, take a large amount of internal memories, affect synchronous processing speed, also can affect the problem of the performance of whole system simultaneously.
And, can collect fast and accurately needs synchronous data, improve the data no-load speed, reduce system stores pressure, reduce system performance loss, and the data synchronizing 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.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, the below will do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art, apparently, accompanying drawing in the following describes only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the method flow diagram of a kind of method of data synchronization of the embodiment of the invention one announcement;
Fig. 2 is the method flow diagram of the another kind of method of data synchronization of the embodiment of the invention two announcements;
Fig. 3 is the structural representation of a kind of data synchronization unit of the embodiment of the invention three announcements;
Fig. 4 is the structural representation of the another kind of data synchronization unit of the embodiment of the invention three announcements;
Fig. 5 is the structural representation of the another kind of data synchronization unit of the embodiment of the invention three announcements;
Fig. 6 is the structural representation of the another kind of data synchronization unit of the embodiment of the invention three announcements;
Fig. 7 is a kind of data synchronous system frame diagram that the embodiment of the invention four discloses.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, below in conjunction with accompanying drawing the embodiment of the invention is described in detail.
Embodiment one
See also Fig. 1, it is the method flow diagram of a kind of method of data synchronization of the embodiment of the invention one announcement, may further comprise the steps:
Step 101: before submitting processing transactions to, obtain the unique identification of current processing transactions;
Step 102: according to the described unique identification that obtains, inquire about the revocation information of current processing transactions;
Step 103: resolve the described revocation information of inquiry, generate synchrodata information, and with described synchrodata information recording/in the synchronous data interface table;
Step 104: described synchronous data interface table is sent to need to be by synchronous equipment.
Preferably, described step 102 comprises:
According to the unique identification of the current processing transactions of obtaining, 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 modification affairs.
Preferably, described step 103 comprises:
Step 103A: the processing statement type in the described revocation information of identification inquiry, described processing statement type comprises: cancel statement, insert statement and upgrade statement;
Step 103B: according to different processing statement types, generate different synchrodata information, and be recorded in the synchronous data interface table.
When described processing statement type was cancel statement, preferred, described step 103B was:
Obtain record identification from revocation information, obtain insertion recorded information in the data information table according to record identification, described record identification is used for the information in data information table unique identification file, data block and this data block;
Described insertion recorded information is write in the service synchronization data-interface table, and mark inserts record identification in the synchronous data interface table.When described processing statement type is that preferred, described step 103B is when inserting statement:
Synchronous data table name is replaced to service synchronization interface table name;
Mark deletion record sign in the synchronous data interface table.
When described processing statement is that preferred, described step 103B is when upgrading statement:
Obtain record identification, obtain recorded information in the MSDS according to record identification, described record identification is used for the delegation's information in database unique identification file, data block and this data block;
Described recorded information is write in the corresponding synchronous data interface table, and in the synchronous data interface table, stamp the amendment record sign.
Preferably, step 104 comprises:
Step 104A: described synchronous data interface table by sync cap, is formed sync data file;
Step 104B: in the file transfer protocol (FTP) mode, described sync data file is sent to need to be by synchronizer.
Preferably, described method also comprises: the sync data file that need to be received by synchronous device scan, according to synchronous data interface table name and record identification, by the insertion record identification in the said method, expression is done insert handling to the data that receive.The expression of deletion record sign is done deletion to data and is processed, and the expression of amendment record sign is made an amendment processing to data.By judging to identify the data that receive are processed synchronously, finished synchronously rear feedback synchronized result.
By above-described embodiment one, can find out the synchronous method of a kind of data provided by the invention, adopt Flashback Technology, the revocation information of all changes when obtaining transaction, thereby determine the variation of data in the concrete tables of data by revocation information, realize that data are synchronous, avoided storage mass data table to take ample resources, avoid correction data table information to bring error problem, also improved the performance of data synchronization processing speed and whole system simultaneously.
Embodiment two
In order to describe better more specifically the present invention, the below is with concrete affairs 1, and relating to 3 tables of data information synchronization scenes is that example is described, and concrete grammar sees also the synchronous method of another kind of data that Fig. 2 discloses, and specifically may further comprise the steps:
Step 201: before submitting processing transactions 1 to, obtain the unique ID 1 of current processing transactions;
Step 202: according to the described unique ID 1 of obtaining, inquire about the revocation information UNDO information of current processing transactions;
Step 203: resolve the described UNDO information of inquiry, generate synchrodata information, and with described synchrodata information recording/in the synchronous data interface table;
Step 204: described synchronous data interface table is sent to need to be by synchronous equipment.
Preferably, described step 202 comprises:
According to the unique identification of the current processing transactions of obtaining, 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 modification affairs.
Preferably, described step 203 comprises:
Step 203A: the processing statement type in the described revocation information of identification inquiry, described processing statement type comprises: cancel statement, insert statement and upgrade statement;
Step 203B: according to different processing statement types, generate different synchrodata information, and be recorded in the synchronous data interface table.
When described processing statement type was cancel statement, preferred, described step 203B was:
Obtain record identification from revocation information, obtain insertion recorded information in the data information table according to record identification, described record identification is used for the information in data information table unique identification file, data block and this data block;
Described insertion recorded information is write in the service synchronization data-interface table, and mark inserts record identification in the synchronous data interface table.
When described processing statement type is that preferred, described step 203B is when inserting statement:
Synchronous data table name is replaced to service synchronization interface table name, and carry out the statement after resolving, in the synchronous data interface table, generate synchrodata;
Mark deletion record sign in the synchronous data interface table.
When described processing statement is that preferred, described step 203B is when upgrading statement:
Obtain record identification, obtain recorded information in the data information table according to record identification, described record identification is used for the delegation's information in data information table unique identification file, data block and this data block;
Described recorded information is write in the corresponding synchronous data interface table, and in the synchronous data interface table, stamp the amendment record sign.
Preferably, step 204 comprises:
Step 204A: described synchronous data interface table by sync cap, is formed sync data file;
Step 204B: in the file transfer protocol (FTP) mode, described sync data file is sent to need to be by synchronizer.
Preferably, described method also comprises: the sync data file that need to be received by synchronous device scan, according to synchronous data interface table name and record identification synchrodata, finish synchronously rear feedback synchronized result.
If when the affairs 1 of processing relate to three data MSDSs, data information table 1, data information table 2 and data information table 3.
Synchronization scenarios A for example: before submitting processing transactions 1 to, three data MSDSs that affairs 1 are related to all delete processing, the unique identification that obtains current processing transactions is ID1, then pass through Flashback Technology, in system view according to ID1, obtain the UNDO information of cancelling of transaction-level, affairs relate to three tables of data information complete documentation in affairs flash back table of modification.Because three data MSDSs are all deleted processing, three UNDO information that then generate, all be to insert statement, when resolving statement type for the insertion statement, then according to preferably, described step 203B is described to be processed, and is specially: the data information table name is replaced to the sync cap table name, and the statement after the execution parsing, in the synchronous data interface table, generate synchrodata; Mark deletion record sign in the synchronous data interface table.Then realize the transmission of synchrodata by step 204, be specially: described synchronous data interface table by sync cap, is formed sync data file; In the file transfer protocol (FTP) mode, described sync data file is sent to need to be by synchronous equipment.The described sync data file that need to be received by synchronous device scan then, according to synchronous data interface table name and record identification, carry out synchrodata, be specially identification delete flag sign, sign is to do deletion to process to the data in the data sync data file that receives, and finishes synchronously rear feedback synchronized result.
Synchronization scenarios B for example: before submitting processing transactions 1 to, three data MSDSs that affairs 1 are related to all carry out insert handling, the unique identification that obtains current processing transactions is ID1, according to ID1, inquire about the revocation information of current processing transactions, then by Flashback Technology, in system view according to ID1, obtain the UNDO information of cancelling of transaction-level, affairs relate to three tables of data information complete documentation in affairs flash back table of modification.Because be that three data MSDSs have all been carried out insert handling, three UNDO information that then generate all are cancel statements;
When resolving statement type when being cancel statement, then according to preferably, described step 203B is described to be processed, and is specially:
Obtain record identification ROWID from revocation information, obtain the insertion recorded information according to record identification ROWID indicating positions in the data information table, described record identification is used for the information in data information table unique identification file, data block and this data block; Described insertion recorded information is write in the synchronous data interface table, and mark inserts record identification in the synchronous data interface table.
Then realize the transmission of synchrodata by step 204, be specially: described synchronous data interface table by sync cap, is formed sync data file; In the file transfer protocol (FTP) mode, described sync data file is sent to need to be by synchronous equipment.The described sync data file that need to be received by synchronous device scan then, according to synchronous data interface table name and record identification, carry out synchrodata, be specially: the mark sign is inserted in identification, sign is to do insert handling to the data in the data sync data file that receives, and finishes synchronously rear feedback synchronized result.
Synchronization scenarios C for example: before submitting processing transactions 1 to, the processing of all making amendment of three data MSDSs that affairs 1 are related to, the unique identification that obtains current processing transactions is ID1, then pass through Flashback Technology, in system view according to ID1, obtain the UNDO information of cancelling of transaction-level, affairs relate to three tables of data information complete documentation in affairs flash back table of modification.Because be three data MSDSs all to have been carried out revising process, three UNDO information that then generate all are to upgrade statement;
When resolving statement type when upgrading statement, then according to preferably, described step 203B is described to be processed, and is specially:
Obtain record identification ROWID, described position according to record identification ROWID indication obtains recorded information in the data information table, and described record identification is used for the delegation's information in data information table unique identification file, data block and this data block;
Described recorded information is write in the corresponding synchronous data interface table, and in the synchronous data interface table, stamp the amendment record sign.
Then realize the transmission of synchrodata by step 204, be specially: described synchronous data interface table by sync cap, is formed sync data file; In the file transfer protocol (FTP) mode, described sync data file is sent to need to be by synchronous equipment.The described sync data file that need to be received by synchronous device scan then, according to synchronous data interface table name and record identification, carry out synchrodata, be specially: the mark sign is revised in identification, sign is to make an amendment processing to the data in the data sync data file that receives, and finishes synchronously rear feedback synchronized result.
For example, above-mentioned before submitting processing transactions 1 to, three data MSDSs that affairs 1 are related to insert respectively, delete, revise processing, then can process synchronously according to the processing mode of above-mentioned three kinds of correspondences, certainly, any one or any two kinds or three kinds of data processing methods all can adopt said method to realize processing synchronously.
Same for different affairs, no matter be what affairs, no matter what data MSDSs are affairs relate to, no matter affairs have been carried out several data processing methods, the method that all can provide according to above-described embodiment realizes synchronously processing.
In the said method, carry out the stationary problem of insert handling or deletion processing or modification processing for the data of any affairs and all can realize the processing that data are synchronous, also can for above-mentioned any one or any two kinds or three kinds of data processing form, carry out simultaneously data synchronization processing.
By above-described embodiment two, can find out a kind of method of data synchronization provided by the invention, by the affairs follow-up mechanism, before submitting to, affairs obtain the ID of current affairs, adopt simultaneously the transaction-level Flashback Technology, according to affairs ID inquiry revocation information, process, need to obtain synchronous data, realize synchronously, avoided generating the synchrodata table by the mode of contrast, take a large amount of internal memories, affect synchronous processing speed, also can affect the problem of the performance of whole system simultaneously.
Embodiment three
The present invention also provides a kind of data synchronization unit, specifically sees also the structural representation of a kind of data synchronization unit that Fig. 3 discloses, and specifically comprises: acquisition module 301, search module 302, parsing module 303, delivery module 304,
Acquisition module 301 is used for obtaining the unique identification of current processing transactions before submitting processing transactions to;
Search module 302, be used for according to the described unique identification that obtains, inquire about the revocation information of current processing transactions;
Parsing module 303 be used for to be resolved the described revocation information of inquiry, generates synchrodata information, and with described synchrodata information recording/in the synchronous data interface table;
Delivery module 304, being used for described synchronous data interface table is sent to need to be by synchronous equipment.
Preferably, the described module 302 of searching comprises:
Search submodule 302A, be used for the unique identification according to the current processing transactions of obtaining, in system view, search affairs flash back table;
Obtain submodule 302B, be used for obtaining the revocation information that current affairs relate to the tables of data of modification at described affairs flash back table.
Preferably, described parsing module 303 comprises:
Recognin module 303A, for the processing statement type of the described revocation information of identifying inquiry, described processing statement type comprises: cancel statement, insert statement and renewal statement;
Record sub module 303B is used for according to different processing statement types, generates different synchrodata information, and is recorded in the 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, be used for when described processing statement type is cancel statement, from revocation information, obtain record identification, obtain insertion recorded information in the data information table according to record identification, described record identification is used for the information in data information table unique identification file, data block and this data block;
Newly-increased record sub module A2 be used for described insertion recorded information is write service synchronization data-interface table, and mark inserts record identification in the synchronous data interface table.
Preferably, described record sub module can be record sub module 503B, specifically as shown in Figure 5, comprising:
Deletion submodule B1 is used for synchronous data table name being replaced to service synchronization interface table name, and carrying out the statement after resolving when described processing statement type is the insertion statement, generates synchrodata in the synchronous data interface table;
Deletion record submodule B2 is used for identifying in the deletion record of synchronous data interface table mark.
Preferably, described record sub module can be record sub module 603B, specifically comprises as shown in Figure 6:
Updating submodule C1, be used for when described processing statement is the renewal statement, from revocation information, obtain record identification, obtain recorded information in the data information table according to record identification, described record identification is used for the delegation's information in data information table unique identification file, data block and this data block;
Amendment record submodule C2 is used for described recorded information is write corresponding synchronous data interface table, and stamps the amendment record sign in the synchronous data interface table.
Preferably, described delivery module 604 comprises:
Generate submodule 604A, be used for described synchronous data interface table is passed through sync cap, form sync data file;
Transmit submodule 604B, be used in the file transfer protocol (FTP) mode, described sync data file is sent to need to be by synchronous equipment.
Record sub module in the device that discloses in above-described embodiment, can comprise any one or any two or three in three submodules of record sub module 403B, record sub module 503B and record sub module 603B, to satisfy the demand that realizes different transaction data process types.
Same for different affairs, no matter be what affairs, no matter what data MSDSs are affairs relate to, no matter affairs have been carried out several data processing methods, the device that all can provide according to above-described embodiment three is realized synchronously processing.
By above-described embodiment as can be known, the synchronous device of a kind of data provided by the invention, can collect fast and accurately needs synchronous data, improve the data no-load speed, reduce system stores pressure, reduce system performance loss, and this device can separate the data synchronizing function with data service function, and when system maintenance or new demand supported, newly-increased data variation information can automatic synchronization automatically, accurately keeps data consistency.
Embodiment four
The present invention also provides a kind of data synchronous system, specifically sees also a kind of data synchronous system frame diagram that Fig. 7 discloses, and specifically comprises
Synchronization module 701, above-described embodiment three described any one data synchronization units 702 and by synchronization module 703,
Described synchronization module 701 is used for carrying out transaction;
Described data synchronization unit 702 is used for realizing that synchrodata generates processing;
Described by synchronization module 703, be used for the sync data file that scanning receives, with interface table name and record identification synchrodata, finish synchronously rear feedback synchronized result according to synchrodata.
The above only is preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle 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 (16)

1. a method of data synchronization is characterized in that, comprising:
Before submitting processing transactions to, obtain the unique identification of current processing transactions;
According to the described unique identification that obtains, inquire about the revocation information of current processing transactions;
Resolve the described revocation information of inquiry, generate synchrodata information, and with described synchrodata information recording/in the synchronous data interface table;
Described synchronous data interface table is sent to need to be by synchronous equipment.
2. method according to claim 1 is characterized in that, described described unique identification according to obtaining is inquired about the revocation information of current processing transactions, comprising:
According to the unique identification of the current processing transactions of obtaining, 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 modification affairs.
3. method according to claim 1 and 2 is characterized in that, the described revocation information of described parsing inquiry generates synchrodata information, and with described synchrodata information recording/in the synchronous data interface table, comprising:
Processing statement type in the described revocation information of identification inquiry, described processing statement type comprises: cancel statement, insert statement and upgrade statement;
According to different processing statement types, generate different synchrodata information, and be recorded in the synchronous data interface table.
4. method according to claim 3 is characterized in that, and is described according to different processing statement types, generates different synchrodata information, and is recorded in the synchronous data interface table, comprising:
When described processing statement type is cancel statement, from revocation information, obtain record identification, obtain insertion recorded information in the data information table according to record identification, described record identification is used for the information in data information table unique identification file, data block and this data block;
Described insertion recorded information is write in the synchronous data interface table, and mark inserts record identification in the synchronous data interface table.
5. method according to claim 3 is characterized in that, and is described according to different processing statement types, generates different synchrodata information, and is recorded in the synchronous data interface table, comprising:
When described processing statement type is the insertion statement, synchronous data table name is replaced to the sync cap table name, and carry out the statement after resolving, in the synchronous data interface table, generate synchrodata;
Mark deletion record sign in the synchronous data interface table.
6. method according to claim 3 is characterized in that, and is described according to different processing statement types, generates different synchrodata information, and is recorded in the synchronous data interface table, comprising:
When described processing statement is when upgrading statement, from revocation information, obtain record identification, obtain recorded information in the data information table according to record identification, described record identification is used for the delegation's information in data information table unique identification file, data block and this data block;
Described recorded information is write in the corresponding synchronous data interface table, and in the synchronous data interface table, stamp the amendment record sign.
7. according to claim 1 or claim 2, it is characterized in that, described described synchronous data interface table is sent to and need to by synchronous equipment, comprise:
Described synchronous data interface table by sync cap, is formed sync data file;
In the file transfer protocol (FTP) mode, described sync data file is sent to need to be by synchronizer.
8. according to claim 1 or claim 2, it is characterized in that, described described synchronous data interface table is sent to and need to by after the synchronous equipment, also comprise:
The sync data file that need to be received by synchronous device scan according to synchronous data interface table name and record identification synchrodata, is finished synchronously rear feedback synchronized result.
9. a data synchronization unit is characterized in that, comprising:
Acquisition module is used for obtaining the unique identification of current processing transactions before submitting processing transactions to;
Search module, be used for according to the described unique identification that obtains, inquire about the revocation information of current processing transactions;
Parsing module be used for to be resolved the described revocation information of inquiry, generates synchrodata information, and with described synchrodata information recording/in the synchronous data interface table;
Delivery module, being used for described synchronous data interface table is sent to need to be by synchronous equipment.
10. device according to claim 9 is characterized in that, the described module of searching comprises:
Search submodule, be used for the unique identification according to the current processing transactions of obtaining, in system view, search affairs flash back table;
Obtain submodule, be used for obtaining the revocation information that current affairs relate to the tables of data of modification at described affairs flash back table.
11. according to claim 9 or 10 described devices, it is characterized in that described parsing module comprises:
The recognin module, for the processing statement type of the described revocation information of identifying inquiry, described processing statement type comprises: cancel statement, insert statement and renewal statement;
Record sub module is used for according to different processing statement types, generates different synchrodata information, and is recorded in the synchronous data interface table.
12. device according to claim 11 is characterized in that, described record sub module comprises:
The intron module, be used for when described processing statement type is cancel statement, from revocation information, obtain record identification, obtain insertion recorded information in the data information table according to record identification, described record identification is used for the information in data information table unique identification file, data block and this data block;
Newly-increased record sub module be used for described insertion recorded information is write service synchronization data-interface table, and mark is inserted record identification in the synchronous data interface table.
13. device according to claim 11 is characterized in that, described record sub module comprises:
The deletion submodule is used for synchronous data table name being replaced to service synchronization interface table name, and carrying out the statement after resolving when described processing statement type is the insertion statement, generates synchrodata in the synchronous data interface table;
The deletion record submodule is used for identifying in the deletion record of synchronous data interface table mark.
14. device according to claim 11 is characterized in that, described record sub module comprises:
Updating submodule, be used for when described processing statement is the renewal statement, obtain record identification from revocation information, obtain recorded information in the data information table according to record identification, described record identification is used for the delegation's information in data information table unique identification file, data block and this data block;
The amendment record submodule is used for described recorded information is write corresponding synchronous data interface table, and stamps the amendment record sign in the synchronous data interface table.
15. according to claim 9 or 10 described devices, it is characterized in that described delivery module comprises:
Generate submodule, be used for described synchronous data interface table is passed through sync cap, form sync data file;
Transmit submodule, be used in the file transfer protocol (FTP) mode, described sync data file is sent to need to be by synchronous equipment.
16. a data synchronous system is characterized in that, comprising:
The described data synchronization unit of the claims 9 to 15 any one, synchronization module and by synchronization module,
Described synchronization module is used for carrying out transaction;
Described data synchronization unit is used for realizing that synchrodata generates processing;
Described by synchronization module, be used for the sync data file that scanning receives, according to synchronous data interface table name and record identification synchrodata, finish data and feed back synchronized result synchronously.
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 true CN102970373A (en) 2013-03-13
CN102970373B 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)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914300A (en) * 2014-03-24 2014-07-09 深圳天珑无线科技有限公司 Software development business realizing method and electronic equipment
CN104317921A (en) * 2014-10-29 2015-01-28 北京思特奇信息技术股份有限公司 Cross-database data synchronizing system and method
WO2016173444A1 (en) * 2015-04-29 2016-11-03 阿里巴巴集团控股有限公司 Transaction processing recording method 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
CN109284287A (en) * 2018-08-22 2019-01-29 平安科技(深圳)有限公司 Data backtracking and report method, device, computer equipment and storage medium
CN111831755A (en) * 2020-07-23 2020-10-27 北京思特奇信息技术股份有限公司 Cross-database data synchronization method, system, medium and equipment
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

Cited By (13)

* 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
CN103914300A (en) * 2014-03-24 2014-07-09 深圳天珑无线科技有限公司 Software development business realizing method and electronic equipment
CN104317921A (en) * 2014-10-29 2015-01-28 北京思特奇信息技术股份有限公司 Cross-database data synchronizing system and method
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
WO2016173444A1 (en) * 2015-04-29 2016-11-03 阿里巴巴集团控股有限公司 Transaction processing recording method 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
CN109284287A (en) * 2018-08-22 2019-01-29 平安科技(深圳)有限公司 Data backtracking and report method, device, computer equipment and storage medium
CN109284287B (en) * 2018-08-22 2024-02-02 平安科技(深圳)有限公司 Data backtracking and reporting method and device, computer equipment and storage medium
CN111831755A (en) * 2020-07-23 2020-10-27 北京思特奇信息技术股份有限公司 Cross-database data synchronization method, system, medium and equipment
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

Also Published As

Publication number Publication date
CN102970373B (en) 2015-11-11

Similar Documents

Publication Publication Date Title
CN102970373A (en) Data synchronization method, device and system
CN101504672B (en) Method and system for dynamically configuring physical data table
CN110489313B (en) Operation log recording method and device based on block chain and storage medium
CN105354194A (en) Intelligent commodity classifying method and system
CN103020044A (en) Machine-aided webpage translation method and system thereof
CN109344719A (en) Substation equipment information query method based on augmented reality and intelligent glasses
CN103345484A (en) Report form processing system based on dynamic domain and method
CN102279846A (en) Article assisting writing system and method thereof
CN103516591A (en) Method and device for achieving enterprise address list in instant communication platform
CN107092652A (en) The air navigation aid and device of target pages
CN106326243B (en) Data processing method and device
CN106155769A (en) A kind of workflow processing method, device and workflow engine
CN104156198A (en) Method and device for automatically generating software integration version updating description
CN102521713B (en) Data processing equipment and data processing method
CN103368778A (en) Optical fiber distribution equipment passive intelligent management system based on wireless transmission
CN111090803A (en) Data processing method and device, electronic equipment and storage medium
CN107239548B (en) Report processing method based on SQL Server and HIVE
CN106134470B (en) A kind of DNC integrated management system and method
CN101404648A (en) Media terminal and its data synchronization method and system
CN103246639B (en) One is provided with stationary installation vehicle without tax atlas automatic composing method
CN109241183B (en) Data synchronization method and system based on socket communication
CN106022721A (en) Editing system
CN112416944A (en) Method and equipment for synchronizing service data
CN106257443A (en) A kind of data lead-in method and device
CN110267092A (en) The system and method that video content is divided and replaced automatically

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 of 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 of 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