WO2017067224A1 - 一种报文处理方法及装置 - Google Patents

一种报文处理方法及装置 Download PDF

Info

Publication number
WO2017067224A1
WO2017067224A1 PCT/CN2016/088431 CN2016088431W WO2017067224A1 WO 2017067224 A1 WO2017067224 A1 WO 2017067224A1 CN 2016088431 W CN2016088431 W CN 2016088431W WO 2017067224 A1 WO2017067224 A1 WO 2017067224A1
Authority
WO
WIPO (PCT)
Prior art keywords
tcp
packet
message
information
timestamp information
Prior art date
Application number
PCT/CN2016/088431
Other languages
English (en)
French (fr)
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 WO2017067224A1 publication Critical patent/WO2017067224A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/166IP fragmentation; TCP segmentation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Definitions

  • the present application relates to, but is not limited to, the field of wireless communication technologies, and in particular, to a message processing method and apparatus.
  • the TCP Transmission Control Protocol
  • the reliability of the transmitted data is mainly ensured by adopting an acknowledgment-based manner.
  • the TCP first device After the TCP first device sends a packet, it will start the retransmission timer. If the response of the second device is not received before the RTO (Retransmission Time Out) of the retransmission timer expires, the TCP first device needs to resend the message.
  • the size of the RTO is related to the RTT (Round Trip Time) of the TCP link.
  • the TCP protocol provides a timestamp option.
  • the TCP first device and the second device negotiate whether the two parties support the timestamp option in the handshake process. If both parties support the timestamp option, the TCP first device carries the timestamp of the local end in the sent packet, and the TCP second device carries the received timestamp in its response packet and sends it to the TCP first device. In this way, the first device of the TCP can obtain the RTT according to the time stamp sent and the time when the response message is received.
  • each TCP packet carries a timestamp option, especially for a TCP packet with a small length, this may be a relatively large overhead, which in turn causes waste of air interface resources.
  • This document provides a packet processing method and apparatus, which can save air interface resources.
  • a packet processing method includes:
  • TCP Transmission Control Protocol
  • the TCP packet includes the timestamp information, reassembling the TCP packet, where the reassembled TCP packet does not include timestamp information;
  • the determining whether the TCP packet includes timestamp information includes:
  • the packet is a TCP handshake packet, it is determined whether the TCP handshake packet includes timestamp information. If the TCP handshake packet includes timestamp information, it is determined that the TCP packet includes timestamp information.
  • the determining whether the TCP packet is a TCP handshake packet includes:
  • the determining whether the TCP handshake packet includes timestamp information includes:
  • reassembling the TCP packet, where the reassembled TCP packet does not include the timestamp information including:
  • the TCP packet includes the timestamp information
  • the TCP packet is reassembled, and the reassembled TCP packet does not include the timestamp information, and the method further includes:
  • the reassembled TCP packet is obtained according to the CRC check result.
  • the TCP handshake message includes: a TCP connection message and/or a TCP connection confirmation message.
  • a packet processing method includes:
  • the TCP response packet for the TCP packet is sent, and the timestamp information of the local end is not included in the TCP response packet.
  • the determining whether the TCP packet includes timestamp information includes:
  • the TCP packet is a TCP handshake packet
  • the information of the option field of the TCP handshake packet is obtained. If the option field includes a timestamp option according to the information of the option field, the TCP packet is determined. Includes timestamp information.
  • the TCP response message is a TCP connection confirmation message; and when the TCP handshake message is a TCP connection confirmation message, the TCP response The message is an ACK (Acknowledgement) message.
  • a message processing device comprising:
  • the first receiving unit is configured to: receive a transmission control protocol TCP packet sent by the first device;
  • a first determining unit configured to: determine whether the TCP packet includes timestamp information
  • the processing unit is configured to reassemble the TCP packet if the TCP packet includes timestamp information, where the reassembled TCP packet does not include timestamp information;
  • the first sending unit is configured to: send the reassembled TCP packet to the second device.
  • the first determining unit includes:
  • the first determining module is configured to: determine whether the TCP packet is a TCP handshake packet
  • the second determining module is configured to: determine, when the TCP packet is a TCP handshake packet, whether the TCP handshake packet includes timestamp information; if the TCP handshake packet includes timestamp information, determine The TCP message includes timestamp information.
  • the first determining module includes:
  • Obtaining a submodule configured to: obtain information about a synchronization flag field of the TCP packet;
  • Determining a sub-module configured to: determine, according to the information of the synchronization flag field, that the synchronization flag field is identified as being in a valid state, determining that the TCP packet is a TCP handshake packet;
  • the obtaining sub-module is further configured to acquire information of an option field of the TCP handshake message
  • the determining sub-module is further configured to: when determining that the option field includes a timestamp option according to the information of the option field, determining that the TCP handshake message includes timestamp information.
  • the processing unit is configured to:
  • processing unit is further configured to:
  • a message processing device comprising:
  • the second receiving unit is configured to: receive the TCP packet sent by the packet processing device;
  • a second determining unit configured to: determine whether the TCP packet includes timestamp information
  • the second sending unit is configured to: when it is determined that the TCP packet does not include the timestamp information, send a TCP response packet for the TCP packet, and the TCP response packet does not include the local timestamp information. .
  • the second determining unit includes:
  • the acquiring module is configured to: obtain information about a synchronization flag field of the TCP packet, and obtain information about an option field of the TCP handshake packet;
  • the determining module is configured to: when it is determined that the synchronization flag field is identified as being in a valid state according to the information of the synchronization flag field, determining that the TCP packet is a TCP handshake packet; and the packet is a TCP handshake packet And determining, according to the information of the option field, that the option field includes a timestamp option, determining that the TCP handshake message includes timestamp information.
  • the TCP response message is a TCP connection confirmation message; and when the TCP handshake message is a TCP connection confirmation message, the TCP response The message is an ACK message.
  • a computer readable storage medium storing computer executable instructions that, when executed by a processor, implement the above method.
  • the TCP packet of the first device when the TCP packet of the first device is received, it is determined whether the packet includes timestamp information. If the TCP packet includes the timestamp information, the TCP packet is reassembled, and the reassembled TCP packet does not include the timestamp information, and the reassembled TCP packet is sent to the second device. Therefore, after the second device receives the reassembled TCP packet, it may be determined that the first device does not support the timestamp option. Therefore, the second device that uses the solution of the embodiment of the present invention sends the report to the first device.
  • the timestamp option may not be included in the text, thereby avoiding the defect that the timestamp option must be included in each TCP packet in the related art, and thus the scheme of the embodiment of the present invention saves air interface resources compared with the related art.
  • FIG. 1 is a flowchart of a packet processing method according to Embodiment 1 of the present invention.
  • FIG. 2 is a schematic diagram of a TCP packet format in the related art
  • FIG. 3 is a flowchart of a packet processing method according to Embodiment 2 of the present invention.
  • FIG. 4 is a flowchart of a packet processing method according to Embodiment 3 of the present invention.
  • FIG. 5 is a flowchart of a packet processing method according to Embodiment 4 of the present invention.
  • FIG. 6 is a schematic diagram of a message processing apparatus according to Embodiment 5 of the present invention.
  • FIG. 7 is a schematic diagram of a message processing apparatus according to Embodiment 6 of the present invention.
  • the message processing method according to Embodiment 1 of the present invention can be executed by a message processing apparatus.
  • the packet processing device may be a network device such as an RNC (Radio Network Controller) or a UE (User Equipment).
  • the method includes:
  • Step 11 Receive a TCP packet sent by the first device.
  • the TCP protocol is a connection-oriented and reliable transmission protocol, and a connection needs to be established before two devices or processes mutually transmit data.
  • the message sent by the first device and the second device based on the TCP protocol is referred to as a TCP message.
  • the first device and the second device may be clients or servers.
  • Step 12 Determine whether the TCP packet includes timestamp information.
  • the TCP packet format is as shown in Figure 2. It includes: source port number, destination port number, sequence number, acknowledgment sequence number, offset, reservation, control bit, window, checksum, emergency pointer, option, padding. And other fields.
  • control bit field including URG (emergency flag), ACK (acknowledgement flag), PSH (push flag), RST (reset flag), SYN (synchronization flag), FIN (end flag) and other flags.
  • Option field include options such as timestamps.
  • the first device sends a TCP connection packet (SYN packet) to the second device, and the second device sends the TCP packet to the first device after receiving the connection.
  • the connection confirmation message (SYN ACK message)
  • the first device sends a TCP acknowledgement message (ACK message) to the second device.
  • the SYN (synchronization flag) field in the flag field is marked with 1 in the TCP connection packet, indicating that the field is valid; and the TCP connection confirmation message is based on the TCP packet.
  • the format, SYN (Synchronization Flag) field is marked with 1, indicating that the field is valid, and the ACK (Acknowledgement Flag) field is also marked as 1, indicating that the field is valid; in the TCP confirmation message, the flag field is not set.
  • the TCP connection message and the TCP connection confirmation message have the capability of carrying time stamp information. Therefore, in the embodiment of the present invention, the two types of messages can be processed mainly.
  • the TCP connection message and the TCP connection confirmation message are collectively referred to as a TCP handshake message.
  • the TCP packet is a TCP handshake packet.
  • the SYN field in the TCP connection message and the TCP connection confirmation message is marked as 1 in the process of establishing the connection. Therefore, in the embodiment of the present invention, it can be determined by determining whether the SYN field is valid. Whether the packet transmitted between the first device and the second device is a TCP handshake packet. First, the information of the SYN field of the TCP packet is obtained. If the information of the synchronization flag field is determined to be valid, that is, the SYN field is marked as 1, the TCP packet is determined to be a TCP handshake packet.
  • timestamps are included in the Option field.
  • the timestamp option of the TCP message sent by itself is set. Therefore, in this step, the information of the option field of the TCP handshake message may be obtained, and if it is determined according to the information of the option field that the option field includes a timestamp option, determining that the TCP handshake message includes time The information is stamped, otherwise it is determined that the time stamp information is not included in the TCP handshake message.
  • the first device can be used as the transmitting end or the receiving end, and the second device is also the same.
  • the first device is the sender
  • the second device is the receiver.
  • the TCP handshake packet is a TCP connection confirmation packet
  • the second device is the sender.
  • the device is the receiving end.
  • Step 13 If the TCP packet includes timestamp information, the TCP packet is reassembled, and the reassembled TCP packet does not include timestamp information.
  • the TCP packet After determining that the TCP packet includes the timestamp information, the TCP packet is reassembled by deleting the timestamp option of the TCP packet. After the timestamp information is determined in the TCP handshake packet, that is, the timestamp option is included, the timestamp option in the TCP handshake packet is deleted, so that the TCP handshake message is not reassembled. Includes timestamp information.
  • Step 14 Send the reassembled TCP packet to the second device.
  • the second device can send the reassembled TCP packet, so that the second device does not include the timestamp information in the subsequent TCP packet.
  • the TCP packet of the first device is received and it is determined whether the packet includes timestamp information. If the TCP packet includes the timestamp information, the TCP packet is reassembled, and the reassembled TCP packet does not include the timestamp information, and the reassembled TCP packet is sent to the second device. Therefore, after the second device receives the reassembled TCP packet, it may be determined that the first device does not support the timestamp option. Therefore, the second device that uses the solution of the embodiment of the present invention sends the report to the first device.
  • the text can not include the timestamp option, from The defect in the related art that the timestamp option must be included in each TCP packet is avoided, so that the solution of the embodiment of the present invention saves air interface resources compared with the related art.
  • the packet processing method in the second embodiment of the present invention is executed by a client or a server, and includes:
  • Step 21 Receive a TCP packet sent by the packet processing device.
  • the packet processing device may be a network device such as an RNC or a UE, and the meaning of the TCP packet may be referred to the description of the foregoing embodiment.
  • Step 22 Determine whether the TCP packet includes timestamp information.
  • the TCP packet is a TCP handshake message. If the TCP packet is a TCP handshake packet, the information of the option field of the TCP handshake packet is obtained. If the option field includes a timestamp option according to the information of the option field, the TCP packet is determined. Includes timestamp information. For the manner of determining whether the TCP packet is a TCP handshake packet, refer to the description of the method embodiment 1.
  • Step 23 When it is determined that the TCP packet does not include the timestamp information, the TCP response packet for the TCP packet is sent, and the timestamp information of the local end is not included in the TCP response packet.
  • the TCP handshake packet is mainly processed, and the TCP handshake packet may include a SYN packet or a SYN ACK packet. Then, in this embodiment, when the TCP handshake message is a TCP connection message, the TCP response message is a TCP connection confirmation message; when the TCP handshake message is a TCP connection confirmation message, The TCP response message is an ACK message.
  • the TCP packet of the first device is received and it is determined whether the packet includes timestamp information. If the TCP packet includes the timestamp information, the TCP packet is reassembled, and the reassembled TCP packet does not include the timestamp information, and the reassembled TCP packet is sent to the second device. Therefore, after the second device receives the reassembled TCP packet, it may be determined that the first device does not support the timestamp option. Therefore, the second device that uses the solution of the embodiment of the present invention sends the report to the first device.
  • the timestamp option may not be included in the text, thereby avoiding the defect that the timestamp option must be included in each TCP packet in the related art, and thus the scheme of the embodiment of the present invention saves air interface resources compared with the related art.
  • the packet processing method in the third embodiment of the present invention is performed by the RNC, and includes:
  • Step 31 When establishing a wireless network connection, the RNC receives the uplink TCP packet.
  • Step 32 The RNC parses the TCP packet header format. After parsing, if the TCP packet is a SYN packet or a SYN ACK packet, step 33 is performed; otherwise, step 36 is performed.
  • the header information of the TCP packet is parsed, and in the flag field of the header, only when the SYN field is 1, the TCP packet is determined to be a SYN packet; In the field, when the SYN field is 1, and the ACK field is 1, it is determined that the TCP packet is a SYN ACK packet.
  • Step 33 Determine whether the SYN packet or the SYN ACK packet carries timestamp information. If yes, go to step 34, otherwise go to step 36.
  • the option field in the SYN message is read. If the option field includes a timestamp option, it is determined that the SYN message carries timestamp information. Similarly, the option field of the SYN ACK message is read. If the option field includes a timestamp option, it is determined that the SYN ACK message carries timestamp information.
  • Step 34 Reassemble the SYN packet or the SYN ACK packet.
  • the content of the timestamp option in the SYN packet is deleted, the CRC check is performed on the header of the SYN packet, and the content in the timestamp option in the SYN ACK packet is deleted.
  • the header of the ACK packet is re-checked by the CRC.
  • Step 35 Send the reassembled SYN packet or SYN ACK packet to the core network.
  • the receiving device After the receiving device receives the reassembled SYN packet or the SYN ACK packet sent by the RNC, the receiving device does not include the timestamp information in the response packet sent by the receiving device for the SYN packet or the SYN ACK packet. .
  • Step 36 Send the TCP packet to the core network.
  • the solution of the embodiment of the present invention saves air interface resources and improves the performance of wireless transmission.
  • the packet processing method in the fourth embodiment of the present invention is performed by the UE, and includes:
  • Step 41 When establishing a wireless network connection, the UE receives an uplink TCP packet.
  • Step 42 The UE parses the TCP packet header format. After parsing, if the TCP packet is a SYN packet or a SYN ACK packet, step 43 is performed; otherwise, step 46 is performed.
  • the header information of the TCP packet is parsed, and in the flag field of the header, only when the SYN field is 1, the TCP packet is determined to be a SYN packet; In the field, when the SYN field is 1, and the ACK field is 1, it is determined that the TCP packet is a SYN ACK packet.
  • Step 43 Determine whether the SYN packet or the SYN ACK packet carries timestamp information. If yes, go to step 44, otherwise go to step 46.
  • the option field in the SYN message is read. If the option field includes a timestamp option, it is determined that the SYN message carries timestamp information. Similarly, the option field of the SYN ACK message is read. If the option field includes a timestamp option, it is determined that the SYN ACK message carries timestamp information.
  • Step 44 Reassemble the SYN packet or the SYN ACK packet.
  • the content of the timestamp option in the SYN packet is deleted, the CRC check is performed on the header of the SYN packet, and the content in the timestamp option in the SYN ACK packet is deleted.
  • the header of the ACK packet is re-checked by the CRC.
  • Step 45 Send the reassembled SYN packet or SYN ACK from the air interface to the network side.
  • the receiving device After receiving the reassembled SYN packet or SYN ACK packet, the receiving device will not include the timestamp information in the response packet sent by the receiving device for the SYN packet or the SYN ACK packet.
  • Step 46 Send the TCP packet to the network side.
  • the solution of the embodiment of the present invention saves air interface resources and improves the performance of wireless transmission.
  • the message processing apparatus of the fifth embodiment of the present invention includes:
  • the first receiving unit 61 is configured to: receive the transmission control protocol TCP packet sent by the first device, and the first determining unit 62 is configured to: determine whether the TCP packet includes timestamp information; and the processing unit 63 is configured to: Reassembling the TCP if the TCP packet includes timestamp information The packet, wherein the reassembled TCP packet does not include the timestamp information; the first sending unit 64 is configured to: send the reassembled TCP packet to the second device.
  • the first determining unit 62 includes: a first determining module, configured to: determine whether the TCP packet is a TCP handshake packet; and the second determining module is configured to: the TCP packet is a TCP handshake packet And determining whether the TCP handshake message includes timestamp information; if the TCP handshake message includes timestamp information, determining that the TCP packet includes timestamp information.
  • the first determining module includes: an obtaining submodule, configured to: obtain information of a synchronization flag field of the TCP packet; and determine a submodule, configured to: determine the synchronization flag according to information according to the synchronization flag field When the field is identified as being in a valid state, the TCP packet is determined to be a TCP handshake packet; the obtaining submodule is further configured to obtain information of an option field of the TCP handshake packet; the determining submodule is further configured to When it is determined that the option field includes a timestamp option according to the information of the option field, it is determined that the TCP handshake message includes timestamp information.
  • the processing unit 63 is configured to: delete a timestamp option of the TCP packet. That is, in the embodiment of the present invention, the timestamp option in the TCP handshake message is deleted. In order to improve the security of the TCP packet, the processing unit 63 is further configured to perform a cyclic redundancy check code CRC check on the TCP packet with the timestamp option deleted; and obtain the reassembled TCP according to the CRC check result. Message. That is, in the embodiment of the present invention, the cyclic handshake check CRC is performed on the TCP handshake message with the timestamp option deleted, and then the reassembled TCP handshake message is obtained according to the CRC check result.
  • the TCP handshake message includes: a TCP connection message and/or a TCP connection confirmation message.
  • the device may be located in a network device such as an RNC or a UE.
  • the TCP packet of the first device is received and it is determined whether the packet includes timestamp information. If the TCP packet includes the timestamp information, the TCP packet is reassembled, and the reassembled TCP packet does not include the timestamp information, and the reassembled TCP packet is sent to the second device. Therefore, after the second device receives the reassembled TCP packet, it may be determined that the first device does not support the timestamp option. Therefore, the second device that uses the solution of the embodiment of the present invention sends the report to the first device.
  • the text can not include the timestamp option, from The defect in the related art that the timestamp option must be included in each TCP packet is avoided, so that the solution of the embodiment of the present invention saves air interface resources compared with the related art.
  • the message processing apparatus of the sixth embodiment of the present invention includes:
  • the second receiving unit 71 is configured to: receive the TCP packet sent by the packet processing device; the second determining unit 72 is configured to: determine whether the TCP packet includes timestamp information; and the second sending unit 73 is configured to: When it is determined that the TCP packet does not include the timestamp information, the TCP response packet for the TCP packet is sent, and the timestamp information of the local end is not included in the TCP response packet.
  • the second determining unit 72 includes: an obtaining module, configured to: obtain information of a synchronization flag field of the TCP packet, and obtain information of an option field of the TCP handshake packet; and determine a module, set to: And determining, according to the information of the synchronization flag field, that the synchronization flag field is identified as a valid state, determining that the TCP packet is a TCP handshake packet; and when the packet is a TCP handshake packet, according to the option
  • the information of the field determines that the option field includes a timestamp option, and determines that the TCP handshake message includes timestamp information.
  • the TCP response message is a TCP connection confirmation message; when the TCP handshake message is a TCP connection confirmation message, the TCP The response message is an ACK message.
  • the device can be located in a client or a server. It can be seen that, in the embodiment of the present invention, the TCP packet of the first device is received and it is determined whether the packet includes timestamp information. If the TCP packet includes the timestamp information, the TCP packet is reassembled, and the reassembled TCP packet does not include the timestamp information, and the reassembled TCP packet is sent to the second device. Therefore, after the second device receives the reassembled TCP packet, it may be determined that the first device does not support the timestamp option.
  • the second device that uses the solution of the embodiment of the present invention sends the report to the first device.
  • the timestamp option may not be included in the text, thereby avoiding the defect that the timestamp option must be included in each TCP packet in the related art, and thus the scheme of the embodiment of the present invention saves air interface resources compared with the related art.
  • the embodiment of the invention further provides a computer readable storage medium storing computer executable instructions, which are implemented when the computer executable instructions are executed by the processor.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • the device/function module/functional unit in the above embodiment When the device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the second device does not include the timestamp option in the subsequent packet sent to the first device, thereby avoiding the defect that the timestamp option must be included in each TCP packet, thereby saving Empty resources.

