CN108848024A - message synchronization method, system and device - Google Patents

message synchronization method, system and device Download PDF

Info

Publication number
CN108848024A
CN108848024A CN201810823155.3A CN201810823155A CN108848024A CN 108848024 A CN108848024 A CN 108848024A CN 201810823155 A CN201810823155 A CN 201810823155A CN 108848024 A CN108848024 A CN 108848024A
Authority
CN
China
Prior art keywords
message
sequence number
message sequence
synchronization
sent
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
CN201810823155.3A
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.)
Shenzhen Bit Bear Technology Co Ltd
Original Assignee
Shenzhen Bit Bear 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 Shenzhen Bit Bear Technology Co Ltd filed Critical Shenzhen Bit Bear Technology Co Ltd
Priority to CN201810823155.3A priority Critical patent/CN108848024A/en
Publication of CN108848024A publication Critical patent/CN108848024A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/23Reliability checks, e.g. acknowledgments or fault reporting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • H04L1/1621Group acknowledgement, i.e. the acknowledgement message defining a range of identifiers, e.g. of sequence numbers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention is suitable for message synchronization technical field, provides a kind of message synchronization method, the method includes:A, synchronization request is received, newest first message sequence number is sent to terminal side;B, terminal side is by locally-stored newest second message sequence number and the comparative analysis of first message sequence number;C, according to the comparing result of first message sequence number and second message sequence number, synchronization message content is sent.The present invention provides a kind of message synchronization system, device accordingly.Whereby, the present invention can preferably realize message synchronization.

Description

