CN102064932A - Method and device for synchronizing data between different equipment - Google Patents

Method and device for synchronizing data between different equipment Download PDF

Info

Publication number
CN102064932A
CN102064932A CN2010106141062A CN201010614106A CN102064932A CN 102064932 A CN102064932 A CN 102064932A CN 2010106141062 A CN2010106141062 A CN 2010106141062A CN 201010614106 A CN201010614106 A CN 201010614106A CN 102064932 A CN102064932 A CN 102064932A
Authority
CN
China
Prior art keywords
equipment
message
data
sync
length
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.)
Pending
Application number
CN2010106141062A
Other languages
Chinese (zh)
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.)
SHANGHAI DINGZU COMMUNICATION TECHNOLOGY Co Ltd
Original Assignee
SHANGHAI DINGZU COMMUNICATION TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHANGHAI DINGZU COMMUNICATION TECHNOLOGY Co Ltd filed Critical SHANGHAI DINGZU COMMUNICATION TECHNOLOGY Co Ltd
Priority to CN2010106141062A priority Critical patent/CN102064932A/en
Publication of CN102064932A publication Critical patent/CN102064932A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method for synchronizing data between different equipment. The method comprises the following steps: (a) first equipment records the initial position and length of each data item needing to be synchronized in the memory of the first equipment; (b) the first equipment constructs each data item needing to be synchronized into a synchronous message which can be transmitted to second equipment according to the recorded initial position and length information of each data item and sends the synchronous message to the second equipment, and if the length of each data item is more than the maximum allowable message length between the first equipment and the second equipment, the data item is split into a plurality of synchronous messages with the length less than the maximum allowable message length; and (c) the second equipment memorizes the received data into the memory of the second equipment and the memory position is the same as that of the received data in the memory of the first equipment.

Description

