WO2012100627A1 - Method for updating clock offset, method and apparatus for announcing clock offset message - Google Patents

Method for updating clock offset, method and apparatus for announcing clock offset message Download PDF

Info

Publication number
WO2012100627A1
WO2012100627A1 PCT/CN2011/084939 CN2011084939W WO2012100627A1 WO 2012100627 A1 WO2012100627 A1 WO 2012100627A1 CN 2011084939 W CN2011084939 W CN 2011084939W WO 2012100627 A1 WO2012100627 A1 WO 2012100627A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
clock offset
type field
value
communication peer
Prior art date
Application number
PCT/CN2011/084939
Other languages
French (fr)
Chinese (zh)
Inventor
梁剑耀
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2012100627A1 publication Critical patent/WO2012100627A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0078Avoidance of errors by organising the transmitted data in a format specifically designed to deal with errors, e.g. location
    • H04L1/0079Formats for control data

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a clock offset update method, a clock offset message notification method and apparatus. Background technique
  • the CTCS-3 (China Train Control System, China Train Control System Level 3) train operation control system standard is the main technical standard for the Chinese railway speed 300-350km passenger line.
  • RSSP-IK Railway Signal Safety Protocol II, Railway Signal Security Protocol II X Corresponding to the ETCS (European Train Control System) standard
  • Subset098 protocol is one of the important communication and interface protocols for RBC-RBC (Radio Block Center), RBC-IL (Interlocking, Interlocking) ), communication between RBC-TSRS (Temporary Speed Restriction Server).
  • the RSSP-II protocol is mainly used to protect against threats such as out-of-order, delay, error, forgery, and insertion of messages in an open network.
  • the RSSP-II protocol defense message delay is TTS (Triple Time Stamp) technology.
  • TTS Triple Time Stamp
  • the TTS technology needs to periodically update the local clock offset between the two communicating parties. It periodically sends a clock offset update request message to the other party, and updates the clock offset of both parties after receiving the update clock offset response message.
  • the prior art has at least the following disadvantages:
  • the clock offset update request message and the response message format are exactly the same, and the only difference between the two and the normal application data message is that The first two have no application data. Therefore, only The message length and the Last receiver time stamp are used to distinguish the three.
  • the receiver determines the clock offset update request message from the peer, and sends a response message to the receiver.
  • the opposite end (B), the opposite end (B) receives the response message, and also determines the clock offset update request message, and returns the clock offset update response message, and repeats, resulting in an infinite loop of the message and a high communication error rate.
  • Embodiments of the present invention provide a method for updating a clock offset, an announcement method and a device for a clock offset message.
  • the technical solution is as follows:
  • an embodiment of the present invention provides a method for updating a clock offset, including: receiving a message from a communication peer, where the message includes a message type field;
  • the message type field is the first value or the second value, updating the local clock offset according to the type of the message and the message.
  • an embodiment of the present invention provides a method for advertising a clock offset message, including: sending a message to a communication peer, where the message includes a message type field;
  • the message is a clock offset update request message
  • an embodiment of the present invention provides an apparatus for updating a clock offset, including: a receiving module, configured to receive a message from a communication peer, where the message includes a message type field; and an acquiring module, configured to be used according to the message
  • the message type field acquires the type of the message
  • the update module is configured to: when the message type field is the first value, the message is from the a clock offset update request message of the communication peer; when the message type field is the second value, the message is a clock offset update response message from the communication peer; and
  • the message type field is the first value or the second value, updating the local clock offset according to the type of the message and the message.
  • an embodiment of the present invention provides an apparatus for advertising a clock offset message, including: a sending module, configured to send a message to a communication peer, where the message includes a message type field; when the message type field is a value, the message is a clock offset update request message; and
  • an embodiment of the present invention provides a clock offset update system, including: a device for updating a clock offset, configured to receive a message from a communication peer, where the message includes a message type field; a message according to the message The type field obtains the type of the message; when the message type field is the first value, the message is a clock offset update request message from the communication peer; when the message type field is the second value, The message is a clock offset update response message from the communication peer; and if the message type field is the first value or the second value, updating the local according to the type of the message and the message Clock offset
  • a notification device of the clock offset message configured to send a message to the communication peer, where the message includes a message type field; when the message type field is the first value, the message is a clock offset update request message; When the message type field is the second value, the message is a clock offset update response message.
  • the message type is obtained according to the message type field of the message, and the local clock offset is processed according to the message type, so that when the 0-length application data is received, the message type can be accurately identified. The occurrence of an infinite loop of messages is avoided, and the communication error rate is reduced.
  • FIG. 1 is a flowchart of a method for updating a clock offset according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for updating a clock offset according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of an apparatus for updating a clock offset according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of a clock offset message according to an embodiment of the present invention. Schematic diagram of the notification device;
  • FIG. 6 is a schematic structural diagram of a clock offset update system according to an embodiment of the present invention. detailed description
  • the embodiment of the present invention provides a method for clock offset update.
  • the method includes:
  • the message type field is the first value
  • the message is a clock offset update request message from the communication peer
  • the message type field is the second value
  • the message is a clock offset from the communication peer Update response message
  • the local clock offset is updated according to the type of the message and the message.
  • updating the local clock offset according to the type of the message and the message includes:
  • the clock offset update response message When the message is a clock offset update request message from the communication peer, the clock offset update response message is sent to the communication peer end, and the clock offset update response message carries the clock offset received. a local timestamp of the new request message and a local timestamp of the clock offset update response message; when the message is a clock offset update response message from the communication peer, the clock offset is updated according to the receipt from the communication peer The local timestamp when replying to the message and the clock offset update response message from the correspondent end of the communication update the local clock offset.
  • the method further includes:
  • the message is an application data message; and if the message type field is the third value, performing the application data according to the type of the message and the message Processing of the message.
  • the method provided by the embodiment of the present invention obtains a message type according to a message type field of a message when receiving a message from a communication peer end, and processes a local clock offset according to the message type, so that when the 0-length application data is received, , can accurately identify the message type, avoid the appearance of the message infinite loop, and reduce the communication error rate.
  • FIG. 2 is a further embodiment of the present invention.
  • the interaction between the initiator A and the responder B is taken as an example.
  • the method includes:
  • the initiator A sends a clock offset update request message to the responder B, where the message type field of the clock offset update request message is equal to the first value;
  • the message type field of the clock offset update request message is equal to the first value
  • the message type field of the clock offset update response message is equal to the second value
  • the message type of the application data message is used.
  • the field is equal to the third value, and the three types of messages are defined as different values on the message type field to distinguish their types, avoiding confusion of messages.
  • the message type field is a header field of the three types of messages.
  • the clock offset update request message carries the local transmission time stamp TA(x).
  • the first value, the second value, and the third value are set by the developer according to the computing power of the system or other factors, and the invention is not specifically limited.
  • Responder B receives the message from initiator A and obtains a message type field of the message;
  • the message received by the responder B may be a clock offset update response message, a clock offset update request message, or an application data message.
  • the message type of the message may be obtained.
  • the message format of the clock offset update request message and the clock offset update response message is exactly the same, except that the value of the message type field is different from the application data message in that the first two are not applied. data.
  • the initiator A sends a clock offset update request message as an example. If the message sent by the initiator A is a clock offset update response message, the message type field is known as the second. The value, if the message sent by the initiator A is an application data message, it can be known that the message type field is the third value. Preferably, the third value is 6.
  • the message is an application data message; and if the message type field is the third value, performing the application data according to the type of the message and the message Processing of the message.
  • Responder B sends a clock offset update response message to initiator A, where the clock offset update response message carries a local timestamp of the received clock offset update request message and a local timestamp of the transmit clock offset update response message;
  • the responder B when receiving the clock offset update request message, the responder B needs to construct a clock offset update response message (Clock offset update Answer), and sends the message to the initiator A, where the message carries TA ( x ), the local timestamp TB ( m ) when the clock offset update request message is received, and the local time stamp TB(n) when the clock offset update response message is sent.
  • the received message is determined to be an application data message, processing of the application data message is performed.
  • Initiator A receives the message from responder B and obtains the message type field of the message;
  • the step of checking whether the clock offset update request message is sent by the prior art may be omitted, which simplifies the communication process and further improves. Communication efficiency.
  • Initiator A updates the local clock offset based on the local timestamp when receiving the clock offset update response message from Responder B and the clock offset update response message from Responder B.
  • the initiator A receives the clock offset update response message, records the local timestamp TA ( y ) of the received clock offset update response message, and checks whether the Last receiver time stam field carried by the clock offset update response message is equal to the present The local timestamp when the transmit clock offset update request message is saved. If yes, the local clock offset needs to be calculated. If not, the local clock offset does not need to be updated.
  • the local clock offset maximum value of initiator A TA_offset_max and local clock offset minimum TA_offset-min is calculated as follows:
  • TA—offset—max TA(y) - TB(n);
  • TA—offset—min TA(x) - TB(m).
  • the method provided by the embodiment of the present invention obtains a message type according to a message type field of a message when receiving a message from a communication peer end, and processes a local clock offset according to the message type, so that when the 0-length application data is received, , can accurately identify the message type, avoid the appearance of the message infinite loop, and reduce the communication error rate.
  • the embodiment of the present invention provides a method for advertising a clock offset message.
  • the method includes:
  • the message type field is the first value
  • the message is a clock offset update request message
  • the message type field is the second value
  • the message is a clock offset update response message.
  • the method further includes: when the message type field is a third value, the message is an application data cancellation Interest.
  • the method may further include: locally receiving a message sent by the communication peer, where the message sent by the communication peer includes a message type field, and when the message type field is the first value, the communication peer
  • the sent message is a clock offset update request message
  • the step 301 specifically includes: sending a message to the communication peer end, where the message is a clock offset update response message.
  • the step 301 may be: when the clock offset update needs to be performed locally, the message is sent to the communication peer, and the message is a clock offset update request message.
  • the method provided by the present invention is similar to the message type field setting in the method provided in Embodiment 2, and is not mentioned again.
  • the method provided by the embodiment of the present invention by sending a message to the communication peer, causes the communication peer to process the local clock offset according to the message type, so that when the 0-length application data is received, the message type can be accurately identified, and the message type is avoided.
  • the appearance of an infinite loop of messages reduces the communication error rate.
  • an embodiment of the present invention provides a device for clock offset update.
  • the device includes:
  • a receiving module 401 configured to receive a message from a communication peer, where the message includes a message type field;
  • the obtaining module 402 is configured to obtain a type of the message according to a message type field of the message, and an update module 403, configured to: when the message type field is the first value, the message is a clock offset update request message from the communication peer end When the message type field is the second value, the message is a clock offset update response message from the communication peer; and
  • the local clock offset is updated according to the type of the message and the message.
  • the update module 403 is specifically configured to: when the message is a clock offset update request message from the communication peer, send a clock offset update response message to the communication peer, where the clock offset update response is cancelled.
  • the information carries the local timestamp of the clock offset update request message and the local timestamp of the clock offset update response message.
  • the update module 403 is further configured to: when the message is a clock offset update response message from the communication peer end, according to the local timestamp when the response message is received from the clock offset of the communication peer end, and the local timestamp from the communication peer end
  • the clock offset update response message updates the local clock offset.
  • the method further includes: when the message type field is a third value, the message is an application data message; and
  • the message type field is the header field of the message.
  • the device provided by the embodiment of the present invention obtains the message type according to the message type field of the message when receiving the message from the communication peer, and processes the local clock offset according to the message type, so that when the 0-length application data is received, , can accurately identify the message type, avoid the appearance of the message infinite loop, and reduce the communication error rate.
  • An embodiment of the present invention provides a notification device for a clock offset message.
  • the device includes:
  • the sending module 501 is configured to send a message to the communication peer, where the message includes a message type field; when the message type field is the first value, the message is a clock offset update request message; and when the message type field is the second When the value is, the message is a clock offset update response message.
  • the message type field is the third value, the message is an application data message.
  • the device provided by the embodiment of the present invention by sending a message to the communication peer, causes the communication peer to process the local clock offset according to the message type, so that when the 0-length application data is received, the message type can be accurately identified, and the message type is avoided.
  • the appearance of an infinite loop of messages reduces the communication error rate.
  • the embodiment of the present invention provides a clock offset update system.
  • the system includes: a clock offset update device 601, configured to receive a message from a communication peer, where the message includes a message type field;
  • the message type field gets the type of the message; when the message class When the type field is the first value, the message is a clock offset update request message from the communication peer; when the message type field is the second value, the message is a clock offset update response message from the communication peer; and If the message type field is the first value or the second value, updating the local clock offset according to the type of the message and the message;
  • the notification device 602 of the clock offset message is configured to send a message to the communication peer, where the message includes a message type field; when the message type field is the first value, the message is a clock offset update request message; and when the message When the type field is the second value, the message is a clock offset update response message.
  • the system provided by the embodiment of the present invention obtains the message type according to the message type field of the message when receiving the message from the communication peer, and processes the local clock offset according to the message type, so that when the 0-length application data is received, , can accurately identify the message type, avoid the appearance of the message infinite loop, and reduce the communication error rate.
  • All or part of the above technical solutions provided by the embodiments of the present invention may be completed by hardware related to program instructions, and the program may be stored in a readable storage medium, and the storage medium includes: ROM, RAM, disk or CD. And other media that can store program code.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method for updating clock offset, method and apparatus for announcing the clock offset message. The method includes: receiving the message from the corresponding communication terminal; acquiring the message type according to the message type field of said message; updating local clock offset according to the type of said message and said message. The apparatus includes: receiving module, acquiring module and update module. The invention enables the accurate judgement of the message type when receiving 0 length application data, by acquiring the message type according to the message type field of the message, When the message is received from the corresponding communication terminal, and processing local clock offset accordingly in accordance with the message type, thus, the dead circulation of the message is avoided and the communication error rate is reduced.

