WO2019001129A1 - 一种实现传输性能检测的方法、装置和系统 - Google Patents

一种实现传输性能检测的方法、装置和系统 Download PDF

Info

Publication number
WO2019001129A1
WO2019001129A1 PCT/CN2018/084961 CN2018084961W WO2019001129A1 WO 2019001129 A1 WO2019001129 A1 WO 2019001129A1 CN 2018084961 W CN2018084961 W CN 2018084961W WO 2019001129 A1 WO2019001129 A1 WO 2019001129A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
receiving
packet
detecting
detection
Prior art date
Application number
PCT/CN2018/084961
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
Priority claimed from CN201710546444.9A external-priority patent/CN109218122B/zh
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP18822759.9A priority Critical patent/EP3637692A4/en
Publication of WO2019001129A1 publication Critical patent/WO2019001129A1/zh
Priority to US16/730,465 priority patent/US20200136944A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • H04L43/0841Round trip packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • H04L43/0864Round trip delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/28Flow control; Congestion control in relation to timing considerations
    • H04L47/283Flow control; Congestion control in relation to timing considerations in response to processing delays, e.g. caused by jitter or round trip time [RTT]

Definitions

  • the embodiments of the present invention relate to the field of communications technologies, and in particular, to a method, an apparatus, and a system for detecting transmission performance.
  • a reliable transmission protocol is a transmission protocol widely used in a network (such as the Internet), such as a Transmission Control Protocol (TCP) or a Stream Control Transmission Protocol (SCTP).
  • TCP Transmission Control Protocol
  • SCTP Stream Control Transmission Protocol
  • the collection information of the received message (such as the time of receiving the message or the number of received messages) is reported to the evaluation device by the network device, and the evaluation device uploads the data according to each network device.
  • the collection information determines network performance indicators such as packet loss or delay. For example, the time delay between the two network devices is determined according to the time when the two network devices upload the same packet.
  • the network performance detection according to the prior art requires that each network device reports the acquisition information acquired by itself to the evaluation device, which is complicated and has low detection efficiency.
  • the embodiments of the present invention provide a method, an apparatus, and a system for implementing transmission performance detection, which are used to solve the problem of low efficiency of transmission performance detection existing in the prior art.
  • a method for implementing transmission performance detection comprising: detecting, by a detecting device, a serial number sent by a transmitting device based on a reliable transmission protocol-based connection established between the transmitting device and the receiving device After the data packet of the N1 and the N2, it is determined that N2 is greater than N1 and is not continuous with N1; after receiving the data packet with the sequence number N2, the data packet with the sequence number M1 is received, and when it is determined that M1 is greater than N1 and When it is less than N2 and it is determined that T2-T1 is greater than or equal to the RTT, the data packet whose sequence number is M1 is determined to be a retransmission packet corresponding to the upstream packet loss, where T1 is that the detecting device receives the data packet with the sequence number N2.
  • the time T2 is the time when the detecting device receives the data packet with the sequence number M1
  • the RTT is the two-way delay between the sending device and the receiving device
  • the upstream packet loss refers to the A packet loss occurs between the transmitting device and the detecting device.
  • the detecting device can detect the packet loss by identifying the serial number and time of the received data packet, which is simple and efficient.
  • the method may further include: when the detecting apparatus determines that M1 is greater than N1 and less than N2 and determines that T2-T1 is less than RTT, determining that the data packet with the sequence number M1 is an out-of-order message. .
  • the out-of-order message can be identified, so that the packet misdetection can be eliminated on the one hand, and the packet loss detection can be implemented more accurately.
  • the out-of-order situation can be detected, and thus the situation can be more comprehensive. Accurate detection of transmission performance.
  • the data packet with the sequence number N3 and the data packet with the sequence number M1 are two data packets successively received by the detecting device, where N3 is greater than or equal to N2.
  • the method may further include: when the detecting device determines that any one of the serial number black holes before the data packet whose M1 is less than N3 and does not belong to the sequence number M1, determining that the data packet with the sequence number M1 is corresponding The data packet of the downstream packet loss, wherein the sequence number black hole is a sequence number range in which the sequence number of the data packet received in a consecutive sequence but the sequence number is discontinuous is a boundary.
  • the detecting device can also conveniently detect the downstream packet loss, thereby implementing the transmission performance detection comprehensively and efficiently.
  • the detecting device may further determine an upstream packet loss rate in the detection period according to the number of upstream packet loss detected in the detection period after the end of one detection period, where the number of upstream packet loss is The number of data packets that have been lost between the sending device and the detecting device.
  • a method for implementing transmission performance detection is provided, the method being applied to a communication system, where the communication system includes a transmitting device, a receiving device, and the transmitting device, and the transmitting device, and the transmitting device and the transmitting device pass a connection based on a reliable transmission protocol established between the sending device and the receiving device transmits a message, and the packet is transmitted by the transmitting device; the method includes:
  • the transmitting device After receiving the data message with the sequence numbers N1 and N2 sent by the sending device through the connection, the transmitting device determines that N2 is greater than N1 and is not continuous with N1;
  • the transmission device determines that M1 is greater than N1 and is less than N2 and determines that T2-T1 is greater than or equal to the RTT
  • the data packet whose sequence number is M1 is determined to be a retransmission packet corresponding to the upstream packet loss, where T1 is the transmission.
  • the time when the device receives or sends the data packet with the sequence number N2, and T2 is the time when the transmission device receives or sends the data packet with the sequence number M1, and the RTT is the two-way between the sending device and the receiving device.
  • the delay, the upstream packet loss refers to a packet loss occurring between the sending device and the transmitting device.
  • T1 is the time when the communication unit receives the data message with the sequence number N2
  • T2 is the time when the communication unit receives the data message with the sequence number M1
  • T1 is the communication unit.
  • the time at which the data message with the sequence number N2 is transmitted, and T2 is the time at which the communication unit 710B transmits the data message with the sequence number M1.
  • the method may further include: when the transmitting device determines that M1 is greater than N1 and determines that T2-T1 is less than RTT, determining that the data packet with the sequence number M1 is a mess Preface message.
  • the data packet with the sequence number N3 and the data packet with the sequence number M1 are successive Two data messages received in succession, where N3 is greater than or equal to N2.
  • the method further includes: when the transmission device determines that any one of the serial number is not the N3 and does not belong to the data packet of the sequence number M1, determining that the data packet with the sequence number M1 is corresponding to the downstream The data packet of the packet, wherein the sequence number black hole is a sequence number range bounded by a sequence number of a data message received in a consecutive sequence but having a discontinuous sequence number.
  • a method for implementing transmission performance detection comprising: detecting, by a detection device, a sequence number of a receiving and transmitting device sent by a connection based on a reliable transmission protocol established between the sending device and a receiving device At time T3 of the data packet, when it is determined that the target confirmation message sent by the receiving device through the connection is received, the time T4 at which the detecting device receives the target confirmation message is acquired, and is calculated according to T3 and T4.
  • the target acknowledgement message is the first one received by the detecting device to indicate that the receiving device has received the serial number as The data message of K1 or the acknowledgement message of the data message after the data message whose serial number is K1.
  • the target acknowledgement message may specifically be the first included acknowledgement number field or the selective acknowledgement SACK received by the detecting device.
  • the value of the latest right boundary field of the field is greater than or equal to the acknowledgement message of K1+LenK1, where LenK1 is the payload length of the data message with sequence number K1.
  • the detecting device calculates the delay according to the time when the data packet is sent and the time when the receiving target confirms the packet, so that the delay can be detected by itself, which is simple and efficient.
  • a fourth aspect provides a method for implementing transmission performance detection, the method being applied to a communication system, where the communication system includes a transmitting device, a receiving device, and the transmitting device, and the transmitting device, and the transmitting device and the receiving device pass A connection based on a reliable transmission protocol established between the sending device and the receiving device transmits a message, and the packet is transmitted by the transmitting device.
  • the method includes: acquiring, by the transmitting device, a time T3 of receiving, by the sending device, a data packet with a sequence number K1 sent by the reliable transmission protocol based connection established between the sending device and the receiving device, Determining, when receiving the target acknowledgment message sent by the receiving device by using the connection, acquiring a time T4 at which the transmission device receives or sends the target acknowledgment message, and calculating the transmission device according to T3, T4 Receiving a two-way delay DRTT between the devices, wherein the target acknowledgement message is the first data packet or the received by the transmitting device to indicate that the receiving device has received the sequence number K1 An acknowledgement message for the data message following the data message with the sequence number K1.
  • the target acknowledgment message may specifically be the first acknowledgment number field or the selective acknowledgment SACK received by the transmission device.
  • the value of the latest right boundary field of the field is greater than or equal to the acknowledgement message of K1+LenK1, where LenK1 is the payload length of the data message with sequence number K1.
  • T4 is the time for the transmission device to send the target acknowledgement message.
  • T3 is the time for the transmission device to send the data packet with the sequence number K1
  • T4 is the time when the transmission device receives the target acknowledgement message.
  • the receiving device when the receiving device is a client device, and the sending device is a server, when the connection is established, the receiving device sends the sending device to the sending device, where Requesting to establish a request message for the connection, the sending device sending a response message of the request message to the receiving device.
  • the transmitting device receives the request message sent by the receiving device to the sending device when establishing the connection, and receives the response message sent by the sending device, and receives or sends the request message.
  • the difference between the time of requesting the message and the time of receiving or transmitting the response message is determined as a two-way delay URTT between the transmitting device and the transmitting device.
  • the difference between the time when the request message is received and the time when the response message is sent may be determined as a URTT
  • the difference between the time when the request message is sent and the time when the response message is received may be determined as a URTT.
  • a method for implementing transmission performance detection is provided, the detection method being performed by a detection device in a communication system, the communication system comprising a transmission device, a reception device, and at least one transmission device, the transmission device and the The receiving device transmits a message by using a connection based on a reliable transmission protocol established between the sending device and the receiving device, and the packet is transmitted by the at least one transmitting device, where the detecting device is the sending device or One of the at least one transmission device;
  • the method includes: the detecting device generates a detection packet, and sends the detection packet by using the connection, where the detection packet payload is empty, and includes the packet that has been sent by the communication unit in a current detection period.
  • the number of the statistics packets, Num1, and Num1 is used to determine whether packet loss has occurred in the statistical packet transmitted between the detection device and the downstream device of the detection device during the current detection period.
  • each device does not need to separately report the number of transmitted data packets when detecting the packet loss, which is simple to implement and high in efficiency.
  • a method of implementing transmission performance detection is provided, the detection method being performed by a detection device in a communication system.
  • the communication system includes a transmitting device, a receiving device, and at least one transmitting device, where the transmitting device and the receiving device transmit a message by using a connection based on a reliable transmission protocol established between the sending device and the receiving device.
  • the message is transmitted by the at least one transmission device, and the detection device is the receiving device or a transmission device between the device for generating a detection message and the receiving device in the at least one transmission device.
  • the load of the detection packet is empty, and may include the number Num1 of the number of statistical messages that have been sent through the connection in the current detection period, which is added by the device that generates the detection packet.
  • the method includes: after receiving the detection packet, the detecting device determines the number of statistically received messages Num2 that have been received through the connection in the current detection period, and Num2 is used to determine the detection device. Whether a packet has been lost in the statistical packet transmitted during the current detection period between the upstream device or the downstream device of the detecting device.
  • the detecting device may further determine, according to the Num1 and the Num2, whether the statistical packet transmitted between the device that generates the detection packet and the detection device during the current detection period is A packet loss has occurred.
  • each device does not need to separately report the number of transmitted statistical packets when detecting the packet loss, which is simple to implement and high in efficiency.
  • a method for implementing transmission performance detection is provided, the detection method being performed by a detection device in a communication system, the communication system comprising a transmission device, a reception device, and at least one transmission device, the transmission device and the The receiving device transmits a message by using a connection based on a reliable transmission protocol established between the sending device and the receiving device, and the packet is transmitted by the at least one transmitting device, where the detecting device is the sending device or One of the at least one transmission device;
  • the method includes: the detecting device generates a detection packet, and sends the detection packet by using the connection, where the detection packet load is empty, and the first detecting device generates the detection packet.
  • the time T1, T1 is used to calculate a one-way delay between the detecting device and the downstream device of the detecting device.
  • each device does not need to separately report time information for calculating a delay when detecting the delay, which is simple to implement and high in efficiency.
  • a method of implementing transmission performance detection is provided, the detection method being performed by a detection device in a communication system.
  • the communication system includes a transmitting device, a receiving device, and at least one transmitting device, where the transmitting device and the receiving device transmit a message by using a connection based on a reliable transmission protocol established between the sending device and the receiving device.
  • the message is transmitted by the at least one transmission device, and the detection device is the receiving device or a transmission device between the device for generating a detection message and the receiving device in the at least one transmission device.
  • the load of the detection packet is empty, and may include a time T1 generated by the device that generates the detection packet to generate the detection packet.
  • the method includes: after receiving the detection packet, the detecting device acquires a time T2 for receiving the detection packet, where T2 is used to calculate the detection device and an upstream device or a downstream device of the detection device. One-way delay between.
  • the detecting device may further calculate a one-way delay between the first detecting device and the second detecting device according to T1 and T2.
  • each device does not need to separately report time information for calculating a delay when detecting the delay, which is simple to implement and high in efficiency.
  • a method for implementing transmission performance detection is provided, the detection method being performed by a detection device in a communication system, the communication system comprising a transmission device, a reception device, and at least one transmission device, the transmission device and the The receiving device transmits a message by using a connection based on a reliable transmission protocol established between the sending device and the receiving device, and the packet is transmitted by the at least one transmitting device, where the detecting device is the sending device or One of the at least one transmission device;
  • the method includes: the detecting device generates a detection packet, and sends the detection packet by using the connection, where the detection packet payload is empty, and includes an identifier of the first detecting device, where the first The identifier of the detecting device is used to determine a transmission path through which the detection packet passes.
  • the transmission path through which the detection message passes can be conveniently determined, and the effective reference information can be provided for the evaluation of the transmission performance.
  • a method of implementing transmission performance detection is provided, the detection method being performed by a detection device in a communication system.
  • the communication system includes a transmitting device, a receiving device, and at least one transmitting device, where the transmitting device and the receiving device transmit a message by using a connection based on a reliable transmission protocol established between the sending device and the receiving device.
  • the message is transmitted by the at least one transmission device, and the detection device is a transmission device between the device for generating a detection message and the receiving device in the at least one transmission device.
  • the detection packet is empty, and the detection packet may include the identifier of the device for generating the detection packet added by the device for generating the detection packet, where The identifier of the device that generates the detection packet is used to determine a transmission path that the detection packet passes.
  • the method includes: after receiving the detection packet, the detecting device adds an identifier of the detecting device to the detection packet, and sends the detection packet.
  • the identifier of the detecting device is used to determine a transmission path through which the detection packet passes.
  • the transmission path through which the detection message passes can be conveniently determined, and the effective reference information can be provided for the evaluation of the transmission performance.
  • a communication system for implementing transmission performance detection includes a transmitting device, a receiving device, and at least one transmitting device, where the transmitting device and the receiving device transmit a message by using a connection based on a reliable transmission protocol established between the sending device and the receiving device.
  • the message is transmitted by the at least one transmission device.
  • the first detecting device in the communication system is configured to generate a detection packet, and send the detection packet by using the connection, where the detection packet payload is empty and includes the first detection in a current detection period.
  • the number of statistical messages sent by the device through the connection is Num1, and the first detecting device is one of the sending device or the at least one transmitting device.
  • the second detecting device in the communication system is configured to determine, after receiving the detection packet, the number of statistically received messages that the second detecting device has received through the connection during the current detection period.
  • the Num1 and the Num2 are used to determine whether packet loss is generated in the statistical packet transmitted between the first detecting device and the second detecting device in the current detection period, where the second detecting device is The receiving device is or is a transmission device between the first detecting device and the receiving device among the at least one transmitting device.
  • the second detecting device may be further configured to determine, according to the Num1 and the Num2, whether the statistical packet transmitted between the first detecting device and the second detecting device during the current detection period occurs.
  • the packet loss may be further used to calculate, according to the Num1 and the Num2, the number of the statistics packets lost between the first detecting device and the second detecting device in the current detection period, and the first detection.
  • each device does not need to report the number of transmitted data packets separately when detecting the packet loss, which is simple to implement and high in efficiency.
  • a communication system for implementing transmission performance detection includes a transmitting device, a receiving device, and at least one transmitting device, where the transmitting device and the receiving device transmit a message by using a connection based on a reliable transmission protocol established between the sending device and the receiving device.
  • the message is transmitted by the at least one transmission device.
  • the first detecting device in the communication system is configured to generate a detection packet, and send the detection packet by using the connection, where the detection packet payload is empty and the first detecting device generates the detection At time T1 of the message, the first detecting device is one of the sending device or the at least one transmitting device.
  • a second detecting device in the communication system configured to acquire a time T2 for receiving the detection packet after receiving the detection packet, where T1 and T2 are used to calculate the first detecting device and the second Detecting a one-way delay between the devices, the second detecting device being the receiving device or a transmitting device between the first detecting device and the receiving device among the at least one transmitting device.
  • each device when the time delay is detected, each device does not need to report the time information for calculating the delay, which is simple to implement and high in efficiency.
  • a communication system for implementing transmission performance detection includes a transmitting device, a receiving device, and at least one transmitting device, where the transmitting device and the receiving device transmit a message by using a connection based on a reliable transmission protocol established between the sending device and the receiving device.
  • the message is transmitted by the at least one transmission device.
  • a first detecting device in the communication system configured to generate a detection packet, and send the detection packet by using the connection, where the detection packet load is empty and includes an identifier of the first detecting device, where The first detecting device is one of the transmitting device or the at least one transmitting device.
  • the second detecting device in the communication system is configured to: after receiving the detection packet, add an identifier of the second detecting device to the detection packet, and send the detection packet, where
  • the second detecting device is a transmitting device between the first detecting device and the receiving device among the at least one transmitting device;
  • the identifier of the first detecting device and the identifier of the second detecting device are used to determine a transmission path through which the detection packet passes.
  • the transmission path through which the detection message passes can be conveniently determined, and the effective reference information can be provided for the evaluation of the transmission performance.
  • a fourteenth aspect provides a detecting device comprising a receiving unit and a processing unit.
  • the receiving unit is configured to receive a message that the sending device and the receiving device transmit to each other through a connection established by the reliable transmission protocol established between the sending device and the receiving device.
  • the processing unit is configured to: after the receiving unit successively receives the data message with the sequence numbers N1 and N2 sent by the sending device by using the connection, determine that N2 is greater than N1 and is not discontinuous with N1; After receiving the data packet with sequence number N2 and the data packet with sequence number M1, the receiving unit determines that the sequence number is M1 when it is determined that M1 is greater than N1 and less than N2 and T2-T1 is greater than or equal to RTT.
  • the data packet is a retransmission packet corresponding to the upstream packet loss, where T1 is the time when the receiving unit receives the data packet with the sequence number N2, and T2 is the receiving unit receives the data packet with the sequence number M1.
  • Time, RTT is a two-way delay between the sending device and the receiving device, and the upstream packet loss refers to a packet loss occurring between the sending device and the detecting device.
  • a fifteenth aspect provides a detecting device comprising a receiving unit and a processing unit.
  • the receiving unit is configured to receive, by the sending device and the receiving device, a message that is mutually transmitted by using a reliable transmission protocol-based connection established between the sending device and the receiving device, where the reliable transmission protocol is a transmission control protocol TCP or flow control. Transport protocol SCTP.
  • the processing unit is configured to acquire, at the time T3, that the receiving unit receives the data packet with the sequence number K1 sent by the sending device by using the connection, and is configured to determine, by the receiving unit, that the receiving device receives the When the target acknowledgment message is sent, the time T4 at which the receiving unit receives the target acknowledgment message is obtained, and the two-way delay DRTT between the detecting device and the receiving device is calculated according to T3 and T4, where
  • the target acknowledgement message is the first data received by the receiving unit to indicate that the receiving device has received the data packet with the sequence number K1 or the data packet with the sequence number K1.
  • Confirmation message of the message is the transmission control protocol TCP or the flow control transmission protocol (SCTP).
  • the target acknowledgement message may specifically be the first included acknowledgement number field or selective acknowledgement received by the receiving unit.
  • the value of the latest right boundary field of the SACK field is greater than or equal to the acknowledgement message of K1+LenK1, where LenK1 is the payload length of the data message with sequence number K1.
  • a sixteenth aspect provides a transmission device comprising a communication unit and the detection device according to the thirteenth aspect.
  • the communication unit is configured to transmit information transmitted between the sending device and the receiving device, and send the information to the detecting device, where the information includes a message transmitted by the connection and/or Or a message for establishing the connection.
  • a seventeenth aspect provides a transmission device, the transmission device being applied to a communication system, the communication system comprising a transmission device, a reception device, and the transmission device, wherein the transmission device and the reception device transmit by using the A connection based on a reliable transmission protocol established between the device and the receiving device transmits a message, and the message is transmitted by the transmission device;
  • the transmission device includes a communication unit and a processing unit;
  • the communication unit is configured to transmit a message that the sending device and the receiving device transmit to each other through the connection;
  • the processing unit is configured to: after the communication unit successively receives the data message with the sequence numbers N1 and N2 sent by the sending device by using the connection, determine that N2 is greater than N1 and is discontinuous with N1; After receiving the data packet with sequence number N2 and the data packet with sequence number M1, the communication unit determines that the sequence number is M1 when it is determined that M1 is greater than N1 and less than N2 and T2-T1 is determined to be greater than or equal to RTT.
  • the data packet is a retransmission packet corresponding to the upstream packet loss, where T1 is the time when the communication unit receives or transmits the data packet with the sequence number N2, and T2 is the communication unit receiving or transmitting the sequence number M1.
  • the time of the data packet, the RTT is a two-way delay between the sending device and the receiving device, and the upstream packet loss refers to a packet loss occurring between the sending device and the transmitting device.
  • the processing unit is further configured to: when determining that M1 is greater than N1 and determining that T2-T1 is less than RTT, determining that the data packet whose sequence number is M1 is an out-of-order report. Text.
  • the data packet with the sequence number N3 and the data packet with the sequence number M1 The text is two data packets successively received, wherein N3 is greater than or equal to N2.
  • the processing unit is further configured to: when it is determined that the M1 is less than N3 and does not belong to any one of the serial number black holes before the data packet of the sequence number M1, determine that the data packet with the sequence number M1 is corresponding to the downstream packet loss.
  • a data message, wherein the sequence number black hole is a sequence number range whose boundary is a serial number of data messages received in a consecutive sequence but whose sequence numbers are not consecutive.
  • a eighteenth aspect provides a transmission device, the transmission device being applied to a communication system, the communication system comprising a transmission device, a reception device, and the transmission device, wherein the transmission device and the reception device transmit by using the A connection based on a reliable transmission protocol established between the device and the receiving device transmits a message, and the message is transmitted by the transmission device;
  • the transmission device includes a communication unit and a processing unit;
  • the communication unit is configured to transmit a message that the sending device and the receiving device transmit to each other through the connection;
  • the processing unit is configured to acquire a time T3 when the communication unit receives or sends a data message with a sequence number K1 sent by the sending device by using the connection, and is configured to determine that the communication unit receives the receiving And acquiring, by the device, the time T4 when the communication unit receives or sends the target confirmation message, and calculating the two-way between the detecting device and the receiving device according to T3 and T4. a delay DRTT, wherein the target acknowledgement message is a first data message received by the communication unit to indicate that the receiving device has received the data packet with the sequence number K1 or the sequence number is K1. A confirmation message for the data message after the data message.
  • the target acknowledgment message may specifically be the first acknowledgment number field or the selective acknowledgment SACK received by the transmission device.
  • the value of the latest right boundary field of the field is greater than or equal to the acknowledgement message of K1+LenK1, where LenK1 is the payload length of the data message with sequence number K1.
  • the receiving device when the receiving device is a client device, and the sending device is a server, when the connection is established, the receiving device sends the device to the sending device. And in response to requesting to establish the connection request message, the sending device sends a response message of the request message to the receiving device.
  • the communication unit is further configured to receive a request message sent by the receiving device to the sending device to request to establish the connection when the connection is established, and the sending device sends the request message to the receiving device The response message of the request message; the processing unit is further configured to determine, as the sending device, a difference between a time when the communication unit receives or sends the request message and a time when the response message is received or sent. A two-way delay URTT with the transmission device.
  • the processing unit may determine, as a URTT, a difference between a time when the communication unit receives the request message and a time when the response message is sent, where the communication unit may send the request message The difference from the time at which the response message is received is determined to be URTT.
  • a nineteenth aspect provides a detecting device, the detecting device being applied to a communication system, the communication system comprising a transmitting device, a receiving device and at least one transmitting device, wherein the transmitting device and the receiving device transmit by using the transmitting device And transmitting, by the device and the receiving device, a connection based on a reliable transmission protocol, the message is transmitted by the at least one transmission device, where the detection device is the sending device or the at least one transmission device one of.
  • the detecting device includes a communication unit and a processing unit.
  • the communication unit is configured to transmit a message through the connection.
  • the processing unit is configured to generate a detection packet, and send the detection packet by using the communication unit, where the detection packet payload is empty, and includes statistics that have been sent by the communication unit in a current detection period.
  • the number of packets Num1 and Num1 is used to determine whether packet loss has occurred in the statistical packet transmitted between the detecting device and the downstream device of the detecting device during the current detection period.
  • a twentieth aspect provides a detecting device, the detecting device being applied to a communication system, the communication system comprising a transmitting device, a receiving device, and at least one transmitting device, wherein the transmitting device and the receiving device transmit by using the And transmitting, by the device and the receiving device, a connection based on a reliable transmission protocol, the message is transmitted by the at least one transmission device, where the detection device is the receiving device or the at least one transmission device The transmission device between the device for generating the detection packet and the receiving device, where the load of the detection packet is empty;
  • the communication unit is configured to transmit a message by using the connection
  • the processing unit is configured to determine, after receiving the detection message, the number of statistical messages Num2 that the communication unit has received through the connection in the current detection period, and Num2 is used to determine the Whether the packet being transmitted in the current detection period between the detecting device and the upstream device or the downstream device of the detecting device has lost packets.
  • a twenty-first aspect provides a detecting device, the detecting device being applied to a communication system, the communication system comprising a transmitting device, a receiving device, and at least one transmitting device, wherein the transmitting device and the receiving device pass the a reliable transmission protocol-based connection transmission message established between the transmitting device and the receiving device, the message being transmitted by the at least one transmission device, the detecting device being the transmitting device or the at least one transmitting device one of the;
  • the detecting device includes a communication unit and a processing unit.
  • the communication unit is configured to transmit a message through the connection.
  • the processing unit is configured to generate a detection packet, and send the detection packet by using the communication unit, where the detection packet load is empty, and the time T1 that the first detecting device generates the detection packet is T1 is used to calculate a one-way delay between the detecting device and a downstream device of the detecting device.
  • a twenty-second aspect provides a detecting device, the detecting device being applied to a communication system, the communication system comprising a transmitting device, a receiving device, and at least one transmitting device, wherein the transmitting device and the receiving device pass the a reliable transmission protocol-based connection transmission message established between the transmitting device and the receiving device, the message being transmitted by the at least one transmission device, the detecting device being the receiving device or the at least one transmission
  • the device is located between the device for generating the detection message and the transmission device between the receiving device.
  • the load of the detection packet is empty, and may include a time T1 generated by the device that generates the detection packet to generate the detection packet.
  • the detecting device includes a communication unit and a processing unit.
  • the communication unit is configured to transmit a message through the connection.
  • the processing unit is configured to: after receiving the detection packet, obtain a time T2 for receiving the detection packet, where T2 is used to calculate between the detection device and an upstream device or a downstream device of the detection device. One-way delay.
  • the detecting device may further calculate a one-way delay between the first detecting device and the second detecting device according to T1 and T2.
  • a twenty-third aspect provides a detecting device, wherein the detecting device is applied to a communication system, the communication system comprising a transmitting device, a receiving device, and at least one transmitting device, wherein the transmitting device and the receiving device pass the a reliable transmission protocol-based connection transmission message established between the transmitting device and the receiving device, the message being transmitted by the at least one transmission device, the detecting device being the transmitting device or the at least one transmitting device one of the;
  • the detecting device includes a communication unit and a processing unit.
  • the communication unit is configured to transmit a message through the connection.
  • the processing unit is configured to generate a detection packet, and send the detection packet by using the communication unit, where the detection packet payload is empty, and includes an identifier of the first detecting device, and the first detecting device The identifier of the identifier is used to determine a transmission path through which the detection packet passes.
  • a twenty-fourth aspect provides a detecting device, the detecting device being applied to a communication system, the communication system comprising a transmitting device, a receiving device, and at least one transmitting device, wherein the transmitting device and the receiving device pass the a reliable transmission protocol-based connection transmission message established between the transmitting device and the receiving device, the message being transmitted by the at least one transmission device, where the detecting device is located in the at least one transmission device for generating A transmission device between the device that detects the message and the receiving device.
  • the detection packet is empty, and the detection packet may include the identifier of the device for generating the detection packet added by the device for generating the detection packet, where The identifier of the device that generates the detection packet is used to determine a transmission path that the detection packet passes.
  • the detecting device includes a communication unit and a processing unit.
  • the communication unit is configured to transmit a message through the connection.
  • the processing unit is configured to add an identifier of the detecting device to the detection packet after receiving the detection packet, and send the detection packet.
  • a detection apparatus comprising a transceiver, a processor, and a memory.
  • the transceiver is configured to receive information transmitted between the transmitting device and the receiving device, and transmit the information to the processor, where the information includes a reliable connection established between the sending device and the receiving device A message transmitted by the connection of the transport protocol, and/or a message used to establish the connection.
  • the transceiver may specifically be a network card.
  • the memory is configured to store computer operating instructions.
  • the processor is configured to execute computer operating instructions stored in the memory such that the detecting device performs the method provided by the first aspect or the second aspect of the present invention.
  • a transmission device comprising a transceiver, a processor, and a detection device as provided in the twenty-first aspect of the invention.
  • the transceiver is configured to receive information transmitted between the transmitting device and the receiving device, and transmit the information to the processor, where the information includes a reliable connection established between the sending device and the receiving device A message transmitted by the connection of the transport protocol, and/or a message used to establish the connection.
  • the transceiver may specifically be a network card.
  • the processor is configured to transmit the information to the detecting device.
  • a transmission device comprising a transceiver, a processor, and a memory.
  • the transceiver is configured to receive information transmitted between the transmitting device and the receiving device, and transmit the information to the processor, where the information includes a reliable connection established between the sending device and the receiving device A message transmitted by the connection of the transport protocol, and/or a message used to establish the connection.
  • the transceiver may specifically be a network card.
  • the memory is configured to store computer operating instructions.
  • the processor configured to execute computer operating instructions stored in the memory, to cause the transmitting device to perform the method provided by the first aspect or the second aspect of the present invention.
  • a detecting device being applied to a communication system, the communication system comprising a transmitting device, a receiving device and at least one transmitting device, wherein the transmitting device and the receiving device pass through a reliable transmission protocol-based connection transmission message established between the sending device and the receiving device, the message being transmitted by the at least one transmission device, the detecting device being the transmitting device or the at least one transmission One of the devices.
  • the detection device includes a transceiver, a processor, and a memory.
  • the memory is configured to store computer operating instructions.
  • the processor configured to execute computer operating instructions stored in the memory, such that the transmitting device performs the method provided by any one of the third, fifth, and seventh aspects of the present invention, wherein the processor The message is received and transmitted by the transceiver.
  • a detection device is provided, the detection device being applied to a communication system, the communication system comprising a transmission device, a reception device and at least one transmission device, wherein the transmission device and the reception device pass through a reliable transmission protocol-based connection transmission message established between the transmitting device and the receiving device, the message being transmitted by the at least one transmission device, the detecting device being the receiving device or the at least one
  • the transmission device is located in the transmission device between the device for generating the detection message and the receiving device, and the load of the detection message is empty.
  • the detection device includes a transceiver, a processor, and a memory.
  • the memory is configured to store computer operating instructions.
  • the processor configured to execute computer operating instructions stored in the memory, such that the transmitting device performs the method of any of the fourth, sixth, and eighth aspects of the present invention, wherein the processor The message is received and transmitted by the transceiver.
  • a computer readable storage medium is provided, the instructions being stored in a computer readable storage medium, when executed on a computer, causing the computer to perform the methods described in the above aspects.
  • a computer program product comprising instructions which, when run on a computer, cause the computer to perform the methods described in the above aspects.
  • FIGS. 1A and 1B are schematic diagrams showing a networking structure of a communication system 100 according to an embodiment of the present invention
  • FIGS. 2A and 2B are schematic flowcharts of a method according to Embodiment 1 of the present invention.
  • 3A and 3B are schematic flowcharts of a method according to Embodiment 2 of the present invention.
  • FIG. 1A is a schematic diagram of a networking structure of a communication system 100 according to an embodiment of the present invention.
  • the communication system 100 includes a first communication device 110, at least one transmission device 120, and a second communication device 130.
  • a connection based on a reliable transmission protocol can be established between the first communication device 110 and the second communication device 130, and a message is transmitted through the connection, and a message transmitted through the connection is transmitted via the at least one transmission device 120.
  • the reliable transmission protocol may specifically be TCP, SCTP, or the like.
  • the packet includes a data packet and an acknowledgement packet, such as an ACK packet, for confirming the data packet.
  • the data packet is usually a packet carrying communication data.
  • one of the first communication device 110 and the second communication device 130 (hereinafter referred to as the communication device A) sends an acknowledgement message to the other communication device (hereinafter referred to as the communication device B) through the connection.
  • the acknowledgment message may also be used as the acknowledgment message sent by the communication device A to the communication device B as the data message sent by the communication device B to the communication device A.
  • the communication device B usually informs the communication device A that the data message has been received through the confirmation message. If the data message is lost, the communication device A usually The data message will be retransmitted.
  • the sequence number of the data packet sent by the communication device A to the communication device B through the connection meets a certain rule.
  • the reliable transmission protocol is TCP or SCTP
  • the sequence number of the latter data packet is equal to the sequence number of the previous data packet plus the payload length of the previous data packet.
  • the communication device A may also send a message carrying the communication data to the communication device B through the connection, and the payload length of the message not carrying the communication data is 0.
  • the sequence number of the subsequent message (which may be a data message or a message that does not carry communication data) is equal to the previous message ( It may be a serial number of a data packet or a packet that does not carry communication data plus the payload length of the previous packet. Since the payload of the packet carrying the communication data has a payload length of 0, when the communication device A transmits both the data packet and the packet carrying the communication data to the communication device B through the connection, any two adjacent two are adjacent.
  • the data packet also conforms to the rule that the serial number of the latter data packet is equal to the sequence number of the previous data packet plus the payload length of the previous data packet.
  • the communication device B For any message sent by the communication device A to the communication device B that does not carry the communication data, the communication device B usually does not notify the communication device A that the message has been received through the confirmation message, and if the message is lost, the communication is Device A usually does not retransmit the message.
  • Both the first communication device 110 and the second communication device 130 can be terminals or servers.
  • the first communication device is a video terminal, such as a set top box (STB)
  • the second communication device is a video server, such as a network protocol television (IPTV) head end.
  • IPTV network protocol television
  • the first communication device and the second communication device are both call terminals.
  • the transmission device 120 may specifically include a home gateway, a core router (CR), a broadband network gateway (BNG), an optical line terminal (OLT), and a broadband remote access server (Broadband Remote Access Server). , BRAS) and other equipment.
  • CR core router
  • BNG broadband network gateway
  • ONT optical line terminal
  • Broadband Remote Access Server Broadband Remote Access Server
  • a data message (such as a message encapsulating video data) sent by one of the first communication device 110 and the second communication device 130 (hereinafter referred to as a transmitting device) is transmitted to the other party via the transmission device 120 (hereinafter referred to as receiving)
  • the device sends an acknowledgment message sent by the receiving device for confirming the received data message to the first communication device 110 via the transmission device 120.
  • the communication system 100 may specifically be an IPTV system as shown in FIG. 1B.
  • the sending device (such as the first communications device 110) is specifically an IPTV head end, and the receiving device is specifically a set top box.
  • Embodiments 1-3 of the present invention are described below in conjunction with Figs. 2A/2B and 3A/3B and 4, respectively.
  • the method of Embodiments 1-3 of the present invention can be applied to the communication system 100 as shown in FIGS. 1A and 1B.
  • the first communication device and the second communication device establish a connection based on a reliable transmission protocol (such as TCP), and transmit the message through the connection.
  • a reliable transmission protocol such as TCP
  • the first communication device and the second communication device may be that one of the first communication device and the second communication device sends a data message to another communication device, and may also be the first communication device and the second The communication device sends data packets to the other party.
  • the communication device that transmits the data message in the first communication device and the second communication device is hereinafter referred to as a transmitting device, and the other communication device is referred to as a receiving device.
  • the first communication device is an STB
  • the second communication device is an IPTV head end
  • the IPTV head end sends a video stream to the STB
  • the IPTV head end is referred to as a transmitting device
  • the STB is referred to as a receiving device.
  • the first communication device and the second communication device are both call devices, and both can send data messages to the other party.
  • the first communication device is referred to as a transmitting device
  • the second communication device is referred to as a receiving device.
  • the transmission performance detection is performed based on the data message sent by the second communication device to the first communication device
  • the second communication device is referred to as a transmitting device
  • the first communication device is referred to as a receiving device.
  • a detecting device for realizing transmission performance detection may be deployed in a communication system, and the detecting device may be implemented by software, hardware, firmware, or any combination thereof.
  • the detection device can be built in a transmission device in the communication system, and correspondingly, the detection device receives the message through the transmission device in which the detection device is located. If the detecting device is implemented by hardware, the processor of the device where the detecting device is located can send the received message to the detecting device by mirroring.
  • the detecting device can also be connected to any device of the communication system and obtain the message transmitted on the device connected to the detecting device by mirroring.
  • the detecting device may obtain the packet transmitted by the first communication device and the second communication device by using the connection, and perform transmission performance detection according to the obtained packet.
  • packet loss between the sending device and the detecting device may be used to indicate that the sending device and the device where the detecting device is located or the device that is connected to the device
  • the packet loss occurs between the transmitting device and the detecting device according to Embodiments 1 and 2 of the present invention, and may be used to indicate the device or the device where the transmitting device and the detecting device are located.
  • the delay between hanging devices may be used to indicate that the sending device and the device where the detecting device is located or the device that is connected to the device.
  • packet loss between the detecting device and the receiving device may be used to indicate that the device where the detecting device is located or between the device that is connected and the receiving device A packet loss occurs, and the delay between the detecting device and the receiving device in the embodiment of the present invention may be used to indicate that the device where the detecting device is located or between the device that is connected and the receiving device Delay.
  • the detecting device described in the following embodiments 3, 7-8, and 12-13 may be any device in the communication system, such as a transmitting device, a transmitting device, or a receiving device.
  • Upstream packet loss Packet loss occurring between the sending device and the detecting device, which can be used to indicate the packet loss occurring between the sending device and the device where the detecting device is located, or the device connected to the transmitting device and the detecting device. A packet loss occurred between.
  • Downstream packet loss packet loss occurring between the detecting device and the receiving device, specifically for indicating packet loss occurring between the device where the detecting device is located and the receiving device, or detecting the device and the receiving device connected to the device A packet loss occurred between.
  • Embodiment 1 of the present invention is schematic flowcharts of a method according to Embodiment 1 of the present invention, which can implement packet loss detection.
  • the detecting means may be built in or hanged on any of the transmitting devices as in the communication system 100.
  • the method provided in Embodiment 1 of the present invention includes the following steps.
  • FIG. 2A only the detecting device is hanged on the transmission device as an example, and the transmitting device connected to the detecting device mirrors the received message to the detecting device. There may be no particular order between the steps sent to the receiving device.
  • Step 201 After receiving the data packets with the sequence numbers N1 and N2 sent by the sending device through the connection, the detecting device determines that N2 is greater than N1 and is not continuous with N1.
  • N1 and N2 are serial numbers of two adjacent data packets, N1 and N2 are considered to be continuous; otherwise, N1 and N2 are considered to be discontinuous.
  • N2 is equal to N1+LenN1, where LenN1 is the payload length of the data message with sequence number N1.
  • N1 and N2 are considered to be discontinuous, that is, data packets with sequence numbers N1 and N2 are not adjacent data messages.
  • the sending device may also send a packet that does not carry communication data, such as a control packet, by using the connection.
  • the detecting device may also identify the data packet.
  • the reliable transmission protocol is TCP or SCTP
  • the payload of the packet carrying the communication data has a payload length of 0, and the detecting device may specifically identify the data packet according to the payload length of the received packet.
  • the detecting device first receives a data packet with a sequence number of 2001 and a payload length of 1000, and the serial number of the next data packet that is currently expected to be received is 3001 (ie, 2001+1000), if the serial number is currently received.
  • a data message of 5001, that is, a data message with sequence number 3001 and a data message with sequence number 4001 are not received before receiving the data message with sequence number 5001.
  • the sequence numbers of the two data packets received in this sequence are not continuous. For example, two consecutive data packets are 2001 and 5001 respectively, which may be called a black hole phenomenon.
  • the sequence number range in which the serial number of the data message received in a consecutive sequence but the serial number is not continuous is called the serial number black hole, and the sequence number ranged from 2001 and 5001 is (2001,5001).
  • the serial number range is an open interval, and does not include a boundary value.
  • the data packets whose sequence numbers are located between the two consecutively received data packets such as the data packets with sequence numbers 3001 and 4001, may be referred to as black hole messages.
  • a black hole message may be an out-of-order message or a re-transmission message.
  • the detecting means detects a sequence number black hole between the sequence number N1 and the sequence number N2 (i.e., a sequence number black hole bordered by N1 and N2).
  • Step 202 After receiving the data packet with the sequence number N2, the detecting device receives the data packet with the sequence number M1, and determines whether M1 is greater than N1 and less than N2, that is, whether M1 belongs to N1 and N2.
  • the serial number of the boundary is a black hole.
  • the data packet whose sequence number is M1 is a data packet in the black hole of the sequence number bounded by N1 and N2
  • the data packet whose sequence number is M1 may be an out-of-order report.
  • the text may also be a retransmission message corresponding to the upstream packet loss.
  • the two data packets that are consecutively received in step 201 are 2001 and 5001, respectively, that is, N1 is 2001, and N2 is 5001.
  • the data packet with sequence number 3001 is received (that is, M1 is 3001). )
  • the data message with serial number 3001 is a data message in the black hole of the serial number with the boundary between 2001 and 5001.
  • the sequence number of the latest received data message before the receipt of the data packet with the sequence number M1 is N3, that is, the data message with the sequence number N3 and the data message with the sequence number M1 are successively received. , where N3 is greater than or equal to N2. If the M1 is smaller than the N3, the data packet whose sequence number is M1 may be initially determined to be an out-of-order message or a retransmission message.
  • the data packet whose sequence number is M1 is determined to be a data packet in the black hole of the sequence number bounded by N1 and N2, which may be an out-of-order packet or a corresponding upstream packet loss. Retransmission message. If M1 does not belong to any black hole of the sequence number before the data message with the sequence number M1, that is, M1 is not between N1 and N2, and does not fall in other black hole of the sequence number, the data with the sequence number M1 can be determined.
  • the packet is a retransmission packet corresponding to the downstream packet loss, that is, the data packet with the sequence number M1 sent by the sending device is lost between the detecting device and the receiving device, and the currently received sequence is received.
  • the data packet numbered M1 is a retransmission packet.
  • N3 may be equal to N2, and there may be no transmission process for the data message with sequence number N3 in FIG. 2A.
  • step 203 determines whether the data packet whose sequence number is M1 is an out-of-order message or a retransmission message corresponding to the upstream packet loss.
  • Step 203 The detecting device determines whether the T2-T1 is greater than or equal to the RTT. If the T2-T1 is greater than or equal to the RTT, the data packet whose sequence number is M1 is determined to be a retransmission packet corresponding to the upstream packet loss, that is, the sending The data packet with the sequence number M1 sent by the device has been lost between the sending device and the detecting device. The currently received data packet with the sequence number M1 is a retransmitted message.
  • T1 is the time when the detecting device receives the data message with the sequence number N2
  • T2 is the time when the detecting device receives the data message with the sequence number M1
  • the RTT is the sending device and the receiving device. Two-way delay between. For specific determination of the RTT, reference may be made to the specific embodiment in Embodiment 2 below.
  • the number of upstream packet loss can be increased by one, and the total number of packet loss can be increased by one.
  • T2-T1 is smaller than RTT, it is determined that the data packet whose sequence number is M1 is an out-of-order message. Since the out-of-order message can be identified, the packet misdetection can be eliminated on the one hand, and the packet loss detection can be implemented more accurately, and the out-of-order situation can be detected on the other hand, thereby enabling more complete and accurate transmission. Performance testing.
  • the data packet whose sequence number is M1 is determined to be the retransmission packet corresponding to the upstream packet loss
  • the data packet whose sequence number is M2 can be directly determined to be the weight of the corresponding upstream packet loss.
  • the time when the detecting device receives the data message with the sequence number M2 is taken as T2, and the data message whose sequence number is M2 is determined by step 203.
  • the time at which the detecting device receives the data message with the sequence number W can be passed as T2 for each data message falling in the black hole of the sequence number (assuming the sequence number is W).
  • the method may further include step 204.
  • Step 204 The detecting device counts the packet loss indicator in the detection period after the end of one detection period.
  • step 204 one or more of an upstream packet loss rate UPLR, a downstream packet loss rate DPLR, and an overall packet loss rate TPLR may be counted.
  • an overall packet loss rate TPLR in the detection period Determining, according to the total number of lost packets TLNum in the detection period, an overall packet loss rate TPLR in the detection period, where the total number of lost packets is lost between the sending device and the receiving device
  • the downstream packet loss rate DPLR in the detection period is determined according to the number of downstream packet loss DLNum in the detection period, where the number of downstream packet loss is in the detection device and the The number of data packets that have been lost between the receiving devices.
  • the detecting device can detect the lost packet by identifying the serial number and time of the received data packet, which is simple and efficient.
  • Embodiment 2 of the present invention are schematic flowcharts of a method according to Embodiment 2 of the present invention, which can implement time delay detection.
  • the detecting means may be built in or hanged on any of the transmitting devices as in the communication system 100.
  • the method provided in Embodiment 2 of the present invention includes the following steps.
  • Step 301 The detecting device acquires the time T3 of the data packet with the sequence number K1 sent by the receiving device through the connection based on the reliable transmission protocol established between the sending device and the receiving device.
  • the detecting device may acquire the time for receiving the current data packet every other preset duration, for example, obtaining the time for receiving the current data packet every 10 seconds.
  • the detecting device may also acquire the time for receiving the current data message at a specified time or when receiving the detection instruction.
  • the data packet with the sequence number 2001 is received, and the time T3 for receiving the data packet is obtained.
  • Step 302 The detecting device acquires a time T4 when the detecting device receives the target confirmation message by receiving the target confirmation message sent by the receiving device by using the connection, and calculates the time according to T3 and T4. a two-way delay DRTT between the detecting device and the receiving device, wherein the target acknowledgement message is the first one received by the detecting device to indicate that the receiving device has received the serial number as K1 The data message or the acknowledgement message of the data message after the data message whose serial number is K1.
  • the target acknowledgement message may specifically be the first included acknowledgement number field or selective acknowledgement received by the detecting device (Selective Acknowledgment)
  • the value of the latest right edge field of the SACK field is greater than or equal to the acknowledgement message of K1+LenK1, where LenK1 is the payload length of the data message with sequence number K1.
  • the confirmation number is carried by the Acknowledgment Number field of the acknowledgement message.
  • the target acknowledgement message is usually the first received by the detecting device.
  • the value of the included confirmation number field is greater than or equal to the confirmation message of K1+LenK1.
  • the target acknowledgement message is usually the first received by the detecting device.
  • the value of the latest right boundary field of the included SACK field is equal to the acknowledgement message of K1+LenK1, and the value of the latest right boundary field of the first included SACK field received by the detecting device may be greater than K1+LenK1. Confirm the message.
  • the target acknowledgement message is usually an acknowledgement message whose value of the latest right boundary field of the first included SACK field received by the detecting device is greater than K1+LenK1.
  • the adjacent data message before the sequence number K1 is a data message with a sequence number of K2 and a load length of LenK2.
  • the acknowledgment number carried in the acknowledgment message for confirming the data message K2 before the data packet of the sequence number K1 may specifically be K1 (ie, K1 is equal to K2+LenK2).
  • the acknowledgement message carrying the acknowledgement number K1 sent by the receiving device to the sending device is used to indicate that the data packet with the sequence number K2 has been received. If the receiving device does not receive the data packet with the sequence number K1 within the predetermined time, the acknowledgment message with the acknowledgment number K1 (hereinafter referred to as the duplicate acknowledgment message) is sent again until the sequence number is K1. Data message.
  • the SACK field of the duplicate acknowledgement packet may carry a data packet indicating that the received sequence number is greater than K1.
  • Information For example, the receiving device receives the data packets with sequence numbers 1001, 3001, 4001, 5001, 7001, and 8001, and does not receive the data packet with the sequence number 2001 before receiving the data packet with the sequence number 8001.
  • the acknowledgement number of the repeated acknowledgement message sent is 2001, and is used to confirm that the data packet with the sequence number 1001 has been received.
  • the SACK field of the duplicate acknowledgement message includes [8001 9001] and [4001 6001], where The left boundary is 8001 and the right boundary is 9001 [8001 9001].
  • the left boundary is 4001 and the right boundary is 6001 [4001 6001] is used to confirm the serial number is 3001. Data messages of 4001 and 5001 have been received, where 9001 is the value of the latest right boundary field.
  • the detecting apparatus detects the latest right boundary field of the SACK field in the duplicate acknowledgement message after receiving the duplicate acknowledgement message.
  • the value, once it is detected that the value of the latest right boundary field is greater than or equal to the acknowledgement message of K1+LenK1, may be based on the time of receiving the data message with the sequence number K1 and the time of receiving the detected duplicate acknowledgement message.
  • a two-way delay DRTT between the detecting device and the receiving device is calculated.
  • Step 303 Calculate a two-way delay DRTT between the detecting device and the receiving device according to T3 and T4.
  • the two-way delay between the detecting device and the receiving device is generally referred to as a downstream two-way delay.
  • the detecting device may directly calculate the DRTT in step 303 according to T3 and T4 in one detecting process, and specifically may use the difference between T3 and T4 as the DRTT; or may perform the step before step 303 multiple times in one statistical time period.
  • the two-way delay URTT (commonly referred to as upstream two-way delay) between the transmitting device and the detecting device may also be calculated in the following manner.
  • one of the devices is sent as a client to another device for requesting to establish the connection.
  • the request message the other device acts as a server to reply the response message of the request message to the client.
  • the request message may specifically be a SYN message, and correspondingly, the response message may be a SYN ACK message.
  • the detecting device may receive a request message and a response message for establishing the connection, and may be according to a time T5 when the request message is received
  • the time T6 of receiving the response message calculates a delay between the server and the detecting device, and specifically, the difference between T5 and T6 may be determined as a delay between the server and the detecting device. If the transmitting device is the server, the determined delay between the server and the detecting device is URTT.
  • the detecting device calculates the delay according to the time of sending the data packet and the time of receiving the target confirmation packet, so that the delay can be detected by itself, which is simple and efficient.
  • Embodiment 1 and Embodiment 2 can be implemented in combination.
  • the RTT of step 203 of the embodiment 1 may be specifically calculated according to the implementation manner of the embodiment 2.
  • the detecting device when the detecting device is built in the transmitting device, information (such as data) transmitted between the transmitting device and the receiving device received by the detecting device in Embodiments 1 and 2 of the present invention is as described.
  • the message, the acknowledgment message, the request message, and the response message are hereinafter referred to as the information A).
  • the time when the detecting device receives the information A according to the embodiments 1 and 2 of the present invention may specifically be received by the transmitting device where the detecting device is located. Or the time when the message A was sent.
  • the time when the detecting device in the first and second embodiments of the present invention receives the information A is usually the time when the device in which the detecting device is located receives the information A.
  • the detecting device may use the time when the information A arrives at the detecting device as the time when the detecting device receives the information A, or the time when the transmitting device where the detecting device is located receives the information A as the detecting. The time at which the device receives the message A.
  • the time when the detecting device according to the first and second embodiments of the present invention receives the information A is usually the time when the device in which the detecting device is located transmits the information A.
  • the detecting device may use the time when the information A arrives at the detecting device as the time when the detecting device receives the information A, or the time when the transmitting device where the detecting device is located transmits the information A as the detecting device. The time when the message A was received.
  • Embodiment 4 is a schematic flowchart of a method according to Embodiment 3 of the present invention, which can implement packet loss detection and delay detection.
  • the detecting method is applied to a communication system, and the communication system includes a transmitting device, a receiving device, and at least one transmitting device, and the transmitting device and the receiving device are based on reliability established between the transmitting device and the receiving device
  • the connection of the transport protocol transmits a message, the message being transmitted by the at least one transmission device.
  • the method provided in Embodiment 3 of the present invention includes the following steps.
  • Step 401 The first detecting device generates a detection packet, and sends the detection packet through the connection, where the detection packet load is empty, and the detection packet includes the first detection device in the current detection period.
  • the number of statistical messages sent by the connection Num1.
  • the first detecting device may specifically be the sending device; or any transmitting device between the sending device and the receiving device, such as a CR. If the first detecting device is a transmitting device, the Num1 is specifically the number of the statistics packets that the first detecting device has transmitted through the connection in the current detecting period.
  • the first detecting device may periodically generate a detection packet, where the current detection period may be a time between the last detection packet and the current detection packet. If the detection packet is to be generated after the packet with the sequence number J1 is sent according to the detection period, the generated sequence number of the detection packet may be J1+LenJ1, and the report with the sequence number J1 may be sent. The detection message is sent after the text.
  • the statistic packet may be all the packets or partial packets sent by the first detecting device to the receiving device by using the connection.
  • the packet sent by the first detecting device to the receiving device includes a data packet, and may also include a packet that does not carry communication data, such as a control packet.
  • the first detecting device may count the number of all the packets that have been sent to the receiving device through the connection in the current detecting period, that is, the counted packets include all types of packets, and the first detecting When the device counts the number of sent packets, the device does not distinguish the type of packets.
  • the first detecting device may also count the number of preset types of packets (such as data packets) that have been sent to the receiving device through the connection in the current detection period, that is, the statistics packet is pre- Set the type of message.
  • Step 402 The second detecting device receives the detection packet, and determines the number of statistically received messages Num2, Num1 and Num2 that have been received through the connection in the current detection period, and is used to determine the first detecting device and Whether the packet is transmitted in the statistical packet transmitted during the current detection period between the second detecting devices.
  • the second detecting device may specifically be any receiving device, such as an OLT, between the receiving device or the first detecting device and the receiving device.
  • the second detecting device is a transmitting device between the first detecting device and the receiving device
  • Num2 is specifically that the second detecting device has been transmitted through the connection during the current detecting period. The number of statistics messages.
  • the first detecting device in step 401 counts the number of all the messages that have been sent to the receiving device through the connection in the current detection period, and correspondingly, in step 402.
  • the second detecting device counts the number of all the packets that have been received through the connection in the current detection period, that is, the second detecting device compares the number of received packets to the packet. Type does not distinguish.
  • the first detecting device in step 401 counts the number of preset types of packets that have been sent to the receiving device through the connection in the current detection period, and correspondingly, The second detecting device in step 402 counts the number of the preset types of packets that have been received through the connection in the current detection period.
  • step 403 may be performed to determine, according to Num1 and Num2, whether the statistical packet transmitted between the first detecting device and the second detecting device during the current detection period has occurred. Lose the package. Further, the number of lost packets LNum in the current detection period between the first detecting device and the second detecting device may be calculated according to Num1 and Num2, where Num1 is greater than Num2, and specifically, Num1 and Num2 may be used. The difference is taken as LNum. In addition, the packet loss ratio between the first detecting device and the second detecting device may be calculated according to Num1 and Num2, such as the ratio of LNum and Num1 as the first detecting device and the second detecting device. The rate of packet loss between.
  • step 404 may be further performed to add Num2 to the detection packet, and send the device.
  • the detection packet that is, the detection packet sent includes Num2.
  • Step 403 and step 404 may both be performed, or only one of the steps may be performed. When both are executed, there may be no particular order between step 403 and step 404. If the step 404 is not performed, when the second detecting device is a transmitting device between the first detecting device and the receiving device, the received detection packet may be directly sent out.
  • the first detecting device refers to a device that generates a detection packet
  • the second detecting device receives the detection packet and adds detection data (such as Num2) to the detection packet.
  • the second detecting device may have one or more. When there are multiple second detecting devices, each second detecting device performs step 402 when receiving the detecting message.
  • each device when the device detects the packet loss, each device does not need to report the number of the transmitted statistics packets, which is simple and efficient.
  • the first detecting device may further add a time T1 at which the first detecting device generates the detection packet to the detection packet.
  • the second detecting device may further acquire a time T2 for receiving the detection message after receiving the detection message, where T1 and T2 are used to calculate the first detecting device and A one-way delay between the second detecting devices.
  • the second detecting device may calculate a one-way delay between the first detecting device and the second detecting device according to T1 and T2, and specifically, the difference between T1 and T2 may be used as the one-way Delay.
  • T2 may be added to the detection packet before sending the detection packet.
  • each device When the time delay is detected in the third embodiment of the present invention, each device does not need to report the timestamp separately, which is simple to implement and high in efficiency.
  • the first detecting device may further add the identifier Id1 of the first detecting device to the detection packet.
  • the second detecting device when the second detecting device is a transmitting device between the first detecting device and the receiving device, the second detecting may be performed before sending the detecting message.
  • the identifier Id2 of the device is added to the detection packet.
  • the identifier of the first detecting device and the identifier of the second detecting device may be used to determine a transmission path through which the detection packet passes.
  • the first detecting device and the second detecting device may further add a sequence number of the identifier of the device in the identifier list in the detection packet to the detection packet, for example, the first detection The device adds the sequence number 01 of the device to the detection packet, and the first second detection device (that is, the first detection device that receives the detection packet) adds the serial number 02 of the device to the device.
  • the second second detecting device ie, the second detecting device that receives the detection packet
  • the path through which the detection message passes can also be determined, so that the transmission performance can be evaluated more comprehensively and accurately.
  • the reliable transmission protocol is the TCP protocol
  • the information such as the quantity, the time, the identifier, and the like may be carried in the extended TCP option field in the detection packet.
  • the detection packet reaches a certain second detection device, if the length of the TCP Option of the detection packet exceeds the limit of the TCP Option, a detection packet having the same sequence number and the load is empty may be generated. Add the quantity, time, and ID information obtained by the device to the newly generated detection packet.
  • the first detecting device and the second detecting device may respectively count the number of statistical messages that have been received or sent in the current detection period, the time at which each of the detection messages is generated or received, and the device. Any combination of one or more of the identifications is added to the detection message.
  • the CR generates a detection packet and adds the number of the transmitted packets in the current detection period to the detection packet, and the BRAS and the OLT respectively transmit the detected packet within the current detection period after receiving the detection packet.
  • the number of packets is added to the detection message.
  • the other device or the receiving device can use the number of packets respectively added by the CR, the BRAS, and the OLT to determine whether packet loss occurs between any two devices in the CR, the BRAS, and the OLT, and how many packets are lost.
  • Any device in the BRAS and OLT (such as the OLT) can also calculate whether packet loss occurs between a certain upstream device (such as CR or BRAS) and the device, and how many packets are lost.
  • the CR generates a detection packet and adds a time for generating the detection packet to the detection packet, and the BRAS and the OLT respectively add the time for receiving the detection packet to the detection packet after receiving the detection packet.
  • the other device or the receiving device can calculate the delay between any two of the CR, the BRAS, and the OLT by using the time respectively added by the CR, the BRAS, and the OLT.
  • Any device in the BRAS and OLT (such as an OLT) can also calculate the delay between an upstream device (such as a CR or BRAS) and the device.
  • the CR generates a detection packet and adds the identifier of the device to the detection packet, and the BRAS and the OLT respectively add the identifier of the device to the detection packet after receiving the detection packet. Then, the other device or the receiving device may use the identifier list carried by the detection packet to determine a transmission path that the detection packet passes. Any device in the BRAS and the OLT (such as an OLT) may also determine a transmission path that the detection message has passed before reaching the device.
  • the sending device may be used as the second detecting device, and all devices between the sending device and the receiving device are used as the second detecting device, and the receiving may further be performed.
  • the device also acts as the second detection device.
  • the TCP connection between the sending device and the receiving device passes through three detection points, which are CR, Bras and OLT in sequence, and the three detection points detect the data stream sent by the sending device through the TCP connection.
  • the CR inserts a detection packet between the transmitted packets according to the preset time interval. For example, after the packet with the sequence number 3001, the detection packet with the sequence number 4001 and the payload length of 0 is inserted, and the detection packet is The field of the TCP Option includes the device number 0 of the CR (the identifier is the first detection point), the device identifier CR1, the local time when the detection message is generated 2345678, and the time from the generation of the last detection packet to the current time.
  • the detection message passes through the detection point Bras and the OLT in sequence. Each detection point will modify the detection message. It is assumed that Bras adds the device number 1 of the Bras to the TCP Option field of the detection message (the identifier is the second detection point), the device identifier Bras1, and the detection report.
  • the local time of the message is 7645678, and the number of packets of the data stream that has been transmitted between receiving the previous detection message and receiving the current detection message is 2, assuming that the OLT adds a TCP Option field to the detection message.
  • the device serial number 2 of the OLT (the identifier is the third detection point), the device identifier OLT1, the local time when the detection message is received, 8895678, and the transmission from the reception of the last detection message to the reception of the current detection message.
  • the number of packets of this data stream is 2. Then, it can be obtained on the OLT: in the current detection period, CR1 sends a total of three messages to Bras1, and one message is lost.
  • the packet loss rate is 1/3; one-way time from CR1 to Bras1 The delay is 7645678–2345678; Bras1 sends a total of 2 packets to OLT1, and 0 packets are lost.
  • the packet loss rate is 0, and the one-way delay from Bras1 to OLT1 is 8895678–7645678.
  • the one-way delay calculated by Embodiment 3 of the present invention is a relative one-way delay, and the significance of the one-way delay is to observe the change amount, that is, multiple times before and after comparison.
  • the amount of change in the one-way delay detected, whether the observation delay is larger or smaller, provides a reference for transmission quality assessment.
  • fault demarcation can be further achieved, that is, the specific location at which the fault occurs is determined.
  • the example in the embodiment 1-2 of the present invention is taken as an example.
  • the control center may send a control command to the home gateway of the user to instruct the home gateway to initiate transmission performance detection, such as detecting the packet loss rate of the upstream and downstream of the home gateway. / or delay, then the home gateway can report the detected upstream and downstream packet loss rate and / or delay to the control center, the control center for analysis. If the downstream packet loss rate and/or the downstream delay are large, the network fault can be determined to occur in the user's home.
  • the network can be determined.
  • the failure occurs in the network of an Internet Service Provider (ISP).
  • ISP Internet Service Provider
  • the control center can send a control command to the transmission device A (such as the home gateway) close to the receiving device and the transmission device B close to the transmitting device to indicate the transmission device A and the transmission.
  • Device B starts the transmission performance test and detects that the downstream packet loss rate of the A device is 1%, the upstream packet loss rate is 0.1%, the downstream packet loss rate of the B device is 1%, and the upstream packet loss rate is 0.1%.
  • the downstream packet loss rate of the A device is 1%, that is, the packet loss occurs mainly downstream of the A device (such as inside the user's home network), and there is no packet loss between the A device and the B device, and the upstream packet loss rate of B. It is 0.1%.
  • Embodiment 4 of the present invention provides a detecting apparatus 500.
  • the detecting apparatus 500 includes a receiving unit 510 and a processing unit 520.
  • the receiving unit 510 is configured to receive, by the sending device and the receiving device, a message that is mutually transmitted by using a reliable transmission protocol-based connection established between the sending device and the receiving device.
  • the processing unit 520 is configured to: after the receiving unit 510 successively receives the data packets with the sequence numbers N1 and N2 sent by the sending device by using the connection, determine that N2 is greater than N1+LenN1, where LenN1 is the serial number.
  • the load length of the data packet of the N1 is also used to determine that the data packet with the sequence number M1 is received later than the sequence number N2 after the receiving unit 510 receives the data packet with the sequence number M1.
  • the data packet is received, and it is determined that the M1 is greater than N1 and is less than N2.
  • the data packet whose sequence number is M1 is determined to be a retransmission packet corresponding to the upstream packet loss, where the T2 is determined to be greater than or equal to the RTT.
  • T1 is the time when the receiving unit 510 receives the data packet with the sequence number N2
  • T2 is the time when the receiving unit 510 receives the data packet with the sequence number M1
  • the RTT is the sending device and the receiving device.
  • the two-way delay between the upstream packets refers to packet loss occurring between the transmitting device and the detecting device.
  • Embodiment 4 of the present invention can be used to implement the operations performed by the detecting device in the method described in Embodiment 1 above.
  • the functional unit described in Embodiment 4 of the present invention can be used to implement the operations performed by the detecting device in the method described in Embodiment 1 above.
  • Embodiment 5 of the present invention proposes a detecting apparatus 600.
  • the detecting apparatus 600 includes a receiving unit 610 and a processing unit 620.
  • the receiving unit 610 is configured to receive, by the sending device and the receiving device, a message that is mutually transmitted by using a reliable transmission protocol-based connection established between the sending device and the receiving device, where the reliable transmission protocol is a transmission control protocol TCP or a flow. Control transmission protocol SCTP.
  • the processing unit 620 is configured to acquire the time T3 that the receiving unit 610 receives the data message with the sequence number K1 sent by the sending device through the connection, and is configured to receive the first one received at the receiving unit 610.
  • the value of the latest right boundary field of the selective acknowledgment SACK field is greater than K1+LenK1 and is used to confirm the acknowledgment message of the data message before the data message with the sequence number K1
  • the calculation is performed according to T3 and T4.
  • T4 is the time when the receiving unit 610 receives the acknowledgement message
  • LenK1 is the payload length of the data packet with the sequence number K1.
  • the functional unit described in the embodiment 5 of the present invention can be used to implement the operations performed by the detecting device in the method described in the foregoing embodiment 2.
  • the functional unit described in the embodiment 5 of the present invention can be used to implement the operations performed by the detecting device in the method described in the foregoing embodiment 2.
  • the embodiment 6A of the present invention proposes a transmission device 700A.
  • the transmission device 700A includes a communication unit 710A and a detection device 720A.
  • the communication unit 710A is configured to transmit information transmitted between the transmitting device and the receiving device, and send the information to the detecting device 720A, where the information is established between the sending device and the receiving device.
  • the detecting device 720A may specifically be the detecting device 500 according to Embodiment 4 of the present invention. Accordingly, the communication unit 710A specifically transmits the information to the receiving unit 510 of the detecting device 720A.
  • the detecting device 720A may also be specifically the detecting device 600 according to the embodiment 5 of the present invention. Accordingly, the communication unit 710A specifically transmits the information to the receiving unit 610 of the detecting device 720A.
  • the communication unit 710A specifically transmits the information to the receiving unit 610 of the detecting device 720A.
  • the embodiment 6B of the present invention proposes a transmission device 700B, which is applied to a communication system, where the communication system includes a transmitting device, a receiving device, and the transmitting device 700B.
  • the sending device and the receiving device transmit a message by using a connection based on a reliable transmission protocol established between the sending device and the receiving device, and the packet is transmitted by the transmitting device 700B.
  • the transmission device 700B includes a communication unit 710B and a processing unit 720B.
  • the communication unit 710B is configured to transmit a message that the sending device and the receiving device transmit to each other through the connection;
  • the processing unit 720B is configured to: after the communication unit 710B successively receives the data packets with the sequence numbers N1 and N2 sent by the sending device through the connection, determine that N2 is greater than N1 and is not discontinuous with N1; After the communication unit 710B successively receives the data message with the sequence number N2 and the data message with the sequence number M1, when it is determined that M1 is greater than N1 and less than N2 and it is determined that T2-T1 is greater than or equal to the RTT, the sequence number is determined.
  • the data packet of the M1 is a retransmission packet corresponding to the upstream packet loss, where T1 is the time when the communication unit 710B receives or transmits the data packet with the sequence number N2, and T2 is the receiving or sending by the communication unit 710B.
  • T1 is the time when the communication unit 710B receives or transmits the data packet with the sequence number N2
  • T2 is the receiving or sending by the communication unit 710B.
  • the time of the data packet with the sequence number M1 is a two-way delay between the sending device and the receiving device
  • the upstream packet loss refers to between the sending device and the transmitting device 700B. The packet loss occurred.
  • T1 is the time when the communication unit 710B receives the data message with the sequence number N2, and T2 is the time when the communication unit 710B receives the data message with the sequence number M1; or T1 is the The communication unit 710B transmits the time of the data message with the sequence number N2, and T2 is the time when the communication unit 710B transmits the data message with the sequence number M1.
  • the functional unit of the transmission device 700B provided by Embodiment 6B of the present invention can be used to implement the operations performed by the detecting device in the method described in Embodiment 1 above.
  • the functional unit of the transmission device 700B provided by Embodiment 6B of the present invention can be used to implement the operations performed by the detecting device in the method described in Embodiment 1 above.
  • Embodiment 6C of the present invention proposes a transmission device 700C, which is applied to a communication system, where the communication system includes a transmitting device, a receiving device, and the transmitting device, The transmitting device and the receiving device transmit a message through a connection based on a reliable transmission protocol established between the sending device and the receiving device, and the message is transmitted by the transmitting device.
  • the transmission device 700C includes a communication unit 710C and a processing unit 720C.
  • the communication unit 710C is configured to transmit, by the sending device and the receiving device, a message that is mutually transmitted by using a reliable transmission protocol-based connection established between the sending device and the receiving device.
  • the processing unit 720C is configured to acquire the time T3 that the communication unit 710C receives or sends the data message with the sequence number K1 sent by the sending device by using the connection; and is used to determine that the communication unit 710C receives And acquiring, by the receiving device, the time T4 when the communication unit 710C receives or sends the target confirmation message, and calculating the detecting device and the receiving device according to T3 and T4. a two-way delay DRTT, wherein the target acknowledgement message is the first data message received by the communication unit 710C to indicate that the receiving device has received the data message with the sequence number K1 or the The acknowledgement packet of the data packet after the data packet with the sequence number K1.
  • T4 is the time when the communication unit 710C sends the target acknowledgement message.
  • T3 is the time when the communication unit 710C transmits the data message with the sequence number K1
  • T4 is the time when the communication unit 710C receives the target acknowledgement message.
  • the functional unit of the transmission device 700C provided by Embodiment 6C of the present invention can be used to implement the operations performed by the detecting device in the method described in Embodiment 1 above.
  • the functional unit of the transmission device 700C provided by Embodiment 6C of the present invention can be used to implement the operations performed by the detecting device in the method described in Embodiment 1 above.
  • Embodiment 7 of the present invention provides a detecting device 800, which is applied to a communication system, where the communication system includes a transmitting device, a receiving device, and at least one transmitting device, as shown in FIG. 1A.
  • the communication system 100 described in FIG. 1B, the transmitting device and the receiving device transmit a message by using a connection based on a reliable transmission protocol established between the sending device and the receiving device, where the message is Said at least one transmission device transmission, said detection device being one of said transmission device or said at least one transmission device.
  • the detecting device 800 includes a communication unit 810 and a processing unit 820.
  • the communication unit 810 is configured to transmit a message by using the connection
  • the processing unit 820 is configured to generate a detection packet, and send the detection packet by using the communication unit 820, where the detection packet payload is empty, and includes the information that has been sent by the communication unit during the current detection period.
  • the number of the statistics packets, Num1, and Num1 is used to determine whether packet loss has occurred in the statistical packet transmitted between the detection device and the downstream device of the detection device during the current detection period.
  • Embodiment 7 of the present invention may be used to implement the operations performed by the first detecting device in the method described in Embodiment 3, and the specific implementation manner may refer to the description in Embodiment 3 above, and details are not described herein again. .
  • Embodiment 8 of the present invention provides a detecting device 900, which is applied to a communication system, where the communication system includes a transmitting device, a receiving device, and at least one transmitting device, as shown in FIG. 1A.
  • the communication system 100 described in FIG. 1B, the transmitting device and the receiving device transmit a message by using a connection based on a reliable transmission protocol established between the sending device and the receiving device, where the message is Said at least one transmission device transmits.
  • the detecting device is the receiving device or a transmitting device between the device for generating a detection message and the receiving device in the at least one transmitting device.
  • the detecting device 900 includes a communication unit 910 and a processing unit 920.
  • the communication unit 810 is configured to transmit a message by using the connection
  • the processing unit 820 is configured to determine, after receiving the detection message, the number of statistical messages that the communication unit has received through the connection in the current detection period, Num2, and Num2 is used to determine the location. Whether the packet being transmitted in the current detection period between the detecting device and the upstream device or the downstream device of the detecting device has lost packets.
  • the functional unit described in the embodiment 8 of the present invention can be used to implement the operations performed by the second detecting device in the method described in the foregoing Embodiment 3.
  • the functional unit described in the embodiment 8 of the present invention can be used to implement the operations performed by the second detecting device in the method described in the foregoing Embodiment 3.
  • Embodiment 9 of the present invention provides a detecting apparatus 1000.
  • the detecting apparatus 1000 includes a communication interface 1010, a processor 1020, and a memory 1030, wherein the communication interface 1010, processing The communication between the device 1020 and the memory 1030 is completed by a bus.
  • the communication interface 1010 is configured to receive information that is transmitted between the sending device and the receiving device, where the information includes a message transmitted by using a connection based on a reliable transmission protocol established between the sending device and the receiving device, and/or The message for establishing the connection.
  • the communication interface 1010 may specifically be a network card.
  • the memory 1030 is configured to store computer operating instructions. Specifically, it may be a high speed RAM memory or a non-volatile memory.
  • the processor 1020 is configured to execute computer operation instructions stored in the memory 1030.
  • the processor 1020 may specifically be a central processing unit (CPU), or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
  • CPU central processing unit
  • ASIC Application Specific Integrated Circuit
  • the processor 1020 executes the computer operation instruction to cause the detecting device 1000 to perform the operations performed by the detecting device in the method described in the foregoing Embodiment 1 or 2.
  • the processor 1020 executes the computer operation instruction to cause the detecting device 1000 to perform the operations performed by the detecting device in the method described in the foregoing Embodiment 1 or 2.
  • the specific implementation refer to the foregoing Embodiment 1 or Embodiment 2 Description, no longer repeat here.
  • Embodiment 10 of the present invention provides a transmission device 2000.
  • the transmission device 2000 includes a transceiver 2010, a processor 2020, and a memory 2030, wherein the transceiver 2010 processes The communication between the 2020 and the memory 2030 is accomplished by a bus.
  • the transceiver 2010 is configured to receive information transmitted between the transmitting device and the receiving device, and transmit the information to the processor 2020, where the information includes a reliable connection established between the sending device and the receiving device. A message transmitted by the connection of the transport protocol, and/or a message used to establish the connection.
  • the transceiver 2010 may specifically be a network card.
  • the memory 2030 is configured to store computer operation instructions. Specifically, it may be a high speed RAM memory or a nonvolatile memory.
  • the processor 2020 is configured to execute computer operating instructions stored in the memory 2030.
  • Processor 2020 may specifically be a CPU, or an ASIC, or one or more integrated circuits configured to implement embodiments of the present invention.
  • the processor 2020 executes the computer operation instruction, so that the transmission device 2000 performs the operations performed by the detecting device in the method described in the foregoing Embodiment 1 or 2.
  • the transmission device 2000 performs the operations performed by the detecting device in the method described in the foregoing Embodiment 1 or 2.
  • the embodiment 11 of the present invention proposes a transmission device 3000.
  • the transmission device 3000 includes a transceiver 3010, a processor 3020, and a detecting device 3030.
  • the transceiver 3010 is configured to receive information transmitted between the sending device and the receiving device, and send the information to the processor 3020, where the information is established between the sending device and the receiving device.
  • the transceiver 3010 may specifically be a network card.
  • the processor 3020 is configured to transmit the information to the detecting device.
  • Processor 3020 may be, in particular, a CPU, or an ASIC, or one or more integrated circuits configured to implement embodiments of the present invention.
  • the detecting device 3030 may specifically be the detecting device 1000 according to the embodiment 9 of the present invention. Accordingly, the processor 3020 specifically transmits the information to the communication interface 1010 of the detecting device 3030.
  • Embodiment 12 of the present invention provides a detecting device 4000, which is applied to a communication system, where the communication system includes a transmitting device, a receiving device, and at least one transmitting device, as shown in FIG. 1A.
  • the communication system 100 described in FIG. 1B, the transmitting device and the receiving device transmit a message by using a connection based on a reliable transmission protocol established between the sending device and the receiving device, where the message is Said at least one transmission device transmission, said detection device being one of said transmission device or said at least one transmission device.
  • the detecting device 4000 includes a transceiver 4010, a processor 4020, and a memory 4030, wherein communication between the transceiver 4010, the processor 4020, and the memory 4030 is completed by a bus.
  • the transceiver 4010 may specifically be a network card.
  • the memory 4030 is configured to store computer operation instructions. Specifically, it may be a high speed RAM memory or a nonvolatile memory.
  • the processor 4020 is configured to execute computer operation instructions stored in the memory 4030.
  • Processor 4020 may be, in particular, a CPU, or an ASIC, or one or more integrated circuits configured to implement embodiments of the present invention.
  • the processor 4020 executes the computer operation instructions such that the detecting device 4000 performs the operations performed by the first detecting device in the method described in Embodiment 3 above, wherein the processor 4020 specifically receives the sum through the transceiver. Send the message.
  • Embodiment 13 of the present invention provides a detecting device 5000, which is applied to a communication system, where the communication system includes a transmitting device, a receiving device, and at least one transmitting device, as shown in FIG. 1A.
  • the communication system 100 described in 1B is shown.
  • the sending device and the receiving device transmit a message by using a connection based on a reliable transmission protocol established between the sending device and the receiving device, and the packet is transmitted by the at least one transmitting device.
  • the detecting device is the receiving device or a transmitting device between the device for generating a detection message and the receiving device in the at least one transmitting device.
  • the detecting device 5000 includes a transceiver 5010, a processor 5020, and a memory 5030, wherein communication between the transceiver 5010, the processor 5020, and the memory 5030 is completed by a bus.
  • the transceiver 5010 may specifically be a network card.
  • the memory 5030 is configured to store computer operation instructions. Specifically, it may be a high speed RAM memory or a nonvolatile memory.
  • the processor 5020 is configured to execute computer operation instructions stored in the memory 5030.
  • Processor 5020 may be, in particular, a CPU, or an ASIC, or one or more integrated circuits configured to implement embodiments of the present invention.
  • the processor 5020 executes the computer operation instruction such that the detecting device 5000 performs the operation performed by the second detecting device in the method described in Embodiment 3, wherein the processor specifically receives and transmits through the transceiver. The message.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium.
  • the computer readable storage medium can be any available media that can be accessed by a computer.
  • the usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)).