The method of data sync and device between distinct device
Technical field
The present invention relates to communication and field of computer technology, relate in particular to the method and the device of data sync between a kind of distinct device.
Background technology
One of important technology of realizing seamless switching between host apparatus and the stand-by equipment is a data synchronization technology between two equipment.After the veneer of two identical functions successively started, the veneer that the back starts needed need to seek data in synchronization to the veneer that starts earlier.
Synchronizing process between host apparatus and the stand-by equipment is as described below usually: stand-by equipment sends synchronization request to host apparatus; Host apparatus sends the synchrodata message to stand-by equipment; Behind EOS, host apparatus sends to stand-by equipment and finishes message synchronously.Some synchronization mechanism further sends response message to host apparatus after stand-by equipment is received synchrodata, to guarantee the reliability and the sequential of message transmissions.
The shortcoming of above method is, if host apparatus and stand-by equipment differ very long start-up time, just possibility is a lot of to need data in synchronization.Normal transmission causes the transmission time elongated owing to transmit data more, the operate as normal of the veneer that the influence back starts.And, relatively stricter if these data require sequential, during transfer of data, also to consider the assurance of transmission time sequence.And, formerly in the equipment of Qi Donging, need data in synchronization can not guarantee in internal memory it is continued presence, if directly transmit internal memory, have a lot of unnecessary data and be transmitted, cause very big redundancy.
Summary of the invention
Technical problem to be solved by this invention is, the method and the device of data sync between a kind of distinct device is provided, and can reduce the volume of transmitted data between host apparatus and the stand-by equipment, to reduce the required time of data sync, increases work efficiency.
In order to address the above problem, the invention provides the method for data sync between a kind of distinct device, comprising: (a) synchronous original position and the length of each data item in first Device memory of the first equipment records needs; (b) first equipment is according to the original position and the length information of each data item that is write down, needing the data in synchronization item to be configured to each can be for transferring to the sync message of second equipment and being sent to second equipment, if the length of data item greater than the maximum message length that allows between first and second equipment, then splits into this data item several length less than the described maximum sync message that allows message length; (c) in second Device memory, the memory location is identical with the position of the data of being accepted in first Device memory with the storage accepted for second equipment.
As optional technical scheme, the step (b) of first equipment structure and transmission sync message further comprises: (b1) first equipment is that each sync message that constructs adds sequence number continuously; (b2) sync message that is added with sequence number that first equipment will construct is sent to second equipment, and simultaneously the positional information of each sync message in first Device memory is sent to second equipment; (b3) after second equipment receives the EM end of message, check the sequence number of message of receiving, if sequence number of message is continuous, then send the information that acceptance finishes to first equipment, if test serial number has interruption, then the numbering that will lack is sent to first equipment, and first equipment is sent to second equipment with the message of reference numeral.
As optional technical scheme, step (b1) further comprises: first equipment further generates a tables of data, and described tables of data comprises that all need original position and the length information of synchrodata in internal memory.
As optional technical scheme, step (b2) further comprises: first equipment also is sent to tables of data second equipment when sending sync message.
As optional technical scheme, step (c) further comprises: second equipment is according to the positional information of sync message in first Device memory that obtains by the reading of data table to be received.
As optional technical scheme, step (b) comprises that further second equipment starts a timer when beginning to accept sync message, is defined in to stop to receive sync message when the timer timing finishes.
As optional technical scheme, after finishing, first equipment structure sync message comprises the steps: that further (b4) first equipment compresses the sync message of structure in the step (b); (b5) sync message after several compressions is further formed synchronous compressed packet, and in follow-up step, replace this synchronous compressed packet of transmission.
The present invention further provides the device of data sync between a kind of distinct device, having comprised: data record unit is used for original position and the length of each synchronous data item of the first equipment records needs in first Device memory; Message structure and delivery unit, be used for original position and the length information of first equipment according to each data item that is write down, needing the data in synchronization item to be configured to each can be for transferring to the sync message of second equipment and being sent to second equipment, if the length of data item greater than the maximum message length that allows between first and second equipment, then splits into this data item several length less than the described maximum sync message that allows message length; Data storage cell, be used for second equipment with the storage accepted in second Device memory, the memory location is identical with the position of the data of being accepted in first Device memory.
The invention has the advantages that, need synchronous original position and the length of each data item in first Device memory, only will need data in synchronization to be packaged into message and send, avoided sending too much redundant data, thereby saved lock in time by the location.Further,, avoid message dropping takes place in transmission course, improved the reliability of system so that receiving terminal carries out integrity checking by for message adds continuous numbering.Further comprise that by establishment all need the original position of synchrodata in internal memory and the tables of data of length information, for the receiving terminal decompress(ion) and store sync message and provide convenience.
Description of drawings
It shown in the accompanying drawing 1 the implementation step schematic diagram of the embodiment of the method for the invention.
It shown in the accompanying drawing 2 the system architecture schematic diagram of the embodiment of device of the present invention.
Embodiment
Next in conjunction with the accompanying drawings the method for data sync between distinct device of the present invention and the embodiment of device are made a detailed description.
Provide the embodiment of the method for the invention at first in conjunction with the accompanying drawings.Be implementation step schematic diagram of the present invention shown in the accompanying drawing 1, comprise: step a, first equipment records needs synchronous original position and the length of each data item in first Device memory; Step b1, first equipment need the data in synchronization item to be configured to supply the sync message of second equipment that transfers to each according to the original position and the length information of each data item that is write down, and are that each sync message that constructs adds sequence number continuously; Step b2, the sync message that is added with sequence number that first equipment will construct is sent to second equipment, and simultaneously the positional information of each sync message in first Device memory is sent to second equipment; Step b3, after second equipment receives the EM end of message, check the sequence number of message of receiving, if sequence number of message is continuous, then send the information that acceptance finishes to first equipment, if test serial number has interruption, then the numbering that will lack is sent to first equipment, and first equipment is sent to second equipment with the message of reference numeral; Refer step c, in second Device memory, the memory location is identical with the position of the data of being accepted in first Device memory with the storage accepted for second equipment.
Refer step a, first equipment records needs synchronous original position and the length of each data item in first Device memory.The position that data are stored in internal memory is discontinuous, if the content in a certain internal memory all is transferred to second equipment, and the unnecessary data of transmission a big chunk possibly.So present embodiment is at first located and is needed the position of data in synchronization in internal memory.
Refer step b1, first equipment is according to the original position and the length information of each data item that is write down, need the data in synchronization item to be configured to supply the sync message of second equipment that transfers to each, and be that each sync message that constructs adds sequence number continuously.The message that transmits between the distinct device has maximum permission length L usually, if the length of data item greater than this length L, then splits into this data item the sync message of several length less than L.Add continuously sequence number and be meant that the mode that adopts continuous programming code for each message adds a sequence number, promptly idle bit can not occur, this second equipment that helps being used to receiving data is checked the integrality of the sync message that is received after the reception sync message.In case the coding of the second device discovery sync message is discontinuous, then meaning has sync message to lose in transmission.
Can recover smoothly in second equipment for after message is split, first equipment in this step can also further generate a tables of data, and described tables of data comprises that all need original position and the length information of synchrodata in internal memory.If long data are split when the structure message, also should embody in the then described tables of data.
In order further to reduce data quantity transmitted, first equipment can also further carry out second-compressed to the sync message of constructing after the structure message, and the sync message after several compressions is further formed synchronous compressed packet.Like this, in follow-up step, replace this synchronous compressed packet of transmission, can further reduce data quantity transmitted.
Refer step b2, the sync message that is added with sequence number that first equipment will construct is sent to second equipment, and simultaneously the positional information of each sync message in first Device memory is sent to second equipment.If first equipment has generated tables of data simultaneously in previous step, then in this step, first equipment is sent to second equipment with tables of data when sending sync message, to realize the purpose of second equipment that the positional information of each sync message in first Device memory is sent to.In this step, cause transmission course to be absorbed in endless loop for fear of something unexpected happened in transmission course, can further make second equipment when beginning to accept sync message, start a timer, stop to receive sync message when being defined in timer timing end.
Refer step b3, after second equipment receives the EM end of message, check the sequence number of message of receiving, if sequence number of message is continuous, then send the information that acceptance finishes to first equipment, if test serial number has interruption, then the numbering that will lack is sent to first equipment, and first equipment is sent to second equipment with the message of reference numeral.
Refer step c, in second Device memory, the memory location is identical with the position of the data of being accepted in first Device memory with the storage accepted for second equipment.If first equipment is sent to second equipment with tables of data when sending sync message, then second equipment can be according to the positional information of sync message in first Device memory that obtains by the reading of data table to be received in this step.
Next provide the embodiment of device of the present invention in conjunction with the accompanying drawings.Accompanying drawing 2 is system architecture diagrams of the described device of this embodiment, comprising: data record unit 200 is used for original position and the length of each synchronous data item of the first equipment records needs in first Device memory; Message structure and delivery unit 210, be used for original position and the length information of first equipment according to each data item that is write down, needing the data in synchronization item to be configured to each can be for transferring to the sync message of second equipment and being sent to second equipment, if the length of data item greater than the maximum message length that allows between first and second equipment, then splits into this data item several length less than the described maximum sync message that allows message length; Data storage cell 220, be used for second equipment with the storage accepted in second Device memory, the memory location is identical with the position of the data of being accepted in first Device memory.
The message structure further comprises with delivery unit 210: sequence number is added module 211, is used for first equipment and adds sequence number for each sync message that constructs continuously; Message sending module 212 is used for the sync message that is added with sequence number that first equipment will construct and is sent to second equipment, and simultaneously the positional information of each sync message in first Device memory is sent to second equipment; Message audit module 213, after being used for second equipment reception EM end of message, check the sequence number of message of receiving, if sequence number of message is continuous, then send the information that acceptance finishes to first equipment, if test serial number has interruption, then the numbering that will lack is sent to first equipment, and first equipment is sent to second equipment with the message of reference numeral.
Sequence number is added module 211 and further comprised: first equipment further generates a tables of data, and described tables of data comprises that all need original position and the length information of synchrodata in internal memory.
Message audit module 212 further comprises: first equipment also is sent to tables of data second equipment when sending sync message.
Data storage cell 220 further comprises: second equipment is according to the positional information of sync message in first Device memory that obtains by the reading of data table to be received.
The message structure further comprises with delivery unit 210: second equipment starts a timer when beginning to accept sync message, is defined in to stop to receive sync message when the timer timing finishes.
The message structure further comprises with delivery unit 210: the message compression module is used for first equipment sync message of constructing is compressed; The compressed packet delivery module is used for the sync message after several compressions is further formed synchronous compressed packet, and replaces this synchronous compressed packet of transmission in follow-up step.Not shown with upper module.
The embodiment that the correlation of above-mentioned each unit and module and operation principle please refer to last method.
The above only is a 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 (14)