Description

时钟偏移更新的方法、 时钟偏移消息的通告方法和装置 本申请要求于 2011 年 1 月 26 日提交中国专利局、 申请号为 201110028100.1、 发明名称为 "时钟偏移更新的方法、 时钟偏移消息的通告 方法和装置" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请 中。 技术领域  Method for updating clock offset, method and device for notifying clock offset message. The present application claims to be filed on January 26, 2011, the Chinese Patent Office, the application number is 201110028100.1, the invention name is "clock offset update method, clock offset The priority of the Chinese Patent Application, the disclosure of which is incorporated herein by reference. Technical field
本发明涉及通讯技术领域, 特别涉及一种时钟偏移更新的方法、 时钟偏 移消息的通告方法和装置。 背景技术  The present invention relates to the field of communications technologies, and in particular, to a clock offset update method, a clock offset message notification method and apparatus. Background technique
CTCS-3 ( China Train Control System, 中国列车控制系统 3级)列车运行 控制系统标准是中国铁路时速 300 ~ 350km 客运专线的主要技术标准, RSSP-IK Railway Signal Safety Protocol II,铁路信号安全协议 II X对应 ETCS ( Europe Train Control System, 欧洲列车控制系统 )标准 Subset098协议 ) 是其中一个重要的通信和接口协议, 用于 RBC-RBC ( Radio Block Center, 无 线闭塞中心)、 RBC-IL ( Interlocking, 联锁)、 RBC-TSRS ( Temporary Speed Restriction Server, 临时限速服务器)之间的通信。 RSSP-II协议主要用于防 御开放网络中消息的乱序、 延时、 错误、 伪造、 插入等威胁。  The CTCS-3 (China Train Control System, China Train Control System Level 3) train operation control system standard is the main technical standard for the Chinese railway speed 300-350km passenger line. RSSP-IK Railway Signal Safety Protocol II, Railway Signal Security Protocol II X Corresponding to the ETCS (European Train Control System) standard Subset098 protocol is one of the important communication and interface protocols for RBC-RBC (Radio Block Center), RBC-IL (Interlocking, Interlocking) ), communication between RBC-TSRS (Temporary Speed Restriction Server). The RSSP-II protocol is mainly used to protect against threats such as out-of-order, delay, error, forgery, and insertion of messages in an open network.
RSSP-II协议防御消息延迟的方法是 TTS ( Triple Time Stamp, 三重 时间戳)技术。 TTS技术需要定期更新通信双方之间的本地时钟偏移, 通过 定期向对方发送时钟偏移更新请求消息, 收到更新时钟偏移应答消息后对双 方的时钟偏移进行更新。  The RSSP-II protocol defense message delay is TTS (Triple Time Stamp) technology. The TTS technology needs to periodically update the local clock offset between the two communicating parties. It periodically sends a clock offset update request message to the other party, and updates the clock offset of both parties after receiving the update clock offset response message.
在对现有技术进行分析后, 发明人发现现有技术至少具有如下缺点: 现有技术中, 时钟偏移更新请求消息和应答消息格式完全相同, 这两者 与普通应用数据消息唯一的区别在于前两者没有应用数据。 因此, 只能采用 消息长度、 携带的 Last receiver time stamp时间戳来区分三者, 当网络上错误 发送 0 长度应用数据时, 接收者(A )会判定为来自对端的时钟偏移更新请 求消息, 从而发送应答消息给对端 (B ), 对端 (B ) 收到应答消息, 还会判 定为时钟偏移更新请求消息, 又回复时钟偏移更新应答消息, 周而复始, 从 而导致消息死循环, 通信错误率高。 发明内容 After analyzing the prior art, the inventors have found that the prior art has at least the following disadvantages: In the prior art, the clock offset update request message and the response message format are exactly the same, and the only difference between the two and the normal application data message is that The first two have no application data. Therefore, only The message length and the Last receiver time stamp are used to distinguish the three. When the network sends an error of 0 length application data, the receiver (A) determines the clock offset update request message from the peer, and sends a response message to the receiver. The opposite end (B), the opposite end (B) receives the response message, and also determines the clock offset update request message, and returns the clock offset update response message, and repeats, resulting in an infinite loop of the message and a high communication error rate. Summary of the invention
本发明实施例提供了一种时钟偏移更新的方法、 时钟偏移消息的通告方 法和装置。 所述技术方案如下:  Embodiments of the present invention provide a method for updating a clock offset, an announcement method and a device for a clock offset message. The technical solution is as follows:
一方面, 本发明实施例提供了一种时钟偏移更新的方法, 包括: 接收来自通信对端的消息, 所述消息包含消息类型字段;  In one aspect, an embodiment of the present invention provides a method for updating a clock offset, including: receiving a message from a communication peer, where the message includes a message type field;
根据所述消息的消息类型字段获取所述消息的类型, 当所述消息类型字 段为第一数值时, 所述消息为来自所述通信对端的时钟偏移更新请求消息; 当所述消息类型字段为第二数值时 , 所述消息为来自所述通信对端的时钟偏 移更新应答消息; 和  Obtaining, according to a message type field of the message, a type of the message, when the message type field is a first value, the message is a clock offset update request message from the communication peer; when the message type field When the value is the second value, the message is a clock offset update response message from the communication peer; and
若所述消息类型字段为所述第一数值或所述第二数值, 根据所述消息的 类型及所述消息, 更新本地时钟偏移。  And if the message type field is the first value or the second value, updating the local clock offset according to the type of the message and the message.
另一方面, 本发明实施例提供了一种时钟偏移消息的通告方法, 包括: 向通信对端发送消息, 所述消息包含消息类型字段;  On the other hand, an embodiment of the present invention provides a method for advertising a clock offset message, including: sending a message to a communication peer, where the message includes a message type field;
当所述消息类型字段为第一数值时,所述消息为时钟偏移更新请求消息; 和  When the message type field is the first value, the message is a clock offset update request message; and
当所述消息类型字段为第二数值时,所述消息为时钟偏移更新应答消息。 一方面, 本发明实施例提供了一种时钟偏移更新的装置, 包括: 接收模块, 用于接收来自通信对端的消息, 所述消息包含消息类型字段; 获取模块, 用于根据所述消息的消息类型字段获取所述消息的类型; 更新模块, 用于当所述消息类型字段为第一数值时, 所述消息为来自所 述通信对端的时钟偏移更新请求消息; 当所述消息类型字段为第二数值时, 所述消息为来自所述通信对端的时钟偏移更新应答消息; 和 When the message type field is the second value, the message is a clock offset update response message. In one aspect, an embodiment of the present invention provides an apparatus for updating a clock offset, including: a receiving module, configured to receive a message from a communication peer, where the message includes a message type field; and an acquiring module, configured to be used according to the message The message type field acquires the type of the message, and the update module is configured to: when the message type field is the first value, the message is from the a clock offset update request message of the communication peer; when the message type field is the second value, the message is a clock offset update response message from the communication peer; and
若所述消息类型字段为所述第一数值或所述第二数值, 根据所述消息的 类型及所述消息, 更新本地时钟偏移。  And if the message type field is the first value or the second value, updating the local clock offset according to the type of the message and the message.
另一方面, 本发明实施例提供了一种时钟偏移消息的通告装置, 包括: 发送模块, 用于向通信对端发送消息, 所述消息包含消息类型字段; 当所述消息类型字段为第一数值时,所述消息为时钟偏移更新请求消息; 和  On the other hand, an embodiment of the present invention provides an apparatus for advertising a clock offset message, including: a sending module, configured to send a message to a communication peer, where the message includes a message type field; when the message type field is a value, the message is a clock offset update request message; and
当所述消息类型字段为第二数值时,所述消息为时钟偏移更新应答消息。 又一方面, 本发明实施例提供了一种时钟偏移更新系统, 包括: 时钟偏移更新的装置, 用于接收来自通信对端的消息, 所述消息包含消 息类型字段; 根据所述消息的消息类型字段获取所述消息的类型; 当所述消 息类型字段为第一数值时, 所述消息为来自所述通信对端的时钟偏移更新请 求消息; 当所述消息类型字段为第二数值时, 所述消息为来自所述通信对端 的时钟偏移更新应答消息; 和若所述消息类型字段为所述第一数值或所述第 二数值, 根据所述消息的类型及所述消息, 更新本地时钟偏移;  When the message type field is the second value, the message is a clock offset update response message. In another aspect, an embodiment of the present invention provides a clock offset update system, including: a device for updating a clock offset, configured to receive a message from a communication peer, where the message includes a message type field; a message according to the message The type field obtains the type of the message; when the message type field is the first value, the message is a clock offset update request message from the communication peer; when the message type field is the second value, The message is a clock offset update response message from the communication peer; and if the message type field is the first value or the second value, updating the local according to the type of the message and the message Clock offset
时钟偏移消息的通告装置, 用于向通信对端发送消息, 所述消息包含消 息类型字段; 当所述消息类型字段为第一数值时, 所述消息为时钟偏移更新 请求消息; 和当所述消息类型字段为第二数值时, 所述消息为时钟偏移更新 应答消息。  a notification device of the clock offset message, configured to send a message to the communication peer, where the message includes a message type field; when the message type field is the first value, the message is a clock offset update request message; When the message type field is the second value, the message is a clock offset update response message.
本发明实施例提供的技术方案的有益效果是:  The beneficial effects of the technical solutions provided by the embodiments of the present invention are:
通过在接收到来自通信对端的消息时, 根据消息的消息类型字段获取消 息类型, 并根据消息类型对应的处理本地时钟偏移, 使得在接收到 0长度应 用数据时, 可以准确的辨别消息类型, 避免了消息死循环的出现, 降低了通 信错误率。 附图说明 When receiving the message from the communication peer, the message type is obtained according to the message type field of the message, and the local clock offset is processed according to the message type, so that when the 0-length application data is received, the message type can be accurately identified. The occurrence of an infinite loop of messages is avoided, and the communication error rate is reduced. DRAWINGS
图 1是本发明实施例提供的一种时钟偏移更新的方法的流程图; 图 2是本发明实施例提供的一种时钟偏移更新的方法的流程图; 图 3是本发明实施例提供的一种时钟偏移消息的通告方法的流程图; 图 4是本发明实施例提供的一种时钟偏移更新的装置的结构示意图; 图 5 是本发明实施例提供的一种时钟偏移消息的通告装置的结构示意 图;  1 is a flowchart of a method for updating a clock offset according to an embodiment of the present invention; FIG. 2 is a flowchart of a method for updating a clock offset according to an embodiment of the present invention; FIG. 4 is a schematic structural diagram of an apparatus for updating a clock offset according to an embodiment of the present invention; FIG. 5 is a schematic diagram of a clock offset message according to an embodiment of the present invention; Schematic diagram of the notification device;
图 6是本发明实施例提供的一种时钟偏移更新系统的结构示意图。 具体实施方式  FIG. 6 is a schematic structural diagram of a clock offset update system according to an embodiment of the present invention. detailed description
为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对本发 明实施方式作进一步地详细描述。  The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
实施例 1  Example 1
为了避免消息死循环的出现, 降低通信错误率, 本发明实施例提供了一 种时钟偏移更新的方法, 参见图 1 , 该方法包括:  In order to avoid the occurrence of a message infinite loop and reduce the communication error rate, the embodiment of the present invention provides a method for clock offset update. Referring to FIG. 1, the method includes:
101 : 接收来自通信对端的消息, 该消息包含消息类型字段;  101 : receiving a message from a communication peer, where the message includes a message type field;
102: 根据该消息的消息类型字段获取该消息的类型;  102: Obtain a type of the message according to a message type field of the message;
103: 当该消息类型字段为第一数值时, 该消息为来自该通信对端的时钟 偏移更新请求消息; 当该消息类型字段为第二数值时, 该消息为来自该通信 对端的时钟偏移更新应答消息; 和  103: When the message type field is the first value, the message is a clock offset update request message from the communication peer; when the message type field is the second value, the message is a clock offset from the communication peer Update response message; and
若该消息类型字段为该第一数值或该第二数值, 根据该消息的类型及该 消息, 更新本地时钟偏移。  If the message type field is the first value or the second value, the local clock offset is updated according to the type of the message and the message.
在本发明提供的另一实施例中, 根据该消息的类型及该消息, 更新本地 时钟偏移, 具体包括:  In another embodiment of the present invention, updating the local clock offset according to the type of the message and the message includes:
该消息为来自该通信对端的时钟偏移更新请求消息时, 向该通信对端发 送时钟偏移更新应答消息, 该时钟偏移更新应答消息携带收到该时钟偏移更 新请求消息的本地时间戳和发送该时钟偏移更新应答消息的本地时间戳; 该消息为来自该通信对端的时钟偏移更新应答消息时, 根据收到该来自 该通信对端的时钟偏移更新应答消息时的本地时间戳和该来自该通信对端的 时钟偏移更新应答消息对本地时钟偏移进行更新。 When the message is a clock offset update request message from the communication peer, the clock offset update response message is sent to the communication peer end, and the clock offset update response message carries the clock offset received. a local timestamp of the new request message and a local timestamp of the clock offset update response message; when the message is a clock offset update response message from the communication peer, the clock offset is updated according to the receipt from the communication peer The local timestamp when replying to the message and the clock offset update response message from the correspondent end of the communication update the local clock offset.
在本发明提供的另一实施例中, 该方法还包括:  In another embodiment provided by the present invention, the method further includes:
当所述消息类型字段为第三数值时, 所述消息为应用数据消息; 和 若所述消息类型字段为所述第三数值,根据所述消息的类型及所述消息 , 进行所述应用数据消息的处理。  When the message type field is a third value, the message is an application data message; and if the message type field is the third value, performing the application data according to the type of the message and the message Processing of the message.
本发明实施例提供的方法, 通过在接收到来自通信对端的消息时, 根据 消息的消息类型字段获取消息类型, 并根据消息类型对应的处理本地时钟偏 移, 使得在接收到 0长度应用数据时, 可以准确的辨别消息类型, 避免了消 息死循环的出现, 降低了通信错误率。  The method provided by the embodiment of the present invention obtains a message type according to a message type field of a message when receiving a message from a communication peer end, and processes a local clock offset according to the message type, so that when the 0-length application data is received, , can accurately identify the message type, avoid the appearance of the message infinite loop, and reduce the communication error rate.
参见图 2, 图 2 为本发明提供的又一实施例, 该实施例以发起者 A和响 应者 B之间的交互为例进行说明, 该实施例方法包括:  Referring to FIG. 2, FIG. 2 is a further embodiment of the present invention. The interaction between the initiator A and the responder B is taken as an example. The method includes:
201 : 发起者 A向响应者 B发送时钟偏移更新请求消息, 该时钟偏移更 新请求消息的消息类型字段等于第一数值;  201: The initiator A sends a clock offset update request message to the responder B, where the message type field of the clock offset update request message is equal to the first value;
在本发明实施例中, 时钟偏移更新请求消息 (Clock offset update Request) 的消息类型字段等于第一数值, 时钟偏移更新应答消息的消息类型字段等于 第二数值, 而应用数据消息的消息类型字段等于第三数值, 通过在消息类型 字段上将该三种消息定义为不同的数值以区分其类型, 避免了消息的混淆。 优选地, 该消息类型字段为该三种消息的头字段。  In the embodiment of the present invention, the message type field of the clock offset update request message is equal to the first value, and the message type field of the clock offset update response message is equal to the second value, and the message type of the application data message is used. The field is equal to the third value, and the three types of messages are defined as different values on the message type field to distinguish their types, avoiding confusion of messages. Preferably, the message type field is a header field of the three types of messages.
本领域技术人员可以获知, 该时钟偏移更新请求消息中携带本地发送时 间戳 TA(x)。 另外, 该第一数值、 第二数值和第三数值为开发人员根据系统的 计算能力或其他因素设置, 本发明不做具体限定。  Those skilled in the art can know that the clock offset update request message carries the local transmission time stamp TA(x). In addition, the first value, the second value, and the third value are set by the developer according to the computing power of the system or other factors, and the invention is not specifically limited.
202: 响应者 B接收到来自发起者 A的消息, 并获取该消息的消息类型 字段; 在本发明实施例中,响应者 B收到的消息可能是时钟偏移更新应答消息、 时钟偏移更新请求消息或应用数据消息, 通过获取其消息类型字段, 可以得 到该消息的消息类型。 202: Responder B receives the message from initiator A and obtains a message type field of the message; In the embodiment of the present invention, the message received by the responder B may be a clock offset update response message, a clock offset update request message, or an application data message. By obtaining its message type field, the message type of the message may be obtained.
需要说明的是, 时钟偏移更新请求消息和时钟偏移更新应答消息的消息 格式完全相同, 不同之处在于其消息类型字段的值, 这两者与应用数据消息 的区别在于前两者没有应用数据。  It should be noted that the message format of the clock offset update request message and the clock offset update response message is exactly the same, except that the value of the message type field is different from the application data message in that the first two are not applied. data.
203: 判断该消息类型字段的数值, 该消息类型字段为第一数值, 则获知 消息为来自所述通信对端的时钟偏移更新请求消息;  203: Determine a value of the message type field, where the message type field is a first value, and the learned message is a clock offset update request message from the communication peer end;
在本发明实施例中, 是以发起者 A发送时钟偏移更新请求消息为例进行 说明的, 如果发起者 A发送的消息为时钟偏移更新响应消息, 则可获知该消 息类型字段为第二数值, 如果发起者 A发送的消息为应用数据消息时, 则可 获知该消息类型字段为第三数值。 优选地, 该第三数值为 6。  In the embodiment of the present invention, the initiator A sends a clock offset update request message as an example. If the message sent by the initiator A is a clock offset update response message, the message type field is known as the second. The value, if the message sent by the initiator A is an application data message, it can be known that the message type field is the third value. Preferably, the third value is 6.
当所述消息类型字段为第三数值时, 所述消息为应用数据消息; 和 若所述消息类型字段为所述第三数值 ,根据所述消息的类型及所述消息 , 进行所述应用数据消息的处理。  When the message type field is a third value, the message is an application data message; and if the message type field is the third value, performing the application data according to the type of the message and the message Processing of the message.
204: 响应者 B向发起者 A发送时钟偏移更新应答消息, 该时钟偏移更 新应答消息携带收到时钟偏移更新请求消息的本地时间戳和发送时钟偏移更 新应答消息的本地时间戳;  204: Responder B sends a clock offset update response message to initiator A, where the clock offset update response message carries a local timestamp of the received clock offset update request message and a local timestamp of the transmit clock offset update response message;
在本发明实施例中, 当接收到时钟偏移更新请求消息时, 响应者 B需构 建时钟偏移更新应答消息 (Clock offset update Answer), 并将该消息发送给发 起者 A, 该消息中携带 TA ( x )、 收到时钟偏移更新请求消息时的本地时间戳 TB ( m )、 发送时钟偏移更新应答消息时的本地时间戳 TB(n)。 另外, 当接收 到的消息判定为应用数据消息时, 进行应用数据消息的处理。  In the embodiment of the present invention, when receiving the clock offset update request message, the responder B needs to construct a clock offset update response message (Clock offset update Answer), and sends the message to the initiator A, where the message carries TA ( x ), the local timestamp TB ( m ) when the clock offset update request message is received, and the local time stamp TB(n) when the clock offset update response message is sent. In addition, when the received message is determined to be an application data message, processing of the application data message is performed.
205: 发起者 A接收来自响应者 B的消息, 并获取该消息的消息类型字 段;  205: Initiator A receives the message from responder B and obtains the message type field of the message;
206: 判断该消息类型字段的数值, 该消息类型字段为第二数值, 则获知 消息为来自所述通信对端的时钟偏移更新应答消息; 206: Determine a value of the message type field, where the message type field is a second value, then The message is a clock offset update response message from the communication peer;
在本发明实施例中, 由于已经根据消息类型字段对消息的类型进行了判 断, 则可以省略现有技术中检查自身是否发送过时钟偏移更新请求消息这一 步骤, 简化了通信过程, 进一步提高了通信效率。  In the embodiment of the present invention, since the type of the message has been determined according to the message type field, the step of checking whether the clock offset update request message is sent by the prior art may be omitted, which simplifies the communication process and further improves. Communication efficiency.
207: 发起者 A根据收到来自响应者 B的时钟偏移更新应答消息时的本 地时间戳和来自响应者 B 的时钟偏移更新应答消息对本地时钟偏移进行更 新。  207: Initiator A updates the local clock offset based on the local timestamp when receiving the clock offset update response message from Responder B and the clock offset update response message from Responder B.
具体地, 发起者 A收到时钟偏移更新应答消息, 记录收到时钟偏移更新 应答消息的本地时间戳 TA ( y ), 检查时钟偏移更新应答消息携带的 Last receiver time stam 字段是否等于本端保存的发送时钟偏移更新请求消息时的 本地时间戳, 如果是, 则需对本地时钟偏移进行计算, 如果否, 则本地时钟 偏移不需更新。发起者 A的本地时钟偏移最大值 TA— offset— max和 本地时钟 偏移最小值 TA— offset— min的具体计算公式如下:  Specifically, the initiator A receives the clock offset update response message, records the local timestamp TA ( y ) of the received clock offset update response message, and checks whether the Last receiver time stam field carried by the clock offset update response message is equal to the present The local timestamp when the transmit clock offset update request message is saved. If yes, the local clock offset needs to be calculated. If not, the local clock offset does not need to be updated. The local clock offset maximum value of initiator A TA_offset_max and local clock offset minimum TA_offset-min is calculated as follows:
TA— offset— max = TA(y) - TB(n);  TA—offset—max = TA(y) - TB(n);
TA— offset— min = TA(x) - TB(m)。  TA—offset—min = TA(x) - TB(m).
本发明实施例提供的方法, 通过在接收到来自通信对端的消息时, 根据 消息的消息类型字段获取消息类型, 并根据消息类型对应的处理本地时钟偏 移, 使得在接收到 0长度应用数据时, 可以准确的辨别消息类型, 避免了消 息死循环的出现, 降低了通信错误率。  The method provided by the embodiment of the present invention obtains a message type according to a message type field of a message when receiving a message from a communication peer end, and processes a local clock offset according to the message type, so that when the 0-length application data is received, , can accurately identify the message type, avoid the appearance of the message infinite loop, and reduce the communication error rate.
实施例 3  Example 3
为了避免消息死循环的出现, 降低通信错误率, 本发明实施例提供了一 种时钟偏移消息的通告方法, 参见图 3 , 包括:  In order to avoid the occurrence of a message infinite loop and reduce the communication error rate, the embodiment of the present invention provides a method for advertising a clock offset message. Referring to FIG. 3, the method includes:
301 : 向通信对端发送消息, 该消息包含消息类型字段;  301: Send a message to the communication peer, where the message includes a message type field;
当该消息类型字段为第一数值时, 该消息为时钟偏移更新请求消息; 和 当该消息类型字段为第二数值时, 该消息为时钟偏移更新应答消息。 该方法还包括: 当该消息类型字段为第三数值时, 该消息为应用数据消 息。 When the message type field is the first value, the message is a clock offset update request message; and when the message type field is the second value, the message is a clock offset update response message. The method further includes: when the message type field is a third value, the message is an application data cancellation Interest.
在本实施例中, 步骤 301之前, 还可以包括: 本地接收通信对端发送的 消息, 该通信对端发送的消息包含消息类型字段, 当该消息类型字段为第一 数值时, 该通信对端发送的消息为时钟偏移更新请求消息, 则步骤 301具体 包括: 向通信对端发送消息, 该消息为时钟偏移更新应答消息。 需要说明的 足,  In this embodiment, before step 301, the method may further include: locally receiving a message sent by the communication peer, where the message sent by the communication peer includes a message type field, and when the message type field is the first value, the communication peer The sent message is a clock offset update request message, and the step 301 specifically includes: sending a message to the communication peer end, where the message is a clock offset update response message. Need to explain,
在本实施例中, 步骤 301还可以为: 当本地需要进行时钟偏移更新时, 向通信对端发送消息, 该消息为时钟偏移更新请求消息。  In this embodiment, the step 301 may be: when the clock offset update needs to be performed locally, the message is sent to the communication peer, and the message is a clock offset update request message.
本发明提供的方法与实施例 2提供的方法中的消息类型字段设置类似, 再次不再赞述。  The method provided by the present invention is similar to the message type field setting in the method provided in Embodiment 2, and is not mentioned again.
本发明实施例提供的方法, 通过向通信对端发送消息, 使得通信对端根 据消息类型对应的处理本地时钟偏移, 使得在接收到 0长度应用数据时, 可 以准确的辨别消息类型, 避免了消息死循环的出现, 降低了通信错误率。  The method provided by the embodiment of the present invention, by sending a message to the communication peer, causes the communication peer to process the local clock offset according to the message type, so that when the 0-length application data is received, the message type can be accurately identified, and the message type is avoided. The appearance of an infinite loop of messages reduces the communication error rate.
实施例 4  Example 4
为了避免消息死循环的出现, 降低通信错误率, 本发明实施例提供了一 种时钟偏移更新的装置, 参见图 4, 该装置包括:  In order to avoid the occurrence of a message infinite loop and reduce the communication error rate, an embodiment of the present invention provides a device for clock offset update. Referring to FIG. 4, the device includes:
接收模块 401 , 用于接收来自通信对端的消息, 该消息包含消息类型字 段;  a receiving module 401, configured to receive a message from a communication peer, where the message includes a message type field;
获取模块 402, 用于根据该消息的消息类型字段获取该消息的类型; 更新模块 403 , 用于当该消息类型字段为第一数值时, 该消息为来自该 通信对端的时钟偏移更新请求消息; 当该消息类型字段为第二数值时, 该消 息为来自该通信对端的时钟偏移更新应答消息; 和  The obtaining module 402 is configured to obtain a type of the message according to a message type field of the message, and an update module 403, configured to: when the message type field is the first value, the message is a clock offset update request message from the communication peer end When the message type field is the second value, the message is a clock offset update response message from the communication peer; and
若该消息类型字段为该第一数值或该第二数值, 根据该消息的类型及该 消息, 更新本地时钟偏移。  If the message type field is the first value or the second value, the local clock offset is updated according to the type of the message and the message.
该更新模块 403具体用于该消息为来自该通信对端的时钟偏移更新请求 消息时, 向该通信对端发送时钟偏移更新应答消息, 该时钟偏移更新应答消 息携带收到该时钟偏移更新请求消息的本地时间戳和发送该时钟偏移更新应 答消息的本地时间戳; The update module 403 is specifically configured to: when the message is a clock offset update request message from the communication peer, send a clock offset update response message to the communication peer, where the clock offset update response is cancelled. The information carries the local timestamp of the clock offset update request message and the local timestamp of the clock offset update response message.
该更新模块 403还用于该消息为来自该通信对端的时钟偏移更新应答消 息时, 根据收到该来自该通信对端的时钟偏移更新应答消息时的本地时间戳 和该来自该通信对端的时钟偏移更新应答消息对本地时钟偏移进行更新。  The update module 403 is further configured to: when the message is a clock offset update response message from the communication peer end, according to the local timestamp when the response message is received from the clock offset of the communication peer end, and the local timestamp from the communication peer end The clock offset update response message updates the local clock offset.
该方法还包括: 当该消息类型字段为第三数值时, 该消息为应用数据消 息; 和  The method further includes: when the message type field is a third value, the message is an application data message; and
若该消息类型字段为该第三数值, 根据该消息的类型及该消息, 进行该 应用数据消息的处理。  If the message type field is the third value, processing the application data message according to the type of the message and the message.
其中, 该消息类型字段为该消息的头字段。  The message type field is the header field of the message.
本发明实施例提供的装置, 通过在接收到来自通信对端的消息时, 根据 消息的消息类型字段获取消息类型, 并根据消息类型对应的处理本地时钟偏 移, 使得在接收到 0长度应用数据时, 可以准确的辨别消息类型, 避免了消 息死循环的出现, 降低了通信错误率。  The device provided by the embodiment of the present invention obtains the message type according to the message type field of the message when receiving the message from the communication peer, and processes the local clock offset according to the message type, so that when the 0-length application data is received, , can accurately identify the message type, avoid the appearance of the message infinite loop, and reduce the communication error rate.
本发明实施例提供了一种时钟偏移消息的通告装置, 参见图 5 , 该装置 包括:  An embodiment of the present invention provides a notification device for a clock offset message. Referring to FIG. 5, the device includes:
发送模块 501 , 用于向通信对端发送消息, 该消息包含消息类型字段; 当该消息类型字段为第一数值时, 该消息为时钟偏移更新请求消息; 和 当该消息类型字段为第二数值时, 该消息为时钟偏移更新应答消息。 当该消息类型字段为第三数值时, 该消息为应用数据消息。  The sending module 501 is configured to send a message to the communication peer, where the message includes a message type field; when the message type field is the first value, the message is a clock offset update request message; and when the message type field is the second When the value is, the message is a clock offset update response message. When the message type field is the third value, the message is an application data message.
本发明实施例提供的装置, 通过向通信对端发送消息, 使得通信对端根 据消息类型对应的处理本地时钟偏移, 使得在接收到 0长度应用数据时, 可 以准确的辨别消息类型, 避免了消息死循环的出现, 降低了通信错误率。  The device provided by the embodiment of the present invention, by sending a message to the communication peer, causes the communication peer to process the local clock offset according to the message type, so that when the 0-length application data is received, the message type can be accurately identified, and the message type is avoided. The appearance of an infinite loop of messages reduces the communication error rate.
本发明实施例提供了一种时钟偏移更新系统, 参见图 6, 该系统包括: 时钟偏移更新的装置 601 , 用于接收来自通信对端的消息, 该消息包含 消息类型字段; 根据该消息的消息类型字段获取该消息的类型; 当该消息类 型字段为第一数值时, 该消息为来自该通信对端的时钟偏移更新请求消息; 当该消息类型字段为第二数值时, 该消息为来自该通信对端的时钟偏移更新 应答消息; 和若该消息类型字段为该第一数值或该第二数值, 根据该消息的 类型及该消息, 更新本地时钟偏移; The embodiment of the present invention provides a clock offset update system. Referring to FIG. 6, the system includes: a clock offset update device 601, configured to receive a message from a communication peer, where the message includes a message type field; The message type field gets the type of the message; when the message class When the type field is the first value, the message is a clock offset update request message from the communication peer; when the message type field is the second value, the message is a clock offset update response message from the communication peer; and If the message type field is the first value or the second value, updating the local clock offset according to the type of the message and the message;
时钟偏移消息的通告装置 602, 用于向通信对端发送消息, 该消息包含 消息类型字段; 当该消息类型字段为第一数值时, 该消息为时钟偏移更新请 求消息; 和当该消息类型字段为第二数值时, 该消息为时钟偏移更新应答消 息。  The notification device 602 of the clock offset message is configured to send a message to the communication peer, where the message includes a message type field; when the message type field is the first value, the message is a clock offset update request message; and when the message When the type field is the second value, the message is a clock offset update response message.
本发明实施例提供的系统, 通过在接收到来自通信对端的消息时, 根据 消息的消息类型字段获取消息类型, 并根据消息类型对应的处理本地时钟偏 移, 使得在接收到 0长度应用数据时, 可以准确的辨别消息类型, 避免了消 息死循环的出现, 降低了通信错误率。  The system provided by the embodiment of the present invention obtains the message type according to the message type field of the message when receiving the message from the communication peer, and processes the local clock offset according to the message type, so that when the 0-length application data is received, , can accurately identify the message type, avoid the appearance of the message infinite loop, and reduce the communication error rate.
本发明实施例提供的装置和系统, 与方法实施例属于同一构思, 其具体 实现过程详见方法实施例, 这里不再贅述。  The device and the system provided by the embodiment of the present invention are the same as the method embodiment, and the specific implementation process is described in the method embodiment, and details are not described herein again.
本发明实施例提供的上述技术方案的全部或部分可以通过程序指令相关 的硬件来完成, 所述程序可以存储在可读取的存储介质中, 该存储介质包括: ROM, RAM, 磁碟或者光盘等各种可以存储程序代码的介质。  All or part of the above technical solutions provided by the embodiments of the present invention may be completed by hardware related to program instructions, and the program may be stored in a readable storage medium, and the storage medium includes: ROM, RAM, disk or CD. And other media that can store program code.
以上所述仅为本发明的较佳实施例, 并不用以限制本发明, 凡在本发明 的精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发 明的保护范围之内。  The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., which are within the spirit and scope of the present invention, should be included in the protection of the present invention. Within the scope.