Message synchronization method, system and device
Technical field
The present invention relates to message synchronization technical field more particularly to a kind of message synchronization method, system and device.
Background technique
Instant messaging (Instant Message) is a kind of real-time communication service for allowing user to establish connection by network. With the rapid development of mobile Internet, the outburst of the various terminals such as mobile phone, tablet computer, smart television, the mode that user links up Gradually tend to multiple terminals, and when user switches between multiple terminals, needs to keep the consistent experience of instant messaging application.
Currently, the message sink at different ends may be implemented in existing message push mode, it is in user while logs in hand When generator terminal and computer end, while message can be pushed to computer, it is pushed to mobile phone terminal.But it is multiple in face of mobile Internet Miscellaneous network traffic conditions, the message for being pushed to mobile terminal can not be often sent to, and in the case where mass users scale, Storage push failed message can consume a large amount of storage resource, largely push again to also seriously consuming server resource.
In summary, the existing technology has inconveniences and defects in actual use, so it is necessary to be improved.
Summary of the invention
It, can be with the purpose of the present invention is to provide a kind of message synchronization method, system and device for above-mentioned defect Better synchronization message.
To achieve the goals above, the present invention provides a kind of message synchronization method, the method includes:
A, synchronization request is received, newest first message sequence number is sent to terminal side;
B, terminal side is by locally-stored newest second message sequence number and the comparative analysis of first message sequence number;
C, according to the comparing result of first message sequence number and second message sequence number, synchronization message content is sent.
Message synchronization method according to the present invention, step A further include before:The generation strategy of presetting message sequence number.
Message synchronization method according to the present invention, the generation strategy of the message SN are specially:By message send or Receiving time setting incremented by successively.
Message synchronization method according to the present invention, the step C include:
If second message sequence number is less than first message sequence number, synchronous message synchronization will be needed to corresponding terminal Side.
The present invention also provides a kind of message synchronization systems, including:
Newest first message sequence number is sent to terminal side for receiving synchronization request by transmission unit;
Comparing unit, for dividing locally-stored newest second message sequence number compared with first message sequence number Analysis;
Synchronous processing unit, according to the comparing result of first message sequence number and second message sequence number, transmission, which synchronizes, to disappear Cease content.
Message synchronization system according to the present invention further includes
Setting unit, the generation strategy for presetting message sequence number.
Message synchronization system according to the present invention, the setting unit send or receive the time by message and incremented by successively set It sets.
Message synchronization system according to the present invention, if second message sequence number is less than first message sequence number, it is synchronous at Managing unit needs synchronous message synchronization to corresponding terminal side.
The present invention also provides a kind of synchronizing devices including system as described above.
The present invention sends newest first message sequence number after synchronization request by setting transmission unit, for receiving To terminal side;And locally-stored newest second message sequence number is divided compared with first message sequence number by comparing unit Analysis;Synchronous processing unit is sent in synchronization message according to the comparing result of first message sequence number and second message sequence number Hold.If second message sequence number is less than first message sequence number, synchronous message synchronization will be needed to corresponding terminal side.It borrows This, can better synchronization message.
Detailed description of the invention
Fig. 1 is message synchronization method flow diagram of the invention;
Fig. 2 is message synchronization system construction drawing of the invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
Referring to Fig. 1, a kind of message synchronization system of the present invention, message when logging in multiple terminals applied to same user is same Step mechanism, the synchronization system 100 include:
Newest first message sequence number is sent to terminal side after synchronization request for receiving by transmission unit 10.Specifically , when a certain user logs in multiple terminals by an application, due to terminal itself or communication, message difference can be generated The case where step.To solve this problem, a preset setting unit 40 in system 100, the generation plan for presetting message sequence number Slightly, time setting incremented by successively specially is sent or received by message.
Comparing unit 20, for dividing locally-stored newest second message sequence number compared with first message sequence number Analysis.There is the latest sequence number of each message terminal side, since message SN has stringent incremental order, if If first message sequence number cannot be matched with second message sequence number, description messages are not carried out synchronization, and by comparing result It is sent to the processing of synchronous processing unit 30.
Synchronous processing unit 30 sends and synchronizes according to the comparing result of first message sequence number and second message sequence number Message content.Synchronous processing unit 30 can obtain corresponding according to the difference of first message sequence number and second message sequence number The message content of terminal side missing, and corresponding terminal side is sent it to, terminal side while update message sequence number.
Usually, if not synchronizing, second message sequence number can be less than first message sequence number, can according to this kind comparison Conveniently to obtain non-synchronizing information, and sends it to terminal and complete to synchronize.
The present invention also provides a kind of synchronizing devices including above system 100, can correspond to message server.
Referring to fig. 2, the present invention accordingly provides a kind of message synchronization method, can be real by system 100 as shown in Figure 1 Existing, this method includes:
Newest first message sequence number is sent to terminal side after receiving synchronization request by step S201.Specifically, a certain When user logs in multiple terminals by an application, due to terminal itself or communication, the nonsynchronous feelings of message can be generated Condition.To solve this problem, a preset setting unit 40 in system 100, for the generation strategy of presetting message sequence number, specifically To send or receive time setting incremented by successively by message.
Step S202, by locally-stored newest second message sequence number and the comparative analysis of first message sequence number.Eventually There is the latest sequence number of each message end side, since message SN has stringent incremental order, if first disappears If breath sequence number cannot be matched with second message sequence number, description messages are not carried out synchronization, and comparing result is sent to The processing of synchronous processing unit 30.The comparison of the step can be realized by terminal side, can also be realized by service side.
Step S203, the comparing result of first message sequence number and second message sequence number send synchronization message content.Together Corresponding terminal side missing can be obtained according to the difference of first message sequence number and second message sequence number by walking processing unit 30 Message content, and corresponding terminal side is sent it to, terminal side while update message sequence number.
Usually, if not synchronizing, second message sequence number can be less than first message sequence number, can according to this kind comparison Conveniently to obtain non-synchronizing information, and sends it to terminal and complete to synchronize.
In conclusion the present invention is by setting transmission unit, for receiving newest first message after synchronization request Sequence number is sent to terminal side;And by comparing unit by locally-stored newest second message sequence number and first message sequence Row number comparative analysis;Synchronous processing unit is sent same according to the comparing result of first message sequence number and second message sequence number Walk message content.If second message sequence number is less than first message sequence number, synchronous message synchronization will be needed to corresponding Terminal side.It whereby, can better synchronization message.
Certainly, the present invention can also have other various embodiments, without deviating from the spirit and substance of the present invention, ripe It knows those skilled in the art and makes various corresponding changes and modifications, but these corresponding changes and change in accordance with the present invention Shape all should fall within the scope of protection of the appended claims of the present invention.

Claims (9)

1. a kind of message synchronization method, which is characterized in that the method includes:
A, newest first message sequence number is sent to terminal side after reception synchronization request;
B, terminal side is by locally-stored newest second message sequence number and the comparative analysis of first message sequence number;
C, according to the comparing result of first message sequence number and second message sequence number, synchronization message content is sent.
2. message synchronization method according to claim 1, which is characterized in that further include before step A:Presetting message sequence Number generation strategy.
3. message synchronization method according to claim 2, which is characterized in that the generation strategy of the message SN is specific For:Time setting incremented by successively is sent or received by message.
4. message synchronization method according to claim 3, which is characterized in that the step C includes:
If second message sequence number is less than first message sequence number, synchronous message synchronization will be needed to corresponding terminal side.
5. a kind of message synchronization system, which is characterized in that including:
Newest first message sequence number is sent to terminal side after synchronization request for receiving by transmission unit;
Comparing unit, for by locally-stored newest second message sequence number and the comparative analysis of first message sequence number;
Synchronous processing unit is sent in synchronization message according to the comparing result of first message sequence number and second message sequence number Hold.
6. message synchronization system according to claim 5, which is characterized in that further include
Setting unit, the generation strategy for presetting message sequence number.
7. message synchronization system according to claim 6, which is characterized in that the setting unit is sent or received by message Time setting incremented by successively.
8. message synchronization system according to claim 7, which is characterized in that if second message sequence number is less than first message Sequence number, then synchronous processing unit needs synchronous message synchronization to corresponding terminal side.
9. a kind of includes the synchronizing device of the system as described in any one of claim 5~8.
CN201810823155.3A 2018-07-25 2018-07-25 message synchronization method, system and device Pending CN108848024A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810823155.3A CN108848024A (en) 2018-07-25 2018-07-25 message synchronization method, system and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810823155.3A CN108848024A (en) 2018-07-25 2018-07-25 message synchronization method, system and device