1. the method for data sync between a distinct device is characterized in that, comprising:
(a) first equipment records needs synchronous original position and the length of each data item in first Device memory;
(b) first equipment is according to the original position and the length information of each data item that is write down, needing the data in synchronization item to be configured to each can be for transferring to the sync message of second equipment and being sent to second equipment, if the length of data item greater than the maximum message length that allows between first and second equipment, then splits into this data item several length less than the described maximum sync message that allows message length;
(c) in second Device memory, the memory location is identical with the position of the data of being accepted in first Device memory with the storage accepted for second equipment.
2. the method for data sync is characterized in that between distinct device according to claim 1, and the step (b) of first equipment structure and transmission sync message further comprises:
(b1) first equipment adds sequence number for each sync message that constructs continuously;
(b2) sync message that is added with sequence number that first equipment will construct is sent to second equipment, and simultaneously the positional information of each sync message in first Device memory is sent to second equipment;
(b3) after second equipment receives the EM end of message, check the sequence number of message of receiving, if sequence number of message is continuous, then send the information that acceptance finishes to first equipment, if test serial number has interruption, then the numbering that will lack is sent to first equipment, and first equipment is sent to second equipment with the message of reference numeral.
3. the method for data sync between distinct device according to claim 2, it is characterized in that, step (b1) further comprises: first equipment further generates a tables of data, and described tables of data comprises that all need original position and the length information of synchrodata in internal memory.
4. the method for data sync is characterized in that between distinct device according to claim 3, and step (b2) further comprises: first equipment also is sent to tables of data second equipment when sending sync message.
5. the method for data sync is characterized in that between distinct device according to claim 4, and step (c) further comprises: second equipment is according to the positional information of sync message in first Device memory that obtains by the reading of data table to be received.
6. the method for data sync between distinct device according to claim 1, it is characterized in that, step (b) comprises that further second equipment starts a timer when beginning to accept sync message, is defined in to stop to receive sync message when the timer timing finishes.
7. the method for data sync is characterized in that between distinct device according to claim 1, further comprises the steps: after first equipment structure sync message finishes in the step (b)
(b4) first equipment compresses the sync message of structure;
(b5) sync message after several compressions is further formed synchronous compressed packet, and in follow-up step, replace this synchronous compressed packet of transmission.
8. the device of data sync between a distinct device is characterized in that, comprising:
Data record unit is used for original position and the length of each synchronous data item of the first equipment records needs in first Device memory;
Message structure and delivery unit, be used for original position and the length information of first equipment according to each data item that is write down, needing the data in synchronization item to be configured to each can be for transferring to the sync message of second equipment and being sent to second equipment, if the length of data item greater than the maximum message length that allows between first and second equipment, then splits into this data item several length less than the described maximum sync message that allows message length;
Data storage cell, be used for second equipment with the storage accepted in second Device memory, the memory location is identical with the position of the data of being accepted in first Device memory.
9. the device of data sync is characterized in that between distinct device according to claim 8, and the message structure of first equipment structure and transmission sync message further comprises with delivery unit:
Sequence number is added module, is used for first equipment and adds sequence number for each sync message that constructs continuously;
The message sending module is used for the sync message that is added with sequence number that first equipment will construct and is sent to second equipment, and simultaneously the positional information of each sync message in first Device memory is sent to second equipment;
The message audit module, after being used for second equipment reception EM end of message, check the sequence number of message of receiving, if sequence number of message is continuous, then send the information that acceptance finishes to first equipment, if test serial number has interruption, then the numbering that will lack is sent to first equipment, and first equipment is sent to second equipment with the message of reference numeral.
10. the device of data sync between distinct device according to claim 8, it is characterized in that, sequence number is added module and further comprised: first equipment further generates a tables of data, and described tables of data comprises that all need original position and the length information of synchrodata in internal memory.
11. the device of data sync is characterized in that between distinct device according to claim 10, the message sending module further comprises: first equipment also is sent to tables of data second equipment when sending sync message.
12. the device of data sync between distinct device according to claim 11, it is characterized in that data storage cell further comprises: second equipment is according to the positional information of sync message in first Device memory that obtains by the reading of data table to be received.
13. the device of data sync between distinct device according to claim 8, it is characterized in that, the message structure comprises further that with delivery unit second equipment starts a timer when beginning to accept sync message, is defined in to stop to receive sync message when the timer timing finishes.
14. the device of data sync is characterized in that between distinct device according to claim 8, the message structure further comprises with delivery unit:
The message compression module is used for first equipment sync message of constructing is compressed;
The compressed packet delivery module is used for the sync message after several compressions is further formed synchronous compressed packet, and replaces this synchronous compressed packet of transmission in follow-up step.
CN2010106141062A 2010-12-30 2010-12-30 Method and device for synchronizing data between different equipment Pending CN102064932A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010106141062A CN102064932A (en) 2010-12-30 2010-12-30 Method and device for synchronizing data between different equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010106141062A CN102064932A (en) 2010-12-30 2010-12-30 Method and device for synchronizing data between different equipment