Claims

权 利 要求 书 Claim
1、 一种时钟偏移更新的方法, 其特征在于, 包括:  A method for updating a clock offset, comprising:
接收来自通信对端的消息, 所述消息包含消息类型字段;  Receiving a message from a communication peer, the message including a message type field;
根据所述消息的消息类型字段获取所述消息的类型, 当所述消息类型字 段为第一数值时, 所述消息为来自所述通信对端的时钟偏移更新请求消息; 当所述消息类型字段为第二数值时 , 所述消息为来自所述通信对端的时钟偏 移更新应答消息; 和  Obtaining, according to a message type field of the message, a type of the message, when the message type field is a first value, the message is a clock offset update request message from the communication peer; when the message type field When the value is the second value, the message is a clock offset update response message from the communication peer; and
若所述消息类型字段为所述第一数值或所述第二数值, 根据所述消息的 类型及所述消息, 更新本地时钟偏移。  And if the message type field is the first value or the second value, updating the local clock offset according to the type of the message and the message.
2、 根据权利要求 1所述的方法, 其特征在于, 根据所述消息的类型及所 述消息, 更新本地时钟偏移, 具体包括: The method according to claim 1, wherein the updating the local clock offset according to the type of the message and the message comprises:
所述消息为来自所述通信对端的时钟偏移更新请求消息时, 向所述通信 对端发送时钟偏移更新应答消息, 所述时钟偏移更新应答消息携带收到所述 时钟偏移更新请求消息的本地时间戳和发送所述时钟偏移更新应答消息的本 地时间戳;  When the message is a clock offset update request message from the communication peer, sending a clock offset update response message to the communication peer, where the clock offset update response message carries the clock offset update request a local timestamp of the message and a local timestamp of sending the clock offset update response message;
所述消息为来自所述通信对端的时钟偏移更新应答消息时, 根据收到所 述来自所述通信对端的时钟偏移更新应答消息时的本地时间戳和所述来自所 述通信对端的时钟偏移更新应答消息对本地时钟偏移进行更新。  When the message is a clock offset update response message from the communication peer, the local timestamp when the response message is received from the clock offset of the communication peer and the clock from the communication peer The offset update response message updates the local clock offset.
3、 根据权利要求 1所述的方法, 其特征在于, 还包括: 当所述消息类型 字段为第三数值时, 所述消息为应用数据消息; 和 3. The method according to claim 1, further comprising: when the message type field is a third value, the message is an application data message; and
若所述消息类型字段为所述第三数值,根据所述消息的类型及所述消息 , 进行所述应用数据消息的处理。  If the message type field is the third value, processing the application data message according to the type of the message and the message.
4、 根据权利要求 1-3任一项所述的方法, 其特征在于, 所述消息类型字 段为所述消息的头字段。 The method according to any one of claims 1 to 3, wherein the message type word The segment is the header field of the message.
5、 一种时钟偏移消息的通告方法, 其特征在于, 包括: 5. A method for advertising a clock offset message, comprising:
向通信对端发送消息, 所述消息包含消息类型字段;  Sending a message to the communication peer, where the message includes a message type field;
当所述消息类型字段为第一数值时,所述消息为时钟偏移更新请求消息; 和  When the message type field is the first value, the message is a clock offset update request message; and
当所述消息类型字段为第二数值时,所述消息为时钟偏移更新应答消息。  When the message type field is the second value, the message is a clock offset update response message.
6、 根据权利要求 5所述的方法, 其特征在于, 当所述消息类型字段为第 三数值时, 所述消息为应用数据消息。 The method according to claim 5, wherein when the message type field is a third value, the message is an application data message.
7、 一种时钟偏移更新的装置, 其特征在于, 包括: 7. A device for updating a clock offset, comprising:
接收模块, 用于接收来自通信对端的消息, 所述消息包含消息类型字段; 获取模块, 用于根据所述消息的消息类型字段获取所述消息的类型; 更新模块, 用于当所述消息类型字段为第一数值时, 所述消息为来自所 述通信对端的时钟偏移更新请求消息; 当所述消息类型字段为第二数值时, 所述消息为来自所述通信对端的时钟偏移更新应答消息; 和  a receiving module, configured to receive a message from a communication peer, where the message includes a message type field, an acquiring module, configured to acquire a type of the message according to a message type field of the message, and an update module, configured to: when the message type When the field is the first value, the message is a clock offset update request message from the communication peer; when the message type field is the second value, the message is a clock offset update from the communication peer Reply message; and
若所述消息类型字段为所述第一数值或所述第二数值, 根据所述消息的 类型及所述消息, 更新本地时钟偏移。  And if the message type field is the first value or the second value, updating the local clock offset according to the type of the message and the message.
8、 根据权利要求 7所述的装置, 其特征在于, 所述更新模块具体用于所 述消息为来自所述通信对端的时钟偏移更新请求消息时, 向所述通信对端发 送时钟偏移更新应答消息, 所述时钟偏移更新应答消息携带收到所述时钟偏 移更新请求消息的本地时间戳和发送所述时钟偏移更新应答消息的本地时间 戳; The device according to claim 7, wherein the update module is configured to send a clock offset to the communication peer when the message is a clock offset update request message from the communication peer end. Updating a response message, where the clock offset update response message carries a local timestamp of receiving the clock offset update request message and a local timestamp of sending the clock offset update response message;
所述更新模块还用于所述消息为来自所述通信对端的时钟偏移更新应答 消息时, 根据收到所述来自所述通信对端的时钟偏移更新应答消息时的本地 时间戳和所述来自所述通信对端的时钟偏移更新应答消息对本地时钟偏移进 行更新。 The update module is further configured to: the message is a clock offset update response from the communication peer In the message, the local clock offset is updated according to the local timestamp when the clock offset update response message from the communication peer is received and the clock offset update response message from the communication peer.
9、 根据权利要求 7所述的装置, 其特征在于, 还包括: 当所述消息类型 字段为第三数值时, 所述消息为应用数据消息; 和 9. The apparatus according to claim 7, further comprising: when the message type field is a third value, the message is an application data message; and
若所述消息类型字段为所述第三数值,根据所述消息的类型及所述消息 , 进行所述应用数据消息的处理。  If the message type field is the third value, processing the application data message according to the type of the message and the message.
10、 根据权利要求 7-9任一项所述的装置, 其特征在于, 所述消息类型 字段为所述消息的头字段。 The apparatus according to any one of claims 7-9, wherein the message type field is a header field of the message.
11、 一种时钟偏移消息的通告装置, 其特征在于, 包括: 11. A device for notifying a clock offset message, comprising:
发送模块, 用于向通信对端的发送消息, 所述消息包含消息类型字段; 当所述消息类型字段为第一数值时,所述消息为时钟偏移更新请求消息; 当所述消息类型字段为第二数值时,所述消息为时钟偏移更新应答消息。  a sending module, configured to send a message to the communication peer, where the message includes a message type field; when the message type field is the first value, the message is a clock offset update request message; when the message type field is The second value is the clock offset update response message.
12、 根据权利要求 11所述的装置, 其特征在于, 当所述消息类型字段为 第三数值时, 所述消息为应用数据消息。 12. The apparatus according to claim 11, wherein when the message type field is a third value, the message is an application data message.
13、 一种时钟偏移更新系统, 其特征在于, 包括: 13. A clock offset update system, comprising:
时钟偏移更新的装置, 用于接收来自通信对端的消息, 所述消息包含消 息类型字段; 根据所述消息的消息类型字段获取所述消息的类型; 当所述消 息类型字段为第一数值时, 所述消息为来自所述通信对端的时钟偏移更新请 求消息; 当所述消息类型字段为第二数值时, 所述消息为来自所述通信对端 的时钟偏移更新应答消息; 和若所述消息类型字段为所述第一数值或所述第 二数值, 根据所述消息的类型及所述消息, 更新本地时钟偏移; 时钟偏移消息的通告装置, 用于向通信对端的发送消息, 所述消息包含 消息类型字段; 当所述消息类型字段为第一数值时, 所述消息为时钟偏移更 新请求消息; 和当所述消息类型字段为第二数值时, 所述消息为时钟偏移更 新应答消息。 And a device for receiving a clock offset, configured to receive a message from a communication peer, where the message includes a message type field; obtaining a type of the message according to a message type field of the message; and when the message type field is a first value The message is a clock offset update request message from the communication peer; when the message type field is a second value, the message is a clock offset update response message from the communication peer; The message type field is the first value or the first a second value, updating a local clock offset according to the type of the message and the message; a notification device of the clock offset message, configured to send a message to the communication peer, the message includes a message type field; when the message type When the field is the first value, the message is a clock offset update request message; and when the message type field is the second value, the message is a clock offset update response message.
PCT/CN2011/084939 2011-01-26 2011-12-29 Method for updating clock offset, method and apparatus for announcing clock offset message WO2012100627A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN 201110028100 CN102098144A (en) 2011-01-26 2011-01-26 Updating method of clock skew as well as announcing method and device of clock skew information
CN201110028100.1 2011-01-26

