WO2013078594A1 - Path communication quality detection method and device - Google Patents

Path communication quality detection method and device Download PDF

Info

Publication number
WO2013078594A1
WO2013078594A1 PCT/CN2011/083050 CN2011083050W WO2013078594A1 WO 2013078594 A1 WO2013078594 A1 WO 2013078594A1 CN 2011083050 W CN2011083050 W CN 2011083050W WO 2013078594 A1 WO2013078594 A1 WO 2013078594A1
Authority
WO
WIPO (PCT)
Prior art keywords
counter
heartbeat
request message
content
heartbeat request
Prior art date
Application number
PCT/CN2011/083050
Other languages
French (fr)
Chinese (zh)
Inventor
黄龙
庞伟东
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2011/083050 priority Critical patent/WO2013078594A1/en
Priority to CN201180002965.9A priority patent/CN103404080B/en
Publication of WO2013078594A1 publication Critical patent/WO2013078594A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • 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/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements

Definitions

  • the present invention relates to the field of network communication technologies, and in particular, to a method and device for detecting path communication quality. Background technique
  • SCTP Stream Control Transmission Protocol
  • Embodiments of the present invention provide a method and device for detecting path communication quality, which implements detection of a communication quality of a path.
  • the sending end sends a heartbeat request message to the receiving end, where the heartbeat request message includes a source address and a destination address of the path to be detected, and a first field, where the first field indicates that the heartbeat request message is used for path communication Quality Inspection;
  • the sending end receives the heartbeat response message corresponding to the heartbeat request message, and determines the communication quality of the path to be detected according to the heartbeat request message and the heartbeat response message.
  • a sending unit configured to send a heartbeat request message to the receiving end, where the heartbeat request message includes a source address and a destination address of the path to be detected, and a first field, where the first field indicates that the heartbeat request message is used For path communication quality detection;
  • a receiving unit configured to receive a heartbeat response message corresponding to the heartbeat request message; and the heartbeat response message received by the unit determines a communication quality of the path to be detected.
  • the exhibition completes the detection of the communication quality of the path according to the heartbeat request message.
  • FIG. 1 is a schematic structural diagram of a multi-homing system according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a method for detecting a path communication quality according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram showing a partial composition of a center hop request message according to an embodiment of the present invention
  • FIG. 5 is a schematic flowchart of another embodiment of a method for detecting a path communication quality according to the present invention
  • FIG. 6 is another schematic diagram of a partial composition of a center hop request message according to an embodiment of the present invention
  • FIG. 8 is a schematic structural diagram of an apparatus for detecting path communication quality according to an embodiment of the present invention
  • FIG. 9 is a schematic structural diagram of another embodiment of an apparatus for detecting path communication quality according to the present invention
  • FIG. 10 is a schematic structural diagram of another embodiment of an apparatus for detecting path communication quality according to the present invention
  • FIG. 11 is a schematic structural diagram of another embodiment of an apparatus for detecting path communication quality according to the present invention
  • a schematic structural diagram of another embodiment of the device The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. The embodiments are a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
  • Transport Address is a binary combination of IP address and port, unique Identifies the sender and receiver of a message.
  • the endpoint uses the primary transport address to transmit user data, and does not use the alternate transport address for load sharing. When the primary transport address is inactive, the alternate transport address is enabled to transmit data.
  • a path is a vector with a starting identifier relative to an endpoint and is a source-destination address pair. When the destination transport address is inactive, the path to the destination address of the destination endpoint is considered faulty.
  • FIG. 1 is a schematic structural diagram of a multi-homing system according to an embodiment of the present invention.
  • the system includes two ports, namely, an endpoint A and an endpoint B.
  • the endpoint A has two IP addresses, namely IP1 and IP2, and the endpoint B also has Two IP addresses, IP3 and IP4.
  • FIG. 1 shows two paths: Path 1 ( Pathl ) and Path 2 ( Path 2 ). Actually, depending on the definition of the path, there can be up to 4 paths between the two endpoints.
  • a heartbeat request message may be used to detect an on/off state of the backup path.
  • port A sends a heartbeat request packet to port B.
  • the source and destination addresses of the heartbeat request packet correspond to the source and destination addresses of the alternate path respectively.
  • Port A starts the timer when sending heartbeat request packets. If the heartbeat response packet of the corresponding heartbeat request packet sent by port B is not received after the timer expires, the backup path between port A and port B is disconnected. If the timer expires, port B is received.
  • the heartbeat response message of the corresponding heartbeat request message sent This indicates that the alternate path between port A and port B is connected.
  • the heartbeat request message can only detect the on/off state of the alternate path, and cannot further detect the communication quality of the alternate path, for example, cannot detect the QoS parameter of the alternate path.
  • the heartbeat request message is extended in the embodiment of the present invention so that the relevant parameters are carried in order to implement the detection of the communication quality. See the following examples for details.
  • Step 21 A sending end sends a heartbeat request message to a receiving end, where the heartbeat request message includes a source address of a path to be detected and The destination address and the first field, the first field indicating that the heartbeat request message is used for path communication quality detection.
  • the system shown in FIG. 1 is taken as an example. If the path to be detected is path 2, and the source address and the destination address of the path 2 are IP2 and IP4, respectively, the endpoint A sends a heartbeat detection packet to the endpoint B, and the The source address and destination address in the header of the heartbeat detection packet are filled with IP2 and IP4, respectively.
  • the first field is also required to be carried in the existing heartbeat request packet, and the first field may be referred to as a heartbeat usage field, and the heartbeat usage field is used for the heartbeat usage field.
  • the heartbeat request message corresponding to the identifier is an ordinary heartbeat request message or a heartbeat request message for communication quality detection.
  • the Heartbeat Usage field can be included in the Sender-Specific Heartbeat Info section of the mind request.
  • Heartbeat Usage field can take a type length value (Type Length).
  • the heartbeat request message includes a heartbeat information part, and the heartbeat information part is composed of a Heartbeat Info Type, a Heartbeat Info Length, and a Sender-Specific Heartbeat Info. Part of the composition.
  • the Heartbeat Usage field is included in the Sender-Specific Heartbeat Info section, and the heartbeat information part is in the TLV format.
  • the Heartbeat Usage Type and the Heartbeat Request are used.
  • the Heartbeat Usage Length and Heartbeat Usage are composed of Heartbeat Usage Length.
  • the value of the Heartbeat Usage Type is 1 and the value of the Heartbeat Usage Type can be defined as 2.
  • the value of Heartbeat Usage Length can be defined as 4, and the value of Heartbeat Usage is used to indicate that the heartbeat request message is
  • the heartbeat request message is a heartbeat request message for the path communication quality check. For example, when the value is 0, it indicates that it is a normal heartbeat request message. When the value is 1, it indicates that the heartbeat is used for path communication quality detection. Request a message.
  • Step 22 The sending end receives the heartbeat response message corresponding to the heartbeat request message, and determines the communication quality of the path to be detected according to the heartbeat request message and the heartbeat response message.
  • the foregoing communication quality may be the number of lost packets or the hopping of the content of the packet. Further, the number of lost packets may be the number of packets lost for packets of different lengths. The number of packet loss and the detection of the hopping condition can be specifically referred to the following embodiments.
  • the existing heartbeat request message is extended, and the communication quality of the path is detected according to the heartbeat request message.
  • Step 41 End point A performs initial setting.
  • the initial settings can include:
  • a transmission cycle timer is started, which is used to indicate a period of sending a heartbeat request message, that is, a heartbeat request message is sent when the transmission cycle timer expires.
  • the detection period timer is started, and the detection period timer is used to indicate the detection period, that is, the detection ends when the detection period timer expires.
  • the value of the above-mentioned transmission cycle timer and the value of the detection cycle timer can be set according to actual needs.
  • Step 42 After the sending loop timer expires, the endpoint A sends a heartbeat request packet to the port B, and the value of the heartbeat request packet use field of the heartbeat request packet is set to indicate that the heartbeat request packet is used for communication quality detection. Value.
  • the value of the heartbeat request message use field is 1 indicating that the heartbeat request message is used for communication quality detection, set the value of the heartbeat request message use field to 1.
  • the source address and the destination address of the packet header of the heartbeat request packet may be the alternate path, and the source and destination addresses corresponding to the alternate path are IP2 and IP4.
  • the source address and destination address in the header of the heartbeat request packet are IP2 and IP4, respectively.
  • Step 43 Endpoint A increments the value of the first counter by one after each of the above heartbeat request messages.
  • Step 44 After receiving the heartbeat request packet, endpoint B sends a corresponding heartbeat response packet to port A.
  • the source address and the destination address of the heartbeat response packet are in an interchangeable relationship with the source address and the destination address of the corresponding heartbeat request packet.
  • the source and destination addresses of the heartbeat request packet are IP2 and IP4 respectively.
  • the source address and destination address of the corresponding heartbeat response are IP4 and IP2, respectively.
  • the payload content of the heartbeat response message is the same as the payload content of the corresponding heartbeat request message when no message content hopping occurs.
  • Step 45 Endpoint A increments the value of the second counter by one after each receiving a heartbeat response message corresponding to the heartbeat request message.
  • the port A can determine whether to correspond to the heartbeat request packet according to the source address and the destination address in the heartbeat response packet.
  • the heartbeat request message can be repeatedly transmitted, and the corresponding heartbeat response message is received, that is, the above steps 42-45 can be repeatedly performed.
  • Step 46 After the detection period timer expires, endpoint A calculates the packet loss rate.
  • the calculation formula of the packet loss rate is: (A-B) /A.
  • the packet loss rate is calculated by using the heartbeat request message for communication quality detection and setting a counter.
  • FIG. 5 is a schematic flowchart of another embodiment of a method for detecting path communication quality according to the present invention, including: Step 51: End point A performs initial setting. Detection.
  • the initial settings include:
  • the length of the packet that can be detected in this embodiment is as shown in Table 1:
  • nine first counters and two second counters corresponding to each of the first counters may be respectively set for the statistical length of 8, 16 respectively. , 32, 64....1400 4 packet loss rate.
  • a transmission cycle timer is started, which is used to indicate a period of sending a heartbeat request message, that is, a heartbeat request message is sent when the transmission cycle timer expires.
  • the detection cycle timer is started, and the detection cycle timer is used to indicate the detection cycle, that is, the detection ends when the detection cycle timer expires.
  • Step 52 After the sending loop timer expires, the endpoint A sends a heartbeat request packet to the endpoint B, and the value of the heartbeat request packet use field of the heartbeat request packet is set to indicate that the heartbeat request packet is used for communication quality detection.
  • the value, as well as the heartbeat request message is filled with a certain length of message content.
  • the heartbeat request message in this embodiment further includes a Fill field, which can be in a TLV format, and is filled in type (Fill Type) and filled in length (fill). Length ) and the fill content ( Fill Content ).
  • the value of the Fill Type can be a predefined value, for example, 3, and the value of the Fill Content is filled according to the pre-configured content, and the value of the Fill Length is set according to the length of the content of the Fill Content. For example, if the configuration is populated as shown in Table 1, Fill Content can fill each byte to 0x55.
  • a total of 8 bytes of content, at this time, the value of Fill Length is 8; or, Fill Content can fill each byte of OxAA, a total of 16 bytes of content, at this time, the value of Fill Length is 16.
  • the second time can also fill the content of 8 bytes (Byte)
  • the second can fill the content of 16 bytes (Byte) .
  • the content of each fill can be filled in a random manner or in a preset manner.
  • the content filled in the message needs to be guaranteed that each bit (bit) will be filled with 0 and filled with 1.
  • bit For example, for a byte, the content of the -time padding is 0x55, that is, 0101.
  • the subsequent message it is necessary to ensure that the highest bit has been filled with 1, the second highest bit has been filled with 0, and the lower low bit is filled.
  • the lowest bit has a case of being filled with 0.
  • the content to be filled next time is 0xAA.
  • Step 53 After transmitting one of the above heartbeat request messages, the endpoint A increases the value of the first counter corresponding to the length of the sent heartbeat request message by one.
  • the value of the first counter for counting the transmission of the heartbeat request message with the padding length of 8 is increased by one.
  • Step 54 After receiving a heartbeat request packet of a certain padding length, the endpoint B sends a heartbeat response packet with a corresponding padding length to the port A.
  • the source address and the destination address of the received heartbeat request message are IP2 and IP4, respectively, and the source address and the destination address of the heartbeat reply message can be filled with IP4 and IP2, respectively, for the heartbeat request.
  • the rest of the message, especially the padding content of the heartbeat request message can be completely copied to the corresponding location of the heartbeat response message.
  • Step 55 Endpoint A increases the value of the corresponding second counter by one after each receiving a heartbeat response message with a certain padding length.
  • the value of the second counter used for receiving the heartbeat response message with the padding length of 8 is incremented by one.
  • the heartbeat request message can be repeatedly transmitted, and the corresponding heartbeat response message is received, that is, the above steps 52-55 can be repeatedly executed.
  • Step 56 After the detection period timer expires, the endpoint A calculates the packet loss rate of the packet of the corresponding length. If the count values of the first counter and the second counter for counting the padding content of length 8 are A1 and B1, respectively, the packet loss rate of the packet of length 8 can be obtained: (A1-B1) /A1 ; Assuming that the count values of the first counter and the second counter for counting the padding content of length 16 are A2 and B2, respectively, the packet loss rate of the packet of length 16 can be obtained: (A2) -B2) /A2. Similarly, the packet loss rate of the remaining length packets can be obtained.
  • the packet loss rate of packets of different lengths can be calculated by using a heartbeat request packet for the communication quality detection and setting a counter corresponding to the length of the packet.
  • FIG. 7 is a schematic flowchart of another embodiment of a method for detecting path communication quality according to the present invention, including: Step 71: End point A performs initial setting.
  • this embodiment can realize the detection of the hopping variable by detecting the content of the padding.
  • the initial settings include:
  • a transmission cycle timer is started, which is used to indicate a heartbeat request packet transmission period, that is, a heartbeat request message is sent when the transmission cycle timer expires.
  • the detection period timer is started, and the detection period timer is used to indicate the detection period, that is, the detection ends when the detection period timer expires.
  • Step 72 After the sending loop timer expires, the endpoint A sends a heartbeat request packet to the endpoint B, and the value of the heartbeat request packet use field of the heartbeat request packet is set to indicate that the heartbeat request packet is used for communication quality detection.
  • the value, as well as the heartbeat request message is filled with a certain length of message content.
  • endpoint A also needs to record the padding information of the heartbeat request message.
  • a padding request message with a source address and a destination address of IP2 and IP4 respectively is filled with: 8 bytes in total, and each byte is filled with 0x55.
  • Step 73 After receiving the heartbeat request packet, the endpoint B sends a corresponding heartbeat response packet to the port A.
  • Step 74 After receiving a heartbeat response message, the endpoint A compares the padding content in the heartbeat response message with the padding content of the corresponding heartbeat request message. If there is a content hopping, each hop changes to a bit, The count value of the trip counter is incremented by 1. If the corresponding heartbeat request packet and the heartbeat response packet are determined according to the source address and the destination address, the endpoint A can compare the padding content of the corresponding heartbeat request packet with the heartbeat response packet. Fill the content and get the jumps. For example, if the source address and the destination address of the heartbeat request packet R1 are IP2 and IP4 respectively, the source address and destination address of the received heartbeat response message A1 are IP4.
  • IP2 compare the fill content F1 of R1 and the fill content F2 of A1. If F1 and F2 are the same, it means there is no jump. If a certain bit of F1 and F2 is different, it is determined that the jump number is 1, similarly, after comparison, Get the jump number.
  • the endpoint A determines the heartbeat request packet and the heartbeat response packet according to the source address and the destination address, the endpoint A continues to determine the corresponding heartbeat request packet and the heartbeat response packet according to the fill length Fill Length. Then, the padding content of the corresponding heartbeat request message and the padding content of the heartbeat response message are compared to obtain a hopping number. For example, if the source address and the destination address of the heartbeat request message R1 are IP2 and IP4 respectively, the source address and destination address of the received heartbeat response message A1 are IP4 respectively. For IP2, you cannot directly compare the fill content F1 of F1 and the fill content F2 of A1 in the previous scene.
  • the heartbeat request message can be repeatedly transmitted, and the corresponding heartbeat response message is received, that is, the above steps 72-74 can be repeatedly performed.
  • Step 75 After the detection period timer expires, Endpoint A determines the value of the hopping counter as the content hop.
  • the packet loss rate of packets of different lengths can be determined, and a hopping counter is set for each packet of the padding length, and hops corresponding to different lengths are used.
  • the variable counter determines the number of hops separately.
  • the calculation of the hopping number can be implemented by using the heartbeat request message for the communication quality detection and setting the hopping counter.
  • the embodiment of the present invention can implement the path communication quality detection as described above after adding a heartbeat request message use field to the heartbeat request message.
  • the heartbeat request packet of the embodiment of the present invention can be used only for the existing on-off detection. In this case, the value of the heartbeat request packet use field of the heartbeat request packet can be set to indicate that the heartbeat request packet is normal. The value of the heartbeat request message can be processed according to the existing on-off detection mode.
  • the packet loss rate is greater than a certain threshold, for example, 0.1%
  • the sub-health status of the alternate path is presented through alarms, diaries, and the like, and the user is prompted to perform troubleshooting to ensure that the alternate path maintains a healthy communication state.
  • a packet of a certain length is always discarded, it is presented by a similar prompt such as an alarm, a diary, etc., to remind the user to perform a purposeful check to ensure that the alternate path maintains a healthy communication state.
  • the alternate path communication quality detection result provides SCTP multi-homing based on the QoS handover path to provide decision data, ensuring that the SCTP multi-homing is accurate and efficient according to the QoS handover.
  • FIG. 8 is a schematic structural diagram of an apparatus for detecting a path communication quality according to the present invention.
  • the device may be a sender device capable of performing SCTP, and may be a base station, a base station control device, a core network device, or the like.
  • the device includes a sending unit 81, a receiving unit 82, and a detecting unit 83.
  • the sending unit 81 is configured to send a heartbeat request message to the receiving end, where the heartbeat request message includes a source address and a destination address of the path to be detected, and the first a field, the first field indicating that the heartbeat request message is used for path communication quality detection, the receiving unit 82 is configured to receive a heartbeat response message corresponding to the heartbeat request message, and the detecting unit 83 is configured to send according to the The heartbeat request message sent by the unit 81 and the heartbeat response message received by the receiving unit 82 determine the communication quality of the path to be detected.
  • FIG. 9 is a schematic structural diagram of another embodiment of an apparatus for detecting a path communication quality according to the present invention.
  • the method further includes: a first indication unit 91, a transmission cycle timer 92, and a detection period timer. 93.
  • the first indication unit 91 is configured to start the transmission cycle timer 92 and the detection cycle timer 93, and set the initial values of the first counter 94 and the second counter 95 to 0.
  • the sending loop timer 92 is configured to instruct the sending unit 81 to send the heartbeat request message after a timeout; the first counter 94 is configured to send one heartbeat request message every time in the sending unit 81.
  • the receiving unit 82 After the receiving unit 82 receives a heartbeat response message corresponding to the heartbeat request message, the counter value is incremented by one; the detecting unit is incremented by one after the receiving unit 82 receives a heartbeat response message corresponding to the heartbeat request message; 83 is specifically used in the detection cycle After the timer 93 times out, the packet loss rate is obtained according to the count value of the first counter and the count value of the second counter.
  • FIG. 10 is a structural example of another embodiment of an apparatus for detecting a path communication quality according to the present invention.
  • the embodiment further includes: a filling unit 101, configured to fill content in the padding field of the heartbeat request message.
  • the sending unit 81 is specifically configured to send a heartbeat request message after the content is filled by the filling unit 101;
  • the receiving unit 82 is specifically configured to receive a heartbeat response message corresponding to the heartbeat request message after the content is filled;
  • the detecting unit 83 is specifically configured to detect a packet loss rate of a message filling the content.
  • FIG. 11 is a schematic structural diagram of another embodiment of an apparatus for detecting a path communication quality according to the present invention.
  • the embodiment further includes: a second indication unit 111, a transmission loop timer 112, and detection.
  • the cycle timer 113, the first counter 114 and the second counter 115; the second indication unit ill is configured to start the transmission cycle timer 112 and the detection cycle timer 113, and set initial values of the first counter 114 and the second counter 115
  • the number of the first counter 114 and the second counter 115 is at least two, and the first counter 114 includes a corresponding number for counting the heartbeat request message whose content is the first length.
  • the second counter 115 includes a second counter 1150 corresponding to the first length for counting the heartbeat response message with the first content being filled;
  • the content filled by the filling unit 101 Include a first length of content;
  • the sending loop timer 112 is configured to indicate the message after a timeout;
  • the corresponding first length The first counter 1140 is configured to increase the count value by 1 after the sending unit 81 sends a heartbeat request message whose filling content is the first length;
  • the second counter 1150 corresponding to the first length is used in the
  • the receiving unit 82 increases the count value by 1 after receiving a heartbeat response message corresponding to the heartbeat request message whose content is the first length;
  • the detecting unit 83 is specifically configured to use the detection cycle timer. After the timeout of 113, the packet loss rate of the packet of the first length is obtained according to the count value 1140 of the first counter corresponding to the first length and the count value of the second counter 1150 corresponding to the first length.
  • FIG. 12 is a schematic structural diagram of another embodiment of an apparatus for detecting a path communication quality according to the present invention.
  • the embodiment further includes: a third indication unit 121, a transmission cycle timer. 122, detection cycle timer 123, hopping counter 124 and recording unit 125;
  • the third indication unit 121 is configured to start the transmission cycle timer 122 and the detection cycle timer 123, and set the initial value of the hopping counter 124 to 0;
  • the transmission cycle timer 122 is configured to indicate the sending unit after the timeout 81: Send a heartbeat request message after the filling unit 101 fills the content;
  • the recording unit 125 is configured to record, after the filling unit 101 fills the heartbeat request message, the first padding content, the first padding
  • the content is the padding content in the heartbeat request message;
  • the hopping counter 124 is configured to compare the second padding content with the first padding content, and when there is a padding content change, increase the count value of the hopping counter by one, the second The padding
  • the existing heartbeat request message is extended, and the communication quality of the path is detected according to the heartbeat request message.
  • the foregoing program may be stored in a computer readable storage medium, and when executed, the program includes The foregoing steps of the method embodiment; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Abstract