Landscapes

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

Abstract

本文公布一种报文处理方法及装置,所述报文处理方法包括:接收第一设备发送的传输控制协议TCP报文;确定所述TCP报文是否包括时间戳信息;若所述TCP报文包括时间戳信息,则重新组装所述TCP报文,其中重新组装后的TCP报文不包括时间戳信息;向第二设备发送所述重新组装后的TCP报文。

Description

一种报文处理方法及装置 技术领域
本申请涉及但不限于无线通信技术领域,尤其是一种报文处理方法及装置。
背景技术
随着数据业务的不断发展,用户对业务质量的需求越来越高。对于无线领域的分组域数据来说,一般采用TCP(Transmission Control Protocol,传输控制协议)协议进行传输,因此提升TCP协议在无线承载中的性能变得越来越重要。
在TCP协议中,主要是通过采用基于确认的方式来保证传输数据的可靠性。TCP第一设备在发出报文后,会启动重传定时器。如果在重传定时器的RTO(Retransmission Time Out,重传超时时间)到达之前没有收到第二设备的响应,TCP第一设备则需要重发该报文。其中,RTO的大小跟TCP链路的RTT(Round Trip Time,环回时延)有关。
为了精确计算TCP链路的环回时延,TCP协议提供了时间戳选项。TCP第一设备和第二设备在握手环节协商好双方是否支持时间戳选项。如果双方都支持时间戳选项,TCP第一设备在其发送报文中携带本端的时间戳,TCP第二设备在其响应报文中携带接收的时间戳并发送给TCP第一设备。这样,TCP第一设备根据发送时间戳和收到响应报文的时间,即可得到RTT。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
对于无线网络来讲,空口资源十分有限。如果每个TCP报文都携带时间戳选项,尤其是对于长度比较小的TCP报文来讲,这可能是比较大的开销,进而造成了空口资源的浪费。
本文提供一种报文处理方法及装置,能够节约空口资源。
一种报文处理方法,包括:
接收第一设备发送的传输控制协议TCP报文;
确定所述TCP报文是否包括时间戳信息;
若所述TCP报文包括时间戳信息,则重新组装所述TCP报文,其中重新组装后的TCP报文不包括时间戳信息;
向第二设备发送所述重新组装后的TCP报文。
可选的,所述确定所述TCP报文是否包括时间戳信息包括:
确定所述TCP报文是否为TCP握手报文;
若所述报文是TCP握手报文,则确定所述TCP握手报文是否包括时间戳信息;若所述TCP握手报文包括时间戳信息,则确定所述TCP报文包括时间戳信息。
可选的,所述确定所述TCP报文是否为TCP握手报文包括:
获取所述TCP报文的同步标志字段的信息;若根据所述同步标志字段的信息确定所述同步标志字段被标识为有效状态,确定所述TCP报文是TCP握手报文;
所述确定所述TCP握手报文是否包括时间戳信息包括:
获取所述TCP握手报文的选项字段的信息;若根据所述选项字段的信息确定所述选项字段包括时间戳选项,则确定所述TCP握手报文中包括时间戳信息。
可选的,所述若所述TCP报文包括时间戳信息,则重新组装所述TCP报文,其中重新组装后的TCP报文不包括时间戳信息包括:
删除所述TCP报文的时间戳选项。
可选的,所述若所述TCP报文包括时间戳信息,则重新组装所述TCP报文,其中重新组装后的TCP报文不包括时间戳信息还包括:
对删除了时间戳选项的TCP报文进行循环冗余校验码CRC校验;
根据CRC校验结果获得重新组装后的TCP报文。
可选的,所述TCP握手报文包括:TCP连接报文和/或TCP连接确认报文。
一种报文处理方法,包括:
接收报文处理装置发送的TCP报文;
确定所述TCP报文是否包括时间戳信息;
当确定所述TCP报文不包括时间戳信息时,发送针对所述TCP报文的TCP响应报文,在所述TCP响应报文中不包括本端的时间戳信息。
可选的,所述确定所述TCP报文是否包括时间戳信息包括:
确定所述TCP报文是否为TCP握手报文;
若所述TCP报文是TCP握手报文,获取所述TCP握手报文的选项字段的信息;若根据所述选项字段的信息确定所述选项字段包括时间戳选项,则确定所述TCP报文包括时间戳信息。
可选的,当所述TCP握手报文是TCP连接报文时,所述TCP响应报文是TCP连接确认报文;当所述TCP握手报文是TCP连接确认报文时,所述TCP响应报文是ACK(确认,Acknowledgement)报文。
一种报文处理装置,包括:
第一接收单元,设置为:接收第一设备发送的传输控制协议TCP报文;
第一确定单元,设置为:确定所述TCP报文是否包括时间戳信息;
处理单元,设置为:若所述TCP报文包括时间戳信息,则重新组装所述TCP报文,其中重新组装后的TCP报文不包括时间戳信息;
第一发送单元,设置为:向第二设备发送所述重新组装后的TCP报文。
可选的,所述第一确定单元包括:
第一确定模块,设置为:确定所述TCP报文是否为TCP握手报文;
第二确定模块,设置为:在所述TCP报文是TCP握手报文时,则确定所述TCP握手报文是否包括时间戳信息;若所述TCP握手报文包括时间戳信息,则确定所述TCP报文包括时间戳信息。
可选的,所述第一确定模块,包括:
获取子模块,设置为:获取所述TCP报文的同步标志字段的信息;
确定子模块,设置为:在根据所述同步标志字段的信息确定所述同步标志字段被标识为有效状态时,确定所述TCP报文是TCP握手报文;
所述获取子模块还设置为,获取所述TCP握手报文的选项字段的信息;
所述确定子模块还设置为,在根据所述选项字段的信息确定所述选项字段包括时间戳选项时,则确定所述TCP握手报文中包括时间戳信息。
可选的,所述处理单元设置为:
删除所述TCP报文的时间戳选项。
可选的,所述处理单元还设置为,
对删除了时间戳选项的TCP报文进行循环冗余校验码CRC校验;根据CRC校验结果获得重新组装后的TCP报文。
一种报文处理装置,包括:
第二接收单元,设置为:接收报文处理装置发送的TCP报文;
第二确定单元,设置为:确定所述TCP报文是否包括时间戳信息;
第二发送单元,设置为:当确定所述TCP报文不包括时间戳信息时,发送针对所述TCP报文的TCP响应报文,在所述TCP响应报文中不包括本端的时间戳信息。
可选的,所述第二确定单元包括:
获取模块,设置为:获取所述TCP报文的同步标志字段的信息以及获取所述TCP握手报文的选项字段的信息;
确定模块,设置为:在根据所述同步标志字段的信息确定所述同步标志字段被标识为有效状态时,确定所述TCP报文是TCP握手报文;在所述报文是TCP握手报文时,若根据所述选项字段的信息确定所述选项字段包括时间戳选项,则确定所述TCP握手报文中包括时间戳信息。
可选的,当所述TCP握手报文是TCP连接报文时,所述TCP响应报文是TCP连接确认报文;当所述TCP握手报文是TCP连接确认报文时,所述TCP响应报文是ACK报文。
一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现上述方法。
在本发明实施例中,当收到第一设备的TCP报文并确定该报文是否包括时间戳信息。若所述TCP报文包括时间戳信息,则重新组装所述TCP报文,其中重新组装后的TCP报文不包括时间戳信息,并向第二设备发送所述重新组装后的TCP报文。因此,当第二设备收到该重新组装后的TCP报文后可确定第一设备不支持时间戳选项,因此,利用本发明实施例的方案第二设备在后续的发送给第一设备的报文中即可不包括时间戳选项,从而避免了相关技术中在每个TCP报文都必须包括时间戳选项的缺陷,因而与相关技术相比本发明实施例的方案节约了空口资源。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1为本发明实施例一的报文处理方法的流程图;
图2为相关技术中TCP报文格式的示意图;
图3为本发明实施例二的报文处理方法的流程图;
图4为本发明实施例三的报文处理方法的流程图;
图5为本发明实施例四的报文处理方法的流程图;
图6为本发明实施例五的报文处理装置的示意图;
图7为本发明实施例六的报文处理装置的示意图。
本发明的实施方式
下面将结合附图和实施例,对本发明的实施方式进行描述。以下实施例用于说明本申请,但不用来限制本申请的范围。
如图1所示,本发明实施例一的报文处理方法可由报文处理装置执行。其中所述报文处理装置可以为RNC(Radio Network Controller,无线网络控制器),UE(User Equipment,用户设备)等网络设备。所述方法包括:
步骤11、接收第一设备发送的TCP报文。
根据相关技术的描述,TCP协议是面向连接的可靠传输协议,两个设备或进程互发数据之前需要建立连接。在此,将第一设备和第二设备之间基于TCP协议发送的报文称为TCP报文。其中,所述第一设备和第二设备可以是客户端或者服务器。
步骤12、确定所述TCP报文是否包括时间戳信息。
根据TCP协议的规定,TCP报文格式如图2所示,包括:源端口号、目的端口号、序号、确认序号、偏移、保留、控制位、窗口、校验、紧急指针、选项、填充等字段。在控制位字段中,包括URG(紧急标志)、ACK(确认标志)、PSH(推标志)、RST(复位标志)、SYN(同步标志)、FIN(结束标志)等标志。在选项(Option)字段,包括时间戳选项(timestamps)等选项。
其中,第一设备和第二设备之间建立连接需要经过三次握手:首先,第一设备向第二设备发送TCP连接报文(SYN报文),第二设备收到后向第一设备发送TCP连接确认报文(SYN ACK报文),最后第一设备向第二设备发送TCP确认报文(ACK报文)。其中,所述TCP连接报文中,根据TCP的报文格式,标志字段中的SYN(同步标志)字段被标记1,表示该字段有效;所述TCP连接确认报文中,根据TCP的报文格式,SYN(同步标志)字段被标记1,表示该字段有效,同时ACK(确认标志)字段也被标记为1,表示该字段有效;所述TCP确认报文中,标志字段不进行设置。
根据相关技术的内容,其中TCP连接报文和TCP连接确认报文具有携带时间戳信息的能力,因此,在本发明实施例中可主要针对这两种类型的报文进行处理。由于这两个报文是发生在两个设备建立连接的过程中,因此,在本发明实施例中,将TCP连接报文和TCP连接确认报文统称为TCP握手报文。
因此,在此步骤中可首先确定所述TCP报文是否为TCP握手报文。根据以上可以看出,在建立连接过程中,在TCP连接报文和TCP连接确认报文中的SYN字段都被标记为1,因此,在本发明实施例中可通过判断SYN字段是否有效来确定第一设备和第二设备之间传输的报文是否为TCP握手报文。 首先获取所述TCP报文的SYN字段的信息,若根据所述同步标志字段的信息确定所述SYN字段被标识为有效状态即标记为1,确定所述TCP报文是TCP握手报文。
参考图2所示的TCP报文格式,在Option(选项)字段中包括时间戳选项(timestamps)。根据相关技术的描述,若第一设备或者第二设备支持时间戳选项,将会设置自身发送的TCP报文的时间戳选项。因此,在此步骤中,可获取所述TCP握手报文的选项字段的信息,若根据所述选项字段的信息确定所述选项字段包括时间戳选项,则确定所述TCP握手报文中包括时间戳信息,否则确定所述TCP握手报文中不包括时间戳信息。
根据以上的描述可以看出,其中第一设备可以作为发送端也可以作为接收端,第二设备也是同样。例如,当TCP握手报文是TCP连接报文时,第一设备是发送端,第二设备是接收端;当TCP握手报文是TCP连接确认报文时,第二设备是发送端,第一设备是接收端。
步骤13、若所述TCP报文包括时间戳信息,则重新组装所述TCP报文,其中重新组装后的TCP报文不包括时间戳信息。
当确定了所述TCP报文包括时间戳信息后,通过删除所述TCP报文的时间戳选项重新组装所述TCP报文。其中,当确定TCP握手报文中有时间戳信息后,也即包括时间戳选项后,可将所述TCP握手报文中的时间戳选项删除,从而使得重新组装后的TCP握手报文中不包括时间戳信息。
步骤14、向第二设备发送所述重新组装后的TCP报文。
在获得了重新组装后的TCP报文后,即可将第二设备发送重新组装后的TCP报文,使得第二设备在其后续发送的TCP报文不包括时间戳信息。
由上可以看出,在本发明实施例中,当收到第一设备的TCP报文并确定该报文是否包括时间戳信息。若所述TCP报文包括时间戳信息,则重新组装所述TCP报文,其中重新组装后的TCP报文不包括时间戳信息,并向第二设备发送所述重新组装后的TCP报文。因此,当第二设备收到该重新组装后的TCP报文后可确定第一设备不支持时间戳选项,因此,利用本发明实施例的方案第二设备在后续的发送给第一设备的报文中即可不包括时间戳选项,从 而避免了相关技术中在每个TCP报文都必须包括时间戳选项的缺陷,因而与相关技术相比本发明实施例的方案节约了空口资源。
如图3所示,本发明实施例二的报文处理方法,由客户端或者服务器执行,包括:
步骤21、接收报文处理装置发送的TCP报文。
其中,所述报文处理装置可以是RNC或者UE等网络设备,所述TCP报文的含义可参照前述实施例的描述。
步骤22、确定所述TCP报文是否包括时间戳信息。
同样,在此步骤中,可首先确定所述TCP报文是否为TCP握手报文。若所述TCP报文是TCP握手报文,获取所述TCP握手报文的选项字段的信息;若根据所述选项字段的信息确定所述选项字段包括时间戳选项,则确定所述TCP报文包括时间戳信息。确定该TCP报文是否为TCP握手报文的方式可参照方法实施例一的描述。
步骤23、当确定所述TCP报文不包括时间戳信息时,发送针对所述TCP报文的TCP响应报文,在所述TCP响应报文中不包括本端的时间戳信息。
如前所述,在本发明实施例中主要是针对TCP握手报文的处理,而TCP握手报文可以包括SYN报文或者SYN ACK报文。那么,在此实施例中,当所述TCP握手报文是TCP连接报文时,所述TCP响应报文是TCP连接确认报文;当所述TCP握手报文是TCP连接确认报文时,所述TCP响应报文是ACK报文。
由上可以看出,在本发明实施例中,当收到第一设备的TCP报文并确定该报文是否包括时间戳信息。若所述TCP报文包括时间戳信息,则重新组装所述TCP报文,其中重新组装后的TCP报文不包括时间戳信息,并向第二设备发送所述重新组装后的TCP报文。因此,当第二设备收到该重新组装后的TCP报文后可确定第一设备不支持时间戳选项,因此,利用本发明实施例的方案第二设备在后续的发送给第一设备的报文中即可不包括时间戳选项,从而避免了相关技术中在每个TCP报文都必须包括时间戳选项的缺陷,因而与相关技术相比本发明实施例的方案节约了空口资源。
如图4所示,本发明实施例三的报文处理方法,由RNC执行,包括:
步骤31、建立无线网络连接时,RNC接收上行TCP报文。
步骤32、RNC对该TCP报文头格式进行解析。经解析,若该TCP报文是SYN报文或者SYN ACK报文,则执行步骤33;否则执行步骤36。
在本发明实施例中,解析所述TCP报文的头部信息,在其头部的标志字段中仅当SYN字段为1时,判断该TCP报文是SYN报文;在其头部的标志字段中当SYN字段为1、ACK字段为1时,判断该TCP报文是SYN ACK报文。
步骤33、判断该SYN报文或者SYN ACK报文是否携带有时间戳信息。若是,则执行步骤34,否则执行步骤36。
根据前述实施例的描述,读取SYN报文中的选项字段,若该选项字段包括时间戳选项,则判断该SYN报文携带有时间戳信息。同样的,或者读取SYN ACK报文的选项字段,若该选项字段包括时间戳选项,则判断该SYN ACK报文携带有时间戳信息。
步骤34、重新组装该SYN报文或SYN ACK报文。其中,包括删除该SYN报文中的时间戳选项中的内容,对该SYN报文的头部重新进行CRC校验等;删除该SYN ACK报文中的时间戳选项中的内容,对该SYN ACK报文的头部重新进行CRC校验等。
步骤35、将重新组装后的SYN报文或SYN ACK报文发送给核心网。
这样,在接收设备收到RNC发送的重新组装后的SYN报文或SYN ACK报文后,在接收设备发送的针对SYN报文或SYN ACK报文的响应报文中将不会包括时间戳信息。
步骤36、将该TCP报文发送给核心网。
由上可以看出,利用本发明实施例的方案,与相关技术相比节约了空口资源,提高了无线传输的性能。
如图5所示,本发明实施例四的报文处理方法,由UE执行,包括:
步骤41、建立无线网络连接时,UE接收到上行TCP报文。
步骤42、UE对该TCP报文头格式进行解析。经解析,若该TCP报文是SYN报文或者SYN ACK报文,则执行步骤43;否则执行步骤46。
在本发明实施例中,解析所述TCP报文的头部信息,在其头部的标志字段中仅当SYN字段为1时,判断该TCP报文是SYN报文;在其头部的标志字段中当SYN字段为1、ACK字段为1时,判断该TCP报文是SYN ACK报文。
步骤43、判断该SYN报文或者SYN ACK报文是否携带有时间戳信息。若是,则执行步骤44,否则执行步骤46。
根据前述实施例的描述,读取SYN报文中的选项字段,若该选项字段包括时间戳选项,则判断该SYN报文携带有时间戳信息。同样的,或者读取SYN ACK报文的选项字段,若该选项字段包括时间戳选项,则判断该SYN ACK报文携带有时间戳信息。
步骤44、重新组装该SYN报文或SYN ACK报文。其中,包括删除该SYN报文中的时间戳选项中的内容,对该SYN报文的头部重新进行CRC校验等;删除该SYN ACK报文中的时间戳选项中的内容,对该SYN ACK报文的头部重新进行CRC校验等。
步骤45、将重新组装后的SYN报文或SYN ACK从空口接口发送到网络侧。
这样,在接收设备收到重新组装后的SYN报文或SYN ACK报文后,在接收设备发送的针对SYN报文或SYN ACK报文的响应报文中将不会包括时间戳信息。
步骤46、将该TCP报文发送给网络侧。
由上可以看出,利用本发明实施例的方案,与相关技术相比节约了空口资源,提高了无线传输的性能。
如图6所示,本发明实施例五的报文处理装置,包括:
第一接收单元61,设置为:接收第一设备发送的传输控制协议TCP报文;第一确定单元62,设置为:确定所述TCP报文是否包括时间戳信息;处理单元63,设置为:若所述TCP报文包括时间戳信息,则重新组装所述TCP 报文,其中重新组装后的TCP报文不包括时间戳信息;第一发送单元64,设置为:向第二设备发送所述重新组装后的TCP报文。
其中,所述第一确定单元62包括:第一确定模块,设置为:确定所述TCP报文是否为TCP握手报文;第二确定模块,设置为:在所述TCP报文是TCP握手报文时,则确定所述TCP握手报文是否包括时间戳信息;若所述TCP握手报文包括时间戳信息,则确定所述TCP报文包括时间戳信息。
所述第一确定模块,包括:获取子模块,设置为:获取所述TCP报文的同步标志字段的信息;确定子模块,设置为:在根据所述同步标志字段的信息确定所述同步标志字段被标识为有效状态时,确定所述TCP报文是TCP握手报文;所述获取子模块还设置为,获取所述TCP握手报文的选项字段的信息;所述确定子模块还设置为,在根据所述选项字段的信息确定所述选项字段包括时间戳选项时,则确定所述TCP握手报文中包括时间戳信息。
其中,所述处理单元63设置为:删除所述TCP报文的时间戳选项。也即在本发明实施例中是删除所述TCP握手报文中的时间戳选项。为了提高TCP报文的安全性,所述处理单元63还设置为,对删除了时间戳选项的TCP报文进行循环冗余校验码CRC校验;根据CRC校验结果获得重新组装后的TCP报文。也即在本发明实施例中是对删除了时间戳选项的TCP握手报文进行循环冗余校验码CRC校验,然后根据CRC校验结果获得重新组装后的TCP握手报文。
如前所述,在本发明实施例中,所述TCP握手报文包括:TCP连接报文和/或TCP连接确认报文。
其中,本发明实施例装置的工作原理可参照前述方法实施例的描述,该装置可位于RNC或UE等网络设备中。
由上可以看出,在本发明实施例中,当收到第一设备的TCP报文并确定该报文是否包括时间戳信息。若所述TCP报文包括时间戳信息,则重新组装所述TCP报文,其中重新组装后的TCP报文不包括时间戳信息,并向第二设备发送所述重新组装后的TCP报文。因此,当第二设备收到该重新组装后的TCP报文后可确定第一设备不支持时间戳选项,因此,利用本发明实施例的方案第二设备在后续的发送给第一设备的报文中即可不包括时间戳选项,从 而避免了相关技术中在每个TCP报文都必须包括时间戳选项的缺陷,因而与相关技术相比本发明实施例的方案节约了空口资源。
如图7所示,本发明实施例六的报文处理装置,包括:
第二接收单元71,设置为:接收报文处理装置发送的TCP报文;第二确定单元72,设置为:确定所述TCP报文是否包括时间戳信息;第二发送单元73,设置为:当确定所述TCP报文不包括时间戳信息时,发送针对所述TCP报文的TCP响应报文,在所述TCP响应报文中不包括本端的时间戳信息。
其中,所述第二确定单元72包括:获取模块,设置为:获取所述TCP报文的同步标志字段的信息以及获取所述TCP握手报文的选项字段的信息;确定模块,设置为:在根据所述同步标志字段的信息确定所述同步标志字段被标识为有效状态时,确定所述TCP报文是TCP握手报文;在所述报文是TCP握手报文时,若根据所述选项字段的信息确定所述选项字段包括时间戳选项,则确定所述TCP握手报文中包括时间戳信息。
如前所述,当所述TCP握手报文是TCP连接报文时,所述TCP响应报文是TCP连接确认报文;当所述TCP握手报文是TCP连接确认报文时,所述TCP响应报文是ACK报文。
其中,本发明实施例装置的工作原理可参照前述方法实施例的描述,该装置可位于客户端或者服务器中。由上可以看出,在本发明实施例中,当收到第一设备的TCP报文并确定该报文是否包括时间戳信息。若所述TCP报文包括时间戳信息,则重新组装所述TCP报文,其中重新组装后的TCP报文不包括时间戳信息,并向第二设备发送所述重新组装后的TCP报文。因此,当第二设备收到该重新组装后的TCP报文后可确定第一设备不支持时间戳选项,因此,利用本发明实施例的方案第二设备在后续的发送给第一设备的报文中即可不包括时间戳选项,从而避免了相关技术中在每个TCP报文都必须包括时间戳选项的缺陷,因而与相关技术相比本发明实施例的方案节约了空口资源。
本发明实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现上述报文处理方法。
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。
上述实施例中的装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。
上述实施例中的装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。
以上所述是本发明的可选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请所述原理的前提下,还可以作出多种改进和润饰,这些改进和润饰也应视为本申请的保护范围。
工业实用性
利用本发明实施例的方案,第二设备在后续的发送给第一设备的报文中即可不包括时间戳选项,从而避免了在每个TCP报文都必须包括时间戳选项的缺陷,因而节约了空口资源。