Publications (1)

Publication Number Publication Date
WO2012100627A1 true WO2012100627A1 (en) 2012-08-02

Family

ID=44131026

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/084939 WO2012100627A1 (en) 2011-01-26 2011-12-29 Method for updating clock offset, method and apparatus for announcing clock offset message

Country Status (2)

Country Link
CN (1) CN102098144A (en)
WO (1) WO2012100627A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109640287A (en) * 2018-12-11 2019-04-16 西安理工大学 A kind of clock skew method for early warning based on RSSP-II agreement
CN114584475A (en) * 2022-05-06 2022-06-03 卡斯柯信号(北京)有限公司 Communication test method and device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102098144A (en) * 2011-01-26 2011-06-15 华为技术有限公司 Updating method of clock skew as well as announcing method and device of clock skew information

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101505215A (en) * 2009-03-05 2009-08-12 中兴通讯股份有限公司 Method and apparatus for time clock synchronization
CN101557255A (en) * 2009-05-11 2009-10-14 华为技术有限公司 Time synchronization method, system thereof and time synchronous communication equipment
CN102098144A (en) * 2011-01-26 2011-06-15 华为技术有限公司 Updating method of clock skew as well as announcing method and device of clock skew information
WO2011076051A1 (en) * 2009-12-25 2011-06-30 华为技术有限公司 Time synchronization method, device and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101505215A (en) * 2009-03-05 2009-08-12 中兴通讯股份有限公司 Method and apparatus for time clock synchronization
CN101557255A (en) * 2009-05-11 2009-10-14 华为技术有限公司 Time synchronization method, system thereof and time synchronous communication equipment
WO2011076051A1 (en) * 2009-12-25 2011-06-30 华为技术有限公司 Time synchronization method, device and system
CN102098144A (en) * 2011-01-26 2011-06-15 华为技术有限公司 Updating method of clock skew as well as announcing method and device of clock skew information

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MINISTRY OF RAILWAY TRANSPORT BUREAU, RSSP-II RAILWAY SIGNAL SAFETY PROTOCOL V0.5, 31 December 2008 (2008-12-31), pages 22-5.4.8.4.2, 23-5.4.8.4.4, 27-5.4.8.6.1 - 27-5.4.8.6.2 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109640287A (en) * 2018-12-11 2019-04-16 西安理工大学 A kind of clock skew method for early warning based on RSSP-II agreement
CN114584475A (en) * 2022-05-06 2022-06-03 卡斯柯信号(北京)有限公司 Communication test method and device
CN114584475B (en) * 2022-05-06 2022-08-30 卡斯柯信号(北京)有限公司 Communication test method and device