Provided are a path communication quality detection method and device, the method comprising: a transmitting terminal transmits a heartbeat request packet to a receiving terminal, the heartbeat request packet carrying a first field and the source address and target address of a to-be-detected path, the first field indicating that the heartbeat request packet is used to detect the path communication quality; the transmitting terminal receives a heartbeat response packet corresponding to the heartbeat request packet, and determines the communication quality of the to-be-detected path according to the heartbeat request packet and the heartbeat response packet. An embodiment of the present invention realizes communication quality detection for a standby path.

Description

检测路径通信质量的方法和设备  Method and apparatus for detecting path communication quality
技术领域 Technical field
本发明涉及网络通信技术领域, 尤其涉及一种检测路径通信质量的方法 和设备。 背景技术  The present invention relates to the field of network communication technologies, and in particular, to a method and device for detecting path communication quality. Background technique
流控制传输协议 ( Stream Control Transmission Protocol, SCTP )是一种 可靠的传输协议, 在两个端点之间提供稳定、有序的数据传递服务。 当 SCTP 的两个端点内分别有多个传输地址, 该两个端点间就存在多条传输路径。 正 常情况下用其中的一条路径传输业务, 这条路径称为主用路径, 其余路径为 备用路径。 现有技术中不能检测备用路径的通信质量。 发明内容  The Stream Control Transmission Protocol (SCTP) is a reliable transport protocol that provides stable, orderly data delivery between two endpoints. When there are multiple transport addresses in the two endpoints of SCTP, there are multiple transmission paths between the two endpoints. Normally, one of the paths is used to transmit traffic. This path is called the primary path, and the remaining paths are the alternate paths. The communication quality of the alternate path cannot be detected in the prior art. Summary of the invention
本发明实施例提供一种检测路径通信质量的方法和设备, 实现对路径的 通信质量的检测。  Embodiments of the present invention provide a method and device for detecting path communication quality, which implements detection of a communication quality of a path.
本发明实施例提供的一种检测路径通信质量的方法, 包括:  A method for detecting path communication quality provided by an embodiment of the present invention includes:
发送端向接收端发送心跳请求报文, 所述心跳请求报文中包含待检测的 路径的源地址和目的地址以及第一字段, 所述第一字段表明所述心跳请求报 文用于路径通信质量检测;  The sending end sends a heartbeat request message to the receiving end, where the heartbeat request message includes a source address and a destination address of the path to be detected, and a first field, where the first field indicates that the heartbeat request message is used for path communication Quality Inspection;
发送端接收与所述心跳请求报文对应的心跳应答报文, 并根据所述心跳 请求报文和心跳应答报文确定所述待检测的路径的通信质量。  The sending end receives the heartbeat response message corresponding to the heartbeat request message, and determines the communication quality of the path to be detected according to the heartbeat request message and the heartbeat response message.
本发明实施例提供的一种检测路径通信质量的设备, 包括:  An apparatus for detecting a path communication quality provided by an embodiment of the present invention includes:
发送单元, 用于向接收端发送心跳请求报文, 所述心跳请求报文中包含 待检测的路径的源地址和目的地址以及第一字段, 所述第一字段表明所述心 跳请求报文用于路径通信质量检测;  a sending unit, configured to send a heartbeat request message to the receiving end, where the heartbeat request message includes a source address and a destination address of the path to be detected, and a first field, where the first field indicates that the heartbeat request message is used For path communication quality detection;
接收单元 , 用于接收与所述心跳请求报文对应的心跳应答报文; 单元接收的所述心跳应答报文确定所述待检测的路径的通信质量。 展, 根据心跳请求报文完成路径的通信质量的检测。 附图说明 为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述中 所需要使用的附图作一简单地介绍, 显而易见地, 下面描述中的附图是本发 明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性的 前提下, 还可以根据这些附图获得其他的附图。 a receiving unit, configured to receive a heartbeat response message corresponding to the heartbeat request message; and the heartbeat response message received by the unit determines a communication quality of the path to be detected. The exhibition completes the detection of the communication quality of the path according to the heartbeat request message. BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the technical solutions in the embodiments of the present invention, a brief description of the drawings to be used in the description of the embodiments will be briefly made. It is obvious that the drawings in the following description are some of the present invention. For the embodiments, those skilled in the art can obtain other drawings according to the drawings without any creative labor.
图 1为本发明实施例多归属系统的结构示意图;  1 is a schematic structural diagram of a multi-homing system according to an embodiment of the present invention;
图 2为本发明检测路径通信质量的方法一实施例的流程示意图; 图 3为本发明实施例中心跳请求报文的部分组成的一种示意图; 图 4为本发明检测路径通信质量的方法另一实施例的流程示意图; 图 5为本发明检测路径通信质量的方法另一实施例的流程示意图; 图 6为本发明实施例中心跳请求报文的部分组成的另一种示意图; 图 7为本发明检测路径通信质量的方法另一实施例的流程示意图; 图 8为本发明检测路径通信质量的设备一实施例的结构示意图; 图 9为本发明检测路径通信质量的设备另一实施例的结构示意图; 图 10为本发明检测路径通信质量的设备另一实施例的结构示意图; 图 11为本发明检测路径通信质量的设备另一实施例的结构示意图; 图 12为本发明检测路径通信质量的设备另一实施例的结构示意图。 具体实施方式 为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有做出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。  2 is a schematic flowchart of a method for detecting a path communication quality according to an embodiment of the present invention; FIG. 3 is a schematic diagram showing a partial composition of a center hop request message according to an embodiment of the present invention; FIG. 5 is a schematic flowchart of another embodiment of a method for detecting a path communication quality according to the present invention; FIG. 6 is another schematic diagram of a partial composition of a center hop request message according to an embodiment of the present invention; FIG. 8 is a schematic structural diagram of an apparatus for detecting path communication quality according to an embodiment of the present invention; FIG. 9 is a schematic structural diagram of another embodiment of an apparatus for detecting path communication quality according to the present invention; FIG. 10 is a schematic structural diagram of another embodiment of an apparatus for detecting path communication quality according to the present invention; FIG. 11 is a schematic structural diagram of another embodiment of an apparatus for detecting path communication quality according to the present invention; A schematic structural diagram of another embodiment of the device. The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. The embodiments are a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
为了更好的理解本发明实施例, 首先对 SCTP的相关概念进行描述。 In order to better understand the embodiments of the present invention, the related concepts of SCTP are first described.
1 )传输地址( Transport Address ) : 是 IP地址与端口的二元组合, 唯一 标识了一条消息的发送者和接收者。 1) Transport Address: is a binary combination of IP address and port, unique Identifies the sender and receiver of a message.
2 )端点 (Endpoint ) : 是一组具有相同端口的传输地址的集合。 例如, Endpoint=[IP 1 ,IP2, ... ,ΙΡη: Port]。  2) Endpoint: A collection of transport addresses with the same port. For example, Endpoint=[IP 1 , IP2, ... , ΙΡη: Port].
3 )偶联(Association ) : 作为一个面向连接的传输协议, 应用层把数据 从一个端点传输到另一个端点前,两个端点间先交换信息建立一个通信关系, 这个通信关系就是偶联。 例如,  3) Association: As a connection-oriented transport protocol, before the application layer transfers data from one endpoint to another, the two endpoints exchange information first to establish a communication relationship. This communication relationship is coupled. E.g,
Association={[ ΙΡ11,ΙΡ12,...,ΙΡ1η: Portl] :[ IP21,IP22,...,IP2n: Port2]} Association={[ ΙΡ11,ΙΡ12,...,ΙΡ1η: Portl] :[IP21,IP22,...,IP2n: Port2]}
4 )主用传输地址( Primary Transport Address ): 相对于备用传输地址而 言, 端点使用主用传输地址传输用户数据, 不用备用传输地址做负荷分担。 当主用传输地址处于未激活状态时, 启用备用传输地址传输数据。 4) Primary Transport Address: Relative to the alternate transport address, the endpoint uses the primary transport address to transmit user data, and does not use the alternate transport address for load sharing. When the primary transport address is inactive, the alternate transport address is enabled to transmit data.
5 )路径(Path ) : 路径是相对某个端点的具有起始标识的向量, 是一个 源-目的的地址对。 当目的传输地址处于未激活状态时, 认为到目的端点这个 传输地址的路径是故障的。  5) Path: A path is a vector with a starting identifier relative to an endpoint and is a source-destination address pair. When the destination transport address is inactive, the path to the destination address of the destination endpoint is considered faulty.
6 ) 多归属(multi-homing ) : 如果两个 SCTP端点内分别有多个传输地 址, 则这个 SCTP偶联内就存在多条传输路径。 正常情况下, 用其中的一条 路径传输业务, 这条路径称为主用路径, 当主用路径去激活 (inactive ) 时, 业务切换到其他激活的备用路径传输。  6) multi-homing: If there are multiple transmission addresses in the two SCTP endpoints, there are multiple transmission paths within the SCTP coupling. Normally, one of the paths is used to transmit traffic. This path is called the primary path. When the primary path is deactivated (inactive), the service switches to another active alternate path.
参见图 1 , 为本发明实施例多归属系统的结构示意图, 该系统中包括两 个端口, 分别为端点 A和端点 B, 端点 A具有两个 IP地址, 分别为 IP1和 IP2 , 端点 B也具有两个 IP地址, 分别为 IP3和 IP4。  1 is a schematic structural diagram of a multi-homing system according to an embodiment of the present invention. The system includes two ports, namely, an endpoint A and an endpoint B. The endpoint A has two IP addresses, namely IP1 and IP2, and the endpoint B also has Two IP addresses, IP3 and IP4.
端点 A和端点 B通信时, 端点 A[IP1,IP2 :100], 端点 B[IP3,IP4 :100], 之间偶联{[ IP1JP2 :100] :[ IP3JP4 : 100]}。图 1给出了两条路径:路径 1( Pathl ) 和路径 2 ( Path2 ) , 实际上根据路径的定义, 这两个端点之间可以最多有 4 条路径。  When endpoint A and endpoint B communicate, endpoints [[IP1, IP2:100], endpoints B[IP3, IP4:100], are coupled {[IP1JP2:100]:[IP3JP4:100]}. Figure 1 shows two paths: Path 1 ( Pathl ) and Path 2 ( Path 2 ). Actually, depending on the definition of the path, there can be up to 4 paths between the two endpoints.
此外, 现有技术中可以采用心跳请求报文检测备份路径的通断状态。 例 如, 端口 A向端口 B发送心跳请求报文, 该心跳请求报文的源地址和目的地 址分别对应备用路径的源地址和目的地址, 端口 A在发送心跳请求报文时开 启定时器, 如果连续多次定时器超时后没有收到端口 B发送的对应心跳请求 报文的心跳应答报文,则表明端口 A和端口 B之间的备用路径处于断开状态, 如果定时器超时之前收到端口 B发送的对应心跳请求报文的心跳应答报文, 则表明端口 A和端口 B之间的备用路径处于连通状态。 In addition, in the prior art, a heartbeat request message may be used to detect an on/off state of the backup path. For example, port A sends a heartbeat request packet to port B. The source and destination addresses of the heartbeat request packet correspond to the source and destination addresses of the alternate path respectively. Port A starts the timer when sending heartbeat request packets. If the heartbeat response packet of the corresponding heartbeat request packet sent by port B is not received after the timer expires, the backup path between port A and port B is disconnected. If the timer expires, port B is received. The heartbeat response message of the corresponding heartbeat request message sent, This indicates that the alternate path between port A and port B is connected.
但是, 现有技术中采用心跳请求报文只能检测备用路径的通断状态, 并 不能进一步检测备用路径的通信质量,例如不能检测备用路径的 QoS参数等。  However, in the prior art, the heartbeat request message can only detect the on/off state of the alternate path, and cannot further detect the communication quality of the alternate path, for example, cannot detect the QoS parameter of the alternate path.
为了实现对备用路径的通信质量的检测, 本发明实施例中对心跳请求报 文进行扩展, 使得携带相关参数, 以便实现通信质量的检测。 具体可以参见 下述实施例。  In order to implement the detection of the communication quality of the alternate path, the heartbeat request message is extended in the embodiment of the present invention so that the relevant parameters are carried in order to implement the detection of the communication quality. See the following examples for details.
图 2为本发明检测路径通信质量的方法一实施例的流程示意图, 包括: 步骤 21 : 发送端向接收端发送心跳请求报文, 所述心跳请求报文中包含 待检测的路径的源地址和目的地址以及第一字段, 所述第一字段表明所述心 跳请求报文用于路径通信质量检测。  2 is a schematic flowchart of a method for detecting a path communication quality according to an embodiment of the present invention, including: Step 21: A sending end sends a heartbeat request message to a receiving end, where the heartbeat request message includes a source address of a path to be detected and The destination address and the first field, the first field indicating that the heartbeat request message is used for path communication quality detection.
其中, 以图 1 所示的系统为例, 假设待检测的路径为路径 2, 且路径 2 的源地址和目的地址分别为 IP2和 IP4, 则端点 A向端点 B发送心跳检测报 文,且该心跳检测报文的报文头中的源地址和目的地址分别填充为 IP2和 IP4。  The system shown in FIG. 1 is taken as an example. If the path to be detected is path 2, and the source address and the destination address of the path 2 are IP2 and IP4, respectively, the endpoint A sends a heartbeat detection packet to the endpoint B, and the The source address and destination address in the header of the heartbeat detection packet are filled with IP2 and IP4, respectively.
此外, 在现有心跳请求报文中还需要携带上述的第一字段, 该第一字段 可以称为心跳请求报文用途(Heartbeat Usage ) 字段, 该心跳请求报文用途 ( Heartbeat Usage )字段用于标识对应的心跳请求报文是普通的心跳请求报文 还是用于通信质量检测的心跳请求报文。  In addition, the first field is also required to be carried in the existing heartbeat request packet, and the first field may be referred to as a heartbeat usage field, and the heartbeat usage field is used for the heartbeat usage field. The heartbeat request message corresponding to the identifier is an ordinary heartbeat request message or a heartbeat request message for communication quality detection.
该 Heartbeat Usage字段可以包含在心兆请求才艮文的发送方特定心兆信息 ( Sender-Specific Heartbeat Info )部分。  The Heartbeat Usage field can be included in the Sender-Specific Heartbeat Info section of the mind request.
进一步地, 该 Heartbeat Usage字段可以采用类型长度值 ( Type Length Further, the Heartbeat Usage field can take a type length value (Type Length
Value, TLV )格式。 Value, TLV) format.
具体地, 参见图 3 , 心跳请求报文包含心跳信息部分, 心跳信息部分由 心跳信息类型( Heartbeat Info Type ) 、 心跳信息长度( Heartbeat Info Length ) 和发送方特定心跳信息( Sender-Specific Heartbeat Info )部分组成。 心跳请求 报文用途( Heartbeat Usage )字段包含在发送方特定心跳信息( Sender-Specific Heartbeat Info )部分, 且心跳信息部分采用 TLV格式, 由心跳请求报文用途 类型( Heartbeat Usage Type )、心跳请求报文用途长度( Heartbeat Usage Length ) 和心跳请求报文用途内容( Heartbeat Usage )组成。其中,上述的 Heartbeat Info Type 的值为 1 , 可以将 Heartbeat Usage Type的值定义为 2。 Heartbeat Usage Length的值可以定义为 4, Heartbeat Usage的值用于表明心跳请求报文是普 通的心跳请求报文, 还是用于路径通信质量检查的心跳请求报文, 例如, 该 值为 0时表明是普通的心跳请求报文, 值为 1时表明是用于路径通信质量检 测的心跳请求报文。 Specifically, referring to FIG. 3, the heartbeat request message includes a heartbeat information part, and the heartbeat information part is composed of a Heartbeat Info Type, a Heartbeat Info Length, and a Sender-Specific Heartbeat Info. Part of the composition. The Heartbeat Usage field is included in the Sender-Specific Heartbeat Info section, and the heartbeat information part is in the TLV format. The Heartbeat Usage Type and the Heartbeat Request are used. The Heartbeat Usage Length and Heartbeat Usage are composed of Heartbeat Usage Length. The value of the Heartbeat Usage Type is 1 and the value of the Heartbeat Usage Type can be defined as 2. The value of Heartbeat Usage Length can be defined as 4, and the value of Heartbeat Usage is used to indicate that the heartbeat request message is The heartbeat request message is a heartbeat request message for the path communication quality check. For example, when the value is 0, it indicates that it is a normal heartbeat request message. When the value is 1, it indicates that the heartbeat is used for path communication quality detection. Request a message.
步骤 22: 发送端接收与所述心跳请求报文对应的心跳应答报文, 并根据 所述心跳请求报文和心跳应答报文确定所述待检测的路径的通信质量。  Step 22: The sending end receives the heartbeat response message corresponding to the heartbeat request message, and determines the communication quality of the path to be detected according to the heartbeat request message and the heartbeat response message.
其中, 上述的通信质量可以为丟包数, 或者报文内容的跳变情况。 进一 步地, 上述的丟包数可以为针对不同长度的报文的丟包数。 丟包数以及跳变 情况的检测可以具体参见下述实施例。  The foregoing communication quality may be the number of lost packets or the hopping of the content of the packet. Further, the number of lost packets may be the number of packets lost for packets of different lengths. The number of packet loss and the detection of the hopping condition can be specifically referred to the following embodiments.
本实施例通过对现有的心跳请求报文进行扩展, 根据心跳请求报文完成 路径的通信质量的检测。  In this embodiment, the existing heartbeat request message is extended, and the communication quality of the path is detected according to the heartbeat request message.
图 4为本发明检测路径通信质量的方法另一实施例的流程示意图, 包括: 步骤 41 : 端点 A进行初始设置。  4 is a schematic flowchart of another embodiment of a method for detecting path communication quality according to the present invention, including: Step 41: End point A performs initial setting.
其中, 初始设置可以包括:  Wherein, the initial settings can include:
( 1 )设置第一计数器和第二计数器, 并将第一计数器和第二计数器的初 始值设置为 0, 其中, 第一计数器用于对用于检测通信质量的心跳请求报文 的发送数进行计数, 第二计数器用于对与用于检测通信质量的心跳请求报文 对应的心跳应答报文的接收数进行计数。  (1) setting a first counter and a second counter, and setting an initial value of the first counter and the second counter to 0, wherein the first counter is configured to perform a number of heartbeat request messages for detecting communication quality Counting, the second counter is configured to count the number of received heartbeat response messages corresponding to the heartbeat request message used to detect the communication quality.
( 2 )启动发送循环定时器, 该发送循环定时器用于指示心跳请求报文的 发送周期, 即当发送循环定时器超时后则发送一个心跳请求报文。  (2) A transmission cycle timer is started, which is used to indicate a period of sending a heartbeat request message, that is, a heartbeat request message is sent when the transmission cycle timer expires.
( 3 )启动检测周期定时器, 该检测周期定时器用于指示检测周期, 即当 检测周期定时器超时后检测结束。  (3) The detection period timer is started, and the detection period timer is used to indicate the detection period, that is, the detection ends when the detection period timer expires.
上述的发送循环定时器的值以及检测周期定时器的值可以根据实际需要 设置。  The value of the above-mentioned transmission cycle timer and the value of the detection cycle timer can be set according to actual needs.
步骤 42:当发送循环定时器超时后,端点 A向端口 B发送心跳请求报文, 且该心跳请求报文的心跳请求报文用途字段的值被设置为表明心跳请求报文 用于通信质量检测的值。  Step 42: After the sending loop timer expires, the endpoint A sends a heartbeat request packet to the port B, and the value of the heartbeat request packet use field of the heartbeat request packet is set to indicate that the heartbeat request packet is used for communication quality detection. Value.
例如, 如果心跳请求报文用途字段的值为 1表明心跳请求报文用于通信 质量检测, 则将上述的心跳请求报文用途字段的值设置为 1。  For example, if the value of the heartbeat request message use field is 1 indicating that the heartbeat request message is used for communication quality detection, set the value of the heartbeat request message use field to 1.
另外, 心跳请求报文的报文头中还可以携带源地址和目的地址, 以要检 测的路径为备用路径,且备用路径对应的源地址和目的地址为 IP2、 IP4为例, 则心跳请求报文的报文头中的源地址和目的地址分别为 IP2和 IP4。 In addition, the source address and the destination address of the packet header of the heartbeat request packet may be the alternate path, and the source and destination addresses corresponding to the alternate path are IP2 and IP4. The source address and destination address in the header of the heartbeat request packet are IP2 and IP4, respectively.
步骤 43: 端点 A在每发送一个上述的心跳请求报文后, 将第一计数器的 值增加 1。  Step 43: Endpoint A increments the value of the first counter by one after each of the above heartbeat request messages.
步骤 44: 端点 B在接收到心跳请求报文后, 向端口 A发送对应的心跳应 答报文。  Step 44: After receiving the heartbeat request packet, endpoint B sends a corresponding heartbeat response packet to port A.
其中, 心跳应答报文的源地址和目的地址与对应的心跳请求报文的源地 址和目的地址是互换的关系, 以上述心跳请求报文的源地址和目的地址分别 为 IP2和 IP4为例, 则对应的心跳应答 ^艮文的源地址和目的地址分别为 IP4 和 IP2。  The source address and the destination address of the heartbeat response packet are in an interchangeable relationship with the source address and the destination address of the corresponding heartbeat request packet. The source and destination addresses of the heartbeat request packet are IP2 and IP4 respectively. , the source address and destination address of the corresponding heartbeat response are IP4 and IP2, respectively.
此外, 在不发生报文内容跳变情况下, 心跳应答报文的净荷内容与对应 的心跳请求报文的净荷内容是相同的。  In addition, the payload content of the heartbeat response message is the same as the payload content of the corresponding heartbeat request message when no message content hopping occurs.
步骤 45:端点 A在每接收一个与上述的心跳请求报文对应的心跳应答报 文后, 将第二计数器的值增加 1。  Step 45: Endpoint A increments the value of the second counter by one after each receiving a heartbeat response message corresponding to the heartbeat request message.
其中, 端口 A可以根据心跳应答报文中的源地址和目的地址确定是否与 上述的心跳请求报文对应。  The port A can determine whether to correspond to the heartbeat request packet according to the source address and the destination address in the heartbeat response packet.
此外, 随着发送循环定时器的不断超时, 心跳请求报文可以被重复发送, 以及接收对应的心跳应答报文, 即上述的步骤 42-45可以被重复执行。  In addition, as the transmission cycle timer continuously times out, the heartbeat request message can be repeatedly transmitted, and the corresponding heartbeat response message is received, that is, the above steps 42-45 can be repeatedly performed.
步骤 46: 当检测周期定时器超时后, 端点 A计算丟包率。  Step 46: After the detection period timer expires, endpoint A calculates the packet loss rate.
其中, 假设第一计数器的计数值为 A, 第二计数器的计数值为 B, 则丟 包率的计算公式为: (A-B ) /A。  Wherein, assuming that the count value of the first counter is A and the count value of the second counter is B, the calculation formula of the packet loss rate is: (A-B) /A.
本实施例通过将心跳请求报文用于通信质量检测, 并设置计数器, 可以 实现丟包率的计算。  In this embodiment, the packet loss rate is calculated by using the heartbeat request message for communication quality detection and setting a counter.
图 5为本发明检测路径通信质量的方法另一实施例的流程示意图, 包括: 步骤 51 : 端点 A进行初始设置。 的检测。  FIG. 5 is a schematic flowchart of another embodiment of a method for detecting path communication quality according to the present invention, including: Step 51: End point A performs initial setting. Detection.
本实施例中, 初始设置包括:  In this embodiment, the initial settings include:
( 1 )设置多个第一计数器和多个第二计数器, 并将第一计数器和第二计 数器的初始值均设置为 0, 其中, 每个第一计数器分别用于对不同填充长度 的用于检测通信质量的心跳请求报文的发送数进行计数, 每个第二计数器分 别用于对应的心跳应答报文的接收数进行计数。 (1) setting a plurality of first counters and a plurality of second counters, and setting initial values of the first counter and the second counter to 0, wherein each of the first counters is used for respectively for different padding lengths The number of heartbeat request messages for detecting the communication quality is counted, and each second counter is divided. Do not use the number of received heartbeat response messages to count.
例如, 本实施例中可以检测的报文长度如表 1所示:  For example, the length of the packet that can be detected in this embodiment is as shown in Table 1:
表 1  Table 1
Figure imgf000008_0001
Figure imgf000008_0001
当可以检测的报文长度为表 1所示的为 9种时, 则可以分别设置 9个第 一计数器和分别与每个第一计数器对应的第二计数器, 分别用于统计长度为 8、 16、 32、 64....1400的4艮文的丟包率。  When the length of the message that can be detected is nine as shown in Table 1, nine first counters and two second counters corresponding to each of the first counters may be respectively set for the statistical length of 8, 16 respectively. , 32, 64....1400 4 packet loss rate.
( 2 )启动发送循环定时器, 该发送循环定时器用于指示心跳请求报文的 发送周期, 即当发送循环定时器超时后则发送一个心跳请求报文。  (2) A transmission cycle timer is started, which is used to indicate a period of sending a heartbeat request message, that is, a heartbeat request message is sent when the transmission cycle timer expires.
( 3 )启动检测周期定时器, 该检测周期定时器用于指示检测周期, 即当 检测周期定时器超时后检 结束。  (3) The detection cycle timer is started, and the detection cycle timer is used to indicate the detection cycle, that is, the detection ends when the detection cycle timer expires.
步骤 52:当发送循环定时器超时后,端点 A向端点 B发送心跳请求报文, 且该心跳请求报文的心跳请求报文用途字段的值被设置为表明心跳请求报文 用于通信质量检测的值, 以及心跳请求报文被填充一定长度的报文内容。  Step 52: After the sending loop timer expires, the endpoint A sends a heartbeat request packet to the endpoint B, and the value of the heartbeat request packet use field of the heartbeat request packet is set to indicate that the heartbeat request packet is used for communication quality detection. The value, as well as the heartbeat request message is filled with a certain length of message content.
参见图 6, 在上一实施例的基础上, 本实施例的心跳请求报文中进一步 包含填充(Fill )字段,该填充字段可以采用 TLV格式,由填充类型(Fill Type )、 填充长度( Fill Length )和填充内容( Fill Content )组成。 Fill Type的值可以 为预先定义的值, 例如为 3 , Fill Content的值通过根据预先配置的内容进行 填充, Fill Length的值根据 Fill Content的内容的长度不同设置。 例如, 如果 配置按照表 1的方式进行填充,则 Fill Content可以填充每个 byte为 0x55 , 共 8个 byte的内容, 此时, Fill Length的值为 8; 或者, Fill Content可以填 充每个 byte为 OxAA, 共 16个 byte的内容, 此时, Fill Length的值为 16。 此 充长度为 8个字节(Byte )的内容,第二次也可以填充长度为 8个字节( Byte ) 的内容, 或者, 第二次可以填充长度为 16个字节(Byte )的内容。 具体每次 填充的内容可以采用随机的方式或者预先设置的方式进行填充。 Referring to FIG. 6, on the basis of the previous embodiment, the heartbeat request message in this embodiment further includes a Fill field, which can be in a TLV format, and is filled in type (Fill Type) and filled in length (fill). Length ) and the fill content ( Fill Content ). The value of the Fill Type can be a predefined value, for example, 3, and the value of the Fill Content is filled according to the pre-configured content, and the value of the Fill Length is set according to the length of the content of the Fill Content. For example, if the configuration is populated as shown in Table 1, Fill Content can fill each byte to 0x55. A total of 8 bytes of content, at this time, the value of Fill Length is 8; or, Fill Content can fill each byte of OxAA, a total of 16 bytes of content, at this time, the value of Fill Length is 16. This is a length of 8 bytes (Byte), the second time can also fill the content of 8 bytes (Byte), or the second can fill the content of 16 bytes (Byte) . The content of each fill can be filled in a random manner or in a preset manner.
进一步地, 为了提高跳变检测的准确性, 报文中填充的内容需要保证在 每个位(bit )会被 0填充也会被 1填充。 例如, 对于一个 byte, —次填充的 内容为 0x55, 即 0101 , 则在后续发送的报文中需要保证最高位有被填充 1的 情况, 次高位有被填充 0的情况, 次低位有被填充 1的情况, 最低位有被填 充 0的情况。 具体可以是在下次填充的内容为 0xAA。  Further, in order to improve the accuracy of the hopping detection, the content filled in the message needs to be guaranteed that each bit (bit) will be filled with 0 and filled with 1. For example, for a byte, the content of the -time padding is 0x55, that is, 0101. In the subsequent message, it is necessary to ensure that the highest bit has been filled with 1, the second highest bit has been filled with 0, and the lower low bit is filled. In the case of 1, the lowest bit has a case of being filled with 0. Specifically, the content to be filled next time is 0xAA.
步骤 53: 端点 A在每发送一个上述的心跳请求报文后, 将与发送的心跳 请求报文的长度对应的第一计数器的值增加 1。  Step 53: After transmitting one of the above heartbeat request messages, the endpoint A increases the value of the first counter corresponding to the length of the sent heartbeat request message by one.
例如, 发送的心跳请求报文填充内容的长度为 8, 则将用于对填充长度 为 8的心跳请求报文进行发送计数的第一计数器的值增加 1。  For example, if the length of the content of the sent heartbeat request message is 8, the value of the first counter for counting the transmission of the heartbeat request message with the padding length of 8 is increased by one.
步骤 54: 端点 B在接收到某一填充长度的心跳请求报文后, 向端口 A发 送对应的填充长度的心跳应答报文。 址互换后得到,例如,接收的一心跳请求报文的源地址和目的地址分别为 IP2 和 IP4, 则可以将心跳应答 文的源地址和目的地址分别填充为 IP4和 IP2, 而对于心跳请求报文的其余内容, 尤其是心跳请求报文的填充内容, 可以完 全拷贝到心跳应答报文的对应位置。  Step 54: After receiving a heartbeat request packet of a certain padding length, the endpoint B sends a heartbeat response packet with a corresponding padding length to the port A. After the address is exchanged, for example, the source address and the destination address of the received heartbeat request message are IP2 and IP4, respectively, and the source address and the destination address of the heartbeat reply message can be filled with IP4 and IP2, respectively, for the heartbeat request. The rest of the message, especially the padding content of the heartbeat request message, can be completely copied to the corresponding location of the heartbeat response message.
步骤 55: 端点 A在每接收一个填充长度一定的心跳应答报文后, 将对应 的第二计数器的值增加 1。  Step 55: Endpoint A increases the value of the corresponding second counter by one after each receiving a heartbeat response message with a certain padding length.
例如, 接收的心跳应答报文填充内容的长度为 8, 则将用于对填充长度 为 8的心跳应答报文进行接收计数的第二计数器的值增加 1。  For example, if the length of the received heartbeat response message padding is 8, the value of the second counter used for receiving the heartbeat response message with the padding length of 8 is incremented by one.
此外, 随着发送循环定时器的不断超时, 心跳请求报文可以被重复发送, 以及接收对应的心跳应答报文, 即上述的步骤 52-55可以被重复执行。  In addition, as the transmission cycle timer continuously times out, the heartbeat request message can be repeatedly transmitted, and the corresponding heartbeat response message is received, that is, the above steps 52-55 can be repeatedly executed.
步骤 56: 当检测周期定时器超时后, 端点 A计算对应长度的报文的丟包 率。 其中, 假设用于对长度为 8的填充内容进行计数的第一计数器和第二计 数器的计数值分别为 A1 和 B1 , 则可以得到长度为 8 的报文的丟包率为: ( A1-B1 ) /A1 ; 假设用于对长度为 16 的填充内容进行计数的第一计数器和 第二计数器的计数值分别为 A2和 B2,则可以得到长度为 16的报文的丟包率 为: (A2-B2 ) /A2。 类似的, 可以得到其余长度的报文的丟包率。 Step 56: After the detection period timer expires, the endpoint A calculates the packet loss rate of the packet of the corresponding length. If the count values of the first counter and the second counter for counting the padding content of length 8 are A1 and B1, respectively, the packet loss rate of the packet of length 8 can be obtained: (A1-B1) /A1 ; Assuming that the count values of the first counter and the second counter for counting the padding content of length 16 are A2 and B2, respectively, the packet loss rate of the packet of length 16 can be obtained: (A2) -B2) /A2. Similarly, the packet loss rate of the remaining length packets can be obtained.
本实施例通过将心跳请求报文用于通信质量检测, 并设置对应不同报文 长度的计数器, 可以实现对不同长度的报文的丟包率的计算。  In this embodiment, the packet loss rate of packets of different lengths can be calculated by using a heartbeat request packet for the communication quality detection and setting a counter corresponding to the length of the packet.
图 7为本发明检测路径通信质量的方法另一实施例的流程示意图, 包括: 步骤 71 : 端点 A进行初始设置。  FIG. 7 is a schematic flowchart of another embodiment of a method for detecting path communication quality according to the present invention, including: Step 71: End point A performs initial setting.
与上一实施例不同的是, 本实施例可以通过检测填充的内容实现对跳变 数的检测。  Different from the previous embodiment, this embodiment can realize the detection of the hopping variable by detecting the content of the padding.
本实施例中, 初始设置包括:  In this embodiment, the initial settings include:
( 1 )设置跳变计数器, 并将跳变计数器的初始值设置为 0。  (1) Set the trip counter and set the initial value of the trip counter to 0.
( 2 )启动发送循环定时器, 该发送循环定时器用于指示的心跳请求报文 的发送周期, 即当发送循环定时器超时后则发送一个心跳请求报文。  (2) A transmission cycle timer is started, which is used to indicate a heartbeat request packet transmission period, that is, a heartbeat request message is sent when the transmission cycle timer expires.
( 3 )启动检测周期定时器, 该检测周期定时器用于指示检测周期, 即当 检测周期定时器超时后检测结束。  (3) The detection period timer is started, and the detection period timer is used to indicate the detection period, that is, the detection ends when the detection period timer expires.
步骤 72:当发送循环定时器超时后,端点 A向端点 B发送心跳请求报文, 且该心跳请求报文的心跳请求报文用途字段的值被设置为表明心跳请求报文 用于通信质量检测的值, 以及心跳请求报文被填充一定长度的报文内容。  Step 72: After the sending loop timer expires, the endpoint A sends a heartbeat request packet to the endpoint B, and the value of the heartbeat request packet use field of the heartbeat request packet is set to indicate that the heartbeat request packet is used for communication quality detection. The value, as well as the heartbeat request message is filled with a certain length of message content.
具体填充方式可以参见上一实施例。  For the specific filling method, refer to the previous embodiment.
此外, 端点 A还需要记录心跳请求报文的填充信息。 例如, 一个源地址 和目的地址分别为 IP2和 IP4的心跳请求报文的填充内容为: 共 8个 byte, 每个 byte填充 0x55。 进一步地, 在可以填充多种长度的场景下, 还需要记录 填充内容的长度, 如记录填充的长度为: 8。  In addition, endpoint A also needs to record the padding information of the heartbeat request message. For example, a padding request message with a source address and a destination address of IP2 and IP4 respectively is filled with: 8 bytes in total, and each byte is filled with 0x55. Further, in a scenario in which a plurality of lengths can be filled, it is also necessary to record the length of the padding content, such as the length of the record padding: 8.
步骤 73: 端点 B在接收到心跳请求报文后, 向端口 A发送对应的心跳应 答报文。  Step 73: After receiving the heartbeat request packet, the endpoint B sends a corresponding heartbeat response packet to the port A.
步骤 74: 端点 A在每接收一个心跳应答报文后, 比较心跳应答报文中的 填充内容与对应的心跳请求报文的填充内容, 如果存在内容跳变, 则每跳变 一个 bit, 则将跳变计数器的计数值增加 1。 其中, 如果在单一长度的填充场景下, 端点 A可以根据源地址和目的地 址确定对应的心跳请求报文和心跳应答报文后, 比较对应的心跳请求报文的 填充内容和心跳应答报文的填充内容, 得到跳变数。 例如, 填充长度固定为 某一长度的场景下,如果心跳请求报文 R1的源地址和目的地址分别为 IP2和 IP4, 接收到的一个心跳应答 ^艮文 A1的源地址和目的地址分别为 IP4个 IP2, 则比较 R1的填充内容 F1和 A1的填充内容 F2, 如果 F1和 F2相同, 则表明 没有跳变, 如果 F1和 F2的某一位不同, 则确定跳变数为 1 , 类似比较后, 得到跳变数。 Step 74: After receiving a heartbeat response message, the endpoint A compares the padding content in the heartbeat response message with the padding content of the corresponding heartbeat request message. If there is a content hopping, each hop changes to a bit, The count value of the trip counter is incremented by 1. If the corresponding heartbeat request packet and the heartbeat response packet are determined according to the source address and the destination address, the endpoint A can compare the padding content of the corresponding heartbeat request packet with the heartbeat response packet. Fill the content and get the jumps. For example, if the source address and the destination address of the heartbeat request packet R1 are IP2 and IP4 respectively, the source address and destination address of the received heartbeat response message A1 are IP4. IP2, compare the fill content F1 of R1 and the fill content F2 of A1. If F1 and F2 are the same, it means there is no jump. If a certain bit of F1 and F2 is different, it is determined that the jump number is 1, similarly, after comparison, Get the jump number.
另外, 如果在不同长度的填充场景下, 端点 A根据源地址和目的地址确 定心跳请求报文和心跳应答报文后, 还要继续根据填充长度 Fill Length确定 对应的心跳请求报文和心跳应答报文, 进而比较对应的心跳请求报文的填充 内容和心跳应答报文的填充内容, 得到跳变数。 例如, 填充长度可以为多种 长度的场景下,如果心跳请求报文 R1的源地址和目的地址分别为 IP2和 IP4, 接收到的一个心跳应答 ^艮文 A1的源地址和目的地址分别为 IP4个 IP2, 则不 能如上一场景时直接比较 R1的填充内容 F1和 A1的填充内容 F2, 而是还需 要获取 R1的 Fill Length部分和 Al的 Fill Length部分,如果 Rl的 Fill Length 部分和 Al的 Fill Length部分相同, 才进一步比较 R1的填充部分 F1和 A1 的填充部分, 如果 F1和 F2相同, 则表明没有跳变, 如果 F1和 F2的某一位 不同, 则确定跳变数为 1 , 类似比较后, 得到跳变数。  In addition, if the endpoint A determines the heartbeat request packet and the heartbeat response packet according to the source address and the destination address, the endpoint A continues to determine the corresponding heartbeat request packet and the heartbeat response packet according to the fill length Fill Length. Then, the padding content of the corresponding heartbeat request message and the padding content of the heartbeat response message are compared to obtain a hopping number. For example, if the source address and the destination address of the heartbeat request message R1 are IP2 and IP4 respectively, the source address and destination address of the received heartbeat response message A1 are IP4 respectively. For IP2, you cannot directly compare the fill content F1 of F1 and the fill content F2 of A1 in the previous scene. Instead, you need to obtain the Fill Length part of R1 and the Fill Length part of Al, if the Fill Length part of R1 and the Fill of Al are The length part is the same, and the filling parts of the filling parts F1 and A1 of R1 are further compared. If F1 and F2 are the same, it means that there is no jump. If a certain bit of F1 and F2 is different, the jump number is determined to be 1, similar to the comparison. , get the jump variable.
此外, 随着发送循环定时器的不断超时, 心跳请求报文可以被重复发送, 以及接收对应的心跳应答报文, 即上述的步骤 72-74可以被重复执行。  In addition, as the transmission cycle timer continuously times out, the heartbeat request message can be repeatedly transmitted, and the corresponding heartbeat response message is received, that is, the above steps 72-74 can be repeatedly performed.
步骤 75: 当检测周期定时器超时后, 端点 A将跳变计数器的值确定为内 容跳变数。  Step 75: After the detection period timer expires, Endpoint A determines the value of the hopping counter as the content hop.
此外, 当需要获取不同长度的报文的跳变数后, 可以类似对不同长度的 报文的丟包率的确定, 对每个填充长度的报文设置一个跳变计数器, 采用对 应不同长度的跳变计数器分别确定跳变数。  In addition, after the hops of packets of different lengths need to be obtained, the packet loss rate of packets of different lengths can be determined, and a hopping counter is set for each packet of the padding length, and hops corresponding to different lengths are used. The variable counter determines the number of hops separately.
4或图 5所示的方式确定丟包数, 又按照图 6所示的方式确定跳变数。 4 or the mode shown in Figure 5 determines the number of lost packets, and determines the number of hops in the manner shown in Figure 6.
本实施例通过将心跳请求报文用于通信质量检测, 并设置跳变计数器, 可以实现对跳变数的计算。 另外, 本发明实施例对心跳请求报文增加心跳请求报文用途字段后可以 实现如上的路径通信质量检测。 同时, 本发明实施例的心跳请求报文还可以 只用于现有的通断检测, 此时, 可以将心跳请求报文的心跳请求报文用途字 段的值设置为表明心跳请求报文为普通心跳请求报文的值, 之后, 可以按照 现有的通断检测方式进行处理。 In this embodiment, the calculation of the hopping number can be implemented by using the heartbeat request message for the communication quality detection and setting the hopping counter. In addition, the embodiment of the present invention can implement the path communication quality detection as described above after adding a heartbeat request message use field to the heartbeat request message. In addition, the heartbeat request packet of the embodiment of the present invention can be used only for the existing on-off detection. In this case, the value of the heartbeat request packet use field of the heartbeat request packet can be set to indicate that the heartbeat request packet is normal. The value of the heartbeat request message can be processed according to the existing on-off detection mode.
在获取上述通信质量检测的数据后, 可以进行不同的应用。 例如, 丟包 率大于一定阈值, 如 0.1%后, 通过告警、 日记等类似的提示方式呈现备用路 径的亚健康状态, 提醒用户进行排查, 确保备用路径保持健康的通信状态。 特定长度的包总是被丟弃时, 通过告警、 日记等类似的提示方式呈现, 提醒 用户有目的性的进行排查, 确保备用路径保持健康的通信状态。 备用路径通 信质量探测结果给 SCTP多归属根据 QoS切换路径提供决策数据,保证 SCTP 多归属根据 QoS切换的准确有效。  After obtaining the data of the above communication quality detection, different applications can be performed. For example, if the packet loss rate is greater than a certain threshold, for example, 0.1%, the sub-health status of the alternate path is presented through alarms, diaries, and the like, and the user is prompted to perform troubleshooting to ensure that the alternate path maintains a healthy communication state. When a packet of a certain length is always discarded, it is presented by a similar prompt such as an alarm, a diary, etc., to remind the user to perform a purposeful check to ensure that the alternate path maintains a healthy communication state. The alternate path communication quality detection result provides SCTP multi-homing based on the QoS handover path to provide decision data, ensuring that the SCTP multi-homing is accurate and efficient according to the QoS handover.
图 8为本发明检测路径通信质量的设备一实施例的结构示意图, 该设备 可以为能够执行 SCTP的发送端设备, 具体可以为基站、 基站控制设备、 核 心网设备等。 该设备包括发送单元 81、 接收单元 82和检测单元 83 ; 发送单 元 81用于向接收端发送心跳请求报文,所述心跳请求报文中包含待检测的路 径的源地址和目的地址以及第一字段, 所述第一字段表明所述心跳请求报文 用于路径通信质量检测;接收单元 82用于接收与所述心跳请求报文对应的心 跳应答报文; 检测单元 83用于根据所述发送单元 81发送的所述心跳请求报 文和所述接收单元 82接收的所述心跳应答报文确定所述待检测的路径的通 信质量。  FIG. 8 is a schematic structural diagram of an apparatus for detecting a path communication quality according to the present invention. The device may be a sender device capable of performing SCTP, and may be a base station, a base station control device, a core network device, or the like. The device includes a sending unit 81, a receiving unit 82, and a detecting unit 83. The sending unit 81 is configured to send a heartbeat request message to the receiving end, where the heartbeat request message includes a source address and a destination address of the path to be detected, and the first a field, the first field indicating that the heartbeat request message is used for path communication quality detection, the receiving unit 82 is configured to receive a heartbeat response message corresponding to the heartbeat request message, and the detecting unit 83 is configured to send according to the The heartbeat request message sent by the unit 81 and the heartbeat response message received by the receiving unit 82 determine the communication quality of the path to be detected.
进一步地, 图 9为本发明检测路径通信质量的设备另一实施例的结构示 意图, 在上一实施例的基础上, 还包括: 第一指示单元 91、 发送循环定时器 92、 检测周期定时器 93、 第一计数器 94和第二计数器 95; 第一指示单元 91 用于启动发送循环定时器 92和检测周期定时器 93 , 并将第一计数器 94和第 二计数器 95的初始值均设置为 0; 所述发送循环定时器 92用于在超时后指 示所述发送单元 81发送所述心跳请求报文; 所述第一计数器 94用于在所述 发送单元 81每发送一个所述心跳请求报文后, 将计数值增加 1 ; 所述第二计 数器 95用于在所述接收单元 82每接收一个与所述心跳请求报文对应的心跳 应答报文后, 将计数值增加 1 ; 所述检测单元 83具体用于在所述检测周期定 时器 93超时后,根据所述第一计数器的计数值和所述第二计数器的计数值得 到丟包率。 Further, FIG. 9 is a schematic structural diagram of another embodiment of an apparatus for detecting a path communication quality according to the present invention. On the basis of the previous embodiment, the method further includes: a first indication unit 91, a transmission cycle timer 92, and a detection period timer. 93. The first counter 94 and the second counter 95. The first indication unit 91 is configured to start the transmission cycle timer 92 and the detection cycle timer 93, and set the initial values of the first counter 94 and the second counter 95 to 0. The sending loop timer 92 is configured to instruct the sending unit 81 to send the heartbeat request message after a timeout; the first counter 94 is configured to send one heartbeat request message every time in the sending unit 81. After the receiving unit 82 receives a heartbeat response message corresponding to the heartbeat request message, the counter value is incremented by one; the detecting unit is incremented by one after the receiving unit 82 receives a heartbeat response message corresponding to the heartbeat request message; 83 is specifically used in the detection cycle After the timer 93 times out, the packet loss rate is obtained according to the count value of the first counter and the count value of the second counter.
进一步地,图 10为本发明检测路径通信质量的设备另一实施例的结构示 例的基础上, 本实施例还包括: 填充单元 101 , 用于在所述心跳请求 文的 所述填充域内填充内容; 所述发送单元 81具体用于发送经所述填充单元 101 填充内容后的心跳请求报文;所述接收单元 82具体用于接收对应填充内容后 的心跳请求报文的心跳应答报文;所述检测单元 83具体用于检测填充内容的 报文的丟包率。  Further, FIG. 10 is a structural example of another embodiment of an apparatus for detecting a path communication quality according to the present invention. The embodiment further includes: a filling unit 101, configured to fill content in the padding field of the heartbeat request message. The sending unit 81 is specifically configured to send a heartbeat request message after the content is filled by the filling unit 101; the receiving unit 82 is specifically configured to receive a heartbeat response message corresponding to the heartbeat request message after the content is filled; The detecting unit 83 is specifically configured to detect a packet loss rate of a message filling the content.
进一步地,图 11为本发明检测路径通信质量的设备另一实施例的结构示 意图, 在上一实施例的基础上, 本实施例还包括: 第二指示单元 111、 发送 循环定时器 112、 检测周期定时器 113、 第一计数器 114和第二计数器 115; 第二指示单元 i l l用于启动发送循环定时器 112和检测周期定时器 113 , 并 将第一计数器 114和第二计数器 115的初始值均设置为 0; 所述第一计数器 114和第二计数器 115的个数分别至少为两个, 所述第一计数器 114包括用 于对填充内容为第一长度的心跳请求报文进行计数的对应第一长度的第一计 数器 1140, 所述第二计数器 115包括用于对填充内容为第一长度的心跳应答 报文进行计数的对应第一长度的第二计数器 1150; 所述填充单元 101填充的 内容包括第一长度的内容; 所述发送循环定时器 112用于在超时后指示所述 报文; 所述对应第一长度的第一计数器 1140用于在所述发送单元 81每发送 一个填充内容为第一长度的心跳请求报文后, 将计数值增加 1 ; 所述对应第 一长度的第二计数器 1150用于在所述接收单元 82每接收一个与所述填充内 容为第一长度的心跳请求报文对应的心跳应答报文后, 将计数值增加 1 ; 所 述检测单元 83具体用于在所述检测周期定时器 113超时后,根据所述对应第 一长度的第一计数器的计数值 1140和所述对应第一长度的第二计数器 1150 的计数值得到第一长度的报文的丟包率。  Further, FIG. 11 is a schematic structural diagram of another embodiment of an apparatus for detecting a path communication quality according to the present invention. On the basis of the previous embodiment, the embodiment further includes: a second indication unit 111, a transmission loop timer 112, and detection. The cycle timer 113, the first counter 114 and the second counter 115; the second indication unit ill is configured to start the transmission cycle timer 112 and the detection cycle timer 113, and set initial values of the first counter 114 and the second counter 115 The number of the first counter 114 and the second counter 115 is at least two, and the first counter 114 includes a corresponding number for counting the heartbeat request message whose content is the first length. a first counter 1140 of the length, the second counter 115 includes a second counter 1150 corresponding to the first length for counting the heartbeat response message with the first content being filled; the content filled by the filling unit 101 Include a first length of content; the sending loop timer 112 is configured to indicate the message after a timeout; the corresponding first length The first counter 1140 is configured to increase the count value by 1 after the sending unit 81 sends a heartbeat request message whose filling content is the first length; the second counter 1150 corresponding to the first length is used in the The receiving unit 82 increases the count value by 1 after receiving a heartbeat response message corresponding to the heartbeat request message whose content is the first length; the detecting unit 83 is specifically configured to use the detection cycle timer. After the timeout of 113, the packet loss rate of the packet of the first length is obtained according to the count value 1140 of the first counter corresponding to the first length and the count value of the second counter 1150 corresponding to the first length.
进一步地,图 12为本发明检测路径通信质量的设备另一实施例的结构示 意图, 在图 10所示的实施例的基础上, 本实施例还包括: 第三指示单元 121、 发送循环定时器 122、检测周期定时器 123、跳变计数器 124和记录单元 125; 第三指示单元 121用于启动发送循环定时器 122和检测周期定时器 123 , 并 将跳变计数器 124的初始值设置为 0; 所述发送循环定时器 122用于在超时 后指示所述发送单元 81发送经所述填充单元 101 填充内容后的心跳请求报 文;记录单元 125用于在所述填充单元 101对所述心跳请求报文进行填充后, 记录第一填充内容, 所述第一填充内容为心跳请求报文中的填充内容; 跳变 计数器 124用于比较第二填充内容和第一填充内容, 当存在一个填充内容变 化时, 将跳变计数器的计数值增加 1 , 所述第二填充内容为接收单元 82接收 的心跳应答 ·艮文中的填充内容;所述检测单元 83具体用于在所述检测周期定 时器 123超时后, 将所述跳变计数器 124的计数值确定为内容跳变个数。 Further, FIG. 12 is a schematic structural diagram of another embodiment of an apparatus for detecting a path communication quality according to the present invention. On the basis of the embodiment shown in FIG. 10, the embodiment further includes: a third indication unit 121, a transmission cycle timer. 122, detection cycle timer 123, hopping counter 124 and recording unit 125; The third indication unit 121 is configured to start the transmission cycle timer 122 and the detection cycle timer 123, and set the initial value of the hopping counter 124 to 0; the transmission cycle timer 122 is configured to indicate the sending unit after the timeout 81: Send a heartbeat request message after the filling unit 101 fills the content; the recording unit 125 is configured to record, after the filling unit 101 fills the heartbeat request message, the first padding content, the first padding The content is the padding content in the heartbeat request message; the hopping counter 124 is configured to compare the second padding content with the first padding content, and when there is a padding content change, increase the count value of the hopping counter by one, the second The padding content is the padding content received by the receiving unit 82. The detecting unit 83 is specifically configured to determine the count value of the hopping counter 124 as a content hop after the detecting period timer 123 times out. Change the number.
本实施例通过对现有的心跳请求报文进行扩展, 根据心跳请求报文完成 路径的通信质量的检测。  In this embodiment, the existing heartbeat request message is extended, and the communication quality of the path is detected according to the heartbeat request message.
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步骤 可以通过程序指令相关的硬件来完成, 前述的程序可以存储于计算机可读取 存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 而前述的 存储介质包括: ROM, RAM,磁碟或者光盘等各种可以存储程序代码的介质。  A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to program instructions. The foregoing program may be stored in a computer readable storage medium, and when executed, the program includes The foregoing steps of the method embodiment; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对其 限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通技术 人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修改, 或 者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并不使相应技 术方案的本质脱离本发明各实施例技术方案的范围。  It should be noted that the above embodiments are only for explaining the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that: The technical solutions described in the foregoing embodiments are modified, or some of the technical features are equivalently replaced; and the modifications or substitutions do not deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