Abstract

本发明实施例公开了一种实现传输性能检测的方法、装置和系统。所述方法包括:检测装置在相继接收到发送设备通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接发送的序列号为N1和N2的数据报文后,确定N2大于N1且和N1不连续;在接收到序列号为N2的数据报文后接收到序列号为M1的数据报文,并当确定M1大于N1且小于N2且确定T2-T1大于或等于RTT时,确定序列号为M1的数据报文为对应上游丢包的重传报文,其中,T1为所述检测装置接收序列号为N2的数据报文的时间,T2为所述检测装置接收序列号为M1的数据报文的时间,RTT为所述发送设备和所述接收设备之间的双向时延。由于检测装置自身即可对丢包进行检测,实现简单,效率较高。

Description

一种实现传输性能检测的方法、装置和系统 技术领域
本发明实施例涉及通信技术领域,尤其涉及一种传输性能检测的方法、装置和系统。
背景技术
可靠传输协议是网络(如互联网)中广泛使用的传输协议,如传输控制协议(Transmission Control Protocol,TCP)、流控制传输协议(Stream Control Transmission Protocol,SCTP)等协议。目前互联网中80%以上的业务的流量是基于TCP协议传输的,如视频业务、下载业务等业务的流量。当网络中出现较严重的传输性能问题时,如,出现较严重的丢包或时延时,会导致业务质量的下降,因此,网络性能检测对业务质量的评估非常重要。
在现有技术中,通常是由各网络设备将接收的报文的采集信息(如接收报文的时间或已接收的报文的数量)上报给评估设备,由该评估设备根据各网络设备上传的采集信息确定丢包或时延等网络性能指标,如,根据两个网络设备上传的接收同一报文的时间确定这两个网络设备之间的时延。
根据该现有技术进行网络性能检测,需要各网络设备各自将自己获取的采集信息上报给评估设备,实现复杂,检测效率较低。
发明内容
本发明实施例提供一种实现传输性能检测的方法、装置和系统,用于解决现有技术中存在的传输性能检测的效率较低的问题。
第一方面,提供了一种实现传输性能检测的方法,所述方法包括:检测装置在相继接收到发送设备通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接发送的序列号为N1和N2的数据报文后,确定N2大于N1且和N1不连续;在接收到序列号为N2的数据报文后接收到序列号为M1的数据报文,并当确定M1大于N1且小于N2且确定T2-T1大于或等于RTT时,确定序列号为M1的数据报文为对应上游丢包的重传报文,其中,T1为所述检测装置接收序列号为N2的数据报文的时间,T2为所述检测装置接收序列号为M1的数据报文的时间,RTT为所述发送设备和所述接收设备之间的双向时延,所述上游丢包指的是在所述发送设备和所述检测装置之间发生的丢包。
根据本发明第一方面提供的方法,检测装置通过识别接收的数据报文的序列号以及时间,自身即可对丢包进行检测,实现简单,效率较高。
当M1大于N1且小于N2时,可能是对应上游丢包的重传报文,也可能是乱序报文。相应地,在具体实现时,所述方法还可以包括,当所述检测装置确定M1大于N1且小于N2且确定T2-T1小于RTT时,确定序列号为M1的数据报文为乱序报文。
通过该实现方式,可以识别出乱序报文,从而一方面可以排除丢包误检的情况,进而 可以更准确地实现丢包检测,另一方面可以检测出乱序的情况,进而可以更全面准确地实现传输性能的检测。
在第一方面的一种实现方式中,序列号为N3的数据报文和序列号为M1的数据报文为所述检测装置先后相继接收到的两个数据报文,其中N3大于或等于N2,所述方法还可以包括:当所述检测装置确定M1小于N3且不属于所述序列号为M1的数据报文之前的任意一个序列号黑洞时,确定序列号为M1的数据报文为对应下游丢包的数据报文,其中,所述序列号黑洞为以一对相继顺序接收但序列号不连续的数据报文的序列号为边界的序列号范围。
通过该实现方式,通过检测装置通过识别接收的数据报文的序列号,自身还可以方便地实现下游丢包的检测,从而可以全面高效地实现传输性能检测。
所述检测装置还可以在一个检测时段结束后根据在所述检测时段内检测到的上游丢包数量确定所述检测时段内的上游丢包率,其中,所述上游丢包数量为在所述发送设备和所述检测装置之间发生了丢包的数据报文的数量。通过该实现方式,可以为传输性能的评估提供精准直观的检测数据。
第二方面,提供了一种实现传输性能检测的方法,所述方法应用于通信系统中,所述通信系统包括发送设备、接收设备和所述传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述传输设备传输;所述方法包括:
所述传输设备在相继接收到发送设备通过所述连接发送的序列号为N1和N2的数据报文后,确定N2大于N1且和N1不连续;
所述传输设备在接收到序列号为N2的数据报文后接收到序列号为M1的数据报文;
当所述传输设备确定M1大于N1且小于N2且确定T2-T1大于或等于RTT时,确定序列号为M1的数据报文为对应上游丢包的重传报文,其中,T1为所述传输设备接收或发送序列号为N2的数据报文的时间,T2为所述传输设备接收或发送序列号为M1的数据报文的时间,RTT为所述发送设备和所述接收设备之间的双向时延,所述上游丢包指的是在所述发送设备和所述传输设备之间发生的丢包。
在具体实现时,通常T1为所述通信单元接收序列号为N2的数据报文的时间,且T2为所述通信单元接收序列号为M1的数据报文的时间;或者T1为所述通信单元发送序列号为N2的数据报文的时间,且T2为所述通信单元710B发送序列号为M1的数据报文的时间。
在第二方面的第一种可能的实现方式中,所述方法还可以包括,当所述传输设备确定M1大于N1且确定T2-T1小于RTT时,确定序列号为M1的数据报文为乱序报文。
基于第二方面或第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,序列号为N3的数据报文和序列号为M1的数据报文为先后相继接收到的两个数据报文,其中N3大于或等于N2。所述方法还包括:当所述传输设备确定M1小于N3且不属于所述序列号为M1的数据报文之前的任意一个序列号黑洞时,确定序列号为M1的数据报文为对应下游丢包的数据报文,其中,所述序列号黑洞为以一对相继顺序接收但序列号不连续的数据报文的序列号为边界的序列号范围。
第三方面,提供了一种实现传输性能检测的方法,所述方法包括:检测装置获取接收发送设备通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接发送的序列号为K1的数据报文的时间T3,在确定接收到所述接收设备通过所述连接发送的目标确认报文时,获取所述检测装置接收所述目标确认报文的时间T4,并根据T3、T4计算所述检测装置和所述接收设备之间的双向时延DRTT,其中,所述目标确认报文为所述检测装置接收到的第一个用于表明所述接收设备已接收所述序列号为K1的数据报文或所述序列号为K1的数据报文之后的数据报文的确认报文。如,当所述可靠传输协议为传输控制协议TCP或流控制传输协议SCTP时,所述目标确认报文具体可以为所述检测装置接收到的第一个包括的确认号字段或选择性确认SACK字段的最新右边界字段的值大于或等于K1+LenK1的确认报文,其中,LenK1为序列号为K1的数据报文的负载长度。
根据本发明第三方面提供的方法,检测装置根据发送数据报文的时间和接收目标确认报文的时间计算时延,因此自身即可对时延进行检测,实现简单,效率较高。
第四方面,提供了一种实现传输性能检测的方法,所述方法应用于通信系统中,所述通信系统包括发送设备、接收设备和所述传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述传输设备传输。所述方法包括:所述传输设备获取接收或发送所述发送设备通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接发送的序列号为K1的数据报文的时间T3,在确定接收到所述接收设备通过所述连接发送的目标确认报文时,获取所述传输设备接收或发送所述目标确认报文的时间T4,并根据T3、T4计算所述传输设备和所述接收设备之间的双向时延DRTT,其中,所述目标确认报文为所述传输设备接收到的第一个用于表明所述接收设备已接收所述序列号为K1的数据报文或所述序列号为K1的数据报文之后的数据报文的确认报文。如,当所述可靠传输协议为传输控制协议TCP或流控制传输协议SCTP时,所述目标确认报文具体可以为所述传输设备接收到的第一个包括的确认号字段或选择性确认SACK字段的最新右边界字段的值大于或等于K1+LenK1的确认报文,其中,LenK1为序列号为K1的数据报文的负载长度。
当T3为所述传输设备接收序列号为K1的数据报文的时间时,通常T4为所述传输设备发送所述目标确认报文的时间。当T3为所述传输设备发送序列号为K1的数据报文的时间时,通常T4为所述传输设备接收所述目标确认报文的时间。
在第四方面的一种可能的实现方式中,当所述接收设备为客户端设备、所述发送设备为服务器时,在建立所述连接时,所述接收设备向所述发送设备发送用于请求建立所述连接的请求消息,所述发送设备向所述接收设备发送所述请求消息的响应消息。相应地,所述传输设备接收所述接收设备在建立所述连接时向所述发送设备发送的所述请求消息,并接收所述发送设备发送的所述响应消息,并将接收或发送所述请求消息的时间和接收或发送所述响应消息的时间的差值确定为所述发送设备和所述传输设备之间的双向时延URTT。
具体可以将接收所述请求消息的时间和发送所述响应消息的时间的差值确定为URTT,也可以将发送所述请求消息的时间和接收所述响应消息的时间的差值确定为URTT。
第五方面,提供了一种实现传输性能检测的方法,所述检测方法由通信系统中的检测设备执行,所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输,所述检测设备为所述发送设备或所述至少一个传输设备中的一个;
所述方法包括:所述检测设备生成检测报文,并通过所述连接发送所述检测报文,所述检测报文负载为空,且包括在当前检测周期内已通过所述通信单元发送的被统计报文的数量Num1,Num1用于判断所述检测设备和所述检测设备的下游设备之间在所述当前检测周期内传输的被统计报文是否发生了丢包。
根据本发明第五方面提供的方法,在对丢包进行检测时各设备无需各自上报已传输的数据报文的数量,实现简单,效率较高。
第六方面,提供了一种实现传输性能检测的方法,所述检测方法由通信系统中的检测设备执行。
所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输,所述检测设备为所述接收设备或为所述至少一个传输设备中位于用于生成检测报文的设备和所述接收设备之间的传输设备。所述检测报文的负载为空,可以包括生成所述检测报文的设备添加的在当前检测周期内已通过所述连接发送的被统计报文的数量Num1。
所述方法包括:所述检测设备在接收到所述检测报文后,确定在所述当前检测周期内已通过所述连接接收的被统计报文的数量Num2,Num2用于判断所述检测设备和所述检测设备的上游设备或下游设备之间在所述当前检测周期内传输的被统计报文是否发生了丢包。当所述检测报文包括Num1时,所述检测设备还可以根据Num1和Num2判断生成所述检测报文的设备和所述检测设备之间在所述当前检测周期内传输的被统计报文是否发生了丢包。
根据本发明第六方面提供的方法,在对丢包进行检测时各设备无需各自上报已传输的被统计报文的数量,实现简单,效率较高。
第七方面,提供了一种实现传输性能检测的方法,所述检测方法由通信系统中的检测设备执行,所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输,所述检测设备为所述发送设备或所述至少一个传输设备中的一个;
所述方法包括:所述检测设备生成检测报文,并通过所述连接发送所述检测报文,所述检测报文负载为空,且包括所述第一检测设备生成所述检测报文的时间T1,T1用于计算所述检测设备和所述检测设备的下游设备之间的单向时延。
根据本发明第七方面提供的方法,在对时延进行检测时各设备无需各自上报用于计算时延的时间信息,实现简单,效率较高。
第八方面,提供了一种实现传输性能检测的方法,所述检测方法由通信系统中的检测设备执行。
所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输,所述检测设备为所述接收设备或为所述至少一个传输设备中位于用于生成检测报文的设备和所述接收设备之间的传输设备。所述检测报文的负载为空,可以包括生成所述检测报文的设备添加的生成所述检测报文的时间T1。
所述方法包括:所述检测设备在接收到所述检测报文后,获取接收所述检测报文的时间T2,T2用于计算所述检测设备和所述检测设备的上游设备或下游设备之间的单向时延。当所述检测报文包括T1时,所述检测设备还可以根据T1和T2计算所述第一检测设备和所述第二检测设备之间的单向时延。
根据本发明第八方面提供的方法,在对时延进行检测时各设备无需各自上报用于计算时延的时间信息,实现简单,效率较高。
第九方面,提供了一种实现传输性能检测的方法,所述检测方法由通信系统中的检测设备执行,所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输,所述检测设备为所述发送设备或所述至少一个传输设备中的一个;
所述方法包括:所述检测设备生成检测报文,并通过所述连接发送所述检测报文,所述检测报文负载为空,且包括所述第一检测设备的标识,所述第一检测设备的标识用于确定所述检测报文所经过的传输路径。
根据本发明第九方面提供的方法,可以方便地确定所述检测报文所经过的传输路径,可以为传输性能的评估提供有效的参考信息。
第十方面,提供了一种实现传输性能检测的方法,所述检测方法由通信系统中的检测设备执行。
所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输,所述检测设备为所述至少一个传输设备中位于用于生成检测报文的设备和所述接收设备之间的传输设备。所述检测报文的负载为空,且所述检测报文可以包括所述用于生成所述检测报文的设备添加的所述用于生成所述检测报文的设备的标识,所述用于生成所述检测报文的设备的标识用于确定所述检测报文所经过的传输路径。
所述方法包括:所述检测设备在接收到所述检测报文后,将所述检测设备的标识添加 到所述检测报文中,并发送所述检测报文。所述检测设备的标识用于确定所述检测报文所经过的传输路径。
根据本发明第十方面提供的方法,可以方便地确定所述检测报文所经过的传输路径,可以为传输性能的评估提供有效的参考信息。
第十一方面,提供了一种实现传输性能检测的通信系统。所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输。
所述通信系统中的第一检测设备,用于生成检测报文,并通过所述连接发送所述检测报文,所述检测报文负载为空且包括在当前检测周期内所述第一检测设备已通过所述连接发送的被统计报文的数量Num1,所述第一检测设备为所述发送设备或所述至少一个传输设备中的一个。
所述通信系统中的第二检测设备,用于在接收所述检测报文后,确定在所述当前检测周期内所述第二检测设备已通过所述连接接收的被统计报文的数量Num2,所述Num1和Num2用于判断所述第一检测设备和所述第二检测设备之间在所述当前检测周期内传输的被统计报文是否发生了丢包,所述第二检测设备为所述接收设备或为所述至少一个传输设备中位于所述第一检测设备和所述接收设备之间的传输设备。在具体实现时,所述第二检测设备还可以用于根据Num1和Num2判断所述第一检测设备和所述第二检测设备之间在所述当前检测周期内传输的被统计报文是否发生了丢包,还可以用于根据Num1和Num2计算所述第一检测设备与所述第二检测设备之间在所述当前检测周期内丢失的被统计报文的数量、以及所述第一检测设备与所述第二检测设备之间的丢包率,其中,Num1大于Num2。
根据本发明第十一方面提供的通信系统,在对丢包进行检测时各设备无需各自上报已传输的数据报文的数量,实现简单,效率较高。
第十二方面,提供了一种实现传输性能检测的通信系统。所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输。
所述通信系统中的第一检测设备,用于生成检测报文,并通过所述连接发送所述检测报文,所述检测报文负载为空且包括所述第一检测设备生成所述检测报文的时间T1,所述第一检测设备为所述发送设备或所述至少一个传输设备中的一个。
所述通信系统中的第二检测设备,用于在接收所述检测报文后,获取接收所述检测报文的时间T2,T1和T2用于计算所述第一检测设备和所述第二检测设备之间的单向时延,所述第二检测设备为所述接收设备或为所述至少一个传输设备中位于所述第一检测设备和所述接收设备之间的传输设备。
根据本发明第十二方面提供的通信系统,在对时延进行检测时各设备无需各自上报用于计算时延的时间信息,实现简单,效率较高。
第十三方面,提供了一种实现传输性能检测的通信系统。所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输。
所述通信系统中的第一检测设备,用于生成检测报文,并通过所述连接发送所述检测报文,所述检测报文负载为空且包括所述第一检测设备的标识,所述第一检测设备为所述发送设备或所述至少一个传输设备中的一个。
所述通信系统中的第二检测设备,用于在接收所述检测报文后,将所述第二检测设备的标识添加到所述检测报文中,并发送所述检测报文,所述第二检测设备为所述至少一个传输设备中位于所述第一检测设备和所述接收设备之间的传输设备;
所述第一检测设备的标识和所述第二检测设备的标识用于确定所述检测报文所经过的传输路径。
根据本发明第十三方面提供的通信系统,可以方便地确定所述检测报文所经过的传输路径,可以为传输性能的评估提供有效的参考信息。
第十四方面提供了一种检测装置,所述检测装置包括接收单元和处理单元。
所述接收单元,用于接收发送设备和接收设备通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接相互传输的报文。
所述处理单元,用于在所述接收单元相继接收到发送设备通过所述连接发送的序列号为N1和N2的数据报文后,确定N2大于N1且和N1不连续;还用于在所述接收单元先后接收到序列号为N2的数据报文和序列号为M1的数据报文后,当确定M1大于N1且小于N2且确定T2-T1大于或等于RTT时,确定序列号为M1的数据报文为对应上游丢包的重传报文,其中,T1为所述接收单元接收序列号为N2的数据报文的时间,T2为所述接收单元接收序列号为M1的数据报文的时间,RTT为所述发送设备和所述接收设备之间的双向时延,所述上游丢包指的是在所述发送设备和所述检测装置之间发生的丢包。
第十五方面提供了一种检测装置,所述检测装置包括接收单元和处理单元。
所述接收单元,用于接收发送设备和接收设备通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接相互传输的报文,所述可靠传输协议为传输控制协议TCP或流控制传输协议SCTP。
所述处理单元,用于获取所述接收单元接收发送设备通过所述连接发送的序列号为K1的数据报文的时间T3;并用于在确定所述接收单元接收到所述接收设备通过所述连接发送的目标确认报文时,获取所述接收单元接收所述目标确认报文的时间T4,并根据T3、T4计算所述检测装置和所述接收设备之间的双向时延DRTT,其中,所述目标确认报文为所述接收单元接收到的第一个用于表明所述接收设备已接收所述序列号为K1的数据报文或所述序列号为K1的数据报文之后的数据报文的确认报文。如,所述可靠传输协议为传输控制协议TCP或流控制传输协议SCTP,相应地,所述目标确认报文具体可以为所述接收单元 接收到的第一个包括的确认号字段或选择性确认SACK字段的最新右边界字段的值大于或等于K1+LenK1的确认报文,其中,LenK1为序列号为K1的数据报文的负载长度。
第十六方面提供了一种传输设备,所述传输设备包括通信单元和如第十三方面所述的检测装置。所述通信单元,用于传输所述发送设备和所述接收设备之间相互传输的信息,并将所述信息发送给所述检测装置,所述信息包括通过所述连接传输的报文和/或用于建立所述连接的消息。
第十七方面提供了一种传输设备,所述传输设备应用于通信系统中,所述通信系统包括发送设备、接收设备和所述传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述传输设备传输;
所述传输设备包括通信单元和处理单元;
所述通信单元,用于传输发送设备和接收设备通过所述连接相互传输的报文;
所述处理单元,用于在所述通信单元相继接收到发送设备通过所述连接发送的序列号为N1和N2的数据报文后,确定N2大于N1且和N1不连续;还用于在所述通信单元先后接收到序列号为N2的数据报文和序列号为M1的数据报文后,当确定M1大于N1且小于N2且确定T2-T1大于或等于RTT时,确定序列号为M1的数据报文为对应上游丢包的重传报文,其中,T1为所述通信单元接收或发送序列号为N2的数据报文的时间,T2为所述通信单元接收或发送序列号为M1的数据报文的时间,RTT为所述发送设备和所述接收设备之间的双向时延,所述上游丢包指的是在所述发送设备和所述传输设备之间发生的丢包。
在第十七方面的第一种可能的实现方式中,所述处理单元还用于,当确定M1大于N1且确定T2-T1小于RTT时,确定序列号为M1的数据报文为乱序报文。
基于第十七方面或第十七方面的第一种可能的实现方式,在第十七方面的第二种可能的实现方式中,序列号为N3的数据报文和序列号为M1的数据报文为先后相继接收到的两个数据报文,其中N3大于或等于N2。所述处理单元还用于:当确定M1小于N3且不属于所述序列号为M1的数据报文之前的任意一个序列号黑洞时,确定序列号为M1的数据报文为对应下游丢包的数据报文,其中,所述序列号黑洞为以一对相继顺序接收但序列号不连续的数据报文的序列号为边界的序列号范围。
第十八方面提供了一种传输设备,所述传输设备应用于通信系统中,所述通信系统包括发送设备、接收设备和所述传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述传输设备传输;
所述传输设备包括通信单元和处理单元;
所述通信单元,用于传输发送设备和接收设备通过所述连接相互传输的报文;
所述处理单元,用于获取所述通信单元接收或发送所述发送设备通过所述连接发送的序列号为K1的数据报文的时间T3;并用于在确定所述通信单元接收到所述接收设备通过 所述连接发送的目标确认报文时,获取所述通信单元接收或发送所述目标确认报文的时间T4,并根据T3、T4计算所述检测装置和所述接收设备之间的双向时延DRTT,其中,所述目标确认报文为所述通信单元接收到的第一个用于表明所述接收设备已接收所述序列号为K1的数据报文或所述序列号为K1的数据报文之后的数据报文的确认报文。如,当所述可靠传输协议为传输控制协议TCP或流控制传输协议SCTP时,所述目标确认报文具体可以为所述传输设备接收到的第一个包括的确认号字段或选择性确认SACK字段的最新右边界字段的值大于或等于K1+LenK1的确认报文,其中,LenK1为序列号为K1的数据报文的负载长度。
在第十八方面的一种可能的实现方式中,当所述接收设备为客户端设备、所述发送设备为服务器时,在建立所述连接时,所述接收设备向所述发送设备发送用于请求建立所述连接的请求消息,所述发送设备向所述接收设备发送所述请求消息的响应消息。相应地,所述通信单元还用于接收所述接收设备在建立所述连接时向所述发送设备发送的用于请求建立所述连接的请求消息,以及所述发送设备向所述接收设备发送的所述请求消息的响应消息;所述处理单元,还用于将所述通信单元接收或发送所述请求消息的时间和接收或发送所述响应消息的时间的差值确定为所述发送设备和所述传输设备之间的双向时延URTT。
在具体实现时,所述处理单元可以将所述通信单元接收所述请求消息的时间和发送所述响应消息的时间的差值确定为URTT,可以将所述通信单元发送所述请求消息的时间和接收所述响应消息的时间的差值确定为URTT。
第十九方面提供了一种检测设备,所述检测设备应用于通信系统中,所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输,所述检测设备为所述发送设备或所述至少一个传输设备中的一个。
所述检测设备包括通信单元和处理单元。所述通信单元用于通过所述连接传输报文。所述处理单元,用于生成检测报文并通过所述通信单元发送所述检测报文,所述检测报文负载为空,且包括在当前检测周期内已通过所述通信单元发送的被统计报文的数量Num1,Num1用于判断所述检测设备和所述检测设备的下游设备之间在所述当前检测周期内传输的被统计报文是否发生了丢包。
第二十方面提供了一种检测设备,所述检测设备应用于通信系统中,所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输,所述检测设备为所述接收设备或为所述至少一个传输设备中位于用于生成检测报文的设备和所述接收设备之间的传输设备,所述检测报文的负载为空;
所述检测设备包括通信单元和处理单元;
所述通信单元用于通过所述连接传输报文;
所述处理单元,用于在接收到所述检测报文后,确定所述通信单元在所述当前检测周 期内已通过所述连接接收的被统计报文的数量Num2,Num2用于判断所述检测设备和所述检测设备的上游设备或下游设备之间在所述当前检测周期内传输的被统计报文是否发生了丢包。
第二十一方面提供了一种检测设备,所述检测设备应用于通信系统中,所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输,所述检测设备为所述发送设备或所述至少一个传输设备中的一个;
所述检测设备包括通信单元和处理单元。所述通信单元用于通过所述连接传输报文。所述处理单元,用于生成检测报文并通过所述通信单元发送所述检测报文,所述检测报文负载为空,且包括所述第一检测设备生成所述检测报文的时间T1,T1用于计算所述检测设备和所述检测设备的下游设备之间的单向时延。
第二十二方面提供了一种检测设备,所述检测设备应用于通信系统中,所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输,所述检测设备为所述接收设备或为所述至少一个传输设备中位于用于生成检测报文的设备和所述接收设备之间的传输设备。所述检测报文的负载为空,可以包括生成所述检测报文的设备添加的生成所述检测报文的时间T1。
所述检测设备包括通信单元和处理单元。所述通信单元用于通过所述连接传输报文。所述处理单元,用于在接收到所述检测报文后,获取接收所述检测报文的时间T2,T2用于计算所述检测设备和所述检测设备的上游设备或下游设备之间的单向时延。当所述检测报文包括T1时,所述检测设备还可以根据T1和T2计算所述第一检测设备和所述第二检测设备之间的单向时延。
第二十三方面提供了一种检测设备,所述检测设备应用于通信系统中,所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输,所述检测设备为所述发送设备或所述至少一个传输设备中的一个;
所述检测设备包括通信单元和处理单元。所述通信单元用于通过所述连接传输报文。所述处理单元,用于生成检测报文并通过所述通信单元发送所述检测报文,所述检测报文负载为空,且包括所述第一检测设备的标识,所述第一检测设备的标识用于确定所述检测报文所经过的传输路径。
第二十四方面提供了一种检测设备,所述检测设备应用于通信系统中,所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输,所述检测设备为所述至少一个传输设备中位于用于生成检测报文的 设备和所述接收设备之间的传输设备。所述检测报文的负载为空,且所述检测报文可以包括所述用于生成所述检测报文的设备添加的所述用于生成所述检测报文的设备的标识,所述用于生成所述检测报文的设备的标识用于确定所述检测报文所经过的传输路径。
所述检测设备包括通信单元和处理单元。所述通信单元用于通过所述连接传输报文。所述处理单元,用于在接收到所述检测报文后,将所述检测设备的标识添加到所述检测报文中,并发送所述检测报文。
第二十五方面,提供了一种检测装置,所述检测装置包括收发器、处理器和存储器。
所述收发器,用于接收发送设备和接收设备之间相互传输的信息,并将所述信息传输给所述处理器,所述信息包括通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接传输的报文,和/或用于建立所述连接的消息。所述收发器具体可以是网卡。
所述存储器,用于存放计算机操作指令。
所述处理器,用于执行所述存储器中存放的计算机操作指令使得所述检测装置执行本发明第一方面或第二方面提供的方法。
第二十六方面,提供了一种传输设备,所述传输设备包括收发器、处理器和如本发明第二十一方面提供的检测装置。
所述收发器,用于接收发送设备和接收设备之间相互传输的信息,并将所述信息传输给所述处理器,所述信息包括通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接传输的报文,和/或用于建立所述连接的消息。所述收发器具体可以是网卡。
所述处理器,用于将所述信息传输给所述检测装置。
第二十七方面,提供了一种传输设备,所述传输设备包括收发器、处理器和存储器。
所述收发器,用于接收发送设备和接收设备之间相互传输的信息,并将所述信息传输给所述处理器,所述信息包括通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接传输的报文,和/或用于建立所述连接的消息。所述收发器具体可以是网卡。
所述存储器,用于存放计算机操作指令。
所述处理器,用于执行所述存储器中存放的计算机操作指令使得所述传输设备执行本发明第一方面或第二方面提供的方法。
第二十八方面,提供了一种检测设备,所述检测设备应用于通信系统中,所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输,所述检测设备为所述发送设备或所述至少一个传输设备中的一个。
所述检测设备包括收发器、处理器和存储器。
所述存储器,用于存放计算机操作指令。
所述处理器,用于执行所述存储器中存放的计算机操作指令使得所述传输设备执行本发明第三方面、第五方面和第七方面中任一方面提供的方法,其中,所述处理器具体通过 所述收发器接收和发送所述报文。
第二十九方面,提供了一种检测设备,所述检测设备应用于通信系统中,所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输,所述检测设备为所述接收设备或为所述至少一个传输设备中位于用于生成检测报文的设备和所述接收设备之间的传输设备,所述检测报文的负载为空。
所述检测设备包括收发器、处理器和存储器。
所述存储器,用于存放计算机操作指令。
所述处理器,用于执行所述存储器中存放的计算机操作指令使得所述传输设备执行本发明第四方面、第六方面和第八方面中任一方面提供的方法,其中,所述处理器具体通过所述收发器接收和发送所述报文。
第三十方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述各方面所述的方法。
第三十一方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述各方面所述的方法。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍。
图1A和1B为本发明实施例提供的通信系统100的组网结构示意图;
图2A和2B为本发明实施例1提供的方法的流程示意图;
图3A和3B为本发明实施例2提供的方法的流程示意图;
图4为本发明实施例3提供的方法的流程示意图;
图5、6、7A、7B、7C、8-14为本发明实施例提供的装置结构示意图;
具体实施方式
下面结合附图,对本发明的实施例进行描述。
图1A为本发明实施例提供的一种通信系统100的组网结构示意图,通信系统100包括第一通信设备110、至少一个传输设备120和第二通信设备130。第一通信设备110和第二通信设备130之间可以建立基于可靠传输协议的连接,并通过该连接传输报文,并且通过该连接传输的报文经所述至少一个传输设备120传输。所述可靠传输协议具体可以是TCP、SCTP等。
所述报文包括数据报文和用于对数据报文进行确认的确认报文,如ACK报文。所述数据报文通常为携带通信数据的报文。需要说明的是,第一通信设备110和第二通信设备130中的一个通信设备(后续称为通信设备A)通过所述连接向另一个通信设备(后续称为通信设备B)发送的确认报文也可能携带数据,则该确认报文即作为通信设备A向通信设备B发 送的确认报文又作为通信设备B向通信设备A发送的数据报文。对于通信设备A向通信设备B发送的任一数据报文,通信设备B通常会通过确认报文通知通信设备A是否已接收到该数据报文,如果该数据报文丢了,通信设备A通常会重传该数据报文。
通信设备A通过所述连接向通信设备B发送的数据报文的序列号符合一定的规则,如,当所述可靠传输协议为TCP或SCTP时,对于任意两个相邻的数据报文中,后一数据报文的序列号等于前一数据报文的序列号加上前一数据报文的负载长度。
需要说明的是,通信设备A还可能通过所述连接向通信设备B发送不携带通信数据的报文,不携带通信数据的报文的负载长度为0。当所述可靠传输协议为TCP或SCTP时,对于任意两个报文,后一报文(可能是数据报文,也可能是不携带通信数据的报文)的序列号等于前一报文(可能是数据报文,也可能是不携带通信数据的报文)的序列号加上前一报文的负载长度。由于不携带通信数据的报文的负载长度为0,因此,当通信设备A通过所述连接向通信设备B既发送数据报文又发送不携带通信数据的报文时,任意相邻的两个数据报文也符合后一数据报文的序列号等于前一数据报文的序列号加上前一数据报文的负载长度的规则。
对于通信设备A向通信设备B发送的任一不携带通信数据的报文,通信设备B通常不会通过确认报文通知通信设备A是否已接收到该报文,如果该报文丢了,通信设备A通常也不会重传该报文。
第一通信设备110和第二通信设备130均可以为终端或服务器。如,第一通信设备为视频终端,如机顶盒(Set Top Box,STB),第二通信设备为视频服务器,如网络协议电视(Internet Protocol Television,IPTV)头端。又如,第一通信设备和第二通信设备均为通话终端。
传输设备120具体可以包括家庭网关、核心路由器(Core Router,CR)、宽带网络网关(Broadband Network Gateway,BNG)、光线路终端(Optical Line Terminal,OLT)、宽带远程接入服务器(Broadband Remote Access Server,BRAS)等设备。
第一通信设备110和第二通信设备130中的一方(后续称为发送设备)发送的数据报文(如封装了视频数据的报文)经由所述传输设备120传输给对方(后续称为接收设备),所述接收设备发送的用于确认已接收的数据报文的确认报文经由所述传输设备120传输给第一通信设备110。
在具体实现时,通信系统100具体可以是如图1B所示的IPTV系统。在该IPTV系统中,所述发送设备(如第一通信设备110)具体为IPTV头端,所述接收设备具体为机顶盒。
下面分别结合图2A/2B和3A/3B和4介绍本发明实施例1-3。本发明实施例1-3的方法可以应用于如图1A、1B所示的通信系统100。
在本发明实施例1-3中,第一通信设备和第二通信设备之间基于可靠传输协议(如TCP)建立连接,并通过所述连接传输报文。
在具体实现时,可能是所述第一通信设备和所述第二通信设备中的其中一个通信设备向另一通信设备发送数据报文,也可能是所述第一通信设备和所述第二通信设备均向对方发送数据报文。
后续将所述第一通信设备和所述第二通信设备中发送数据报文的通信设备称为发送设备,将另一通信设备称为接收设备。
如,第一通信设备为STB,第二通信设备为IPTV头端,IPTV头端向STB发送视频流,将IPTV头端称为发送设备,将STB称为接收设备。
又如,第一通信设备和第二通信设备均为通话设备,均可以向对方发送数据报文。当基于第一通信设备向第二通信设备发送的数据报文进行传输性能检测时,将第一通信设备称为发送设备,将第二通信设备称为接收设备。当基于第二通信设备向第一通信设备发送的数据报文进行传输性能检测时,将第二通信设备称为发送设备,将第一通信设备称为接收设备。
在本发明实施例1和2中,可以在通信系统中部署用于实现传输性能检测的检测装置,所述检测装置可以通过软件、硬件、固件或者其任意组合来实现。
该检测装置可以内置在通信系统中的传输设备上,相应地,所述检测装置通过所述检测装置所在传输设备接收报文。如果所述检测装置采用硬件实现,所述检测装置所在设备的处理器可以通过镜像的方式将接收的报文发送给所述检测装置。
所述检测装置也可以旁挂到通信系统的任一设备上并通过镜像的方式获取所述检测装置所旁挂的设备上传输的报文。
所述检测装置可以通过上述方式获取所述第一通信设备和所述第二通信设备之间通过所述连接传输的报文,并根据获取的所述报文进行传输性能检测。
需要说明的是,本发明实施例1和2中,所述发送设备和所述检测装置之间发生丢包可以用于表示所述发送设备和所述检测装置所在的设备或所旁挂的设备之间发生丢包,本发明实施例1和2中所说的所述发送设备和所述检测装置之间的时延可以用于表示所述发送设备和所述检测装置所在的设备或所旁挂的设备之间的时延。类似地,本发明实施例1和2中,所述检测装置和所述接收设备之间发生丢包可以用于表示所述检测装置所在的设备或所旁挂的设备和所述接收设备之间发生丢包,本发明实施例中所说的所述检测装置和所述接收设备之间的时延可以用于表示所述检测装置所在的设备或所旁挂的设备和所述接收设备之间的时延。
此外,下述实施例3、7-8以及12-13中所描述的检测设备可以是通信系统中的任一设备,如发送设备、传输设备或接收设备。
为了后续便于说明,在对本发明实施例进行详细的解释说明之前,先对本发明实施例中涉及的名词进行解释。
上游丢包:在发送设备和检测装置之间发生的丢包,具体可以用于表示在发送设备和检测装置所在的设备之间发生的丢包,或发送设备和检测装置所旁挂的设备之间发生的丢包。
下游丢包:在检测装置和接收设备之间发生的丢包,具体可以用于表示在检测装置所在的设备和接收设备之间发生的丢包,或检测装置所旁挂的设备和接收设备之间发生的丢包。
图2A和2B是本发明实施例1提供的方法流程示意图,可以实现丢包检测。在本发明 实施例1中,检测装置可以内置或旁挂在如通信系统100中的任一传输设备上。如图2A和2B所示,本发明实施例1提供的方法包括如下步骤。
需要说明的是,在图2A中仅以检测装置旁挂在传输设备上为例进行示意,而且,所述检测装置所旁挂的传输设备将接收的报文镜像给所述检测装置的步骤和发送给所述接收设备的步骤之间可以没有特定的先后顺序。
步骤201:检测装置在相继接收到发送设备通过所述连接发送的序列号为N1和N2的数据报文后,确定N2大于N1且和N1不连续。
在本发明实施例中,如果N1和N2是两个相邻数据报文的序列号,则认为N1和N2是连续的,否则,认为N1和N2是不连续的。
如果所述可靠传输协议为TCP或SCTP,当N1和N2连续时,N2等于N1+LenN1,其中,LenN1为序列号为N1的数据报文的负载长度。相应地,如果N2大于N1+LenN1,则认为N1和N2不连续,即序列号为N1和N2的数据报文不是相邻数据报文。
需要说明的是,所述发送设备还可能通过所述连接发送不携带通信数据的报文,如控制报文,在本发明实施例1和2中,所述检测装置还可以识别出数据报文。当所述可靠传输协议为TCP或SCTP时,不携带通信数据的报文的负载长度为0,所述检测装置具体可以根据所接收的报文的负载长度识别出数据报文。
为方便描述起见,在结合示例描述时假定每个数据报文的负载长度均为1000。
如,所述检测装置先接收到序列号为2001、负载长度为1000的数据报文,当前期望接收的下一个数据报文的序列号为3001(即2001+1000),如果当前接收到序列号为5001的数据报文,即在接收到序列号为5001的数据报文前没有接收到序列号为3001的数据报文和序列号为4001的数据报文。这种相继顺序收到的两个数据报文的序列号不连续的情况,如连续收到的两个数据报文分别为2001和5001,可以称为序列号黑洞现象。后续将以一对相继顺序接收但序列号不连续的数据报文的序列号为边界的序列号范围称为序列号黑洞,如以2001和5001为边界的序列号范围为(2001,5001),其中,该序列号范围为开区间,不包括边界值。相应地,序列号位于这两个相继顺序接收到的数据报文之间的数据报文,如序列号为3001和4001的数据报文,可以称为黑洞报文。黑洞报文有可能是乱序报文,也可能是重传报文。
通过步骤201,所述检测装置检测到了一个位于序列号N1和序列号N2之间的序列号黑洞(即以N1和N2为边界的序列号黑洞)。
步骤202:所述检测装置在接收到序列号为N2的数据报文后接收到序列号为M1的数据报文,并判断M1是否大于N1且小于N2,即判断M1是否属于以N1和N2为边界的序列号黑洞。
如果确定M1大于N1且小于N2,即确定序列号为M1的数据报文为以N1和N2为边界的序列号黑洞中的数据报文,则序列号为M1的数据报文可能是乱序报文,也可能是对应上游丢包的重传报文。
如,在步骤201中连续收到的两个数据报文分别为2001和5001(即N1为2001、N2为5001),在步骤202中收到序列号为3001的数据报文(即M1为3001),则序列号为3001的数据报文为以2001和5001为边界的序列号黑洞中的数据报文。
假定在收到序列号为M1的数据报文前最新收到的数据报文的序列号为N3,即序列号为N3的数据报文和序列号为M1的数据报文是先后相继接收到的,其中N3大于或等于N2。如果M1小于N3,则可以初步确定该序列号为M1的数据报文为乱序报文或者重传报文。
进一步地,如果确定M1大于N1且小于N2,即确定序列号为M1的数据报文为以N1和N2为边界的序列号黑洞中的数据报文,可能为乱序报文或对应上游丢包的重传报文。如果M1不属于所述序列号为M1的数据报文之前的任意一个序列号黑洞,即M1不在N1和N2之间,且没有落在其它序列号黑洞中,则可以确定序列号为M1的数据报文为对应下游丢包的重传报文,即所述发送设备之前发送的序列号为M1的数据报文在所述检测装置与所述接收设备之间发生了丢包,当前接收的序列号为M1的数据报文是重传报文。在确定序列号为M1的数据报文为对应下游丢包的重传报文时,可以将下游丢包数量加一,还可以将总体丢包数量加一。
需要说明的是,N3可能等于N2,则图2A中可以没有关于序号为N3的数据报文的传输过程。
如果确定M1大于N1且小于N2,则下面通过步骤203判断序列号为M1的数据报文是乱序报文还是对应上游丢包的重传报文。
步骤203:所述检测装置判断T2-T1是否大于等于RTT,如果T2-T1大于或等于RTT,则确定序列号为M1的数据报文为对应上游丢包的重传报文,即所述发送设备之前发送的序列号为M1的数据报文在所述发送设备和所述检测装置之间发生了丢包,当前接收的序列号为M1的数据报文是重传报文。其中,T1为所述检测装置接收序列号为N2的数据报文的时间,T2为所述检测装置接收序列号为M1的数据报文的时间,RTT为所述发送设备和所述接收设备之间的双向时延。该RTT的具体确定方式可以参考下面实施例2中的具体实施例。
在确定序列号为M1的数据报文为对应上游丢包的重传报文时,可以将上游丢包数量加一,还可以将总体丢包数量加一。另外,如果T2-T1小于RTT,则确定序列号为M1的数据报文为乱序报文。由于可以识别出乱序报文,从而一方面可以排除丢包误检的情况,进而可以更准确地实现丢包检测,另一方面可以检测出乱序的情况,进而可以更全面准确地实现传输性能的检测。
另外,同一序列号黑洞中可能不止一个数据报文,在收到序列号为M1的数据报文后还可能又收到其它位于同一序列号黑洞中的数据报文(假定序列号为M2,通常M2大于M1)。在第一种实现方式中,在确定序列号为M1的数据报文为对应上游丢包的重传报文的情况下可以直接确定序列号为M2的数据报文也为对应上游丢包的重传报文;在确定序列号为M1的数据报文为乱序报文后,将所述检测装置接收序列号为M2的数据报文的时间作为T2通过步骤203判断序列号为M2的数据报文是乱序报文还是对应上游丢包的重传报文。在第二种实现方式中,可以对于每个落到上述序列号黑洞中的数据报文(假定序列号为W)都将所述检测装置接收序列号为W的数据报文的时间作为T2通过步骤203判断序列号为W的数据报文是乱序报文还是对应上游丢包的重传报文。
进一步地,所述方法还可以包括步骤204。
步骤204:所述检测装置在一个检测时段结束后统计所述检测时段内的丢包指标。
在步骤204中可以统计上游丢包率UPLR、下游丢包率DPLR和总体丢包率TPLR中的一种或多种。
可以根据所述检测时段内的上游丢包数量ULNum确定所述检测时段内的上游丢包率UPLR,其中,所述上游丢包数量ULNum为在所述发送设备和所述检测装置之间发生了丢包的数据报文的数量。具体可以通过如下公式计算所述上游丢包率UPLR:UPLR=ULNum/TNum,其中,TNum为所述检测时段内接收的所述发送设备通过所述连接发送的所有数据报文的数量。
可以根据所述检测时段内的总体丢包数量TLNum确定所述检测时段内的总体丢包率TPLR,其中,所述总体丢包数量为在所述发送设备和所述接收设备之间发生了丢包的数据报文的数量。具体可以通过如下公式计算总体丢包率TPLR:TRLR=TLnum/TNum。
具体还可以在一个检测时段结束后根据所述检测时段内的下游丢包数量DLNum确定所述检测时段内的下游丢包率DPLR,其中,所述下游丢包数量为在所述检测装置和所述接收设备之间发生了丢包的数据报文的数量。具体可以根据如下公式计算下游丢包率DPLR:DPLR=DLNum/TNum。如果在步骤202-步骤203中只统计了上游丢包数量和总体丢包数量,则可以根据ULNum和TLNum计算下游丢包数量DLNum。根据本发明实施例1,检测装置通过识别接收的数据报文的序列号以及时间,自身即可对丢包进行检测,实现简单,效率较高。
图3A和3B是本发明实施例2提供的方法流程示意图,可以实现时延检测。在本发明实施例2中,检测装置可以内置或旁挂在如通信系统100中的任一传输设备上。如图3A和3B所示,本发明实施例2提供的方法包括如下步骤。
需要说明的是,在图3A中仅以检测装置旁挂在传输设备上为例进行示意,而且,所述检测装置所旁挂的传输设备将接收的报文镜像给所述检测装置的步骤和发送给所述接收设备的步骤之间可以没有特定的先后顺序。
步骤301:检测装置获取接收发送设备通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接发送的序列号为K1的数据报文的时间T3;
所述检测装置可以每隔一个预设时长获取接收当前数据报文的时间,如,每隔10秒获取接收当前数据报文的时间。所述检测装置也可以在某个指定的时间或收到检测指令时获取接收当前数据报文的时间。
如,当前接收到序列号为2001的数据报文,获取接收该数据报文的时间T3。
步骤302:所述检测装置在确定接收到所述接收设备通过所述连接发送的目标确认报文时,获取所述检测装置接收所述目标确认报文的时间T4,并根据T3、T4计算所述检测装置和所述接收设备之间的双向时延DRTT,其中,所述目标确认报文为所述检测装置接收到的第一个用于表明所述接收设备已接收所述序列号为K1的数据报文或所述序列号为K1的数据报文之后的数据报文的确认报文。
当所述可靠传输协议为传输控制协议TCP或流控制传输协议SCTP时,所述目标确认报文具体可以为所述检测装置接收到的第一个包括的确认号字段或选择性确认(Selective Acknowledgment,SACK)字段的最新右边界(right edge)字段的值大于或 等于K1+LenK1的确认报文,其中,LenK1为序列号为K1的数据报文的负载长度。
所述确认号为通过所述确认报文的Acknowledgment Number字段携带的。
如果序列号为K1的数据报文和序列号为K1的数据报文之前的数据报文都被所述接收设备成功接收到,所述目标确认报文通常为所述检测装置接收到的第一个包括的确认号字段的值大于或等于K1+LenK1的确认报文。
如果序列号为K1的数据报文被所述接收设备成功接收到但一个或多个序列号小于K1的数据报文丢失了,所述目标确认报文通常为所述检测装置接收到的第一个包括的SACK字段的最新右边界字段的值等于K1+LenK1的确认报文,也可能为所述检测装置接收到的第一个包括的SACK字段的最新右边界字段的值大于K1+LenK1的确认报文。
如果序列号为K1的数据报文丢失了,所述目标确认报文通常为所述检测装置接收到的第一个包括的SACK字段的最新右边界字段的值大于K1+LenK1的确认报文。
假定序列号K1之前的相邻数据报文为序列号为K2、负载长度为LenK2的数据报文。用于确认所述序列号为K1的数据报文之前的数据报文K2的确认报文携带的确认号具体可以是K1(即K1等于K2+LenK2)。所述接收设备向所述发送设备发送的携带的确认号为K1的确认报文用于表明已接收到序列号为K2的数据报文。如果所述接收设备在预定时间内没有收到序列号为K1的数据报文,则再次发送确认号为K1的确认报文(后续称为重复确认报文),直至收到序列号为K1的数据报文。
需要说明的是,如果在发送重复确认报文之前还接收到了序列号大于K1的数据报文,则可以通过重复确认报文的SACK字段携带用于指示已接收的序列号大于K1的数据报文的信息。如,接收设备相继接收到序列号为1001、3001、4001、5001、7001和8001的数据报文,在接收到序列号为8001的数据报文前还没有接收到序列号为2001的数据报文,则发送的重复确认报文的确认号为2001,用于确认序列号为1001的数据报文已接收到,该重复确认报文的SACK字段包括[8001 9001]和[4001 6001],其中,左边界为8001右边界为9001的[8001 9001]用于确认序列号为7001和8001的数据报文已接收到,左边界为4001右边界为6001的[4001 6001]用于确认序列号为3001、4001和5001的数据报文已接收到,其中9001为最新右边界字段的值。
相应地,对于序列号小于或等于K1的数据报文丢失的情况,所述检测装置在每次接收到重复确认报文后,均检测该重复确认报文中的SACK字段的最新右边界字段的值,一旦检测到携带的最新右边界字段的值大于或等于K1+LenK1的确认报文,则可以根据接收序列号为K1的数据报文的时间和接收该检测到的重复确认报文的时间计算所述检测装置和所述接收设备之间的双向时延DRTT。
步骤303:根据T3和T4计算所述检测装置和所述接收设备之间的双向时延DRTT。
所述检测装置和所述接收设备之间的双向时延通常称为下游双向时延。
所述检测装置可以直接根据一次检测过程中的T3和T4在步骤303中计算DRTT,具体可以将T3和T4的差值作为DRTT;也可以在一个统计时间段内多次根据步骤303之前的步骤获取多组T3和T4,如对于每个检测周期获取一组T3和T4,并在步骤303中根据多组T3和T4计算DRTT,具体可以是将各组的T3和T4的差值的平均值作为DRTT。
另外,在本发明实施例2中,还可以通过如下方式计算所述发送设备和所述检测设备之间的双向时延URTT(通常称为上游双向时延)。
具体地,在步骤301之前在所述发送设备和所述接收设备之间建立所述基于可靠传输协议的连接的过程中,其中一个设备作为客户端向另一个设备发送用于请求建立所述连接的请求消息,另一个设备作为服务器向所述客户端回复所述请求消息的响应消息。所述请求消息具体可以为SYN消息,相应地,所述响应消息可以为SYN ACK消息。
在所述发送设备和所述接收设备建立所述连接的过程中,所述检测装置可以接收到用于建立所述连接的请求消息和响应消息,并可以根据接收所述请求消息的时间T5和接收所述响应消息的时间T6计算所述服务器和所述检测装置之间的时延,具体可以将T5和T6的差值确定为所述服务器和所述检测装置之间的时延。如果作为所述服务器的为所述发送设备,则确定的所述服务器和所述检测装置之间的时延即为URTT。
进一步地,还可以利用RTT=URTT+DRTT计算所述发送设备和所述接收设备之间的双向时延。
根据本发明实施例2,检测装置根据发送数据报文的时间和接收目标确认报文的时间计算时延,因此自身即可对时延进行检测,实现简单,效率较高。
在具体实现时,可以将上述实施例1和实施例2结合实施。如,实施例1的步骤203的RTT具体可以是根据实施例2的实现方式计算出来的。
需要说明的是,当检测装置内置在传输设备上时,对于本发明实施例1和2中所说的检测装置所接收的所述发送设备和所述接收设备之间相互传输的信息(如数据报文、确认报文、请求消息、响应消息,后续称为信息A),本发明实施例1和2中所说的检测装置接收信息A的时间具体可以为所述检测装置所在的传输设备接收或发送信息A的时间。
如果检测装置内置在所在设备用于接收信息A的端口处,本发明实施例1和2中所说的检测装置接收信息A的时间通常为所述检测装置所在设备接收信息A的时间。相应地,所述检测装置可以将信息A到达所述检测装置的时间作为所述检测装置接收信息A的时间,也可以将所述检测装置所在的传输设备接收到信息A的时间作为所述检测装置接收信息A的时间。
如果检测装置内置在所在设备用于发送信息A的端口处,本发明实施例1和2中所说的检测装置接收信息A的时间通常为所述检测装置所在设备发送信息A的时间。相应地,所述检测装置可以将信息A到达所述检测装置的时间作为所述检测装置接收信息A的时间,也可以将所述检测装置所在的传输设备发送信息A的时间作为所述检测装置接收信息A的时间。
图4是本发明实施例3提供的方法流程示意图,可以实现丢包检测和时延检测。所述检测方法应用于通信系统,所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输。如图4所示,本发明实施例3提供的方法包括如下步骤。
步骤401:第一检测设备生成检测报文,并通过所述连接发送所述检测报文,所述检测报文负载为空,且所述检测报文包括在当前检测周期内第一检测设备已通过所述连接发送的被统计报文的数量Num1。
所述第一检测设备具体可以是所述发送设备;也可以是所述发送设备和所述接收设备之间的任一传输设备,如CR。如果所述第一检测设备为传输设备,则Num1具体为所述第一检测设备在所述当前检测周期内已通过所述连接传输的被统计报文的数量。
在具体实现时,所述第一检测设备可以周期性地生成检测报文,所述当前检测周期可以是上一检测报文和当前检测报文之间的时间。如果根据检测周期确定在发送序列号为J1的报文后要生成所述检测报文,则生成的所述检测报文的序列号可以为J1+LenJ1,并可以在发送序列号为J1的报文之后发送所述检测报文。
所述被统计报文可以是所述第一检测设备通过所述连接向所述接收设备发送的所有报文或部分报文。在具体实现时,所述第一检测设备向所述接收设备发送的报文包括数据报文,还可能包括不携带通信数据的报文,如控制报文。所述第一检测设备可以统计在当前检测周期内已通过所述连接向所述接收设备发送的所有报文的数量,即所述被统计报文包括所有类型的报文,所述第一检测设备在对发送的报文的数量进行统计时对报文的类型不做区分。所述第一检测设备也可以统计在当前检测周期内已通过所述连接向所述接收设备发送的预设类型的报文(如数据报文)的数量,即所述被统计报文为预设类型的报文。
步骤402:第二检测设备接收所述检测报文,确定在所述当前检测周期内已通过所述连接接收的被统计报文的数量Num2,Num1和Num2用于判断所述第一检测设备和所述第二检测设备之间在所述当前检测周期内传输的被统计报文是否发生了丢包。
所述第二检测设备具体可以为所述接收设备或所述第一检测设备和所述接收设备之间的任一传输设备,如OLT。当所述第二检测设备为位于所述第一检测设备和所述接收设备之间的传输设备时,Num2具体为所述第二检测设备在所述当前检测周期内已通过所述连接传输的被统计报文的数量。
根据一种实现方式,在步骤401中所述第一检测设备统计的是在当前检测周期内已通过所述连接向所述接收设备发送的所有报文的数量,相应地,在步骤402中所述第二检测设备统计的是在所述当前检测周期内已通过所述连接接收的所有报文的数量,即所述第二检测设备在对接收的报文的数量进行统计时对报文的类型不做区分。
根据另一种实现方式,在步骤401中所述第一检测设备统计的是在当前检测周期内已通过所述连接向所述接收设备发送的预设类型的报文的数量,相应地,在步骤402中所述第二检测设备统计的是在所述当前检测周期内已通过所述连接接收的所述预设类型的报文的数量。
所述第二检测设备确定Num2后,可以执行步骤403根据Num1和Num2判断所述第一检测设备和所述第二检测设备之间在所述当前检测周期内传输的被统计报文是否发生了丢包。进一步地,还可以根据Num1和Num2计算所述第一检测设备与所述第二检测设备之间在所述当前检测周期内的丢包数量LNum,其中,Num1大于Num2,具体可以将Num1和Num2的差值作为LNum。另外,还可以根据Num1和Num2计算所述第一检测设备和所述第二检测设备之间的丢包率,如将LNum和Num1的比值作为所述第一检测设备和所述第二检 测设备之间的丢包率。
所述第二检测设备为位于所述第一检测设备和所述接收设备之间的传输设备时,在确定Num2后,还可以执行步骤404将Num2添加到所述检测报文中,并发送所述检测报文,即发送的检测报文中包括Num2。
步骤403和步骤404可以都执行,也可以只执行其中一个步骤。当都执行时,步骤403和步骤404之间可以没有特定的先后顺序。如果不执行步骤404,当所述第二检测设备为位于所述第一检测设备和所述接收设备之间的传输设备时,可以将接收的所述检测报文直接发送出去。
需要说明的是,在本发明实施例3中,第一检测设备指的是生成检测报文的设备,第二检测设备指的接收检测报文并向检测报文中添加检测数据(如Num2)的设备。在具体实现时,第二检测设备可以有一个或多个,当有多个第二检测设备时,各第二检测设备在接收到所述检测报文时分别执行步骤402。
根据本发明实施例3,在对丢包进行检测时各设备无需各自上报已传输的被统计报文的数量,实现简单,效率较高。
在步骤401中,所述第一检测设备还可以将所述第一检测设备生成所述检测报文的时间T1添加到所述检测报文中。相应地,在步骤402中,所述第二检测设备还可以在收到所述检测报文后,获取接收所述检测报文的时间T2,T1和T2用于计算所述第一检测设备和所述第二检测设备之间的单向时延。所述第二检测设备获取T2后可以根据T1和T2计算所述第一检测设备和所述第二检测设备之间的单向时延,具体可以将T1和T2的差值作为所述单向时延。所述第二传输设备为位于所述第一检测设备和所述接收设备之间的传输设备时,还可以在发送所述检测报文之前将T2添加到所述检测报文中。
通过本发明实施例3在对时延进行检测时,各设备无需各自上报时间戳,实现简单,效率较高。
在步骤401中,所述第一检测设备还可以将所述第一检测设备的标识Id1添加到所述检测报文中。相应地,在步骤402中,所述第二检测设备为位于所述第一检测设备和所述接收设备之间的传输设备时,还可以在发送所述检测报文之前将所述第二检测设备的标识Id2添加到所述检测报文中。所述第一检测设备的标识和所述第二检测设备的标识可以用于确定所述检测报文所经过的传输路径。进一步地,所述第一检测设备和所述第二检测设备还可以将本设备的标识在所述检测报文中的标识列表中的序号加入到所述检测报文中,如,第一检测设备将本设备的序号01加入到所述检测报文中,第一个第二检测设备(即第一个收到所述检测报文的第二检测设备)将本设备的序号02加入到所述检测报文中,第二个第二检测设备(即第二个收到所述检测报文的第二检测设备)将本设备的序号03加入到所述检测报文中,依此类推。
通过上述实现方法,还可以确定所述检测报文所经过的路径,从而可以更全面准确地评估传输性能。
在本发明实施例3中,当所述可靠传输协议为TCP协议时,具体可以通过在检测报文中扩展TCP选项(Option)字段携带上述数量、时间、标识等信息。所述检测报文到达某个第二检测设备时,如果所述检测报文的TCP Option的长度已经超过TCP Option的限制, 则可以再生成一个具有相同序列号且负载为空的检测报文并将本设备获取的数量、时间、标识等信息加入到新生成的检测报文中。
在具体实现时,所述第一检测设备和所述第二检测设备可以将在当前检测周期内各自已接收或发送的被统计报文的数量、各自生成或接收检测报文的时间和本设备的标识中的一个或多个的任意组合添加到所述检测报文中。
如,CR生成检测报文并将当前检测周期内已传输的报文的数量添加到所述检测报文中,BRAS和OLT分别在收到所述检测报文后将当前检测周期内已传输的报文的数量添加到所述检测报文中。则其它设备或所述接收设备可以利用CR、BRAS和OLT分别加入的报文的数量判断CR、BRAS和OLT中任意两个设备之间是否发生丢包、以及丢失了多少报文。BRAS和OLT中的任一设备(如OLT)也可以计算某一上游设备(如CR或BRAS)和本设备之间是否发生丢包、以及丢失了多少报文。
又如,CR生成检测报文并将生成检测报文的时间添加到所述检测报文中,BRAS和OLT分别在收到所述检测报文后将接收所述检测报文的时间添加到所述检测报文中。则其它设备或所述接收设备可以利用CR、BRAS和OLT分别加入的时间计算CR、BRAS和OLT中任意两个设备之间的时延。BRAS和OLT中的任一设备(如OLT)也可以计算某一上游设备(如CR或BRAS)和本设备之间的时延。
再如,CR生成检测报文并将本设备的标识添加到所述检测报文中,BRAS和OLT分别在收到所述检测报文后将本设备的标识添加到所述检测报文中。则其它设备或所述接收设备可以利用所述检测报文携带的标识列表确定所述检测报文所经过的传输路径。BRAS和OLT中的任一设备(如OLT)也可以确定所述检测报文在到达本设备之前已经过的传输路径。
在具体实现时,可以将所述发送设备作为所述第二检测设备,将所述发送设备和所述接收设备之间的所有设备均作为所述第二检测设备,进一步还可以将所述接收设备也作为所述第二检测设备。
假设所述发送设备和所述接收设备之间的TCP连接经过三个检测点,依次为CR、Bras和OLT,这三个检测点对所述发送设备通过所述TCP连接发送的数据流进行检测。CR按照预设的时间间隔在传输的报文之间插入检测报文,如在序列号为3001的报文之后插入序列号为4001且负载长度为0的检测报文,所述检测报文的TCP Option的字段包括CR的设备序号0(标识是第一个检测点)、设备标识CR1、生成所述检测报文时的本地时间2345678、以及在从生成上一检测报文的时间到当前时间之间已经传输的该数据流的报文的数量3。所述检测报文依次经过检测点Bras和OLT。每个检测点都会对检测报文进行修改,假设Bras向所述检测报文的TCP Option字段添加了Bras的设备序号1(标识是第二个检测点)、设备标识Bras1、接收所述检测报文时的本地时间7645678、以及从接收上一检测报文到接收当前检测报文之间已经传输的该数据流的报文的数量2,假设OLT向所述检测报文的TCP Option字段添加了OLT的设备序号2(标识是第三个检测点)、设备标识OLT1、接收所述检测报文时的本地时间8895678、以及从接收上一检测报文到接收当前检测报文之间已经传输的该数据流的报文的数量2。则在OLT上可以得到:在当前检测周期内,CR1向 Bras1总共发了3个报文,丢了1个报文,相应地,丢包率就是1/3;从CR1到Bras1的单向时延是7645678–2345678;Bras1向OLT1总共发了2个报文,丢了0个报文,相应地,丢包率为0,从Bras1到OLT1的单向时延是8895678–7645678。
如果各个检测点之间没有做时间同步,通过本发明实施例3计算出的单向时延为相对单向时延,相对单向时延的意义在于观察其变化量,也就是比较前后多次检测的单向时延的变化量,观察时延是变大了还是变小了,为传输质量评估提供参考。
基于本发明实施例1-3中的方案进一步可以实现故障定界,即确定故障发生的具体位置。以采用本发明实施例1-2中的方案为例进行举例如下。如,当某个用户的业务质量不好的时候,控制中心可以向该用户的家庭网关下发控制命令以指示该家庭网关启动传输性能检测,如检测该家庭网关的上下游的丢包率和/或时延,然后该家庭网关可以将检测的上下游的丢包率和/或时延上报到控制中心,控制中心进行分析。如果通过比较发现下游丢包率和/或下游时延较大,则可判断网络故障发生在用户的家庭内,如果检测到的上游丢包率和/或上游时延较大,即可判断网络故障发生在互联网服务供应商(Internet Service Provider,ISP)的网络中。又如,当某个用户的业务质量不好的时候,控制中心可以向靠近接收设备的传输设备A(如家庭网关)和靠近发送设备的传输设备B下发控制命令以指示传输设备A和传输设备B启动传输性能检测,检测到A设备的下游丢包率为1%、上游丢包率为0.1%,B设备的下游丢包率为1%、上游丢包率为0.1%,那么根据这个结果可以判断,A设备的下游丢包率为1%,即丢包主要发生在A设备的下游(如用户家庭网络内部),A设备和B设备之间没有丢包,B的上游丢包率为0.1%。
根据本发明实施例1,本发明实施例4提出了一种检测装置500,如图5所示,检测装置500包括:接收单元510和处理单元520。
所述接收单元510,用于接收发送设备和接收设备通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接相互传输的报文。
所述处理单元520,用于在所述接收单元510相继接收到发送设备通过所述连接发送的序列号为N1和N2的数据报文后,确定N2大于N1+LenN1,其中,LenN1为序列号为N1的数据报文的负载长度;还用于在所述接收单元510接收到序列号为M1的数据报文后,确定序列号为M1的数据报文的接收时间晚于序列号为N2的数据报文的接收时间,且确定M1大于N1且小于N2;并用于在确定T2-T1大于或等于RTT时,确定序列号为M1的数据报文为对应上游丢包的重传报文,其中,T1为所述接收单元510接收序列号为N2的数据报文的时间,T2为所述接收单元510接收序列号为M1的数据报文的时间,RTT为所述发送设备和所述接收设备之间的双向时延,所述上游丢包指的是在所述发送设备和所述检测装置之间发生的丢包。
本发明实施例4中描述的功能单元可以用来实施上述实施例1所述的方法中的检测装置执行的操作。具体实施方式可以参考上述实施例1中的描述,此处不再赘述。
根据本发明实施例2,本发明实施例5提出了一种检测装置600,如图6所示,检测 装置600包括:接收单元610和处理单元620。
所述接收单元610,用于接收发送设备和接收设备通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接相互传输的报文,所述可靠传输协议为传输控制协议TCP或流控制传输协议SCTP。
所述处理单元620,用于获取所述接收单元610接收发送设备通过所述连接发送的序列号为K1的数据报文的时间T3;并用于在所述接收单元610接收到接收到第一个包括的选择性确认SACK字段的最新右边界字段的值大于K1+LenK1且用于确认所述序列号为K1的数据报文之前的数据报文的确认报文时,根据T3、T4计算所述检测装置和所述接收设备之间的双向时延,其中,T4为所述接收单元610接收所述确认报文的时间,LenK1为序列号为K1的数据报文的负载长度。
本发明实施例5中描述的功能单元可以用来实施上述实施例2所述的方法中的检测装置执行的操作,具体实施方式可以参考上述实施例2中的描述,此处不再赘述。
根据本发明实施例2和3,本发明实施例6A提出了一种传输设备700A,如图7A所示,传输设备700A包括:通信单元710A和检测装置720A。
所述通信单元710A,用于传输发送设备和接收设备之间相互传输的信息,并将所述信息发送给所述检测装置720A,所述信息包括通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接传输的报文,和/或用于建立所述连接的消息。
所述检测装置720A,具体可以为如本发明实施例4所述的检测装置500,相应地,所述通信单元710A具体将所述信息发送给所述检测装置720A的接收单元510。所述检测装置720A,还可以具体为如本发明实施例5所述的检测装置600,相应地,所述通信单元710A具体将所述信息发送给所述检测装置720A的接收单元610。具体实施方式可以参考上述实施例1和2中的描述,此处不再赘述。
根据本发明实施例2和3,本发明实施例6B提出了一种传输设备700B,所述传输设备700B应用于通信系统中,所述通信系统包括发送设备、接收设备和所述传输设备700B,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述传输设备700B传输。
如图7B所示,传输设备700B包括:通信单元710B和处理单元720B。
所述通信单元710B,用于传输发送设备和接收设备通过所述连接相互传输的报文;
所述处理单元720B,用于在所述通信单元710B相继接收到发送设备通过所述连接发送的序列号为N1和N2的数据报文后,确定N2大于N1且和N1不连续;还用于在所述通信单元710B先后接收到序列号为N2的数据报文和序列号为M1的数据报文后,当确定M1大于N1且小于N2且确定T2-T1大于或等于RTT时,确定序列号为M1的数据报文为对应上游丢包的重传报文,其中,T1为所述通信单元710B接收或发送序列号为N2的数据报文的时间,T2为所述通信单元710B接收或发送序列号为M1的数据报文的时间,RTT为所述发送设备和所述接收设备之间的双向时延,所述上游丢包指的是在所述发送设备和所述传输设备700B之间发生的丢包。
在具体实现时,通常T1为所述通信单元710B接收序列号为N2的数据报文的时间,且T2为所述通信单元710B接收序列号为M1的数据报文的时间;或者T1为所述通信单元710B发送序列号为N2的数据报文的时间,且T2为所述通信单元710B发送序列号为M1的数据报文的时间。
本发明实施例6B所提供的传输设备的700B的功能单元可以用来实施上述实施例1所述的方法中的检测装置执行的操作。具体实施方式可以参考上述实施例1中的描述,此处不再赘述。
根据本发明实施例2和3,本发明实施例6C提出了一种传输设备700C,所述传输设备应用于通信系统中,所述通信系统包括发送设备、接收设备和所述传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述传输设备传输。
如图7C所示,传输设备700C包括:通信单元710C和处理单元720C。
所述通信单元710C,用于传输发送设备和接收设备通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接相互传输的报文。
所述处理单元720C,用于获取所述通信单元710C接收或发送所述发送设备通过所述连接发送的序列号为K1的数据报文的时间T3;并用于在确定所述通信单元710C接收到所述接收设备通过所述连接发送的目标确认报文时,获取所述通信单元710C接收或发送所述目标确认报文的时间T4,并根据T3、T4计算所述检测装置和所述接收设备之间的双向时延DRTT,其中,所述目标确认报文为所述通信单元710C接收到的第一个用于表明所述接收设备已接收所述序列号为K1的数据报文或所述序列号为K1的数据报文之后的数据报文的确认报文。
当T3为所述通信单元710C接收序列号为K1的数据报文的时间时,通常T4为所述通信单元710C发送所述目标确认报文的时间。当T3为所述通信单元710C发送序列号为K1的数据报文的时间时,通常T4为所述通信单元710C接收所述目标确认报文的时间。
本发明实施例6C所提供的传输设备的700C的功能单元可以用来实施上述实施例1所述的方法中的检测装置执行的操作。具体实施方式可以参考上述实施例1中的描述,此处不再赘述。
根据本发明实施例3,本发明实施例7提出了一种检测设备800,所述检测设备800应用于通信系统中,所述通信系统包括发送设备、接收设备和至少一个传输设备,如图1A、1B所述的通信系统100所示,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输,所述检测设备为所述发送设备或所述至少一个传输设备中的一个。
如图8所示,检测设备800包括通信单元810和处理单元820。
所述通信单元810,用于通过所述连接传输报文;
所述处理单元820,用于生成检测报文并通过所述通信单元820发送所述检测报文,所述检测报文负载为空,且包括在当前检测周期内已通过所述通信单元发送的被统计报文 的数量Num1,Num1用于判断所述检测设备和所述检测设备的下游设备之间在所述当前检测周期内传输的被统计报文是否发生了丢包。
本发明实施例7中描述的功能单元可以用来实施上述实施例3所述的方法中的第一检测设备执行的操作,具体实施方式可以参考上述实施例3中的描述,此处不再赘述。
根据本发明实施例3,本发明实施例8提出了一种检测设备900,所述检测设备900应用于通信系统中,所述通信系统包括发送设备、接收设备和至少一个传输设备,如图1A、1B所述的通信系统100所示,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输。所述检测设备为所述接收设备或为所述至少一个传输设备中位于用于生成检测报文的设备和所述接收设备之间的传输设备。
如图9所示,检测设备900包括通信单元910和处理单元920。
所述通信单元810,用于通过所述连接传输报文;
所述处理单元820,用于在接收到所述检测报文后,确定所述通信单元在所述当前检测周期内已通过所述连接接收的被统计报文的数量Num2,Num2用于判断所述检测设备和所述检测设备的上游设备或下游设备之间在所述当前检测周期内传输的被统计报文是否发生了丢包。
本发明实施例8中描述的功能单元可以用来实施上述实施例3所述的方法中的第二检测设备执行的操作,具体实施方式可以参考上述实施例3中的描述,此处不再赘述。
根据本发明实施例1和2,本发明实施例9提供了一种检测装置1000,如图10所示,检测装置1000包括通信接口1010、处理器1020和存储器1030,其中,通信接口1010、处理器1020和存储器1030之间通过总线完成相互间的通信。
通信接口1010,用于接收发送设备和接收设备之间相互传输的信息,所述信息包括通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接传输的报文,和/或用于建立所述连接的消息。通信接口1010具体可以是网卡。
存储器1030,用于存放计算机操作指令。具体可以是高速RAM存储器,也可以是非易失性存储器(non-volatile memory)。
处理器1020,用于执行存储器1030中存放的计算机操作指令。处理器1020具体可以是中央处理器(central processing unit,CPU),或者是特定集成电路(Application Specific Integrated Circuit,ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路。
其中,处理器1020执行所述计算机操作指令使得检测装置1000执行上述实施例1或2所述的方法中的检测装置所执行的操作,具体实施方式可以参考上述实施例1或实施例2中的描述,此处不再赘述。
根据本发明实施例1和2,本发明实施例10提供了一种传输设备2000,如图11所示,传输设备2000包括收发器2010、处理器2020和存储器2030,其中,收发器2010、处理 器2020和存储器2030之间通过总线完成相互间的通信。
收发器2010,用于接收发送设备和接收设备之间相互传输的信息,并将所述信息传输给所述处理器2020,所述信息包括通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接传输的报文,和/或用于建立所述连接的消息。收发器2010具体可以是网卡。
存储器2030,用于存放计算机操作指令。具体可以是高速RAM存储器,也可以是非易失性存储器。
处理器2020,用于执行存储器2030中存放的计算机操作指令。处理器2020具体可以是CPU,或者是ASIC,或者是被配置成实施本发明实施例的一个或多个集成电路。
其中,处理器2020执行所述计算机操作指令使得传输设备2000执行上述实施例1或2所述的方法中的检测装置所执行的操作,具体实施方式可以参考上述实施例1或实施例2中的描述,此处不再赘述。
根据本发明实施例1和2,本发明实施例11提出了一种传输设备3000,如图12所示,传输设备3000包括:收发器3010、处理器3020和检测装置3030。
所述收发器3010,用于接收发送设备和接收设备之间相互传输的信息,并将所述信息发送给所述处理器3020,所述信息包括通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接传输的报文,和/或用于建立所述连接的消息。收发器3010具体可以是网卡。
所述处理器3020,用于将所述信息传输给所述检测装置。处理器3020具体可以是CPU,或者是ASIC,或者是被配置成实施本发明实施例的一个或多个集成电路。
所述检测装置3030,具体可以为如本发明实施例9所述的检测装置1000,相应地,所述处理器3020具体将所述信息发送给所述检测装置3030的通信接口1010。
根据本发明实施例3,本发明实施例12提供了一种检测设备4000,所述检测设备4000应用于通信系统中,所述通信系统包括发送设备、接收设备和至少一个传输设备,如图1A、1B所述的通信系统100所示,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输,所述检测设备为所述发送设备或所述至少一个传输设备中的一个。
如图13所示,检测设备4000包括收发器4010、处理器4020和存储器4030,其中,收发器4010、处理器4020和存储器4030之间通过总线完成相互间的通信。
收发器4010具体可以是网卡。
存储器4030,用于存放计算机操作指令。具体可以是高速RAM存储器,也可以是非易失性存储器。
处理器4020,用于执行存储器4030中存放的计算机操作指令。处理器4020具体可以是CPU,或者是ASIC,或者是被配置成实施本发明实施例的一个或多个集成电路。
其中,处理器4020执行所述计算机操作指令使得检测装置4000执行上述实施例3所述的方法中的第一检测设备所执行的操作,其中,所述处理器4020具体通过所述收发器接收和发送所述报文。
根据本发明实施例3,本发明实施例13提供了一种检测设备5000,所述检测设备5000应用于通信系统中,所述通信系统包括发送设备、接收设备和至少一个传输设备,如图1A、1B所述的通信系统100所示。所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输。所述检测设备为所述接收设备或为所述至少一个传输设备中位于用于生成检测报文的设备和所述接收设备之间的传输设备。
如图14所示,检测设备5000包括收发器5010、处理器5020和存储器5030,其中,收发器5010、处理器5020和存储器5030之间通过总线完成相互间的通信。
收发器5010具体可以是网卡。
存储器5030,用于存放计算机操作指令。具体可以是高速RAM存储器,也可以是非易失性存储器。
处理器5020,用于执行存储器5030中存放的计算机操作指令。处理器5020具体可以是CPU,或者是ASIC,或者是被配置成实施本发明实施例的一个或多个集成电路。
其中,处理器5020执行所述计算机操作指令使得检测装置5000执行上述实施例3所述的方法中的第二检测设备所执行的操作,其中,所述处理器具体通过所述收发器接收和发送所述报文。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。

Claims (39)

  1. 一种实现传输性能检测的方法,其特征在于,所述方法包括:
    检测装置在相继接收到发送设备通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接发送的序列号为N1和N2的数据报文后,确定N2大于N1且和N1不连续;
    所述检测装置在接收到序列号为N2的数据报文后接收到序列号为M1的数据报文;
    当所述检测装置确定M1大于N1且小于N2且确定T2-T1大于或等于RTT时,确定序列号为M1的数据报文为对应上游丢包的重传报文,其中,T1为所述检测装置接收序列号为N2的数据报文的时间,T2为所述检测装置接收序列号为M1的数据报文的时间,RTT为所述发送设备和所述接收设备之间的双向时延,所述上游丢包指的是在所述发送设备和所述检测装置之间发生的丢包。
  2. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    当所述检测装置确定M1大于N1且确定T2-T1小于RTT时,确定序列号为M1的数据报文为乱序报文。
  3. 如权利要求1或2所述的方法,其特征在于,序列号为N3的数据报文和序列号为M1的数据报文为所述检测装置先后相继接收到的两个数据报文,其中N3大于或等于N2;
    所述方法还包括:当所述检测装置确定M1小于N3且不属于所述序列号为M1的数据报文之前的任意一个序列号黑洞时,确定序列号为M1的数据报文为对应下游丢包的数据报文,其中,所述序列号黑洞为以一对相继顺序接收但序列号不连续的数据报文的序列号为边界的序列号范围。
  4. 如权利要求1-3任一所述的方法,其特征在于,所述确定序列号为M1的数据报文为对应上游丢包的重传报文之前还包括:
    所述检测装置确定所述发送设备和所述检测装置之间的双向时延URTT;
    所述检测装置确定所述检测装置和所述接收设备之间的双向时延DRTT;
    所述检测装置根据RTT=URTT+DRTT计算所述RTT;
    所述确定DRTT具体包括:
    所述检测装置获取接收所述发送设备通过所述连接发送的序列号为K1的数据报文的时间T3;
    所述检测装置在确定接收到所述接收设备通过所述连接发送的目标确认报文时,获取所述检测装置接收所述目标确认报文的时间T4,并根据T3、T4计算DRTT,其中,所述目标确认报文为所述检测装置接收到的第一个用于表明所述接收设备已接收所述序列号为K1的数据报文或所述序列号为K1的数据报文之后的数据报文的确认报文。
  5. 如权利要求4所述的方法,其特征在于,所述可靠传输协议为传输控制协议TCP或流控制传输协议SCTP;
    所述目标确认报文具体为所述检测装置接收到的第一个包括的确认号字段或选择性确认SACK字段的最新右边界字段的值大于或等于K1+LenK1的确认报文,其中,LenK1为序列号为K1的数据报文的负载长度。
  6. 如权利要求4或5所述的方法,其特征在于,
    所述确定URTT具体包括:
    当所述接收设备为客户端设备、所述发送设备为服务器时,所述检测装置接收所述接 收设备在建立所述连接时向所述发送设备发送的用于请求建立所述连接的请求消息,并接收所述发送设备向所述接收设备发送的所述请求消息的响应消息;
    所述检测装置将接收所述请求消息的时间和接收所述响应消息的时间的差值确定为URTT。
  7. 一种实现传输性能检测的方法,其特征在于,所述方法应用于通信系统中,所述通信系统包括发送设备、接收设备和所述传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述传输设备传输;所述方法包括:
    所述传输设备在相继接收到发送设备通过所述连接发送的序列号为N1和N2的数据报文后,确定N2大于N1且和N1不连续;
    所述传输设备在接收到序列号为N2的数据报文后接收到序列号为M1的数据报文;
    当所述传输设备确定M1大于N1且小于N2且确定T2-T1大于或等于RTT时,确定序列号为M1的数据报文为对应上游丢包的重传报文,其中,T1为所述传输设备接收或发送序列号为N2的数据报文的时间,T2为所述传输设备接收或发送序列号为M1的数据报文的时间,RTT为所述发送设备和所述接收设备之间的双向时延,所述上游丢包指的是在所述发送设备和所述传输设备之间发生的丢包。
  8. 一种实现传输性能检测的方法,其特征在于,所述方法包括:
    检测装置获取接收发送设备通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接发送的序列号为K1的数据报文的时间T3;
    所述检测装置在确定接收到所述接收设备通过所述连接发送的目标确认报文时,获取所述检测装置接收所述目标确认报文的时间T4,并根据T3、T4计算所述检测装置和所述接收设备之间的双向时延DRTT,其中,所述目标确认报文为所述检测装置接收到的第一个用于表明所述接收设备已接收所述序列号为K1的数据报文或所述序列号为K1的数据报文之后的数据报文的确认报文。
  9. 如权利要求8所述的方法,其特征在于,所述可靠传输协议为传输控制协议TCP或流控制传输协议SCTP;
    所述目标确认报文具体为所述检测装置接收到的第一个包括的确认号字段或选择性确认SACK字段的最新右边界字段的值大于或等于K1+LenK1的确认报文,其中,LenK1为序列号为K1的数据报文的负载长度。
  10. 如权利要求8或9所述的方法,其特征在于,所述方法还包括:
    当所述接收设备为客户端设备、所述发送设备为服务器时,所述检测装置接收所述接收设备在建立所述连接时向所述发送设备发送的用于请求建立所述连接的请求消息,并接收所述发送设备发送的所述请求消息的响应消息;
    所述检测装置将接收所述请求消息的时间和接收所述响应消息的时间的差值确定为所述发送设备和所述检测装置之间的双向时延URTT。
  11. 一种实现传输性能检测的通信系统,其特征在于,所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输;
    所述通信系统中的第一检测设备,用于生成检测报文,并通过所述连接发送所述检测报文,所述检测报文负载为空且包括在当前检测周期内所述第一检测设备已通过所述连接发送的被统计报文的数量Num1,所述第一检测设备为所述发送设备或所述至少一个传输设备中的一个;
    所述通信系统中的第二检测设备,用于在接收所述检测报文后,确定在所述当前检测周期内所述第二检测设备已通过所述连接接收的被统计报文的数量Num2,所述Num1和Num2用于判断所述第一检测设备和所述第二检测设备之间在所述当前检测周期内传输的被统计报文是否发生了丢包,所述第二检测设备为所述接收设备或为所述至少一个传输设备中位于所述第一检测设备和所述接收设备之间的传输设备。
  12. 如权利要求11所述的通信系统,其特征在于,所述第二检测设备还用于根据Num1和Num2判断所述第一检测设备和所述第二检测设备之间在所述当前检测周期内传输的被统计报文是否发生了丢包。
  13. 如权利要求11或12所述的通信系统,所述第二检测设备为所述至少一个传输设备中位于所述第一检测设备和所述接收设备之间的传输设备时,还用于将Num2添加到所述检测报文中,并发送所述检测报文。
  14. 如权利要求11-13任一所述的通信系统,其特征在于,
    所述第一检测设备,还用于将所述第一检测设备生成所述检测报文的时间T1添加到所述检测报文中;
    所述第二检测设备,还用于在收到所述检测报文后,获取接收所述检测报文的时间T2,T1和T2用于计算所述第一检测设备和所述第二检测设备之间的单向时延。
  15. 如权利要求14所述的通信系统,其特征在于,所述第二检测设备还用于根据T1和T2计算所述第一检测设备和所述第二检测设备之间的单向时延。
  16. 如权利要求14或15所述的通信系统,其特征在于,所述第二检测设备为所述至少一个传输设备中位于所述第一检测设备和所述接收设备之间的传输设备时,还用于在发送所述检测报文之前将T2添加到所述检测报文中。
  17. 如权利要求11-12任一所述的通信系统,其特征在于,
    所述第一检测设备,还用于将所述第一检测设备的标识添加到所述检测报文中;
    所述第二检测设备为所述至少一个传输设备中位于所述第一检测设备和所述接收设备之间的传输设备时,还用于在发送所述检测报文之前将所述第二检测设备的标识添加到所述检测报文中;
    所述第一检测设备的标识和所述第二检测设备的标识用于确定所述检测报文所经过的传输路径。
  18. 一种检测装置,其特征在于,所述检测装置包括接收单元和处理单元;
    所述接收单元,用于接收发送设备和接收设备通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接相互传输的报文;
    所述处理单元,用于在所述接收单元相继接收到发送设备通过所述连接发送的序列号为N1和N2的数据报文后,确定N2大于N1且和N1不连续;还用于在所述接收单元先后接收到序列号为N2的数据报文和序列号为M1的数据报文后,当确定M1大于N1且小于N2且确定T2-T1大于或等于RTT时,确定序列号为M1的数据报文为对应上游丢包的重传报文,其中,T1为所述接收单元接收序列号为N2的数据报文的时间,T2为所述接收单元接收序列号为M1的数据报文的时间,RTT为所述发送设备和所述接收设备之间的双向时延,所述上游丢包指的是在所述发送设备和所述检测装置之间发生的丢包。
  19. 如权利要求18所述的检测装置,其特征在于,所述处理单元还用于,当确定M1大于N1且确定T2-T1小于RTT时,确定序列号为M1的数据报文为乱序报文。
  20. 如权利要求18或19所述的检测装置,其特征在于,序列号为N3的数据报文和序列号为M1的数据报文为所述接收单元先后相继接收到的两个数据报文,其中N3大于或等于N2;
    所述处理单元还用于,当确定M1小于N3且不属于所述序列号为M1的数据报文之前的任意一个序列号黑洞时,确定序列号为M1的数据报文为对应下游丢包的数据报文,其中,所述序列号黑洞为以一对相继顺序接收但序列号不连续的数据报文的序列号为边界的序列号范围。
  21. 如权利要求18-20任一所述的检测装置,其特征在于,
    所述处理单元,还用于确定所述发送设备和所述检测装置之间的双向时延URTT,确定所述检测装置和所述接收设备之间的双向时延DRTT,并根据RTT=URTT+DRTT计算所述RTT;
    所述处理单元在确定DRTT时,具体用于:
    获取所述接收单元接收所述发送设备通过所述连接发送的序列号为K1的数据报文的时间T3;
    在确定所述接收单元接收到所述接收设备通过所述连接发送的目标确认报文时,获取所述接收单元接收所述目标确认报文的时间T4,并根据T3、T4计算DRTT,其中,所述目标确认报文为所述接收单元接收到的第一个用于表明所述接收设备已接收所述序列号为K1的数据报文或所述序列号为K1的数据报文之后的数据报文的确认报文。
  22. 如权利要求21所述的检测装置,其特征在于,所述可靠传输协议为传输控制协议TCP或流控制传输协议SCTP;
    所述目标确认报文具体为所述接收单元接收到的第一个包括的确认号字段或选择性确认SACK字段的最新右边界字段的值大于或等于K1+LenK1的确认报文,其中,LenK1为序列号为K1的数据报文的负载长度。
  23. 如权利要求21或22所述的检测装置,其特征在于,
    当所述接收设备为客户端设备、所述发送设备为服务器时,所述接收单元还用于接收所述接收设备在建立所述连接时向所述发送设备发送的用于请求建立所述连接的请求消息,以及所述发送设备向所述接收设备发送的所述请求消息的响应消息;
    所述处理单元在确定URTT时具体用于:将所述接收单元接收所述请求消息的时间和 接收所述响应消息的时间的差值确定为URTT。
  24. 一种检测装置,其特征在于,所述检测装置包括接收单元和处理单元;
    所述接收单元,用于接收发送设备和接收设备通过所述发送设备和接收设备之间建立的基于可靠传输协议的连接相互传输的报文;
    所述处理单元,用于获取所述接收单元接收发送设备通过所述连接发送的序列号为K1的数据报文的时间T3;并用于在确定所述接收单元接收到所述接收设备通过所述连接发送的目标确认报文时,获取所述接收单元接收所述目标确认报文的时间T4,并根据T3、T4计算所述检测装置和所述接收设备之间的双向时延DRTT,其中,所述目标确认报文为所述接收单元接收到的第一个用于表明所述接收设备已接收所述序列号为K1的数据报文或所述序列号为K1的数据报文之后的数据报文的确认报文。
  25. 如权利要求24所述的检测装置,其特征在于,所述可靠传输协议为传输控制协议TCP或流控制传输协议SCTP;
    所述目标确认报文具体为所述接收单元接收到的第一个包括的确认号字段或选择性确认SACK字段的最新右边界字段的值大于或等于K1+LenK1的确认报文,其中,LenK1为序列号为K1的数据报文的负载长度。
  26. 如权利要求24或25所述的检测装置,其特征在于,
    当所述接收设备为客户端设备、所述发送设备为服务器时,所述接收单元还用于接收所述接收设备在建立所述连接时向所述发送设备发送的用于请求建立所述连接的请求消息,以及所述发送设备向所述接收设备发送的所述请求消息的响应消息;
    所述处理单元,还用于将所述接收单元接收所述请求消息的时间和接收所述响应消息的时间的差值确定为所述发送设备和所述检测装置之间的双向时延URTT。
  27. 一种传输设备,其特征在于,所述传输设备包括通信单元和如权利要求15-20所述的检测装置;
    所述通信单元,用于传输所述发送设备和所述接收设备之间相互传输的信息,并将所述信息发送给所述检测装置,所述信息包括通过所述连接传输的报文和/或用于建立所述连接的消息。
  28. 一种传输设备,其特征在于,所述传输设备应用于通信系统中,所述通信系统包括发送设备、接收设备和所述传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述传输设备传输;
    所述传输设备包括通信单元和处理单元;
    所述通信单元,用于传输发送设备和接收设备通过所述连接相互传输的报文;
    所述处理单元,用于在所述通信单元相继接收到发送设备通过所述连接发送的序列号为N1和N2的数据报文后,确定N2大于N1且和N1不连续;还用于在所述通信单元先后接收到序列号为N2的数据报文和序列号为M1的数据报文后,当确定M1大于N1且小于N2 且确定T2-T1大于或等于RTT时,确定序列号为M1的数据报文为对应上游丢包的重传报文,其中,T1为所述通信单元接收或发送序列号为N2的数据报文的时间,T2为所述通信单元接收或发送序列号为M1的数据报文的时间,RTT为所述发送设备和所述接收设备之间的双向时延,所述上游丢包指的是在所述发送设备和所述传输设备之间发生的丢包。
  29. 一种传输设备,其特征在于,所述传输设备应用于通信系统中,所述通信系统包括发送设备、接收设备和所述传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述传输设备传输;
    所述传输设备包括通信单元和处理单元;
    所述通信单元,用于传输发送设备和接收设备通过所述连接相互传输的报文;
    所述处理单元,用于获取所述通信单元接收或发送所述发送设备通过所述连接发送的序列号为K1的数据报文的时间T3;并用于在确定所述通信单元接收到所述接收设备通过所述连接发送的目标确认报文时,获取所述通信单元接收或发送所述目标确认报文的时间T4,并根据T3、T4计算所述检测装置和所述接收设备之间的双向时延DRTT,其中,所述目标确认报文为所述通信单元接收到的第一个用于表明所述接收设备已接收所述序列号为K1的数据报文或所述序列号为K1的数据报文之后的数据报文的确认报文。
  30. 一种检测设备,其特征在于,所述检测设备应用于通信系统中,所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少一个传输设备传输,所述检测设备为所述发送设备或所述至少一个传输设备中的一个;
    所述检测设备包括通信单元和处理单元;
    所述通信单元用于通过所述连接传输报文;
    所述处理单元,用于生成检测报文并通过所述通信单元发送所述检测报文,所述检测报文负载为空,且包括在当前检测周期内已通过所述通信单元发送的被统计报文的数量Num1,Num1用于判断所述检测设备和所述检测设备的下游设备之间在所述当前检测周期内传输的被统计报文是否发生了丢包。
  31. 如权利要求30所述的检测设备,其特征在于,
    所述处理单元,还用于将所述第一检测设备生成所述检测报文的时间T1添加到所述检测报文中,T1用于计算所述检测设备和所述检测设备的下游设备之间的单向时延。
  32. 如权利要求30或31所述的检测设备,其特征在于,
    所述检测设备,还用于将所述检测设备的标识添加到所述检测报文中,所述检测设备的标识用于确定所述检测报文所经过的传输路径。
  33. 一种检测设备,其特征在于,所述检测设备应用于通信系统中,所述通信系统包括发送设备、接收设备和至少一个传输设备,所述发送设备和所述接收设备通过所述发送设备和所述接收设备之间建立的基于可靠传输协议的连接传输报文,所述报文经所述至少 一个传输设备传输,所述检测设备为所述接收设备或为所述至少一个传输设备中位于用于生成检测报文的设备和所述接收设备之间的传输设备,所述检测报文的负载为空;
    所述检测设备包括通信单元和处理单元;
    所述通信单元用于通过所述连接传输报文;
    所述处理单元,用于在接收到所述检测报文后,确定所述通信单元在所述当前检测周期内已通过所述连接接收的被统计报文的数量Num2,Num2用于判断所述检测设备和所述检测设备的上游设备或下游设备之间在所述当前检测周期内传输的被统计报文是否发生了丢包。
  34. 如权利要求33所述的检测设备,其特征在于,所述通信单元接收的所述检测报文包括生成所述检测报文的设备添加的在当前检测周期内已通过所述连接发送的被统计报文的数量Num1;所述处理单元还用于根据Num1和Num2判断生成所述检测报文的设备和所述检测设备之间在所述当前检测周期内传输的被统计报文是否发生了丢包。
  35. 如权利要求33或34所述的检测设备,所述检测设备为所述至少一个传输设备中位于生成所述检测报文的设备和所述检测设备之间的传输设备时,所述处理单元还用于将Num2添加到所述检测报文中,并通过所述通信单元发送所述检测报文。
  36. 如权利要求33-35任一所述的检测设备,其特征在于,
    所述检测设备为所述至少一个传输设备中位于生成所述检测报文的设备和所述检测设备之间的传输设备时,所述处理单元还用于在所述通信单元收到所述检测报文后,获取所述通信单元接收所述检测报文的时间T2,T2用于计算所述检测设备和所述检测设备的上游设备或下游设备之间的单向时延。
  37. 如权利要求36所述的检测设备,其特征在于,所述通信单元接收的所述检测报文还包括所述检测报文的生成时间T1,所述检测设备还用于根据T1和T2计算所述第一检测设备和所述第二检测设备之间的单向时延。
  38. 如权利要求36或37所述的检测设备,其特征在于,所述检测设备为所述至少一个传输设备中位于生成所述检测报文的设备和所述检测设备之间的传输设备时,所述处理单元还用于在通过所述通信单元发送所述检测报文之前将T2添加到所述检测报文中。
  39. 如权利要求33-38任一所述的检测设备,其特征在于,
    所述检测设备为所述至少一个传输设备中位于生成所述检测报文的设备和所述检测设备之间的传输设备时,所述处理单元还用于在通过所述通信单元发送所述检测报文之前将所述检测设备的标识添加到所述检测报文中,所述第二检测设备的标识用于确定所述检测报文所经过的传输路径。
PCT/CN2018/084961 2017-06-30 2018-04-27 一种实现传输性能检测的方法、装置和系统 WO2019001129A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP18822759.9A EP3637692A4 (en) 2017-06-30 2018-04-27 TRANSMISSION PERFORMANCE MEASUREMENT METHOD, APPARATUS, AND SYSTEM
US16/730,465 US20200136944A1 (en) 2017-06-30 2019-12-30 Data Transmission Performance Detection

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201710526008 2017-06-30
CN201710526008.5 2017-06-30
CN201710546444.9 2017-07-06
CN201710546444.9A CN109218122B (zh) 2017-06-30 2017-07-06 一种实现传输性能检测的方法、装置和系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/730,465 Continuation US20200136944A1 (en) 2017-06-30 2019-12-30 Data Transmission Performance Detection

Publications (1)

Publication Number Publication Date
WO2019001129A1 true WO2019001129A1 (zh) 2019-01-03

Family

ID=64740989

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/084961 WO2019001129A1 (zh) 2017-06-30 2018-04-27 一种实现传输性能检测的方法、装置和系统

Country Status (1)

Country Link
WO (1) WO2019001129A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114095400A (zh) * 2021-11-16 2022-02-25 国网青海省电力公司清洁能源发展研究院 用于电站5g通信系统的通信时延测试方法及其测试装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1842033A (zh) * 2005-03-30 2006-10-04 华为技术有限公司 在多协议标签交换网络中监测丢包率的方法
CN1937541A (zh) * 2005-09-20 2007-03-28 华为技术有限公司 一种网络性能测试方法
CN101321092A (zh) * 2008-07-07 2008-12-10 上海华为技术有限公司 一种测量互联网协议传输网服务质量的方法和装置
CN106506124A (zh) * 2015-09-07 2017-03-15 中国移动通信集团公司 重传报文确定方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1842033A (zh) * 2005-03-30 2006-10-04 华为技术有限公司 在多协议标签交换网络中监测丢包率的方法
CN1937541A (zh) * 2005-09-20 2007-03-28 华为技术有限公司 一种网络性能测试方法
CN101321092A (zh) * 2008-07-07 2008-12-10 上海华为技术有限公司 一种测量互联网协议传输网服务质量的方法和装置
CN106506124A (zh) * 2015-09-07 2017-03-15 中国移动通信集团公司 重传报文确定方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3637692A4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114095400A (zh) * 2021-11-16 2022-02-25 国网青海省电力公司清洁能源发展研究院 用于电站5g通信系统的通信时延测试方法及其测试装置

Similar Documents

Publication Publication Date Title
US11611498B2 (en) Round-trip time evaluation system, method, and apparatus
KR101459252B1 (ko) Traceroute_delay 진단 커맨드
CN101232445B (zh) 通信终端、拥塞控制方法
US9143418B2 (en) Network transmission capacity measurement
CN105634836B (zh) 信息处理方法及装置
US11102273B2 (en) Uplink performance management
US10361937B2 (en) Method and apparatus for detecting operating status of node
US8885473B2 (en) Method for measurement of asymmetric network capacities
US20200136944A1 (en) Data Transmission Performance Detection
CN109981385B (zh) 一种实现丢包检测的方法、装置和系统
CN108322836A (zh) 一种数据传输的方法及装置
US10181994B2 (en) Probing a network
EP2922241B1 (en) Methods and apparatus to determine network delay with location independence from retransmission delay and application response time
WO2012071851A1 (zh) 根据网络抖动调整bfd发送间隔的方法及装置
WO2019001129A1 (zh) 一种实现传输性能检测的方法、装置和系统
Šošić et al. Resolving poor TCP performance on high-speed long distance links—Overview and comparison of BIC, CUBIC and Hybla
EP3100413B1 (en) Reliable network probing session
JP5537692B1 (ja) 品質劣化原因推定装置、品質劣化原因推定方法、品質劣化原因推定プログラム
CN101378352B (zh) RTCP SR报文的转发方法、测量QoS的方法、装置及系统
US10200438B2 (en) Test for preservation of differentiated service in an internet protocol network
Schulte et al. I'll be a bit late—packet reordering in mobile networks
US20130121192A1 (en) Measuring message stream quality across networks
Choy et al. Obtaining Accurate Bandwidth Estimations for the Internet of Things
CN116760765A (zh) 一种网络状态检测方法、装置、电子设备及存储介质
Peuhkuri Application and TCP measurements

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018822759

Country of ref document: EP

Effective date: 20200108