Claims (15)

  1. 一种报文处理方法,包括:
    接收第一设备发送的传输控制协议TCP报文;
    确定所述TCP报文是否包括时间戳信息;
    若所述TCP报文包括时间戳信息,则重新组装所述TCP报文,其中重新组装后的TCP报文不包括时间戳信息;
    向第二设备发送所述重新组装后的TCP报文。
  2. 根据权利要求1所述的方法,其中,所述确定所述TCP报文是否包括时间戳信息包括:
    确定所述TCP报文是否为TCP握手报文;
    若所述TCP报文是TCP握手报文,则确定所述TCP握手报文是否包括时间戳信息;若所述TCP握手报文包括时间戳信息,则确定所述TCP报文包括时间戳信息。
  3. 根据权利要求2所述的方法,其中,所述确定所述TCP报文是否为TCP握手报文包括:
    获取所述TCP报文的同步标志字段的信息;若根据所述同步标志字段的信息确定所述同步标志字段被标识为有效状态,确定所述TCP报文是TCP握手报文;
    所述确定所述TCP握手报文是否包括时间戳信息包括:
    获取所述TCP握手报文的选项字段的信息;若根据所述选项字段的信息确定所述选项字段包括时间戳选项,则确定所述TCP握手报文中包括时间戳信息。
  4. 根据权利要求1或2所述的方法,其中,所述若所述TCP报文包括时间戳信息,则重新组装所述TCP报文,其中重新组装后的TCP报文不包括时间戳信息包括:
    删除所述TCP报文的时间戳选项。
  5. 根据权利要求4所述的方法,其中,所述若所述TCP报文包括时间 戳信息,则重新组装所述TCP报文,其中重新组装后的TCP报文不包括时间戳信息还包括:
    对删除了时间戳选项的TCP报文进行循环冗余校验码CRC校验;
    根据CRC校验结果获得重新组装后的TCP报文。
  6. 根据权利要求2或3所述的方法,其中,所述TCP握手报文包括:TCP连接报文和/或TCP连接确认报文。
  7. 一种报文处理方法,包括:
    接收报文处理装置发送的TCP报文;
    确定所述TCP报文是否包括时间戳信息;
    当确定所述TCP报文不包括时间戳信息时,发送针对所述TCP报文的TCP响应报文,在所述TCP响应报文中不包括本端的时间戳信息。
  8. 根据权利要求7所述的方法,其中,所述确定所述TCP报文是否包括时间戳信息包括:
    确定所述TCP报文是否为TCP握手报文;
    若所述TCP报文是TCP握手报文,获取所述TCP握手报文的选项字段的信息;若根据所述选项字段的信息确定所述选项字段包括时间戳选项,则确定所述TCP报文包括时间戳信息。
  9. 根据权利要求8所述的方法,其中,当所述TCP握手报文是TCP连接报文时,所述TCP响应报文是TCP连接确认报文;当所述TCP握手报文是TCP连接确认报文时,所述TCP响应报文是确认ACK报文。
  10. 一种报文处理装置,包括:
    第一接收单元,设置为:接收第一设备发送的传输控制协议TCP报文;
    第一确定单元,设置为:确定所述TCP报文是否包括时间戳信息;
    处理单元,设置为:若所述TCP报文包括时间戳信息,则重新组装所述TCP报文,其中重新组装后的TCP报文不包括时间戳信息;
    第一发送单元,设置为:向第二设备发送所述重新组装后的TCP报文。
  11. 根据权利要求10所述的装置,其中,所述第一确定单元包括:
    第一确定模块,设置为:确定所述TCP报文是否为TCP握手报文;
    第二确定模块,设置为:在所述TCP报文是TCP握手报文时,则确定所述TCP握手报文是否包括时间戳信息;若所述TCP握手报文包括时间戳信息,则确定所述TCP报文包括时间戳信息。
  12. 根据权利要求11所述的装置,其中,所述第一确定模块,包括:
    获取子模块,设置为:获取所述TCP报文的同步标志字段的信息;
    确定子模块,设置为:在根据所述同步标志字段的信息确定所述同步标志字段被标识为有效状态时,确定所述TCP报文是TCP握手报文;
    所述获取子模块还设置为,获取所述TCP握手报文的选项字段的信息;
    所述确定子模块还设置为,在根据所述选项字段的信息确定所述选项字段包括时间戳选项时,则确定所述TCP握手报文中包括时间戳信息。
  13. 根据权利要求10或11所述的装置,其中,所述处理单元设置为:
    删除所述TCP报文的时间戳选项。
  14. 根据权利要求13所述的装置,其中,所述处理单元还设置为,
    对删除了时间戳选项的TCP报文进行循环冗余校验码CRC校验;根据CRC校验结果获得重新组装后的TCP报文。
  15. 一种报文处理装置,包括:
    第二接收单元,设置为:接收报文处理装置发送的TCP报文;
    第二确定单元,设置为:确定所述TCP报文是否包括时间戳信息;
    第二发送单元,设置为:当确定所述TCP报文不包括时间戳信息时,发送针对所述TCP报文的TCP响应报文,在所述TCP响应报文中不包括本端的时间戳信息。