权 利 要 求 书 Claim
1、 一种检测路径通信质量的方法, 其特征在于, 包括:  A method for detecting the quality of a path communication, characterized in that it comprises:
发送端向接收端发送心跳请求报文, 所述心跳请求报文中包含待检测的 路径的源地址和目的地址以及第一字段, 所述第一字段表明所述心跳请求报 文用于路径通信质量检测;  The sending end sends a heartbeat request message to the receiving end, where the heartbeat request message includes a source address and a destination address of the path to be detected, and a first field, where the first field indicates that the heartbeat request message is used for path communication Quality Inspection;
发送端接收与所述心跳请求报文对应的心跳应答报文, 并根据所述心跳 请求报文和所述心跳应答报文确定所述待检测的路径的通信质量。  The sending end receives the heartbeat response message corresponding to the heartbeat request message, and determines the communication quality of the path to be detected according to the heartbeat request message and the heartbeat response message.
2、 根据权利要求 1所述的方法, 其特征在于, 还包括:  2. The method according to claim 1, further comprising:
设置第一计数器和第二计数器, 将第一计数器的初始值和第二计数器的 初始值设置为 0, 并启动发送循环定时器和检测周期定时器, 所述第一计数 器用于对所述心跳请求报文的发送数进行计数, 所述第二计数器用于对所述 心跳应答报文的接收数进行计数;  Setting a first counter and a second counter, setting an initial value of the first counter and an initial value of the second counter to 0, and starting a transmission cycle timer and a detection cycle timer, the first counter being used for the heartbeat Counting the number of transmissions of the request message, the second counter is configured to count the number of received heartbeat response messages;
所述发送端向接收端发送心跳请求报文, 包括: 当所述发送循环定时器 超时后, 发送所述心跳请求 4艮文;  The sending, by the sending end, the heartbeat request message to the receiving end, includes: sending the heartbeat request message after the sending loop timer expires;
每发送一个所述心跳请求报文后, 将所述第一计数器的计数值增加 1 ; 每接收一个与所述心跳请求报文对应的所述心跳应答报文后, 将所述第 二计数器的计数值增加 1 ;  After the one heartbeat request message is sent, the count value of the first counter is increased by one; after receiving the heartbeat response message corresponding to the heartbeat request message, the second counter is The count value is increased by 1;
所述根据所述心跳请求报文和所述心跳应答报文确定所述待检测的路径 的通信质量, 包括:  Determining the communication quality of the path to be detected according to the heartbeat request message and the heartbeat response message, including:
当所述检测周期定时器超时后, 根据所述第一计数器的计数值和所述第 二计数器的计数值计算得到丟包率。  After the detection period timer expires, the packet loss rate is calculated according to the count value of the first counter and the count value of the second counter.
3、 根据权利要求 1所述的方法, 其特征在于, 所述心跳请求报文中还包 含填充域, 所述方法还包括: 的心跳请求报文及对应的心跳应答报文确定所述待检测的路径的通信质量。  The method according to claim 1, wherein the heartbeat request message further includes a padding field, the method further comprising: a heartbeat request message and a corresponding heartbeat response message determining the to-be-detected The quality of the communication path.
4、 根据权利要求 3所述的方法, 其特征在于, 还包括:  4. The method according to claim 3, further comprising:
设置至少两个第一计数器和分别与每个第一计数器对应的第二计数器, 将所述第一计数器的初始值和所述第二计数器的初始值设置为 0, 并启动发 送循环定时器和检测周期定时器, 每个第一计数器分别用于对填充了不同长 度的内容的心跳请求报文的发送数进行计数, 每个第二计数器分别用于对与 填充了不同长度的内容的心跳请求报文对应的心跳应答报文的接收数进行计 数; Setting at least two first counters and a second counter respectively corresponding to each of the first counters, setting an initial value of the first counter and an initial value of the second counter to 0, and starting a transmission cycle timer and a detection period timer, each of which is used to count the number of heartbeat request messages filled with content of different lengths, and each second counter is used for The number of received heartbeat response messages corresponding to the heartbeat request message filled with content of different lengths is counted;
所述发送端向接收端发送心跳请求报文, 包括: 当所述发送循环定时器 超时后, 对所述心跳请求报文填充第一长度的内容后发送;  The sending, by the sending end, the heartbeat request packet to the receiving end, the method includes: after the sending of the looping timer expires, filling the heartbeat request packet with the content of the first length and then sending the content;
每发送一个填充第一长度的内容的心跳请求报文后, 将对应该第一长度 的第一计数器的计数值增加 1 ;  After each heartbeat request message filling the content of the first length is sent, the count value corresponding to the first counter of the first length is increased by 1;
每接收一个与所述填充第一长度的内容的心跳请求报文对应的心跳应答 报文后, 将对应该第一长度的第二计数器的计数值增加 1 ;  After receiving a heartbeat response message corresponding to the heartbeat request message filling the content of the first length, increasing the count value of the second counter corresponding to the first length by one;
所述根据所述心跳请求报文和所述心跳应答报文确定所述待检测的路径 的通信质量, 包括:  Determining the communication quality of the path to be detected according to the heartbeat request message and the heartbeat response message, including:
当所述检测周期定时器超时后 , 根据对应所述第一长度的第一计数器的 计数值和对应所述第一长度的第二计数器的计数值计算得到填充内容为第一 长度的报文的丟包率。  After the detection period timer expires, the packet with the content of the first length is calculated according to the count value of the first counter corresponding to the first length and the count value of the second counter corresponding to the first length. Packet loss rate.
5、 根据权利要求 3所述的方法, 其特征在于, 还包括:  5. The method according to claim 3, further comprising:
设置跳变计数器, 并将所述跳变计数器的初始值设置为 0 , 所述跳变计 数器用于对报文内容的跳变个数进行计数;  Setting a hopping counter, and setting an initial value of the hopping counter to 0, the hopping counter is configured to count the number of hops of the message content;
对所述心跳请求报文进行填充后, 记录第一填充内容, 所述第一填充内 容为所述心跳请求报文中的填充内容;  After the heartbeat request packet is filled, the first padding content is recorded, and the first padding content is the padding content in the heartbeat request packet.
每接收一个与所述心跳请求报文对应的心跳应答报文后, 比较第二填充 内容和所述第一填充内容, 所述第二填充内容为所述心跳应答报文中的填充 内容, 当存在一个填充内容变化时, 将所述跳变计数器的计数值增加 1 ; 所述根据所述心跳请求报文和所述心跳应答报文确定所述待检测的路径 的通信质量, 包括:  After receiving a heartbeat response message corresponding to the heartbeat request message, comparing the second padding content with the first padding content, where the second padding content is the padding content in the heartbeat response message, when When there is a change in the content of the padding, the value of the hopping counter is increased by one; the determining the communication quality of the path to be detected according to the heartbeat request message and the heartbeat response message includes:
当所述检测周期定时器超时后, 将所述跳变计数器的计数值确定为所述 待检测的路径上的内容跳变个数。  After the detection period timer expires, the count value of the hopping counter is determined as the number of content hops on the path to be detected.
6、 一种检测路径通信质量的设备, 其特征在于, 包括:  6. A device for detecting the quality of a path communication, characterized in that it comprises:
发送单元, 用于向接收端发送心跳请求报文, 所述心跳请求报文中包含 待检测的路径的源地址和目的地址以及第一字段, 所述第一字段表明所述心 跳请求报文用于路径通信质量检测;  a sending unit, configured to send a heartbeat request message to the receiving end, where the heartbeat request message includes a source address and a destination address of the path to be detected, and a first field, where the first field indicates that the heartbeat request message is used For path communication quality detection;
接收单元, 用于接收与所述心跳请求报文对应的心跳应答报文; 单元接收的所述心跳应答报文确定所述待检测的路径的通信质量。 a receiving unit, configured to receive a heartbeat response message corresponding to the heartbeat request message; The heartbeat response message received by the unit determines the communication quality of the path to be detected.
7、 根据权利要求 6所述的设备, 其特征在于, 还包括: 第一指示单元、 发送循环定时器、 检测周期定时器、 第一计数器和第二计数器, 其中,  The device according to claim 6, further comprising: a first indication unit, a transmission cycle timer, a detection cycle timer, a first counter, and a second counter, wherein
所述第一指示单元, 用于启动发送所述循环定时器和所述检测周期定时 器, 并将所述第一计数器和所述第二计数器的初始值均设置为 0;  The first indication unit is configured to start sending the loop timer and the detection period timer, and set an initial value of the first counter and the second counter to 0;
所述发送循环定时器, 用于在超时后指示所述发送单元发送所述心跳请 求报文;  The sending loop timer is configured to instruct the sending unit to send the heartbeat request message after a timeout;
所述第一计数器,用于在所述发送单元每发送一个所述心跳请求报文后, 将计数值增加 1 ;  The first counter is configured to increase the count value by one after each sending of the heartbeat request message by the sending unit;
所述第二计数器, 用于在所述接收单元每接收一个与所述心跳请求报文 对应的心跳应答报文后, 将计数值增加 1 ;  The second counter is configured to increase the count value by 1 after receiving, by the receiving unit, a heartbeat response message corresponding to the heartbeat request message;
所述检测单元, 具体用于在所述检测周期定时器超时后, 根据所述第一 计数器的计数值和所述第二计数器的计数值计算得到丟包率。  The detecting unit is specifically configured to calculate a packet loss rate according to the count value of the first counter and the count value of the second counter after the detection period timer expires.
8、 根据权利要求 6所述的设备, 其特征在于, 所述心跳请求报文中还包 含填充域, 所述设备还包括:  The device according to claim 6, wherein the heartbeat request message further includes a padding field, and the device further includes:
文; Text
所述接收单元, 具体用于接收对应所述填充内容后的心跳请求报文的心 跳应答报文;  The receiving unit is specifically configured to receive a heartbeat response message corresponding to the heartbeat request message after the content is filled;
所述检测单元, 具体用于检测填充内容的报文的丟包率。  The detecting unit is specifically configured to detect a packet loss rate of a packet filled with content.
9、 根据权利要求 8所述的设备, 其特征在于, 还包括: 第二指示单元、 发送循环定时器、 检测周期定时器、 第一计数器和第二计数器, 其中,  The device according to claim 8, further comprising: a second indication unit, a transmission cycle timer, a detection cycle timer, a first counter, and a second counter, wherein
所述第二指示单元, 用于启动所述发送循环定时器和所述检测周期定时 器, 并将所述第一计数器和所述第二计数器的初始值均设置为 0;  The second indicating unit is configured to start the sending loop timer and the detecting period timer, and set an initial value of the first counter and the second counter to 0;
所述第一计数器和所述第二计数器的个数分别至少为两个, 所述第一计 数器包括用于对填充内容为第一长度的心跳请求报文进行计数的对应该第一 长度的第一计数器, 所述第二计数器包括用于对填充内容为第一长度的心跳 应答报文进行计数的对应该第一长度的第二计数器; 所述填充单元填充的内容包括第一长度的内容; The number of the first counter and the second counter is at least two, and the first counter includes a first length corresponding to the heartbeat request message with the first content being filled. a counter, the second counter includes a second counter corresponding to the first length for counting the heartbeat response message whose content is the first length; The content filled by the filling unit includes content of a first length;
所述发送循环定时器, 用于在超时后指示所述发送单元发送经所述填充 单元填充的包括所述第一长度的内容的心跳请求报文;  The sending loop timer is configured to instruct the sending unit to send a heartbeat request message including the first length of content filled by the filling unit after a timeout;
所述对应第一长度的第一计数器, 用于在所述发送单元每发送一个填充 内容为第一长度的心跳请求报文后, 将计数值增加 1 ;  The first counter corresponding to the first length is used to increase the count value by 1 after the sending unit sends a heartbeat request message with the filling content being the first length;
所述对应第一长度的第二计数器, 用于在所述接收单元每接收一个与所 述填充内容为第一长度的心跳请求报文对应的心跳应答报文后, 将计数值增 加 1 ;  The second counter corresponding to the first length is used to increase the count value by 1 after the receiving unit receives a heartbeat response message corresponding to the heartbeat request message with the first content length;
所述检测单元, 具体用于在所述检测周期定时器超时后, 根据所述对应 第一长度的第一计数器的计数值和所述对应第一长度的第二计数器的计数值 计算得到第一长度的报文的丟包率。  The detecting unit is configured to calculate, according to the count value of the first counter corresponding to the first length and the count value of the second counter corresponding to the first length, after the timeout timer expires Packet loss rate of packets of the length.
10、 根据权利要求 8所述的设备, 其特征在于, 还包括: 第三指示单元、 发送循环定时器、 检测周期定时器、 跳变计数器和记录单元, 其中,  The device according to claim 8, further comprising: a third indication unit, a transmission cycle timer, a detection cycle timer, a hopping counter, and a recording unit, wherein
所述第三指示单元, 用于启动所述发送循环定时器和所述检测周期定时 器, 并将所述跳变计数器的初始值设置为 0;  The third indicating unit is configured to start the sending loop timer and the detecting period timer, and set an initial value of the hopping counter to 0;
所述发送循环定时器, 用于在超时后指示所述发送单元发送经所述填充 单元填充内容后的心跳请求报文; 记录第一填充内容, 所述第一填充内容为所述心跳请求报文中的填充内容; 所述跳变计数器, 用于比较第二填充内容和所述第一填充内容, 当存在 一个填充内容变化时, 将所述跳变计数器的计数值增加 1 , 所述第二填充内 容为所述接收单元接收的心跳应答报文中的填充内容;  The sending loop timer is configured to instruct the sending unit to send a heartbeat request message after the filling unit fills the content after the timeout; recording the first padding content, where the first padding content is the heartbeat request message a padding content in the text; the hopping counter is configured to compare the second padding content and the first padding content, and when there is a padding content change, increase the count value of the hopping counter by one, The second padding content is the padding content in the heartbeat response message received by the receiving unit;
所述检测单元, 具体用于在所述检测周期定时器超时后, 将所述跳变计 数器的计数值确定为内容跳变个数。  The detecting unit is specifically configured to determine, when the detection period timer expires, a count value of the hopping counter as a content hopping number.
PCT/CN2011/083050 2011-11-28 2011-11-28 Path communication quality detection method and device WO2013078594A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2011/083050 WO2013078594A1 (en) 2011-11-28 2011-11-28 Path communication quality detection method and device
CN201180002965.9A CN103404080B (en) 2011-11-28 2011-11-28 The method and apparatus of detection path communication quality

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/083050 WO2013078594A1 (en) 2011-11-28 2011-11-28 Path communication quality detection method and device