Publications (1)

Publication Number Publication Date
CN108848024A true CN108848024A (en) 2018-11-20

Family

ID=64192145

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810823155.3A Pending CN108848024A (en) 2018-07-25 2018-07-25 message synchronization method, system and device

Country Status (1)

Country Link
CN (1) CN108848024A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113965580A (en) * 2020-06-29 2022-01-21 北京字节跳动网络技术有限公司 Method and device for synchronizing messages

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080270629A1 (en) * 2007-04-27 2008-10-30 Yahoo! Inc. Data snychronization and device handling using sequence numbers
CN102571990A (en) * 2012-03-16 2012-07-11 北京彩云荣光软件有限公司 E-mail synchronization method and system for mobile terminal
CN104168335A (en) * 2014-09-02 2014-11-26 东软熙康健康科技有限公司 Data synchronization method and device
CN104618498A (en) * 2015-02-13 2015-05-13 深圳市创梦天地科技有限公司 Data resource synchronizing method and server
CN106453639A (en) * 2016-11-25 2017-02-22 深圳市小满科技有限公司 Message synchronization method and message synchronization device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080270629A1 (en) * 2007-04-27 2008-10-30 Yahoo! Inc. Data snychronization and device handling using sequence numbers
CN102571990A (en) * 2012-03-16 2012-07-11 北京彩云荣光软件有限公司 E-mail synchronization method and system for mobile terminal
CN104168335A (en) * 2014-09-02 2014-11-26 东软熙康健康科技有限公司 Data synchronization method and device
CN104618498A (en) * 2015-02-13 2015-05-13 深圳市创梦天地科技有限公司 Data resource synchronizing method and server
CN106453639A (en) * 2016-11-25 2017-02-22 深圳市小满科技有限公司 Message synchronization method and message synchronization device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113965580A (en) * 2020-06-29 2022-01-21 北京字节跳动网络技术有限公司 Method and device for synchronizing messages

Similar Documents

Publication Publication Date Title
JP5430744B2 (en) System and method for real-time performance and load statistics of a communication system
CN103442042B (en) Incremental data synchronization method and system
RU2545999C2 (en) Method, apparatus and mobile broadcast business management system for transmitting information in data form
CN111901341B (en) State synchronization method and device
KR20140031451A (en) Apparatus and metoho for synchronizing a contents in cloud service system
CN104954492A (en) Instant messaging method, distribution server, user terminals and instant messaging system
CN115334025B (en) Decentralized instant messaging method, decentralized instant messaging device, decentralized instant messaging equipment and storage medium
CN112839067A (en) Data synchronization method and device
CN110753005A (en) Speed limiting method, device and system, electronic equipment and computer readable storage medium
CN112417255A (en) Method and device for receiving online state, storage medium and electronic device
CN108848024A (en) message synchronization method, system and device
CN108243396A (en) A kind of time synchronizing method and device
CN106454767A (en) Business data synchronization method, device and system
CN108718274A (en) A kind of anti-loss method of instant communication information
CN110585724B (en) Method and device for updating form data in game client
PH12020551765A1 (en) Methods and systems for booking resources and access management of booked resources
CN111343220B (en) Repeater, distributed file transmission method, distributed file transmission system, medium and electronic equipment
CN110933150A (en) Data synchronization method, system, device, electronic equipment and computer storage medium
CN105323270B (en) Network information push method and system
CN116032867A (en) Session processing method and device, electronic equipment and storage medium
CN108307416A (en) A kind of internet-of-things terminal management method
CN115277649A (en) Method and device for collaboratively editing document in multimedia conference scene
CN109962967A (en) The method of data synchronization subscribed to based on increment
KR20160026138A (en) Rapid sync method for cloud file system and cloud file system using the same
CN112612806A (en) House resource information processing method and device, electronic equipment and computer readable medium

Legal Events

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

Application publication date: 20181120

RJ01 Rejection of invention patent application after publication