PCT/CN2016/088431 2015-10-23 2016-07-04 一种报文处理方法及装置 WO2017067224A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510697647.9 2015-10-23
CN201510697647.9A CN106612256A (zh) 2015-10-23 2015-10-23 一种报文处理方法及装置

Publications (1)

Publication Number Publication Date
WO2017067224A1 true WO2017067224A1 (zh) 2017-04-27

Family

ID=58556712

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/088431 WO2017067224A1 (zh) 2015-10-23 2016-07-04 一种报文处理方法及装置

Country Status (2)

Country Link
CN (1) CN106612256A (zh)
WO (1) WO2017067224A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109729047A (zh) * 2017-10-30 2019-05-07 阿里巴巴集团控股有限公司 一种报文处理方法及装置
CN110381071B (zh) * 2019-07-24 2021-05-28 新华三技术有限公司合肥分公司 一种报文传输方法、装置及发送方设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217429A (zh) * 2008-01-18 2008-07-09 清华大学 基于tcp时间戳选项确定tcp报文之间的引发关系的方法
US20080209518A1 (en) * 2007-02-28 2008-08-28 Sourcefire, Inc. Device, system and method for timestamp analysis of segments in a transmission control protocol (TCP) session
CN101383818A (zh) * 2007-09-05 2009-03-11 华为技术有限公司 一种接入网络的处理方法及装置
CN101986648A (zh) * 2010-11-24 2011-03-16 北京星网锐捷网络技术有限公司 一种tcp选项的协商方法、装置及网络设备
US20130046973A1 (en) * 2011-08-17 2013-02-21 Cleversafe, Inc. Facilitating access of a dispersed storage network
CN103746768A (zh) * 2013-10-08 2014-04-23 北京神州绿盟信息安全科技股份有限公司 一种数据包的识别方法及设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080209518A1 (en) * 2007-02-28 2008-08-28 Sourcefire, Inc. Device, system and method for timestamp analysis of segments in a transmission control protocol (TCP) session
CN101383818A (zh) * 2007-09-05 2009-03-11 华为技术有限公司 一种接入网络的处理方法及装置
CN101217429A (zh) * 2008-01-18 2008-07-09 清华大学 基于tcp时间戳选项确定tcp报文之间的引发关系的方法
CN101986648A (zh) * 2010-11-24 2011-03-16 北京星网锐捷网络技术有限公司 一种tcp选项的协商方法、装置及网络设备
US20130046973A1 (en) * 2011-08-17 2013-02-21 Cleversafe, Inc. Facilitating access of a dispersed storage network
CN103746768A (zh) * 2013-10-08 2014-04-23 北京神州绿盟信息安全科技股份有限公司 一种数据包的识别方法及设备