Publications (1)

Publication Number Publication Date
WO2013078594A1 true WO2013078594A1 (en) 2013-06-06

Family

ID=48534585

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/083050 WO2013078594A1 (en) 2011-11-28 2011-11-28 Path communication quality detection method and device

Country Status (2)

Country Link
CN (1) CN103404080B (en)
WO (1) WO2013078594A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112866187A (en) * 2019-11-28 2021-05-28 华为技术服务有限公司 Path switching method and path switching device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106888138B (en) * 2017-03-17 2019-07-16 烽火通信科技股份有限公司 A kind of service channel detection system and test method
CN107193708A (en) * 2017-05-17 2017-09-22 郑州云海信息技术有限公司 A kind of condition detection method and system
CN109495352B (en) * 2018-12-27 2021-06-08 新华三技术有限公司 Method and device for determining transmission path

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1897547A (en) * 2005-07-14 2007-01-17 华为技术有限公司 Method for inspecting Qos in telecommunication network
CN101166122A (en) * 2006-10-18 2008-04-23 中兴通讯股份有限公司 A method for locating network failure between communication terminals
CN101242320A (en) * 2008-03-13 2008-08-13 华为技术有限公司 Method and device for monitoring network path
CN101404597A (en) * 2008-11-19 2009-04-08 华为技术有限公司 Network quality index acquirement method, system and apparatus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100452715C (en) * 2002-10-01 2009-01-14 华为技术有限公司 Intelligent terminal managing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1897547A (en) * 2005-07-14 2007-01-17 华为技术有限公司 Method for inspecting Qos in telecommunication network
CN101166122A (en) * 2006-10-18 2008-04-23 中兴通讯股份有限公司 A method for locating network failure between communication terminals
CN101242320A (en) * 2008-03-13 2008-08-13 华为技术有限公司 Method and device for monitoring network path
CN101404597A (en) * 2008-11-19 2009-04-08 华为技术有限公司 Network quality index acquirement method, system and apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112866187A (en) * 2019-11-28 2021-05-28 华为技术服务有限公司 Path switching method and path switching device
CN112866187B (en) * 2019-11-28 2022-12-27 华为技术服务有限公司 Path switching method and path switching device