Publications (1)

Publication Number Publication Date
CN102064932A true CN102064932A (en) 2011-05-18

Family

ID=44000045

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010106141062A Pending CN102064932A (en) 2010-12-30 2010-12-30 Method and device for synchronizing data between different equipment

Country Status (1)

Country Link
CN (1) CN102064932A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104937582A (en) * 2013-02-27 2015-09-23 惠普发展公司,有限责任合伙企业 Data synchronization

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1462116A (en) * 2002-05-28 2003-12-17 深圳市中兴通讯股份有限公司 Method of data synchronization in main stock redundance system
CN1756108A (en) * 2004-09-29 2006-04-05 华为技术有限公司 Master/backup system data synchronizing method
CN101695067A (en) * 2009-10-13 2010-04-14 深圳市同洲电子股份有限公司 Data processing method and device based on TCP and digital TV receiver terminal and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1462116A (en) * 2002-05-28 2003-12-17 深圳市中兴通讯股份有限公司 Method of data synchronization in main stock redundance system
CN1756108A (en) * 2004-09-29 2006-04-05 华为技术有限公司 Master/backup system data synchronizing method
CN101695067A (en) * 2009-10-13 2010-04-14 深圳市同洲电子股份有限公司 Data processing method and device based on TCP and digital TV receiver terminal and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104937582A (en) * 2013-02-27 2015-09-23 惠普发展公司,有限责任合伙企业 Data synchronization
US9781203B2 (en) 2013-02-27 2017-10-03 Hewlett-Packard Development Company, L.P. Data synchronization
CN104937582B (en) * 2013-02-27 2018-11-06 惠普发展公司,有限责任合伙企业 Data synchronize