Also Published As

Publication number Publication date
CN106612256A (zh) 2017-05-03

Similar Documents

Publication Publication Date Title
US9832681B2 (en) Higher layer compression with lower layer signaling
US20200358886A1 (en) Data Transmission Method, Apparatus, And System
US7502860B1 (en) Method and apparatus for client-side flow control in a transport protocol
JP5215413B2 (ja) 再送プロトコルのためのステータス報告
US9456384B2 (en) Message processing method, device, and system
JP2008524891A (ja) データ破壊を避けることによる改善されたネットワーク性能のための方法、システム及び物品
JP2014524092A (ja) 単一ソケットポイントツーマルチポイント性能による高信頼性仮想双方向データストリーム通信のためのシステムおよび方法
JP2002541727A5 (ja) 半信頼性再送信プロトコルに対するパケット破棄通知
CN109076475B (zh) 一种用于保持无连接传输中同步的方法和系统
WO2020078324A1 (zh) 用于测量时延的方法和装置
WO2020147453A1 (zh) 数据传输方法及相关装置
CN107154917B (zh) 数据传输方法及服务器
US8627074B1 (en) Secure block acknowledgement mechanism for use in communication networks
CN102769520A (zh) 基于sctp协议的无线网络拥塞控制方法
WO2022083371A1 (zh) 一种数据传输方法和装置
WO2017067224A1 (zh) 一种报文处理方法及装置
WO2019001352A1 (zh) 数据传输的方法、装置和系统
US11470502B2 (en) Congestion notification by data packet from intermediate node
CN115348336A (zh) 异构数据流的通用传输架构
WO2014100973A1 (zh) 视频处理方法、设备及系统
JP4447028B2 (ja) 通信制御方法、送信装置、およびコンピュータプログラム
JP4372814B2 (ja) データユニットの送信回数のカウント方法、カウント装置、送信装置、およびコンピュータプログラム
WO2020154872A1 (zh) 一种传输控制协议加速方法和装置
WO2010022671A1 (zh) 数据传输的方法、代理装置和系统
CN106656755B (zh) 一种电子邮件传输方法和系统

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: 16856663

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: 16856663

Country of ref document: EP

Kind code of ref document: A1