Also Published As

Publication number Publication date
CN102098144A (en) 2011-06-15

Similar Documents

Publication Publication Date Title
CN107210910B (en) Method, electronic device and computer program for providing a hash value for a piece of data
CN104885395B (en) System and method for Conflict solving
JP2017526282A5 (en)
JP2017521946A5 (en)
US10212622B2 (en) Systems and methods for push-to-talk voice communication over voice over internet protocol networks
US9571409B2 (en) Maximum transmission unit negotiation method and data terminal
JP2018509783A5 (en)
CN108259618B (en) Synchronous data interaction processing method and device
EP2779713B1 (en) Method and system for data record packet processing
WO2018107606A1 (en) Method and device for delivering messages in internet of things
CN103259768A (en) Method, system and device of message authentication
JP2018501717A5 (en)
CN101188618B (en) Method, system, server and terminal for canceling push message
WO2013120402A1 (en) Method and device for handling address conflict
WO2012100627A1 (en) Method for updating clock offset, method and apparatus for announcing clock offset message
CN113141257B (en) Revocation list updating method and storage medium
CN104754576B (en) Device authentication method, user equipment and the network equipment
CN108966234A (en) The treating method and apparatus of fallacious message
US20090170474A1 (en) Method and device for authenticating trunking control messages
CN110492978B (en) LoRaWAN system capable of achieving rapid confirmation and implementation method thereof
CN113141263B (en) Upgrading method, device, system and storage medium
JP3460715B2 (en) Communication system and communication method
WO2014100988A1 (en) Fountain code relay method and device
US20040001455A1 (en) Method and system for identification of digitally signed messages in a telecommunication system
CN115118628B (en) Abnormal message processing method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11856724

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11856724

Country of ref document: EP

Kind code of ref document: A1