Similar Documents

Publication Publication Date Title
WO2014059804A1 (en) Method and system for data synchronization
CN103309767A (en) Method and device for processing client log
CN101547219B (en) System and method for data storage
CN102752283A (en) Method and system for transmitting files with large data sizes
CN104620564A (en) Transmission of multiple protocol data elements via an interface utilizing a data tunnel
CN108512785B (en) Data transmission protocol method
CN101132347A (en) System and method for implementing TCP communication backup
CN108259227B (en) Data synchronization method of dual-computer hot standby interlocking system
CN101819561A (en) File downloading method and system
CN101834796A (en) Double-controller communication system and method
CN101778134A (en) Data synchronization method and mobile communication terminal
CN103731247B (en) Receipt method for achieving big dipper RD communication
CN103034597A (en) Device and method for operating memory cards
CN103051434A (en) Data decompression and decompression processing methods and devices
CN101472163A (en) Method, apparatus and system for transmitting picture file
CN102088332B (en) Method and device for expansion 1553B bus to perform file transfer from BC to RT
CN102437925A (en) Data backup method, device and system in distributed system
CN102364472A (en) Data storage method and system
CN110245038B (en) Data cross backup and recovery device and method
CN100385407C (en) Allopatric data image method of network information system
CN102064932A (en) Method and device for synchronizing data between different equipment
CN101754421A (en) File transmission method based on Bluetooth transmission protocol, system and mobile terminal
CN103987096A (en) Method, base station and terminal for achieving information synchronization in single station mode
CN116450180A (en) Remote upgrading method for terminal equipment
CN112667698B (en) MongoDB data synchronization method based on converged media platform

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20110518