Also Published As

Publication number Publication date
CN103404080B (en) 2016-10-12
CN103404080A (en) 2013-11-20

Similar Documents

Publication Publication Date Title
Speakman et al. PGM reliable transport protocol specification
TWI391007B (en) Load management in wireless mesh communications networks
TWI387369B (en) Network utilities in wireless mesh communications networks
US8023509B2 (en) Communication terminal and retransmission request method
TW201014393A (en) Node discovery and culling in wireless mesh communications networks
CN103039042A (en) Communication available transport network bandwidth to L2 Ethernet nodes
TWI506991B (en) Feedback protocol for end-to-end multiple path network systems
WO2011026264A1 (en) Method and apparatus for detecting multi-service performance in tunnel
WO2011144114A2 (en) Method, device and system for detecting path information
WO2013044827A1 (en) Test method for trace route and system, apparatus and device thereof
WO2013078594A1 (en) Path communication quality detection method and device
US11509561B2 (en) Performance measurement using extended bidirectional forwarding control packet
CN105338535A (en) Method for wireless networking through employing mobile terminal
WO2012167474A1 (en) Method, device and system for detecting network loop
US20120218883A1 (en) Multicast fast re-route
CN114747169B (en) Round trip packet loss measurement in packet switched communication networks
US20220263742A1 (en) Enabling a round-trip packet loss measurement in a packet-switched communication network
US20230198897A1 (en) Method, network device, and system for controlling packet sending
WO2013177894A1 (en) Method for measuring traffic performance indicator and transmission side device
WO2014008809A1 (en) Frame loss detection method and system
Singh et al. A survey on TCP (transmission control protocol) and UDP (user datagram protocol) over AODV routing protocol
TWI821882B (en) Packet loss rate measuring method, communication apparatus, and communication system
WO2022222544A1 (en) Method and apparatus for operation administration and maintenance (oam) detection
Chellaprabha et al. Performance of TCP, UDP and SCTP on Sensor Network with Different Data Reporting Intervals
WO2011124182A2 (en) Detection method, device and system of transmission between controller and base station

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11876458

Country of ref document: EP

Kind code of ref document: A1