CN104462477A - Data synchronizing method, device and system based on timestamp - Google Patents
Data synchronizing method, device and system based on timestamp Download PDFInfo
- Publication number
- CN104462477A CN104462477A CN201410795909.0A CN201410795909A CN104462477A CN 104462477 A CN104462477 A CN 104462477A CN 201410795909 A CN201410795909 A CN 201410795909A CN 104462477 A CN104462477 A CN 104462477A
- Authority
- CN
- China
- Prior art keywords
- data segment
- data
- timestamp
- field
- synchronous regime
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 230000001360 synchronised effect Effects 0.000 claims abstract description 164
- 230000004048 modification Effects 0.000 claims abstract description 15
- 238000012986 modification Methods 0.000 claims abstract description 15
- 230000008859 change Effects 0.000 claims description 37
- 230000000052 comparative effect Effects 0.000 claims description 34
- 230000008569 process Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 8
- 238000012545 processing Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 230000008901 benefit Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000026676 system process Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/178—Techniques for file synchronisation in file systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a data synchronizing method based on a timestamp. The data synchronizing method comprises the steps that the content of a selected first data segment is changed; the synchronous state field carried in the first data segment is set to be the to-be-synchronized preset value and the timestamp of a data signature field is set; the first data segment is sent to a target system and serves as the reference content for modifying a second data segment of the target system, wherein the identification of the first data segment and the identification of the second data segment are matched with each other; the modification confirming information fed back by the target system is received; the timestamp in the first data segment and a timestamp of the first data segment in a database are compared; if the timestamp in the first data segment and the timestamp of the first data segment in the database are consistent, the synchronous state field carried in the first data segment is set to be the synchronized preset value; if the timestamp in the first data segment and the timestamp of the first data segment in the database are not consistent, the synchronous state field carried in the first data segment is not changed. By means of the method, data can be efficiently and accurately synchronized, and the system performance can be improved.
Description
Technical field
The present invention relates to data processing field, particularly relate to a kind of method, Apparatus and system of the data syn-chronization based on timestamp.
Background technology
Need to carry out in multiple systems of data syn-chronization at some or in system integration application, when the data of a system change, need to notify another system update data, the data of two systems are consistent, i.e. data synchronization processing.Along with the increase of the application of each integrated system, the data between its system need to be consistent.But along with integrated system or need, to carry out data quantitative change in multiple systems of data syn-chronization large, and the number of times that data change becomes many, frequently just may there will be the inconsistent phenomenon of data among systems therefore due to the synchronous of data and amendment.
Therefore, how efficiently, accurately to carry out data syn-chronization, improving system performance, is those skilled in the art's technical issues that need to address.
Summary of the invention
The object of this invention is to provide a kind of method of the data syn-chronization based on timestamp, the method efficiently, accurately can carry out data syn-chronization, improves system performance.
For solving the problems of the technologies described above, a kind of method that the invention provides data syn-chronization based on timestamp comprises:
Change the content of the first data segment selected;
Arranging the synchronous regime field of carrying in described first data segment is represent preset value to be synchronized, and the timestamp of data signature field;
Send described first data segment to goal systems, revise the reference content of the second data segment as described goal systems, described first data segment and the second data segment mark match;
Receive the amendment acknowledge message of described goal systems feedback;
Timestamp in this first data segment in timestamp in described first data segment and database is compared;
When comparative result is consistent, arranging the synchronous regime field of carrying in described first data segment is represent synchronous preset value; When comparative result is different, the synchronous regime field of carrying in described first data segment does not change.
Wherein, described change also comprise before the content of the first data segment selected:
Revise the storage format of data segment in the system needing to carry out data syn-chronization, add synchronous regime field and data signature field, and specify the data type of synchronous regime field and data signature field.
Wherein, the data type of described synchronous regime field is Boolean type, and the data type of described data signature field is timestamp type.
Wherein, the described synchronous regime field of carrying in described first data segment that arranges is represent preset value to be synchronized, and the timestamp of data signature field; Comprise:
The value of the synchronous regime field in described first data segment is set to 0 by origin system, and data signature field is set to carry out the timestamp preserved after data change.
Wherein, described to goal systems send described first data segment comprise:
Perform data synchronous operation;
The value of the synchronous regime field of data query section in a database;
Obtain described value be the data segment of 0 all as the first data segment, and to goal systems send described first data segment.
Wherein, described when comparative result is the same, by the synchronous regime field mark of described source data for synchronously to comprise:
When comparative result is the same, the value of the synchronous regime field of described source data is set to 1.
The device that the invention provides a kind of data syn-chronization based on timestamp comprises:
Update module, for changing the content of the first selected data segment;
First arranges module, is represent preset value to be synchronized for arranging the synchronous regime field of carrying in described first data segment, and the timestamp of data signature field;
Sending module, for sending described first data segment to goal systems, revises the reference content of the second data segment as described goal systems, described first data segment and the second data segment mark match;
First receiver module, for receiving the amendment acknowledge message of described goal systems feedback;
Comparison module, for comparing the timestamp in this first data segment in the timestamp in described first data segment and database;
Confirm module, for when comparative result is consistent, arranging the synchronous regime field of carrying in described first data segment is represent synchronous preset value; When comparative result is different, the synchronous regime field of carrying in described first data segment does not change.
A kind of method that the invention provides data syn-chronization comprises:
Receive the first data segment changing content that origin system sends, the value of carrying synchronous regime field in described first data segment is represent preset value to be synchronized, and the timestamp of data signature field;
Search the second data segment matched with the mark of described first data segment;
According to described first data segment content modification described in the content of the second data segment, to described origin system feedback amendment acknowledge message, timestamp in described first data segment to be compared with the timestamp in this first data segment in database and when result is consistent, arranging the synchronous regime field of carrying in described first data segment is represent synchronous preset value for triggering described origin system; When comparative result is different, the synchronous regime field of carrying in described first data segment does not change.
The device that the invention provides a kind of data syn-chronization comprises:
Second receiver module, for receiving the first data segment changing content that origin system sends, the value of carrying synchronous regime field in described first data segment is represent preset value to be synchronized, and the timestamp of data signature field;
Search module, for searching the second data segment matched with the mark of described first data segment;
Feedback module, for the content of the second data segment described in the content modification according to described first data segment, to described origin system feedback amendment acknowledge message, timestamp in described first data segment to be compared with the timestamp in this first data segment in database and when result is consistent, arranging the synchronous regime field of carrying in described first data segment is represent synchronous preset value for triggering described origin system; When comparative result is different, the synchronous regime field of carrying in described first data segment does not change.
The system that the invention provides a kind of data syn-chronization comprises:
Origin system, for changing the content of the first selected data segment; Arranging the synchronous regime field of carrying in described first data segment is represent preset value to be synchronized, and the timestamp of data signature field; Send described first data segment to goal systems, revise the reference content of the second data segment as described goal systems, described first data segment and the second data segment mark match; Receive the amendment acknowledge message of described goal systems feedback; Timestamp in this first data segment in timestamp in described first data segment and database is compared; When comparative result is consistent, arranging the synchronous regime field of carrying in described first data segment is represent synchronous preset value; When comparative result is different, the synchronous regime field of carrying in described first data segment does not change;
Goal systems, for receiving the first data segment changing content that origin system sends, the value of carrying synchronous regime field in described first data segment is represent preset value to be synchronized, and the timestamp of data signature field; Search the second data segment matched with the mark of described first data segment; According to described first data segment content modification described in the content of the second data segment, to described origin system feedback amendment acknowledge message, timestamp in described first data segment to be compared with the timestamp in this first data segment in database and when result is consistent, arranging the synchronous regime field of carrying in described first data segment is represent synchronous preset value for triggering described origin system; When comparative result is different, the synchronous regime field of carrying in described first data segment does not change.
Based on technique scheme, the method of the data syn-chronization based on timestamp provided by the present invention, data segment after changing uses synchronous regime field to mark by the method, the system that eliminates needs all data to carry out the process such as contrast, finds delta data section in the process of carrying out data syn-chronization; Effectively can save system resource like this, save the processing time; A time course is needed again owing to carrying out data syn-chronization between system, therefore may occur within this time period that the data of a data segment change twice, and goal systems only to front once upgrade carry out synchronous, the renewal of this data segment in origin system once after miss out; Therefore may there is the problem of accurately not carrying out data syn-chronization, not only there is in the present invention synchronous regime field also there is data signature field, utilize the method contrasting update time to judge it is enough as latest update data, prevent error situation.The method efficiently, accurately can carry out data syn-chronization, improves system performance.
Accompanying drawing explanation
In order to the technical scheme of the clearer explanation embodiment of the present invention or 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.
The process flow diagram of the method for the data syn-chronization based on timestamp that Fig. 1 provides for the embodiment of the present invention;
The storage format schematic diagram of the data segment based on timestamp that Fig. 2 provides for the embodiment of the present invention;
The process flow diagram sending the method for described first data segment to goal systems that Fig. 3 provides for the embodiment of the present invention;
The structured flowchart of the device of the data syn-chronization based on timestamp that Fig. 4 provides for the embodiment of the present invention;
Another process flow diagram based on the method for the data syn-chronization of timestamp that Fig. 5 provides for the embodiment of the present invention;
Another structured flowchart based on the device of the data syn-chronization of timestamp that Fig. 6 provides for the embodiment of the present invention;
The structured flowchart of the system of the data syn-chronization based on timestamp that Fig. 7 provides for the embodiment of the present invention.
Embodiment
The object of this invention is to provide a kind of method of the data syn-chronization based on timestamp, the method efficiently, accurately can carry out data syn-chronization, improves system performance.
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Origin system hereinafter refers to that data segment occurs to be changed, and initiates the system of data syn-chronization operation, and every what have this function is exactly origin system; Goal systems refer to response synchronous operation carry out data syn-chronization operation, the system of Update Table section, every have this can be exactly goal systems.Origin system and goal systems also can be relative.
Please refer to Fig. 1, the process flow diagram of the method for the data syn-chronization based on timestamp that Fig. 1 provides for the embodiment of the present invention; The method can comprise:
Step s100, change the content of the first data segment selected;
Wherein, wherein, according to user operation, or need to carry out the data segment that changes during system cloud gray model, the content of this data segment to be needed according to user or the pre-defined rule of operation of system program changes over the content of needs.
Here the first data segment is referred to as, and namely need to need to change at origin system and goal systems system, namely the data segment completing data syn-chronization is referred to as the first data segment simultaneously.Namely this data segment needs to carry out synchronized update.
Step s110, to arrange the synchronous regime field of carrying in described first data segment be represent preset value to be synchronized, and the timestamp of data signature field;
Wherein, a lot of field can be comprised in first data segment, wherein there is the field that represents this data segment sync state, here synchronous regime field can be referred to as, here preset value is represent that this data segment has changed to need to carry out synchronous value, if the data class signal of such as this field is Boolean type, just can specify that 0 for representing that this data segment needs to upgrade in systems in which, 0 for representing that this data segment does not need to upgrade; Vice versa.
Can also have and represent the field such as data signature field of Data Update time, by distinguishing the content whether synchronous data segment contents is the latest update time update time of recording data segment.Prevent this data segment to upgrade several times, and goal systems does not obtain the phenomenon of the content of up-to-date data segment.
Step s120, to goal systems send described first data segment, revise the reference content of the second data segment as described goal systems, described first data segment and the second data segment mark match;
Wherein, after the synchronous regime field in the first data segment being set, send described first data segment to goal systems.
Goal systems is after obtaining described first data segment, and can find according to the mark of described first data segment the second data segment identifying and match within the system, also namely these two data segments are same data segments, are identified by data segment.After goal systems finds the second data segment, consistent with the first data segment by described second data segment being changed over content by the data content of contrast first data segment and the data content of the second data segment.Namely the data syn-chronization to the first data segment and the second data segment is completed; If the first data segment is here the data segment changed in general reference institute active system, then according to described first data segment contents by after described second data segment contents update all, then also namely complete the Data Update of system.
Thus also can see, such data-updating method is more efficient, because be only the Data Update of carrying out for the data segment changed, the update method of this increment type reduces the work such as a large amount of Data Comparisons, can significantly reduce expending of system resource, such as CPU, internal memory, Internet resources etc.Thus the performance of system can be improved.
Step s130, receive described goal systems feedback amendment acknowledge message;
Wherein, when origin system receives the amendment acknowledge message of described goal systems feedback; Also the message of the content having upgraded the second data segment is namely confirmed.
Step s140, the timestamp in this first data segment in the timestamp in described first data segment and database to be compared;
Wherein, here be relatively that after synchronous, mark is set to again " synchronous " in order to this mark after preventing data modification from upgrading is set to " not synchronous ".In data synchronization process, a time interval is marked with to writing back " synchronous " from reading data, if data have retouching operation in interval time, before being modified in, write back after " synchronous " be marked at, this retouching operation will ignore by data synchronization process next time, there is origin system and the inconsistent problem of goal systems data.
Step s150, when comparative result is consistent, arranging the synchronous regime field of carrying in described first data segment is represent synchronous preset value; When comparative result is different, the synchronous regime field of carrying in described first data segment does not change.
Wherein, origin system also needs the value of synchronous regime field in described first data segment to change into be expressed as synchronous preset value.Such as the value of synchronous regime field is set to 1, then represents that this data segment has upgraded and synchronously complete.
If comparative result is inconsistent, then illustrate and carried out again revising upgrading in this data afterwards, therefore, synchronous regime field can not be revised as synchronous regime, after needing to wait until that the content of the data segment revised afterwards also completes by goal systems, namely until the time consistency of timestamp record time, can carry out arranging the synchronous regime field of carrying in described first data segment is represent synchronous preset value.
Therefore, service time of the present invention stabs as data signature, unique identification data.When the data of a system change, modification time stamp field value, and stamp " not synchronous " mark, represent these data be modified but non-synchronized update to another system; System obtains only to be stamped the data that " not synchronous " mark and is transferred to another system and deals with; After another system process completes, return the result of " processed "; Original system is according to the result returned, if the timestamp of data does not change, data is stamped " synchronous " mark.
Based on technique scheme, the method of the data syn-chronization based on timestamp provided by the present invention, data segment after changing uses synchronous regime field to mark by the method, the system that eliminates needs all data to carry out the process such as contrast, finds delta data section in the process of carrying out data syn-chronization; Effectively can save system resource like this, save the processing time; A time course is needed again owing to carrying out data syn-chronization between system, therefore may occur within this time period that the data of a data segment change twice, and goal systems only to front once upgrade carry out synchronous, the renewal of this data segment in origin system once after miss out; Therefore may there is the problem of accurately not carrying out data syn-chronization, not only there is in the present invention synchronous regime field also there is data signature field, utilize the method contrasting update time to judge it is enough as latest update data, prevent error situation.The method efficiently, accurately can carry out data syn-chronization, improves system performance.
Optionally, please refer to Fig. 2, the storage format schematic diagram of the data segment based on timestamp that Fig. 2 provides for the embodiment of the present invention; Described change also comprise before the content of the first data segment selected: amendment needs to carry out the storage format of data segment in the system of data syn-chronization, add synchronous regime field and data signature field, and specify the data type of synchronous regime field and data signature field.
Wherein, the amendment through data memory format can make each data segment have synchronous regime field.There is provided the value of this synchronous regime to judge that this data segment is synchronous the need of carrying out.And the modification time of data segment can be determined by data signature.And can judge whether this time is up-to-date modification time by this.
Optionally, the data type of described synchronous regime field is Boolean type, and the data type of described data signature field is timestamp type.
Wherein, " synchronous regime " field, field type Boolean type; Such as field value " 0 " represents not synchronous, and field value " 1 " represents synchronous.Timestamp can be the time that data segment contents has been revised, and such as, carries out the time of preserving this data segment after having revised.
Optionally, the described synchronous regime field of carrying in described first data segment that arranges is represent preset value to be synchronized, and the timestamp of data signature field; Comprise:
The value of the synchronous regime field in described first data segment is set to 0 by origin system, and data signature field is set to carry out the timestamp preserved after data change.
Optionally, please refer to Fig. 3, the process flow diagram sending the method for described first data segment to goal systems that Fig. 3 provides for the embodiment of the present invention; The method can comprise:
Step s300, the synchronous operation of execution data;
Wherein, be that wide in range finger system needs to carry out data syn-chronization here.Can be when existence needs just to carry out data segment sync during the data segment carrying out data syn-chronization, after also can being through certain hour, carry out data syn-chronization.
The value of the synchronous regime field of step s310, in a database data query section;
Wherein, can be in data query, add the filtercondition that " synchronous regime " field value is " 0 ", only obtain the data segment that namely incremental portion changes.
Step s320, obtain described value be the data segment of 0 all as the first data segment, and to goal systems send described first data segment.
Wherein, particularly after the certain predetermined time, carrying out data segment sync operation, always the benefit of operation like this can carry out data syn-chronization by anti-locking system, needs to waste a lot of time, take a lot of resource because carry out data syn-chronization always.Data syn-chronization can be carried out at a time point like this, system can not be made to occur frequent access, frequently carry out the situation of data processing.Improve the efficiency of data syn-chronization.
Optionally, described when comparative result is the same, by the synchronous regime field mark of described source data for synchronously to comprise:
When comparative result is the same, the value of the synchronous regime field of described source data is set to 1.
Please refer to Fig. 4, the structured flowchart of the device of the data syn-chronization that Fig. 4 provides for the embodiment of the present invention; This device can comprise:
Update module 100, for changing the content of the first selected data segment;
First arranges module 200, is represent preset value to be synchronized for arranging the synchronous regime field of carrying in described first data segment, and the timestamp of data signature field;
Sending module 300, for sending described first data segment to goal systems, revises the reference content of the second data segment as described goal systems, described first data segment and the second data segment mark match;
First receiver module 400, for receiving the amendment acknowledge message of described goal systems feedback;
Comparison module 500, for comparing the timestamp in this first data segment in the timestamp in described first data segment and database;
Confirm module 600, for when comparative result is consistent, arranging the synchronous regime field of carrying in described first data segment is represent synchronous preset value; When comparative result is different, the synchronous regime field of carrying in described first data segment does not change.
Please refer to Fig. 5, the process flow diagram of the method for another data syn-chronization that Fig. 5 provides for the embodiment of the present invention; The method can comprise:
The first data segment changing content that step s500, reception origin system send, the value of carrying synchronous regime field in described first data segment is represent preset value to be synchronized, and the timestamp of data signature field;
Step s510, search the second data segment matched with the mark of described first data segment;
Wherein, can carry out searching the second data segment matched with the mark of described first data segment in the database of goal systems.
Step s520, according to described first data segment content modification described in the content of the second data segment, to described origin system feedback amendment acknowledge message, timestamp in described first data segment to be compared with the timestamp in this first data segment in database and when result is consistent, arranging the synchronous regime field of carrying in described first data segment is represent synchronous preset value for triggering described origin system; When comparative result is different, the synchronous regime field of carrying in described first data segment does not change.
Wherein, goal systems carries out the amendment of corresponding data segment, and the confirmation after having revised is sent to origin system.Trigger source system carries out follow-up work.
Please refer to Fig. 6, the structured flowchart of the device of another data syn-chronization that Fig. 6 provides for the embodiment of the present invention; This device can comprise:
Second receiver module 700, for receiving the first data segment changing content that origin system sends, the value of carrying synchronous regime field in described first data segment is represent preset value to be synchronized, and the timestamp of data signature field;
Search module 800, for searching the second data segment matched with the mark of described first data segment;
Feedback module 900, for the content of the second data segment described in the content modification according to described first data segment, to described origin system feedback amendment acknowledge message, timestamp in described first data segment to be compared with the timestamp in this first data segment in database and when result is consistent, arranging the synchronous regime field of carrying in described first data segment is represent synchronous preset value for triggering described origin system; When comparative result is different, the synchronous regime field of carrying in described first data segment does not change.
Please refer to Fig. 7, the structured flowchart of the system of the data syn-chronization that Fig. 7 provides for the embodiment of the present invention;
Origin system 1000, for changing the content of the first selected data segment; Arranging the synchronous regime field of carrying in described first data segment is represent preset value to be synchronized, and the timestamp of data signature field; Send described first data segment to goal systems, revise the reference content of the second data segment as described goal systems, described first data segment and the second data segment mark match; Receive the amendment acknowledge message of described goal systems feedback; Timestamp in this first data segment in timestamp in described first data segment and database is compared; When comparative result is consistent, arranging the synchronous regime field of carrying in described first data segment is represent synchronous preset value; When comparative result is different, the synchronous regime field of carrying in described first data segment does not change;
Goal systems 1100, for receiving the first data segment changing content that origin system sends, the value of carrying synchronous regime field in described first data segment is represent preset value to be synchronized, and the timestamp of data signature field; Search the second data segment matched with the mark of described first data segment; According to described first data segment content modification described in the content of the second data segment, to described origin system feedback amendment acknowledge message, timestamp in described first data segment to be compared with the timestamp in this first data segment in database and when result is consistent, arranging the synchronous regime field of carrying in described first data segment is represent synchronous preset value for triggering described origin system; When comparative result is different, the synchronous regime field of carrying in described first data segment does not change.
Based on technique scheme, method, the Apparatus and system of the data syn-chronization based on timestamp provided by the present invention, synchronous regime field is used to mark the data segment after changing, the system that eliminates needs all data to carry out the process such as contrast, finds delta data section in the process of carrying out data syn-chronization; Effectively can save system resource like this, save the processing time; A time course is needed again owing to carrying out data syn-chronization between system, therefore may occur within this time period that the data of a data segment change twice, and goal systems only to front once upgrade carry out synchronous, the renewal of this data segment in origin system once after miss out; Therefore may there is the problem of accurately not carrying out data syn-chronization, not only there is in the present invention synchronous regime field also there is data signature field, utilize the method contrasting update time to judge it is enough as latest update data, prevent error situation.The method efficiently, accurately can carry out data syn-chronization, improves system performance.
In instructions, each embodiment adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar portion mutually see.For device disclosed in embodiment, because it corresponds to the method disclosed in Example, so description is fairly simple, relevant part illustrates see method part.
Professional can also recognize further, in conjunction with unit and the algorithm steps of each example of embodiment disclosed herein description, can realize with electronic hardware, computer software or the combination of the two, in order to the interchangeability of hardware and software is clearly described, generally describe composition and the step of each example in the above description according to function.These functions perform with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can use distinct methods to realize described function to each specifically should being used for, but this realization should not thought and exceeds scope of the present invention.
The software module that the method described in conjunction with embodiment disclosed herein or the step of algorithm can directly use hardware, processor to perform, or the combination of the two is implemented.Software module can be placed in the storage medium of other form any known in random access memory (RAM), internal memory, ROM (read-only memory) (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field.
Above the method for the data syn-chronization based on timestamp provided by the present invention, Apparatus and system are described in detail.Apply specific case herein to set forth principle of the present invention and embodiment, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping.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 carry out some improvement and modification to the present invention, these improve and modify and also fall in the protection domain of the claims in the present invention.
Claims (10)
1. based on a method for the data syn-chronization of timestamp, it is characterized in that, comprising:
Change the content of the first data segment selected;
Arranging the synchronous regime field of carrying in described first data segment is represent preset value to be synchronized, and the timestamp of data signature field;
Send described first data segment to goal systems, revise the reference content of the second data segment as described goal systems, described first data segment and the second data segment mark match;
Receive the amendment acknowledge message of described goal systems feedback;
Timestamp in this first data segment in timestamp in described first data segment and database is compared;
When comparative result is consistent, arranging the synchronous regime field of carrying in described first data segment is represent synchronous preset value; When comparative result is different, the synchronous regime field of carrying in described first data segment does not change.
2. the method for data syn-chronization as claimed in claim 1, is characterized in that, described change also comprise before the content of the first data segment selected:
Revise the storage format of data segment in the system needing to carry out data syn-chronization, add synchronous regime field and data signature field, and specify the data type of synchronous regime field and data signature field.
3. the method for data syn-chronization as claimed in claim 2, it is characterized in that, the data type of described synchronous regime field is Boolean type, and the data type of described data signature field is timestamp type.
4. the method for data syn-chronization as claimed in claim 1, is characterized in that, the described synchronous regime field of carrying in described first data segment that arranges is represent preset value to be synchronized, and the timestamp of data signature field; Comprise:
The value of the synchronous regime field in described first data segment is set to 0 by origin system, and data signature field is set to carry out the timestamp preserved after data change.
5. the method for data syn-chronization as claimed in claim 1, is characterized in that, describedly sends described first data segment to goal systems and comprises:
Perform data synchronous operation;
The value of the synchronous regime field of data query section in a database;
Obtain described value be the data segment of 0 all as the first data segment, and to goal systems send described first data segment.
6. the method for data syn-chronization as claimed in claim 1, is characterized in that, described when comparative result is the same, by the synchronous regime field mark of described source data for synchronously to comprise:
When comparative result is the same, the value of the synchronous regime field of described source data is set to 1.
7. based on a device for the data syn-chronization of timestamp, it is characterized in that, comprising:
Update module, for changing the content of the first selected data segment;
First arranges module, is represent preset value to be synchronized for arranging the synchronous regime field of carrying in described first data segment, and the timestamp of data signature field;
Sending module, for sending described first data segment to goal systems, revises the reference content of the second data segment as described goal systems, described first data segment and the second data segment mark match;
First receiver module, for receiving the amendment acknowledge message of described goal systems feedback;
Comparison module, for comparing the timestamp in this first data segment in the timestamp in described first data segment and database;
Confirm module, for when comparative result is consistent, arranging the synchronous regime field of carrying in described first data segment is represent synchronous preset value; When comparative result is different, the synchronous regime field of carrying in described first data segment does not change.
8. a method for data syn-chronization, is characterized in that, comprising:
Receive the first data segment changing content that origin system sends, the value of carrying synchronous regime field in described first data segment is represent preset value to be synchronized, and the timestamp of data signature field;
Search the second data segment matched with the mark of described first data segment;
According to described first data segment content modification described in the content of the second data segment, to described origin system feedback amendment acknowledge message, timestamp in described first data segment to be compared with the timestamp in this first data segment in database and when result is consistent, arranging the synchronous regime field of carrying in described first data segment is represent synchronous preset value for triggering described origin system; When comparative result is different, the synchronous regime field of carrying in described first data segment does not change.
9. a device for data syn-chronization, is characterized in that, comprising:
Second receiver module, for receiving the first data segment changing content that origin system sends, the value of carrying synchronous regime field in described first data segment is represent preset value to be synchronized, and the timestamp of data signature field;
Search module, for searching the second data segment matched with the mark of described first data segment;
Feedback module, for the content of the second data segment described in the content modification according to described first data segment, to described origin system feedback amendment acknowledge message, timestamp in described first data segment to be compared with the timestamp in this first data segment in database and when result is consistent, arranging the synchronous regime field of carrying in described first data segment is represent synchronous preset value for triggering described origin system; When comparative result is different, the synchronous regime field of carrying in described first data segment does not change.
10. a system for data syn-chronization, is characterized in that, comprising:
Origin system, for changing the content of the first selected data segment; Arranging the synchronous regime field of carrying in described first data segment is represent preset value to be synchronized, and the timestamp of data signature field; Send described first data segment to goal systems, revise the reference content of the second data segment as described goal systems, described first data segment and the second data segment mark match; Receive the amendment acknowledge message of described goal systems feedback; Timestamp in this first data segment in timestamp in described first data segment and database is compared; When comparative result is consistent, arranging the synchronous regime field of carrying in described first data segment is represent synchronous preset value; When comparative result is different, the synchronous regime field of carrying in described first data segment does not change;
Goal systems, for receiving the first data segment changing content that origin system sends, the value of carrying synchronous regime field in described first data segment is represent preset value to be synchronized, and the timestamp of data signature field; Search the second data segment matched with the mark of described first data segment; According to described first data segment content modification described in the content of the second data segment, to described origin system feedback amendment acknowledge message, timestamp in described first data segment to be compared with the timestamp in this first data segment in database and when result is consistent, arranging the synchronous regime field of carrying in described first data segment is represent synchronous preset value for triggering described origin system; When comparative result is different, the synchronous regime field of carrying in described first data segment does not change.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410795909.0A CN104462477B (en) | 2014-12-18 | 2014-12-18 | The method, apparatus and system of data syn-chronization based on timestamp |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410795909.0A CN104462477B (en) | 2014-12-18 | 2014-12-18 | The method, apparatus and system of data syn-chronization based on timestamp |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104462477A true CN104462477A (en) | 2015-03-25 |
CN104462477B CN104462477B (en) | 2018-03-30 |
Family
ID=52908512
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410795909.0A Expired - Fee Related CN104462477B (en) | 2014-12-18 | 2014-12-18 | The method, apparatus and system of data syn-chronization based on timestamp |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104462477B (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106453657A (en) * | 2016-12-07 | 2017-02-22 | 海信集团有限公司 | Status information update method and device of smart home equipment |
CN106897342A (en) * | 2016-07-20 | 2017-06-27 | 阿里巴巴集团控股有限公司 | A kind of data verification method and equipment |
CN107316176A (en) * | 2016-04-27 | 2017-11-03 | 平安科技(深圳)有限公司 | The control method and device of declaration form processing |
CN108536752A (en) * | 2018-03-13 | 2018-09-14 | 北京信安世纪科技有限公司 | A kind of method of data synchronization, device and equipment |
CN109522364A (en) * | 2018-10-18 | 2019-03-26 | 恒峰信息技术有限公司 | A kind of strange land data double-way synchronous method and system |
CN109558458A (en) * | 2018-12-30 | 2019-04-02 | 贝壳技术有限公司 | Method of data synchronization, configuration platform, transaction platform and data synchronous system |
CN110781373A (en) * | 2019-10-29 | 2020-02-11 | 北京字节跳动网络技术有限公司 | List updating method and device, readable medium and electronic equipment |
CN112019360A (en) * | 2019-05-29 | 2020-12-01 | 华为技术有限公司 | Configuration data processing method, software defined network device, system and storage medium |
CN112486934A (en) * | 2020-08-21 | 2021-03-12 | 海信视像科技股份有限公司 | File synchronization method and display device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6694335B1 (en) * | 1999-10-04 | 2004-02-17 | Microsoft Corporation | Method, computer readable medium, and system for monitoring the state of a collection of resources |
CN101064630A (en) * | 2006-04-24 | 2007-10-31 | 华为技术有限公司 | Data synchronization method and system |
CN101075864A (en) * | 2007-07-16 | 2007-11-21 | 腾讯科技(深圳)有限公司 | Method for synchronizing and processing data, customer terminal equipment and servo |
CN103984715A (en) * | 2014-05-08 | 2014-08-13 | 武汉库百网络技术有限公司 | Data synchronizing and checking method, device and system of isomerous database |
CN104065752A (en) * | 2014-07-11 | 2014-09-24 | 上海百步电子科技股份有限公司 | Synchronization method of data between terminals |
-
2014
- 2014-12-18 CN CN201410795909.0A patent/CN104462477B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6694335B1 (en) * | 1999-10-04 | 2004-02-17 | Microsoft Corporation | Method, computer readable medium, and system for monitoring the state of a collection of resources |
CN101064630A (en) * | 2006-04-24 | 2007-10-31 | 华为技术有限公司 | Data synchronization method and system |
CN101075864A (en) * | 2007-07-16 | 2007-11-21 | 腾讯科技(深圳)有限公司 | Method for synchronizing and processing data, customer terminal equipment and servo |
CN103984715A (en) * | 2014-05-08 | 2014-08-13 | 武汉库百网络技术有限公司 | Data synchronizing and checking method, device and system of isomerous database |
CN104065752A (en) * | 2014-07-11 | 2014-09-24 | 上海百步电子科技股份有限公司 | Synchronization method of data between terminals |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107316176A (en) * | 2016-04-27 | 2017-11-03 | 平安科技(深圳)有限公司 | The control method and device of declaration form processing |
CN106897342A (en) * | 2016-07-20 | 2017-06-27 | 阿里巴巴集团控股有限公司 | A kind of data verification method and equipment |
CN106897342B (en) * | 2016-07-20 | 2020-10-09 | 阿里巴巴集团控股有限公司 | Data verification method and equipment |
CN106453657A (en) * | 2016-12-07 | 2017-02-22 | 海信集团有限公司 | Status information update method and device of smart home equipment |
CN108536752B (en) * | 2018-03-13 | 2021-11-09 | 北京信安世纪科技有限公司 | Data synchronization method, device and equipment |
CN108536752A (en) * | 2018-03-13 | 2018-09-14 | 北京信安世纪科技有限公司 | A kind of method of data synchronization, device and equipment |
CN109522364A (en) * | 2018-10-18 | 2019-03-26 | 恒峰信息技术有限公司 | A kind of strange land data double-way synchronous method and system |
CN109558458A (en) * | 2018-12-30 | 2019-04-02 | 贝壳技术有限公司 | Method of data synchronization, configuration platform, transaction platform and data synchronous system |
CN112019360A (en) * | 2019-05-29 | 2020-12-01 | 华为技术有限公司 | Configuration data processing method, software defined network device, system and storage medium |
CN110781373A (en) * | 2019-10-29 | 2020-02-11 | 北京字节跳动网络技术有限公司 | List updating method and device, readable medium and electronic equipment |
CN110781373B (en) * | 2019-10-29 | 2022-09-06 | 北京字节跳动网络技术有限公司 | List updating method and device, readable medium and electronic equipment |
CN112486934A (en) * | 2020-08-21 | 2021-03-12 | 海信视像科技股份有限公司 | File synchronization method and display device |
WO2022037211A1 (en) * | 2020-08-21 | 2022-02-24 | 海信视像科技股份有限公司 | Display device and file synchronization method |
Also Published As
Publication number | Publication date |
---|---|
CN104462477B (en) | 2018-03-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104462477A (en) | Data synchronizing method, device and system based on timestamp | |
CN108074177B (en) | Data reconciliation method, system and computer-readable storage medium | |
CN107872528B (en) | Message pushing method and device | |
CN102291416B (en) | A kind of method and system of client and server bi-directional synchronization | |
CN103095769B (en) | Across method of data synchronization and the system of machine room | |
US20110265071A1 (en) | Apparatus and Method for Loading and Updating Codes of Cluster-Based Java Application System | |
CN105843895B (en) | Data query and synchronous method based on Ehcache, apparatus and system | |
CN103744906A (en) | System, method and device for data synchronization | |
CN104572845A (en) | File distribution method and device, equipment and system | |
CN104065752A (en) | Synchronization method of data between terminals | |
CN110012049B (en) | Information push method, system, server and computer readable storage medium | |
CN104268229A (en) | Resource obtaining method and device based on multi-process browser | |
CN103905441A (en) | Data acquisition method and device | |
CN105812469A (en) | Address book synchronization method and device | |
CN107741965B (en) | Database synchronous processing method and device, computing equipment and computer storage medium | |
CN104537018A (en) | Data synchronization method, device and system | |
CN105205100A (en) | Data synchronization method based on MTP between terminals and terminals | |
CN111008220A (en) | Dynamic identification method and device of data source, storage medium and electronic device | |
CN109471901B (en) | Data synchronization method and device | |
CN114328739A (en) | Data synchronization method, data reading method, data synchronization device, data reading device, electronic equipment, storage medium and product | |
CN111552673B (en) | File processing method and device, electronic equipment and storage medium | |
CN112905668A (en) | Database derivative method, apparatus, and medium based on distributed data stream processing engine | |
CN102332026A (en) | Inquiring statistical method for service database | |
CN112035418A (en) | Multi-computer room synchronization method, computing device and computer storage medium | |
CN108628901A (en) | A kind of data-updating method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180330 |
|
CF01 | Termination of patent right due to non-payment of annual fee |