WO2010091610A1 - Link detection method, apparatus and communications system thereof - Google Patents

Link detection method, apparatus and communications system thereof Download PDF

Info

Publication number
WO2010091610A1
WO2010091610A1 PCT/CN2010/070399 CN2010070399W WO2010091610A1 WO 2010091610 A1 WO2010091610 A1 WO 2010091610A1 CN 2010070399 W CN2010070399 W CN 2010070399W WO 2010091610 A1 WO2010091610 A1 WO 2010091610A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
sequence number
received
packet loss
unit
Prior art date
Application number
PCT/CN2010/070399
Other languages
French (fr)
Chinese (zh)
Inventor
何贵洲
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2010091610A1 publication Critical patent/WO2010091610A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks

Definitions

  • the embodiments of the present invention relate to the field of communications, and in particular, to a link detection method, apparatus, and communication system. Background technique
  • the GTP General Packet Radio Service Tunnel Protocol
  • GSN GPRS Support Node, GPRS service node, including the GGSN and the SGSN
  • GTP channel is a secure channel between the GSNs. Two hosts can exchange data through this channel.
  • the GTP is carried over the UDP (User Datagram Protocol) or the Transmission Control Protocol (TCP). It is divided into a signaling plane and a transmission plane. The signaling plane defines various messages and transmission planes.
  • the GTP protocol is divided into GTP-C, GTP-U and GTP, and the GTP-C is a signaling control protocol, and GTP-U is a packaged user data protocol, GTP, It is a billing related agreement.
  • GTP-C is a signaling control protocol
  • GTP-U is a packaged user data protocol, GTP, It is a billing related agreement.
  • TEID Transport End Point Identifier
  • the two nodes of a GTP tunnel each allocate a TEID that the party is going to use to receive specific data on the tunnel, and negotiates between the nodes through the GTP-C message.
  • GRE Generic Routing Encapsulation
  • GRE Generic Routing Encapsulation
  • GRE defines a protocol for encapsulating any other network layer protocol on any network layer protocol.
  • the GRE protocol can encapsulate multiple IP tunnels.
  • IPPM IP Performance
  • Monitoring, performance monitoring completes the detection of intermediate network transmission links.
  • the existing detection methods have high requirements for compatibility between the detection devices. If the detection device and the peer device are provided by different manufacturers, the detection may be difficult to complete; in addition, the existing detection method requires the control surface to do More complex calculations and configurations consume huge amounts of system resources. Summary of the invention
  • a technical problem to be solved by embodiments of the present invention is to provide a link detection method, apparatus, and communication system.
  • an embodiment of the present invention provides a link detection method, including the following steps:
  • the embodiment of the present invention further provides a device for detecting a link, including:
  • a first unit configured to identify at least one user data stream by using a multi-group
  • a second unit configured to receive and acquire a downlink message sequence number in the user data stream in a preset statistical period; Counting the number of packets actually received in the statistical period; the fourth unit is configured to calculate the number of receivables in the statistical period according to the sequence number of the packet received and obtained by the second unit; And configured to calculate a number of lost packets and/or a packet loss rate in the statistical period according to calculation results of the third unit and the fourth unit.
  • an embodiment of the present invention further provides a communication system, including the foregoing link detecting apparatus.
  • the method, the device, and the communication system provided by the embodiments of the present invention can detect the link quality without the participation of the peer device, even if the device docking of different vendors does not affect the detection. It is implemented and simple to implement, and consumes less system resources.
  • FIG. 1 is a schematic diagram of a method according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of a system according to an embodiment of the present invention. detailed description
  • This embodiment provides a link detection method, which is a link detection for a flow ID (flow ID), that is, a detection and statistics of a user data stream by using a data stream ID as a statistical object.
  • the method of this embodiment includes: first identifying a user data stream, where the meaning of the user data stream is not used to be defined as a data stream between the user equipment and the communication device, but is used to distinguish from the control flow of the control plane.
  • the user data stream includes end-to-end various service flows generated in the communication, for example, an end-to-end data stream generated by a mobile phone call, or an end-to-end data stream generated by a user using a BT (BitTorrent) service when surfing the Internet.
  • BT BitTorrent
  • the user data stream can also be identified by a triple or a quintuple.
  • a single user may generate one or more user data streams during the communication process, that is, one or more flow IDs may be corresponding, and only one of the user data streams may be counted in one statistical period, or Statistics are performed on multiple user data streams.
  • the statistical period can be adjusted according to the requirements of statistical accuracy. For example, it can be set to 5 seconds.
  • the statistical period starts, the serial number of the start message is received and obtained, and the first one will be received. The message is recorded as a received message, and the counter is started at the same time. The number of received messages is counted as 1.
  • the initial count of the counter here may not be 1, when the initial count of the counter is not 1, The initial count value of the counter can be read once at the beginning of the statistical period.
  • the initial count value read at the beginning of the statistical period is subtracted from the counter count; in the next statistical period, the single stream The number of received messages for each message sequence number counter is incremented by one; at the end of the statistical period, the user data stream based on the flow ID is received and the sequence number of the end message in the downlink direction is obtained; according to the start message
  • the sequence number of the sequence number and the end number of the end message can be used to calculate the number of packets that should be received, that is, the number of receivable packets, and calculate the number of lost packets based on the calculated number of receivables and the number of received packets counted in the counter. And / or packet loss rate.
  • the data stream received by the detecting end can be defined as a downlink data stream.
  • the statistics performed on the user data stream in this embodiment are statistics for the downlink data packet in the user data stream, that is, the detecting end. Statistics on the received packets in the received data stream. The statistics can be completed on the detection end.
  • the solution provided in this embodiment can be implemented by using the intrinsic characteristics of the device, and the end-to-end implementation is not required.
  • the detection process can be completed at the detecting end, and the peer device can be used without participation.
  • the solution provided by the embodiment even if the devices of different vendors are connected, the implementation of the detection is not affected, and the compatibility is good.
  • the method of the embodiment is simpler because the participation of the peer device is not required. It does not require the control plane to do more complicated calculations and configurations, consumes less system resources, and can perform real-time detection and closed-loop regulation of link quality.
  • This embodiment provides another method for link detection.
  • the structure of the GTP message frame involved in this embodiment is introduced.
  • the message header of the GTP VI version consists of a fixed part and an optional part.
  • the fixed part consists of 8 bytes, describing the version number, flag bit information, GTP message type, message length, and TEID field used by the GTP message.
  • the optional part includes the serial number, the N-PDU number, and the extension part. The presence or absence of these optional parts is determined by the value of the identification bit.
  • the Version field defines the version number used by GTP, and is set to "001" in the VI version.
  • the PT field is a protocol specifier for distinguishing between GTP and GTP, and the message; the E header (Extension Header flag) is used to indicate whether it exists.
  • the extension number header is used to indicate whether there is an identifier bit of the SN domain; the PN field is used to indicate whether the GTP message header has an N-PDU domain;
  • the Message Type field is used to indicate the GTP message type; the Length field indicates The length of the message except the fixed length message part; the TEID field indicates that the receiver allocates the TEID of the receiving end, and negotiates with the sender through the GTP-C, RANAP, etc.
  • the TEID negotiation in the GTP VI version, the Sequence Number
  • the domain is an optional domain part;
  • the N-PDU Number field is also an optional domain part, which is used for the routing area update process and the SRNS relocation process between the SGSNs.
  • the Next Extension Header Type is an extension of the GTP header that maintains compatibility with future versions.
  • the GRE frame structure is as follows:
  • the GRE frame structure is compared with the GTP frame structure, wherein the Key field is equivalent to the TEID in the GTP frame, and the sequence number Sequence Number parameter is the same as the Sequence Number in the GTP frame structure, and is optional.
  • the method in this embodiment includes:
  • Step 101 Identify at least one user data stream by using a multi-group
  • a triplet or a quintuple may be used. If a triplet method is used, at least one user data may be identified by a source IP, a destination IP, and a protocol type. If the method of the quintuple is used, the source IP, the destination IP, the source port, the destination port, and the protocol type may be used to identify at least one user data stream. Of course, those skilled in the art may also have other extension manners to identify At least one user data stream.
  • the packet in the process of detecting the identified user data stream, the packet may be counted and detected by the stream ID.
  • the flow ID (flow ID) may be different according to the packet type. For example, for a GTP packet, the stream ID can be a TEID. In the actual application, the Key field in the GRE packet is usually processed as mandatory. Therefore, for the GRE "3 ⁇ 4 text, the stream ID can be Key.
  • Step 102 At the beginning of the preset statistical period, receive and acquire the sequence number of the start message in the downlink direction of the user data stream, start a counter, and record the number of the received message as 1;
  • sequence number of the start message in the downlink direction of the user data stream there are various methods for obtaining the sequence number of the start message in the downlink direction of the user data stream.
  • some fields in the GTP message frame structure are optional, and therefore, the use may be considered.
  • An optional field in the frame structure of the GTP packet carries the sequence number of the message.
  • the sequence number field in the GTP message frame structure can be used to carry the sequence number of the start message.
  • sequence number of the start message can also be passed.
  • the GRE packet in the downlink direction of the user data stream is carried.
  • the sequence number of the start message can be carried, for example, by using the Sequence Number field in the GRE packet, for example.
  • the sequence number of the downstream data stream can be expressed in hexadecimal, increasing from 0 to OXfffffff by 4 bytes and allowing flipping.
  • a counter can be started to record the number of packets actually received.
  • Step 104 At the end of the statistical period, receive a TEID-based user data stream and obtain a sequence number in which the downlink direction ends >3 ⁇ 4;
  • sequence number of the end message can also be carried by an optional field in the GTP or GRE message frame structure, such as the Sequence Number field.
  • a variable EndSeqNo can be set, at the end of the statistical period. , the serial number of the received message is taken out and assigned to the variable EndSeqNo 0
  • Step 105 Calculate the number of receivables according to the start sequence sequence number and the end message sequence number in the downlink direction. Specifically, a variable ShouldRcvPktNum may be set to indicate the number of receivables, and it is noted that the report is considered. The sequence number of the text may be reversed. When calculating the number of receivable packets, the sequence number of the start message and the sequence number of the end message may be reversed.
  • the hexadecimal number can be converted to a decimal number when calculating the packet loss rate or the number of lost packets, and the number of received packets calculated in decimal Perform mathematical calculations.
  • sequence number of the last end message of the last statistical period is very important. If the message is out of order or incorrect, it will have a greater impact on the statistics of the next cycle. Therefore, when an abnormal situation occurs, you can consider The start sequence serial number actually received in the next cycle is corrected. Specifically, for the next cycle, if the first sequence number of the first message received in the cycle is not much different from the sequence number of the last message in the previous cycle, for example, the difference is about 2-3, It is considered that the out-of-order message in this period is still used as the statistical message of this period; if the sequence number of the first message actually received in this cycle is very different from the previous period, such as 10000 or more, it is beyond the period.
  • the statistical category can be regarded as the message that is transmitted incorrectly in this period, and is also recorded as the current period statistics. If the first sequence number actually received in this period is smaller than the sequence number of the last period ending message, it is considered to be the upper period message. It can be discarded. In addition, the continuity of several message serial numbers received continuously at the beginning of this cycle should be considered. If the continuity is good and the sequence number of the previous cycle is quite different, it can be considered that there is a previous cycle. Problem, do the assignment correction processing. In addition, communication networks usually use private networks. The private network is well planned. Usually, congestion and out-of-order situations do not occur. In this scenario, packets can be considered as ordered, but if The communication link goes to the public network. The public network usually has no quality guarantee.
  • real-time monitoring and statistics of link quality can also be performed according to these parameters. Specifically, by setting the statistics period, the detecting end performs the statistics on the packet loss rate data to the second level, and the accumulated time, for example, 1 minute, is accumulated according to the statistical result, and then the minute is calculated.
  • the packet loss rate is reported to the upper-layer operation and maintenance center.
  • the base station OM the base station OM periodically reports the packet loss rate data of the minute level to the network management system.
  • the network management system can form the packet loss rate curve according to the baseline. Hour or 1 day, the network management can draw time, The packet loss rate curve of the day, using the packet loss rate curve, the user can monitor the quality of the transmission network to adjust the network operation parameters in real time.
  • the detection link may be closed-loop adjusted according to the result.
  • a packet loss rate threshold may be preset, and the calculated packet loss rate and the packet loss rate threshold may be performed. If the calculated packet loss rate exceeds the preset packet loss rate threshold, the peer can send a message limiting the flow rate. After receiving the message, the peer performs the current limiting process. After that, the detection link can be monitored and compared in real time. If the packet loss rate is lower than the preset packet loss threshold for a certain period of time, the peer can be notified to release the restriction on the flow rate.
  • the system includes: a first unit 11 configured to identify at least one user data stream by using a multi-group; wherein the method for identifying a user data stream may have multiple For example, using a triplet (source IP, destination IP, protocol type) or a quintuple (source IP, destination IP, source port, destination port, protocol type) to identify the user data stream, a single user can generate during the communication process.
  • One or more user data streams that is, one or more TEIDs. In one statistical period, statistics can be performed only for one user data stream, or multiple user data streams can be performed in units of TEIDs.
  • the second unit 12 is configured to receive and obtain a downlink message sequence number in the user data stream in a preset statistical period, where the sequence number of the downlink packet may be carried in an optional field in the GTP/GRE frame. , for example, in the Sequence Number field;
  • the third unit 13 is configured to count the actually received packets in the statistics period, and the counter can be used for statistics, and the number of received ones is incremented by one on a single stream;
  • the method is used to calculate the number of receivables in the statistical period according to the sequence number of the packet received and obtained by the second unit 12, specifically: if the ending packet sequence number is greater than the start message sequence number, the difference between the two That is, the number of receivables is obtained, that is, the number of receivables ShouldRcvPktNum is equal to the end 4 ⁇ serial number EndSeqNo minus the start 4 ⁇ serial number BeginSeqNo plus 1; otherwise, the serial number has been inverted, then the receivable message The number is ShouldRcvPktNum equal to OxFFFFFFFF plus EndSeqNo minus BeginSeqNo force 1;
  • the fifth unit 15 is configured to calculate the number of lost packets and/or the packet loss rate in the statistics period according to the calculation result
  • the device in this embodiment may further include a sixth unit for sorting the messages, and then starting the detection after sorting, in consideration of the fact that the packets may already be out of order before the detection starts.
  • the apparatus of this embodiment may further include a seventh unit, configured to compare the calculated actual packet loss rate with a preset packet loss rate threshold, if the packet loss rate exceeds the preset packet loss rate threshold A value can be used to send a traffic limiting message to the peer.
  • the present embodiment provides a communication system including the link detection device mentioned in the embodiment shown in FIG. 2, wherein the link detection device may include the first unit mentioned in the embodiment shown in FIG. 11 to fifth unit 15, preferably, may also include a sixth unit and/or a seventh unit.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Abstract

A link detection method, apparatus and communications system thereof are provided in the present invention. The method comprises: at least one user data stream is identified by a multi-element set; When the preset statistical period is started, the sequence number of the downlink direction start message in the user data stream is received and obtained, a counter is started, the number of the actually received message is recorded as 1, and then the counter is increased by 1 when receiving a message every time; when the statistical period ends, the sequence number of the end message is received and obtained, the number of the messages which should be received is calculated according to the sequence number of the start message and the sequence number of the end message; the packet loss number and/or packet loss ratio are calculated according to the number of messages which should be received and the number of the actually received messages. The system includes: a first unit, for identifying at least one user data stream by a multi-element set; a second unit, for receiving and obtaining the sequence numbers of the downlink direction messages in the user data stream; a third unit, for counting the actually received messages; a forth unit, for calculating the number of messages which should be received in the statistical period; a fifth unit, for calculating the packet loss number and/or the package loss ratio.

Description

链路检测方法、 装置和通信系统  Link detection method, device and communication system
本申请要求于 2009 年 2 月 13 日提交中国专利局、 申请号为 200910105436.6, 发明名称为 "一种链路检测方法、 装置和通信系统" 的中 国专利申请的优先权。 技术领域  The present application claims priority to Chinese Patent Application No. 2009-10105436.6, entitled "A Link Detection Method, Apparatus, and Communication System", filed on February 13, 2009. Technical field
本发明实施例涉及通信领域, 特别涉及一种链路检测方法、 装置和通信 系统。 背景技术  The embodiments of the present invention relate to the field of communications, and in particular, to a link detection method, apparatus, and communication system. Background technique
GTP ( General Packet Radio Service Tunnel Protocol )协议应用在 GSN ( GPRS Support Node, GPRS服务节点, 包括 GGSN和 SGSN )之间, 为各 个移动台 (MS )建立 GTP通道, GTP通道是 GSN之间的安全通道, 两个 主机可通过该通道交换数据。 GTP承载在 UDP ( User Datagram Protocol, 用 户数据 4艮文)或 TCP ( Transmission Control Protocol, 传输控制协议)之上, 分为信令平面和传输平面, 其中信令平面定义了多种消息, 传输平面则提供 了 GSN之间数据包传送的隧道, GTP协议分为 GTP-C, GTP-U和 GTP,协议, 其中, GTP-C是信令控制协议, GTP-U是封装用户数据协议, GTP,是计费相 关的协议。 在 GTP协议中存在一个 TEID ( Tunnel End Point Identifier, 隧道 端点标识) , 该标识无歧义地标识了数据接收方 GTP-U或 GTP-C协议实体 上的隧道终结点。 一个 GTP隧道的两端节点各自分配本方准备在该隧道上接 收特定数据时使用的 TEID, 并通过 GTP-C消息进行节点间的协商。 此外, GRE ( Generic Routing Encapsulation, 通用路由封装)也是一种常用的隧道协 议, GRE定义了在任意一种网络层协议上封装任意一个其它网络层协议的协 议, GRE协议能封装 IP隧道中的多种协议包, 通过 IP网络创建一条虚拟点 到点的链路。在现有技术中,基站和控制器侧通常采用 IPPM ( IP Performance Monitoring, 性能监控)完成中间网络传输链路的检测。 现有的检测方法对于 检测设备之间的兼容性要求较高, 如果检测端设备和对端设备是由不同厂商 提供的, 则可能导致检测难以完成; 此外, 现有的检测方法需要控制面做较 为复杂的计算和配置, 对系统资源消耗巨大。 发明内容 The GTP (General Packet Radio Service Tunnel Protocol) protocol is applied between the GSN (GPRS Support Node, GPRS service node, including the GGSN and the SGSN) to establish a GTP channel for each mobile station (MS). The GTP channel is a secure channel between the GSNs. Two hosts can exchange data through this channel. The GTP is carried over the UDP (User Datagram Protocol) or the Transmission Control Protocol (TCP). It is divided into a signaling plane and a transmission plane. The signaling plane defines various messages and transmission planes. The GTP protocol is divided into GTP-C, GTP-U and GTP, and the GTP-C is a signaling control protocol, and GTP-U is a packaged user data protocol, GTP, It is a billing related agreement. There is a TEID (Tunnel End Point Identifier) in the GTP protocol, which identifies the tunnel endpoint on the data receiver GTP-U or GTP-C protocol entity unambiguously. The two nodes of a GTP tunnel each allocate a TEID that the party is going to use to receive specific data on the tunnel, and negotiates between the nodes through the GTP-C message. In addition, GRE (Generic Routing Encapsulation) is also a commonly used tunneling protocol. GRE defines a protocol for encapsulating any other network layer protocol on any network layer protocol. The GRE protocol can encapsulate multiple IP tunnels. A protocol package that creates a virtual point-to-point link over an IP network. In the prior art, the base station and the controller side usually adopt IPPM (IP Performance). Monitoring, performance monitoring) completes the detection of intermediate network transmission links. The existing detection methods have high requirements for compatibility between the detection devices. If the detection device and the peer device are provided by different manufacturers, the detection may be difficult to complete; in addition, the existing detection method requires the control surface to do More complex calculations and configurations consume huge amounts of system resources. Summary of the invention
本发明实施例所要解决的技术问题在于提供一种链路检测方法、 装置和 通信系统。  A technical problem to be solved by embodiments of the present invention is to provide a link detection method, apparatus, and communication system.
为解决上述技术问题, 本发明实施例提供了一种链路检测方法, 包括以 下步骤:  To solve the above technical problem, an embodiment of the present invention provides a link detection method, including the following steps:
用多元组标识至少一条用户数据流; 在预设的统计周期开始时, 接收并 获取所述用户数据流中下行方向开始报文的序列号, 启动计数器; 在所述统 计周期内, 每收到一个报文, 将所述计数器中实收报文数加 1 ; 统计周期结 束时, 接收并获取所述用户数据流中下行方向结束报文的序列号; 根据所述 下行方向开始报文序列号和结束报文序列号计算应收报文数; 根据所述应收 报文数和实收报文数计算丢包数和 /或丢包率。  Identifying, by the multi-group, at least one user data stream; receiving, at the beginning of the preset statistical period, receiving and acquiring a sequence number of the downlink start message in the user data stream, starting a counter; in the statistical period, each received a message, the number of the received message in the counter is incremented by one; when the statistical period is over, the sequence number of the end message in the downlink direction of the user data stream is received and obtained; and the sequence number of the message is started according to the downlink direction. And ending the packet sequence number to calculate the number of receivable packets; calculating the number of lost packets and/or the packet loss rate according to the number of receivables and the number of received packets.
此外, 本发明实施例还提供了一种链路检测的装置, 包括:  In addition, the embodiment of the present invention further provides a device for detecting a link, including:
第一单元, 用于用多元组标识至少一条用户数据流; 第二单元, 用于在 预设统计周期内接收并获取所述用户数据流中下行方向报文序列号; 第三单 元, 用于对所述统计周期内实际收到的报文进行计数; 第四单元: 用于根据 所述第二单元接收并获取的报文序列号计算所述统计周期内应收报文数; 第 五单元: 用于根据第三单元及第四单元的计算结果计算所述统计周期内的丢 包数和 /或丢包率。  a first unit, configured to identify at least one user data stream by using a multi-group; and a second unit, configured to receive and acquire a downlink message sequence number in the user data stream in a preset statistical period; Counting the number of packets actually received in the statistical period; the fourth unit is configured to calculate the number of receivables in the statistical period according to the sequence number of the packet received and obtained by the second unit; And configured to calculate a number of lost packets and/or a packet loss rate in the statistical period according to calculation results of the third unit and the fourth unit.
此外, 本发明实施例还提供了一种通信系统, 包括前述的链路检测装置。 与现有技术相比较, 本发明实施例提供的方法、 装置和通信系统不需要 对端设备参与即能检测链路质量, 即使不同厂商的设备对接也不影响检测的 实施, 并且实现简单, 消耗的系统资源少。 附图说明 In addition, an embodiment of the present invention further provides a communication system, including the foregoing link detecting apparatus. Compared with the prior art, the method, the device, and the communication system provided by the embodiments of the present invention can detect the link quality without the participation of the peer device, even if the device docking of different vendors does not affect the detection. It is implemented and simple to implement, and consumes less system resources. DRAWINGS
图 1为本发明实施例的方法示意图;  1 is a schematic diagram of a method according to an embodiment of the present invention;
图 2 为本发明实施例的系统示意图。 具体实施方式  2 is a schematic diagram of a system according to an embodiment of the present invention. detailed description
下面通过附图和实施例, 对本发明的技术方案做进一步的详细描述。 为使本发明实施例的目的、 技术方案和优点更加清楚, 下面结合附图对 本发明的实施例作进一步的详细描述。  The technical solution of the present invention will be further described in detail below through the accompanying drawings and embodiments. The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
本实施例提供了一种链路检测的方法,该检测方法为面向数据流 ID( flow ID )的链路检测,也就是说以数据流 ID为统计对象对用户数据流进行的检测 和统计。 本实施例的方法包括: 首先标识用户数据流, 此处用户数据流的含 义并不用于限定为用户设备与通信设备之间的数据流, 而是为了与控制面的 控制流区分开而使用的概念, 用户数据流包括通信中产生的端到端的各种业 务流, 例如可以是手机通话产生的端到端的数据流, 还可以是用户上网时使 用 BT ( BitTorrent )业务产生的端到端的数据流, 还可以是用户使用 FTP业 务产生的端到端的数据流等。 同时, 标识用户数据流的方法也有多种, 例如 可以用三元组或者五元组来标识。 此外, 单个用户在通信过程中可以产生一 条或者多条用户数据流, 也就是说可以对应一个或多个流 ID, 在一个统计周 期内, 既可以仅针对其中一条用户数据流进行统计, 也可以对多条用户数据 流进行统计。  This embodiment provides a link detection method, which is a link detection for a flow ID (flow ID), that is, a detection and statistics of a user data stream by using a data stream ID as a statistical object. The method of this embodiment includes: first identifying a user data stream, where the meaning of the user data stream is not used to be defined as a data stream between the user equipment and the communication device, but is used to distinguish from the control flow of the control plane. Concept, the user data stream includes end-to-end various service flows generated in the communication, for example, an end-to-end data stream generated by a mobile phone call, or an end-to-end data stream generated by a user using a BT (BitTorrent) service when surfing the Internet. It can also be an end-to-end data stream generated by the user using the FTP service. At the same time, there are many ways to identify the user data stream, for example, it can be identified by a triple or a quintuple. In addition, a single user may generate one or more user data streams during the communication process, that is, one or more flow IDs may be corresponding, and only one of the user data streams may be counted in one statistical period, or Statistics are performed on multiple user data streams.
预设一个统计周期 T, 统计周期可以根据统计精度的要求进行调整, 例 如, 可以设为 5秒, 当统计周期开始时, 接收并获取其中开始报文的序列号, 将收到的第一个报文记为实收报文, 同时启动计数器, 将实收报文数记为 1, 当然, 此处计数器的初始计数也可以不为 1, 当计数器的初始计数不为 1时, 可以在统计周期开始时读取一次计数器的初始计数值, 当统计周期结束时, 在计数器的计数中减去统计周期开始时读取到的初始计数值; 在接下来的统 计周期内, 单条流上每接收到一个报文序列号计数器统计的实收报文数加 1; 在统计周期结束时,接收基于流 ID的用户数据流并获取其中下行方向结束报 文的序列号; 根据开始报文的序列号和结束报文的序列号可以计算出应该收 到的报文数即应收报文数, 根据计算出的应收报文数和计数器中统计的实收 报文数计算丢包数和 /或丢包率。 在检测过程中可以将检测端接收到的数据流 定义为下行数据流, 本实施例中对于用户数据流所作的统计是针对用户数据 流中下行方向的报文进行的统计, 也就是对检测端收到的数据流中的报文进 行的统计, 所述统计在检测端即可完成。 Preset a statistical period T. The statistical period can be adjusted according to the requirements of statistical accuracy. For example, it can be set to 5 seconds. When the statistical period starts, the serial number of the start message is received and obtained, and the first one will be received. The message is recorded as a received message, and the counter is started at the same time. The number of received messages is counted as 1. Of course, the initial count of the counter here may not be 1, when the initial count of the counter is not 1, The initial count value of the counter can be read once at the beginning of the statistical period. When the statistical period ends, the initial count value read at the beginning of the statistical period is subtracted from the counter count; in the next statistical period, the single stream The number of received messages for each message sequence number counter is incremented by one; at the end of the statistical period, the user data stream based on the flow ID is received and the sequence number of the end message in the downlink direction is obtained; according to the start message The sequence number of the sequence number and the end number of the end message can be used to calculate the number of packets that should be received, that is, the number of receivable packets, and calculate the number of lost packets based on the calculated number of receivables and the number of received packets counted in the counter. And / or packet loss rate. In the detection process, the data stream received by the detecting end can be defined as a downlink data stream. The statistics performed on the user data stream in this embodiment are statistics for the downlink data packet in the user data stream, that is, the detecting end. Statistics on the received packets in the received data stream. The statistics can be completed on the detection end.
本实施例提供的方案可以借助设备的固有特性, 无需做端到端的实现, 在检测端即可完成检测过程, 对端设备可以不用参与, 在实践中, 常常存在 不同厂商的设备对接使用的情况, 利用本实施例提供的方案, 即使不同厂商 的设备对接也不会影响检测的实施, 具有很好的兼容性; 此外, 由于不需要 对端设备的参与, 本实施例的方法实现更为简单, 不需要控制面做较为复杂 的计算和配置, 消耗的系统资源更少, 而且可以做到对于链路质量的实时检 测和闭环调控。  The solution provided in this embodiment can be implemented by using the intrinsic characteristics of the device, and the end-to-end implementation is not required. The detection process can be completed at the detecting end, and the peer device can be used without participation. In practice, there are often devices that are connected by different vendors. With the solution provided by the embodiment, even if the devices of different vendors are connected, the implementation of the detection is not affected, and the compatibility is good. Moreover, the method of the embodiment is simpler because the participation of the peer device is not required. It does not require the control plane to do more complicated calculations and configurations, consumes less system resources, and can perform real-time detection and closed-loop regulation of link quality.
本实施例提供了另一种链路检测的方法。 首先对本实施例中涉及的 GTP 消息帧结构进行介绍,如表 1所示, GTP VI版本的消息首部由固定部分和可 选部分组成。 固定部分包括 8个字节, 描述了 GTP消息所使用的版本号、 标 志位信息、 GTP消息类型、 消息长度、 和 TEID域。 可选部分包括序列号、 N-PDU号、 扩充部分, 这些可选部分的存在与否由标识位的值决定。  This embodiment provides another method for link detection. First, the structure of the GTP message frame involved in this embodiment is introduced. As shown in Table 1, the message header of the GTP VI version consists of a fixed part and an optional part. The fixed part consists of 8 bytes, describing the version number, flag bit information, GTP message type, message length, and TEID field used by the GTP message. The optional part includes the serial number, the N-PDU number, and the extension part. The presence or absence of these optional parts is determined by the value of the identification bit.
offset 8 7 6 5 4 3 2 1 Offset 8 7 6 5 4 3 2 1
1 Version PT ( * ) E S PN1 Version PT ( * ) E S PN
2 Message Type 2 Message Type
3 Length ( 1 Octet)  3 Length ( 1 Octet)
4 Length (2 Octet)  4 Length (2 Octet)
5 TEID ( 1 Octet) 6 TEID (2 Octet) 5 TEID ( 1 Octet) 6 TEID (2 Octet)
7 TEID (3 Octet)  7 TEID (3 Octet)
8 TEID (4 Octet)  8 TEID (4 Octet)
9 Sequence Number ( 1 Octet)  9 Sequence Number ( 1 Octet)
10 Sequence Number ( 2 Octet )  10 Sequence Number ( 2 Octet )
11 N-PDU Number2) 4) 11 N-PDU Number 2 ) 4 )
12 Next Extension Header Type  12 Next Extension Header Type
表 1  Table 1
其中, Version域定义了 GTP采用的版本号, 在 VI版本中设为 "001" ; PT域是协议区分符,用于区分 GTP和 GTP,消息; E域( Extension Header flag)用于指明是否存在扩充首部; S域( Sequence Number Flags )用于指明 是否存在 SN域的标识位; PN域用于指明 GTP消息首部是否存在 N-PDU域; Message Type域用于指明 GTP消息类型; Length域指出了消息中除固定长度 的消息部分之外的字节长度; TEID域表示了接收方分配接收端的 TEID, 并 通过 GTP-C、 RANAP等消息与发送方进行 TEID的协商; 在 GTP VI版本中 Sequence Number域是可选域部分; N-PDU Number域也是可选域部分, 用于 SGSN间的路由区更新过程和 SRNS relocation过程。 Next Extension Header Type是 GTP消息头的扩充部分, 可以保持与以后版本的兼容性。  The Version field defines the version number used by GTP, and is set to "001" in the VI version. The PT field is a protocol specifier for distinguishing between GTP and GTP, and the message; the E header (Extension Header flag) is used to indicate whether it exists. The extension number header is used to indicate whether there is an identifier bit of the SN domain; the PN field is used to indicate whether the GTP message header has an N-PDU domain; the Message Type field is used to indicate the GTP message type; the Length field indicates The length of the message except the fixed length message part; the TEID field indicates that the receiver allocates the TEID of the receiving end, and negotiates with the sender through the GTP-C, RANAP, etc. TEID negotiation; in the GTP VI version, the Sequence Number The domain is an optional domain part; the N-PDU Number field is also an optional domain part, which is used for the routing area update process and the SRNS relocation process between the SGSNs. The Next Extension Header Type is an extension of the GTP header that maintains compatibility with future versions.
接下来对 GRE帧结构进行介绍, 如表 2所示, GRE帧结构如下:  Next, the GRE frame structure is introduced. As shown in Table 2, the GRE frame structure is as follows:
0 1 2 3  0 1 2 3
01234567890123456789012345678901  01234567890123456789012345678901
+-+ -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+.+  +-+ -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+.+
|C|R|K|S|s|Recur| Flags | Ver | Protocol Type |  |C|R|K|S|s|Recur| Flags | Ver | Protocol Type |
+-+ -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+.+  +-+ -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+.+
I Checksum ( optional ) | Offset (optional) |  I Checksum ( optional ) | Offset (optional) |
+-+ -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+.+  +-+ -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+.+
I Key ( optional ) |  I Key ( optional ) |
+-+ -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+.+  +-+ -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+.+
I Sequence Number ( optional ) |  I Sequence Number ( optional ) |
+-+ -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+.+  +-+ -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+.+
I Routing ( optional )  I Routing ( optional )
+-+ -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+.+  +-+ -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- +-+-+-+-+-+-+.+
表 2  Table 2
其中 GRE帧结构与 GTP的帧结构相比,其中 Key字段相当于 GTP帧中 的 TEID, 而序列号 Sequence Number参数与 GTP的帧结构中的 Sequence Number一样, 而且是可选的。 如图 1所示, 在本实施例的方法包括: The GRE frame structure is compared with the GTP frame structure, wherein the Key field is equivalent to the TEID in the GTP frame, and the sequence number Sequence Number parameter is the same as the Sequence Number in the GTP frame structure, and is optional. As shown in FIG. 1, the method in this embodiment includes:
步骤 101、 用多元组标识至少一条用户数据流;  Step 101: Identify at least one user data stream by using a multi-group;
这里, 标识用户数据流的方法有多种, 例如可以用三元组或者五元组来 标识, 如果采用三元组的方法, 则可以用源 IP、 目的 IP、 协议类型来标识至 少一条用户数据流; 如果采用五元组的方法, 则可以用源 IP、 目的 IP、 源端 口、 目的端口、 协议类型来标识至少一条用户数据流, 当然本领域技术人员 还可以想到有其他的扩展方式来标识至少一条用户数据流, 此外, 在对标识 出的用户数据流进行检测过程中可以流 ID为单位对报文进行统计和检测,这 里所说的流 ID ( flow ID )根据报文类型不同可以有多种, 例如, 对于 GTP 报文来说, 流 ID可以是 TEID; 在实际应用中 GRE报文中的 Key字段通常 处理为必选的, 因此, 对于 GRE "¾文来说, 流 ID可以是 Key。  Here, there are various methods for identifying a user data stream, for example, a triplet or a quintuple may be used. If a triplet method is used, at least one user data may be identified by a source IP, a destination IP, and a protocol type. If the method of the quintuple is used, the source IP, the destination IP, the source port, the destination port, and the protocol type may be used to identify at least one user data stream. Of course, those skilled in the art may also have other extension manners to identify At least one user data stream. In addition, in the process of detecting the identified user data stream, the packet may be counted and detected by the stream ID. The flow ID (flow ID) may be different according to the packet type. For example, for a GTP packet, the stream ID can be a TEID. In the actual application, the Key field in the GRE packet is usually processed as mandatory. Therefore, for the GRE "3⁄4 text, the stream ID can be Key.
步骤 102、 在预设的统计周期开始时, 接收并获取所述用户数据流中下 行方向开始报文的序列号, 启动计数器, 将实收报文数记为 1 ;  Step 102: At the beginning of the preset statistical period, receive and acquire the sequence number of the start message in the downlink direction of the user data stream, start a counter, and record the number of the received message as 1;
获取用户数据流中下行方向开始报文的序列号的方法可以有多种,例如, 根据前面关于 GTP帧结构的描述, GTP报文帧结构中有一部分字段是可选的, 因此, 可以考虑利用 GTP报文帧结构中的可选字段来携带报文序列号, 例如 可以利用 GTP报文帧结构中的 Sequence Number字段来携带开始报文的序列 号; 此外, 开始报文的序列号还可以通过用户数据流下行方向的 GRE报文来 携带, 考虑到 GRE报文帧结构中有一部分字段也是可选的, 因此可以利用例 如 GRE报文中的 Sequence Number字段来携带开始报文的序列号, 例如, 下 行方向数据流的序列号可以 16进制来表示, 从 0到 OXffffffff以 4字节长度 递增并允许翻转。 此外, 为了统计实际收到的报文数, 可以启动一个计数器, 将开始实际收到的报文数记为 1。 具体的, 可以设置一个变量 BeginSeqNo, 将接收到的报文的序列号取出赋值给变量 BeginSeqNo , 再设置一个变量 RealRcvPktNum 来表示实收报文数, 同时将实收报文数赋为 1, 即令 RealRcvPktNum=L 步骤 103、 在统计周期内, 每收到一个报文将所述计数器中实收报文数 加 1 ; There are various methods for obtaining the sequence number of the start message in the downlink direction of the user data stream. For example, according to the description of the structure of the GTP frame, some fields in the GTP message frame structure are optional, and therefore, the use may be considered. An optional field in the frame structure of the GTP packet carries the sequence number of the message. For example, the sequence number field in the GTP message frame structure can be used to carry the sequence number of the start message. In addition, the sequence number of the start message can also be passed. The GRE packet in the downlink direction of the user data stream is carried. Considering that a part of the field in the frame structure of the GRE packet is optional, the sequence number of the start message can be carried, for example, by using the Sequence Number field in the GRE packet, for example. The sequence number of the downstream data stream can be expressed in hexadecimal, increasing from 0 to OXffffffff by 4 bytes and allowing flipping. In addition, in order to count the number of actually received packets, a counter can be started to record the number of packets actually received. Specifically, a variable BeginSeqNo can be set, the serial number of the received message is taken out and assigned to the variable BeginSeqNo, and then a variable RealRcvPktNum is set to represent the number of received messages, and the number of received messages is set to 1, that is, RealRcvPktNum =L Step 103: In the statistical period, the number of received messages in the counter is incremented by one for each received message;
本实施例中, 单条流上每发送一个报文序列号加 1, 具体来说, 当每收 到一个 GTP或 GRE报文时, 将实收报文变量加 1, 即令 RealRcvPktNum= RealRcvPktNum + 1。  In this embodiment, the sequence number of each message sent on a single stream is increased by 1. Specifically, when a GTP or GRE message is received, the received message variable is incremented by 1, so that RealRcvPktNum= RealRcvPktNum + 1.
步骤 104、在统计周期结束时,接收基于 TEID的用户数据流并获取其中 下行方向结束 >¾文的序列号;  Step 104: At the end of the statistical period, receive a TEID-based user data stream and obtain a sequence number in which the downlink direction ends >3⁄4;
与开始报文序列号相似, 结束报文的序列号也可以利用 GTP或 GRE报 文帧结构中的可选字段, 例如 Sequence Number字段来携带; 具体的, 可以设 置一个变量 EndSeqNo, 统计周期结束时,将接收到报文的序列号取出赋值给 变量 EndSeqNo0 Similar to the start message sequence number, the sequence number of the end message can also be carried by an optional field in the GTP or GRE message frame structure, such as the Sequence Number field. Specifically, a variable EndSeqNo can be set, at the end of the statistical period. , the serial number of the received message is taken out and assigned to the variable EndSeqNo 0
步骤 105、 根据所述下行方向开始报文序列号和结束报文序列号计算应 收报文数;具体的,可以设置一个变量 ShouldRcvPktNum来表示应收报文数, 需要指出的是, 考虑到报文序列号可能发生翻转, 在计算应收报文数时可以 根据开始报文序列号和结束报文序列号做翻转处理, 具体来说: 如果结束报 文序列号大于开始报文序列号, 两种之差即得到应收的报文数, 即 ShouldRcvPktNum = EndSeqNo - BeginSeqNo + 1; 反之则说明序列号已经发 生翻转, 那么应收报文数为 ShouldRcvPktNum = OxFFFFFFFF + EndSeqNo - BeginSeqNo + 1;  Step 105: Calculate the number of receivables according to the start sequence sequence number and the end message sequence number in the downlink direction. Specifically, a variable ShouldRcvPktNum may be set to indicate the number of receivables, and it is noted that the report is considered. The sequence number of the text may be reversed. When calculating the number of receivable packets, the sequence number of the start message and the sequence number of the end message may be reversed. Specifically: if the sequence number of the end message is greater than the sequence number of the start message, The difference between the species is the number of packets received, that is, ShouldRcvPktNum = EndSeqNo - BeginSeqNo + 1; otherwise, the serial number has been inverted, then the number of receivables is ShouldRcvPktNum = OxFFFFFFFF + EndSeqNo - BeginSeqNo + 1;
步骤 106、 根据应收报文数和实收报文数计算丢包数和 /或丢包率; 具 体 来 说 , 设 置 LostPktNum 表 示 丢 包 数 , 则 LostPktNum=ShouldRcvPktNum-RealRcvPktNum,用 LostPktRatio表示丢包率, 则 LostPktRatio= LostPktNum/ ShouldRcvPktNum,应收报文数的计算结果是以 Step 106: Calculate the number of lost packets and/or the packet loss rate according to the number of receivable packets and the number of received packets. Specifically, if LostPktNum is set to indicate the number of lost packets, then LostPktNum=ShouldRcvPktNum-RealRcvPktNum, and LostPktRatio is used to indicate the packet loss rate. , then LostPktRatio= LostPktNum/ ShouldRcvPktNum, the calculation result of the number of receivables is
16进制来表示的, 为了计算和统计的方便, 在计算丢包率或丢包数时可以将 16进制数转化为 10进制数, 再与采用 10进制计算的实收报文数进行数学计 算。 此外, 为了便于下一个周期的统计, 可以在本统计周期结束时, 将结束 报文的序列号加 1之后预设为下一个统计周期的开始报文序列号, 即令下一 个周期的开始 文序列号 NextBeginSeqNo = EndSeqNo + 1。 In hexadecimal notation, for the convenience of calculation and statistics, the hexadecimal number can be converted to a decimal number when calculating the packet loss rate or the number of lost packets, and the number of received packets calculated in decimal Perform mathematical calculations. In addition, in order to facilitate the statistics of the next period, at the end of the statistical period, the sequence number of the end message is incremented by 1 and then preset to the start message sequence number of the next statistical period, that is, the start sequence of the next period. No. NextBeginSeqNo = EndSeqNo + 1.
需要指出的是上个统计周期最后的结束报文序列号很重要, 如果该报文 出现乱序或者错误, 将对下一个周期的统计产生较大影响, 因此当出现异常 情况时, 可以考虑对下一个周期实际收到的开始 文序列号进行修正。 具体 的, 对于下一个周期来说, 如果该周期实际收到的第一个 4艮文序列号同其前 一个周期的最后一个报文序列号差别不大, 例如差别为 2-3左右, 可以认为 是本周期内的乱序报文, 依然作为本周期的统计报文; 如果本周期实际收到 的第一个报文序列号同上周期的差别非常大, 如 10000以上, 超出了本周期 的统计范畴, 可以认为是本周期内传送错误的报文, 也记作本周期统计; 如 果本周期实际收到的第一个序列号小于上周期结束报文序列号, 则认为是上 周期报文, 可以做丢弃处理; 此外, 还要考虑本周期开始连续收到的几个报 文序列号的连续性, 如果连续性好并同上一个周期的序列号相差较大, 可以 认为上一个周期的有问题, 做赋值更正处理。 此外, 现在通讯网络通常都采 用专网, 专网通过很好的规划, 通常情况下不会出现拥挤和乱序的情况, 在 这种场景下, 可以认为报文都是有序的, 但如果通讯链路走到公网, 公网一 般是没有质量保障的, 通常会不同的流走不同的路由会导致报文乱序, 为了 避免报文乱序对检测可能带来的影响, 可以在统计周期开始之前对用户数据 流中的报文进行排序, 以进一步提高检测的准确度和效率。  It should be pointed out that the sequence number of the last end message of the last statistical period is very important. If the message is out of order or incorrect, it will have a greater impact on the statistics of the next cycle. Therefore, when an abnormal situation occurs, you can consider The start sequence serial number actually received in the next cycle is corrected. Specifically, for the next cycle, if the first sequence number of the first message received in the cycle is not much different from the sequence number of the last message in the previous cycle, for example, the difference is about 2-3, It is considered that the out-of-order message in this period is still used as the statistical message of this period; if the sequence number of the first message actually received in this cycle is very different from the previous period, such as 10000 or more, it is beyond the period. The statistical category can be regarded as the message that is transmitted incorrectly in this period, and is also recorded as the current period statistics. If the first sequence number actually received in this period is smaller than the sequence number of the last period ending message, it is considered to be the upper period message. It can be discarded. In addition, the continuity of several message serial numbers received continuously at the beginning of this cycle should be considered. If the continuity is good and the sequence number of the previous cycle is quite different, it can be considered that there is a previous cycle. Problem, do the assignment correction processing. In addition, communication networks usually use private networks. The private network is well planned. Usually, congestion and out-of-order situations do not occur. In this scenario, packets can be considered as ordered, but if The communication link goes to the public network. The public network usually has no quality guarantee. Generally, different routes will be sent to different routes, causing packets to be out of order. To avoid the impact of packet disorder on detection, statistics can be obtained. The messages in the user data stream are sorted before the start of the cycle to further improve the accuracy and efficiency of the detection.
在获知了丢包数和丢包率之后, 还可以根据这些参数进行链路质量的实 时监控和统计。 具体来说, 通过对于统计周期的设置, 检测端对丢包率数据 做精确到秒级别的统计, 在预设的时长内, 例如 1分钟, 才艮据统计结果做累 加, 然后将每分钟的丢包率情况上报到上层操作维护中心, 如基站 OM, 基 站 OM定时向网管上报分钟级别的丢包率数据, 网管以此为基线即可形成分 丢包率曲线; 如果将预定时长设为 1小时或者 1天, 则网管可以绘制出时、 天的丢包率曲线, 利用丢包率曲线, 用户可以监测传送网络运行质量从而对 网络运行参数进行实时调整。 After the number of lost packets and the packet loss rate are known, real-time monitoring and statistics of link quality can also be performed according to these parameters. Specifically, by setting the statistics period, the detecting end performs the statistics on the packet loss rate data to the second level, and the accumulated time, for example, 1 minute, is accumulated according to the statistical result, and then the minute is calculated. The packet loss rate is reported to the upper-layer operation and maintenance center. For example, the base station OM, the base station OM periodically reports the packet loss rate data of the minute level to the network management system. The network management system can form the packet loss rate curve according to the baseline. Hour or 1 day, the network management can draw time, The packet loss rate curve of the day, using the packet loss rate curve, the user can monitor the quality of the transmission network to adjust the network operation parameters in real time.
此外, 在计算出丢包率之后, 还可以根据结果对检测链路进行闭环调整, 具体来说, 可以预先设置一个丢包率阀值, 将计算出的丢包率同丢包率阀值 进行比较, 如果计算出的丢包率超过预设丢包率阀值, 则可以向对端发送限 制流速的消息, 对端在收到该消息之后做限流处理。 之后可以对检测链路进 行实时监控和比较, 如果丢包率低于预设丢包率阀值一定时间之后, 可以通 知对端解除对流速的限制。  In addition, after calculating the packet loss rate, the detection link may be closed-loop adjusted according to the result. Specifically, a packet loss rate threshold may be preset, and the calculated packet loss rate and the packet loss rate threshold may be performed. If the calculated packet loss rate exceeds the preset packet loss rate threshold, the peer can send a message limiting the flow rate. After receiving the message, the peer performs the current limiting process. After that, the detection link can be monitored and compared in real time. If the packet loss rate is lower than the preset packet loss threshold for a certain period of time, the peer can be notified to release the restriction on the flow rate.
本实施例提供了一种链路检测装置, 如图 2所示, 该系统包括: 第一单元 11, 用于用多元组标识至少一条用户数据流; 其中标识用户数 据流的方法可以有多种, 例如采用三元组(源 IP、 目的 IP、 协议类型)或者 五元组(源 IP、 目的 IP、 源端口、 目的端口、 协议类型)来标识用户数据流, 单个用户在通信过程中可以产生一条或者多条用户数据流, 也就是说可以对 应一个或多个 TEID, 在一个统计周期内, 既可以仅针对其中一条用户数据流 进行统计, 也可以以 TEID为单位对多条用户数据流进行统计;  The embodiment provides a link detecting apparatus. As shown in FIG. 2, the system includes: a first unit 11 configured to identify at least one user data stream by using a multi-group; wherein the method for identifying a user data stream may have multiple For example, using a triplet (source IP, destination IP, protocol type) or a quintuple (source IP, destination IP, source port, destination port, protocol type) to identify the user data stream, a single user can generate during the communication process. One or more user data streams, that is, one or more TEIDs. In one statistical period, statistics can be performed only for one user data stream, or multiple user data streams can be performed in units of TEIDs. Statistics
第二单元 12, 用于在预设统计周期内接收并获取所述用户数据流中下行 方向报文序列号;其中下行方向报文的序列号可以携带在 GTP/GRE帧中的可 选字段内, 例如 Sequence Number字段内;  The second unit 12 is configured to receive and obtain a downlink message sequence number in the user data stream in a preset statistical period, where the sequence number of the downlink packet may be carried in an optional field in the GTP/GRE frame. , for example, in the Sequence Number field;
第三单元 13, 用于对所述统计周期内实际收到的报文进行计数, 具体实 现时可以采用计数器来进行统计, 单条流上每收到 1个报文计数器加 1 ; 第四单元 14: 用于根据所述第二单元 12接收并获取的报文序列号计算 所述统计周期内应收报文数, 具体来说: 如果结束报文序列号大于开始报文 序列号, 两者之差即得到应收的报文数, 即应收报文数 ShouldRcvPktNum等 于结束 4艮文序列号 EndSeqNo减去开始 4艮文序列号 BeginSeqNo加 1 ; 反之 则说明序列号已经发生翻转, 那么应收报文数为 ShouldRcvPktNum 等于 OxFFFFFFFF加 EndSeqNo减 BeginSeqNo力口 1; 第五单元 15: 用于根据第三单元 13及第四单元 14的计算结果计算所述 统计周期内的丢包数和 /或丢包率, 具体来说, 设置 LostPktNum表示丢包数, 则 LostPktNum=| ShouldRcvPktNum-RealRcvPktNum|, 其中 "| |"表示取绝对值, 用 LostPktRatio表示丢包率, 贝' j LostPktRatio= LostPktNum / The third unit 13 is configured to count the actually received packets in the statistics period, and the counter can be used for statistics, and the number of received ones is incremented by one on a single stream; The method is used to calculate the number of receivables in the statistical period according to the sequence number of the packet received and obtained by the second unit 12, specifically: if the ending packet sequence number is greater than the start message sequence number, the difference between the two That is, the number of receivables is obtained, that is, the number of receivables ShouldRcvPktNum is equal to the end 4艮 serial number EndSeqNo minus the start 4艮 serial number BeginSeqNo plus 1; otherwise, the serial number has been inverted, then the receivable message The number is ShouldRcvPktNum equal to OxFFFFFFFF plus EndSeqNo minus BeginSeqNo force 1; The fifth unit 15 is configured to calculate the number of lost packets and/or the packet loss rate in the statistics period according to the calculation result of the third unit 13 and the fourth unit 14, specifically, setting LostPktNum to indicate the number of lost packets, then LostPktNum =| ShouldRcvPktNum-RealRcvPktNum|, where "| |" means the absolute value, LostPktRatio is used to indicate the packet loss rate, and 'j LostPktRatio= LostPktNum /
ShouldRcvPktNum„ ShouldRcvPktNum„
此外, 考虑到检测开始之前报文可能已经存在乱序的情况, 本实施例中 的装置还可以包括第六单元, 用于对报文进行排序, 排序之后再开始检测。  In addition, the device in this embodiment may further include a sixth unit for sorting the messages, and then starting the detection after sorting, in consideration of the fact that the packets may already be out of order before the detection starts.
此外, 本实施例的装置还可以包括第七单元, 用于将计算出来的实际丢 包率与预设丢包率阀值进行对比, 若所述丢包率超过所述预设丢包率阀值, 则可以向对端发送限流消息。  In addition, the apparatus of this embodiment may further include a seventh unit, configured to compare the calculated actual packet loss rate with a preset packet loss rate threshold, if the packet loss rate exceeds the preset packet loss rate threshold A value can be used to send a traffic limiting message to the peer.
本实施例提供了一种通信系统, 该通信系统包括图 2所示实施例中提到 的链路检测装置, 其中该链路检测装置可以包括图 2所示实施例中提到的第 一单元 11至第五单元 15, 优选的, 还可以包括第六单元和 /或第七单元。  The present embodiment provides a communication system including the link detection device mentioned in the embodiment shown in FIG. 2, wherein the link detection device may include the first unit mentioned in the embodiment shown in FIG. 11 to fifth unit 15, preferably, may also include a sixth unit and/or a seventh unit.
需要说明的是,以上实施例提供的方法和系统不仅可以使用在 LTE( Long Term Evolution , 长期演进) 系统中, 还可以使用在 WiMaX ( Worldwide Interoperability for Microwave Access, 微波存取全球互通) 、 WCDMA等其 他通信制式的系统中。  It should be noted that the methods and systems provided by the foregoing embodiments can be used not only in an LTE (Long Term Evolution) system but also in WiMaX (World Interoperability for Microwave Access, WCDMA, etc.). In other communication systems.
此外, 上述实施例方法中的全部或部分流程, 是可以通过计算机程序来 指令相关的硬件来完成, 所述的程序可存储于一计算机可读取存储介质中, 该程序在执行时, 可包括如上述各方法的实施例的流程。 其中, 所述的存储 介质可为磁碟、 光盘、 只读存储记忆体(Read-Only Memory, ROM )或随机 存储记忆体 ( Random Access Memory, RAM )等。  In addition, all or part of the processes in the foregoing embodiment may be completed by a computer program to instruct related hardware, and the program may be stored in a computer readable storage medium, and the program may include, when executed, The flow of an embodiment of each of the above methods. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对其 限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通技术 人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修改, 或 者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并不使相应技 术方案的本质脱离本发明各实施例技术方案的精神和范围。 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: Modifications to the technical solutions described in the foregoing embodiments, or equivalent replacement of some of the technical features; and these modifications or replacements do not make corresponding techniques The essence of the technical solution lies in the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

权 利 要 求 书 Claim
1、 一种链路检测方法, 其特征在于, 包括:  A link detection method, comprising:
用多元组标识出至少一条用户数据流;  Identifying at least one user data stream with a multi-group;
在预设的统计周期开始时, 接收并获取所述用户数据流中下行方向开始 报文的序列号, 启动计数器;  Receiving and acquiring the sequence number of the downlink start message in the user data stream at the beginning of the preset statistical period, and starting the counter;
在所述统计周期内, 每收到一个报文, 将所述计数器中实收报文数加 1 ; 统计周期结束时, 接收并获取所述用户数据流中下行方向结束报文的序 列号;  During the statistics period, the number of received packets in the counter is incremented by one for each received message; when the statistical period ends, the sequence number of the downlink end message in the user data stream is received and obtained;
根据所述下行方向开始报文序列号和结束报文序列号计算应收报文数; 根据所述应收报文数和实收报文数计算丢包数和 /或丢包率。  And calculating, according to the downlink direction start message sequence number and the end message sequence number, the number of receivable packets; and calculating the number of lost packets and/or the packet loss rate according to the number of the receivable packets and the number of received packets.
2、 如权利要求 1所述的方法, 其特征在于, 所述接收到的下行方向开始 报文序列号和所述接收到的下行方向结束报文序列号携带在 GTP报文或者 GRE报文中。  The method according to claim 1, wherein the received downlink start message sequence number and the received downlink direction end message sequence number are carried in a GTP message or a GRE message. .
3、 如权利要求 1所述的方法, 其特征在于, 所述多元组为由源 IP、 目的 IP、 源端口、 目的端口、 十办议类型组成的 5元组。  3. The method according to claim 1, wherein the multi-component is a 5-tuple composed of a source IP, a destination IP, a source port, a destination port, and a ten-tune type.
4、 如权利要求 1所述的方法, 其特征在于, 所述方法还包括: 在所述统 计周期结束时, 将所述结束报文的序列号加 1预设为下一个统计周期的开始 报文的序列号, 且当下一个统计周期实际收到的开始报文序列号与所述预设 的开始 文序列号不一致时, 对所述下一个统计周期实际收到的开始 文序 列号作修正。  The method according to claim 1, wherein the method further comprises: when the statistical period ends, adding 1 to the sequence number of the end message as a start report of the next statistical period. The serial number of the text, and when the sequence number of the start message actually received in the next statistical period is inconsistent with the preset start sequence number, the start sequence serial number actually received in the next statistical period is corrected.
5、 如权利要求 1所述的方法, 其特征在于, 所述方法还包括: 在所述统 计周期开始前对所述4艮文进行排序。  5. The method of claim 1, wherein the method further comprises: sorting the four texts before the beginning of the statistical period.
6、 如权利要求 1所述的方法, 其特征在于, 所述方法还包括: 在预设时 长内对所述丢包率进行统计, 并将统计结果发送给操作维护中心 OM。  The method according to claim 1, wherein the method further comprises: performing statistics on the packet loss rate within a preset time period, and transmitting the statistics to the operation and maintenance center OM.
7、 如权利要求 1所述的方法, 其特征在于, 所述方法还包括: 将所述丢 包率与预设丢包率阀值进行对比, 若所述丢包率超过所述预设丢包率阀值, 则向对端发送限流消息。 The method according to claim 1, wherein the method further comprises: comparing the packet loss rate with a preset packet loss rate threshold, if the packet loss rate exceeds the preset lost rate Packet rate threshold, Then, the traffic limiting message is sent to the peer end.
8、 一种链路检测装置, 其特征在于, 包括:  8. A link detecting device, comprising:
第一单元, 用于用多元组标识至少一条用户数据流;  a first unit, configured to identify at least one user data stream by using a multi-group;
第二单元, 用于在预设统计周期内接收并获取所述用户数据流中下行方 向报文的序列号;  a second unit, configured to receive and obtain a sequence number of the downlink direction message in the user data stream in a preset statistical period;
第三单元, 用于对所述统计周期内实际收到的报文进行计数;  The third unit is configured to count the actually received packets in the statistical period;
第四单元, 用于根据所述第二单元接收并获取的报文序列号计算所述统 计周期内应收报文数;  a fourth unit, configured to calculate, according to a message sequence number received and obtained by the second unit, a number of receivables in the statistical period;
第五单元, 用于根据第三单元及第四单元的计算结果计算所述统计周期 内的丢包数和 /或丢包率。  The fifth unit is configured to calculate, according to the calculation result of the third unit and the fourth unit, the number of lost packets and/or the packet loss rate in the statistical period.
9、 如权利要求 8所述的链路检测装置, 其特征在于, 所述装置还包括: 第六单元, 用于对所述报文进行排序。  The link detecting apparatus according to claim 8, wherein the apparatus further comprises: a sixth unit, configured to sort the message.
10、 如权利要求 8所述的链路检测装置, 其特征在于, 所述装置还包括: 第七单元, 用于将所述丢包率与预设丢包率阀值进行对比, 若所述丢包率超 过所述预设丢包率阀值, 则向对端发送限流消息。  The link detecting apparatus according to claim 8, wherein the apparatus further comprises: a seventh unit, configured to compare the packet loss rate with a preset packet loss rate threshold, if If the packet loss rate exceeds the preset packet loss rate threshold, the traffic limiting message is sent to the peer end.
11、 一种通信系统, 其特征在于, 包括如权利要求 8至 10任意一项所述 的链路检测装置。  A communication system, comprising the link detecting apparatus according to any one of claims 8 to 10.
PCT/CN2010/070399 2009-02-13 2010-01-28 Link detection method, apparatus and communications system thereof WO2010091610A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CNA2009101054366A CN101488835A (en) 2009-02-13 2009-02-13 Link detection method, apparatus and communication system
CN200910105436.6 2009-02-13

Publications (1)

Publication Number Publication Date
WO2010091610A1 true WO2010091610A1 (en) 2010-08-19

Family

ID=40891530

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/070399 WO2010091610A1 (en) 2009-02-13 2010-01-28 Link detection method, apparatus and communications system thereof

Country Status (2)

Country Link
CN (1) CN101488835A (en)
WO (1) WO2010091610A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112422370A (en) * 2020-11-20 2021-02-26 维沃移动通信有限公司 Method and device for determining voice call quality
CN112532477A (en) * 2020-11-23 2021-03-19 盛科网络(苏州)有限公司 Link packet loss detection method and device
CN113765726A (en) * 2020-06-02 2021-12-07 中国移动通信集团安徽有限公司 Statistical method and device for number of lost packets of data packets of S1-U port and computing equipment

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488835A (en) * 2009-02-13 2009-07-22 华为技术有限公司 Link detection method, apparatus and communication system
CN101719850B (en) * 2009-11-04 2013-03-27 中兴通讯股份有限公司 Device and method for carrying out statistics on Ethernet packet loss rate as well as message switching device
CN101848474B (en) * 2010-05-07 2013-10-02 华为技术有限公司 Communication link monitoring method and device
CN102315980B (en) * 2010-07-05 2015-09-16 中兴通讯股份有限公司 A kind of method and system of starting counter in measurement of packet loss rate
CN102387039A (en) * 2011-10-25 2012-03-21 北京广利核系统工程有限公司 Method for analyzing specific frame loss distribution state of Ethernet
CN104243226B (en) * 2013-06-20 2018-09-11 南京中兴软件有限责任公司 Flow statistical method and device
CN106685760A (en) * 2016-12-29 2017-05-17 杭州迪普科技股份有限公司 Link state detecting method and apparatus
CN106533847B (en) * 2017-01-24 2020-02-07 腾讯科技(深圳)有限公司 UDP communication quality detection method and device and UDP communication system
CN106850640A (en) * 2017-02-15 2017-06-13 北京浩瀚深度信息技术股份有限公司 RTP business recognition methods and system based on sequence number
CN109728967A (en) * 2017-10-31 2019-05-07 迈普通信技术股份有限公司 Communication quality detection method, communication equipment and system
CN108683555A (en) * 2018-04-17 2018-10-19 上海电力学院 A kind of RTP method for detecting packet loss
CN110572293B (en) * 2018-06-06 2023-02-14 华为技术有限公司 Data message detection method, equipment and system
CN108809519A (en) * 2018-06-13 2018-11-13 浙江易享节能技术服务股份有限公司 A kind of critical data processing method
CN109005081B (en) * 2018-06-26 2022-09-23 卡斯柯信号有限公司 System and method for automatically detecting packet loss
CN113132262A (en) * 2020-01-15 2021-07-16 阿里巴巴集团控股有限公司 Data stream processing and classifying method, device and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1221546A (en) * 1996-06-10 1999-06-30 艾利森电话股份有限公司 Minicell sequence number count
US20010027485A1 (en) * 2000-03-29 2001-10-04 Tomohiko Ogishi Method for collecting statistical traffic data
US20010050901A1 (en) * 1999-12-24 2001-12-13 Agilent Technologies, Inc. Measuring efficiency of data transmission
CN101123584A (en) * 2007-05-21 2008-02-13 华为技术有限公司 A method and device for measuring packet drop of IP link
CN101488835A (en) * 2009-02-13 2009-07-22 华为技术有限公司 Link detection method, apparatus and communication system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1221546A (en) * 1996-06-10 1999-06-30 艾利森电话股份有限公司 Minicell sequence number count
US20010050901A1 (en) * 1999-12-24 2001-12-13 Agilent Technologies, Inc. Measuring efficiency of data transmission
US20010027485A1 (en) * 2000-03-29 2001-10-04 Tomohiko Ogishi Method for collecting statistical traffic data
CN101123584A (en) * 2007-05-21 2008-02-13 华为技术有限公司 A method and device for measuring packet drop of IP link
CN101488835A (en) * 2009-02-13 2009-07-22 华为技术有限公司 Link detection method, apparatus and communication system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113765726A (en) * 2020-06-02 2021-12-07 中国移动通信集团安徽有限公司 Statistical method and device for number of lost packets of data packets of S1-U port and computing equipment
CN113765726B (en) * 2020-06-02 2023-08-04 中国移动通信集团安徽有限公司 Statistical method, device and computing equipment for packet loss number of S1-U port data packets
CN112422370A (en) * 2020-11-20 2021-02-26 维沃移动通信有限公司 Method and device for determining voice call quality
WO2022105706A1 (en) * 2020-11-20 2022-05-27 维沃移动通信有限公司 Voice call quality determination method and apparatus
CN112532477A (en) * 2020-11-23 2021-03-19 盛科网络(苏州)有限公司 Link packet loss detection method and device

Also Published As

Publication number Publication date
CN101488835A (en) 2009-07-22

Similar Documents

Publication Publication Date Title
WO2010091610A1 (en) Link detection method, apparatus and communications system thereof
EP3300415B1 (en) Method, device and system for measuring quality of service operating in terminal
JP6553196B2 (en) Traffic flow monitoring
US9602383B2 (en) General packet radio service tunnel performance monitoring
JP4309118B2 (en) Packet data transmission method for communication system
US20160150439A1 (en) Support of quality of service control in a mobile communication system
WO2010031337A1 (en) Method, apparatus and system for quality of service processing based on stream
JP2013542629A (en) Local congestion exposure
US10484906B2 (en) Method and apparatus for applying different priorities to packets
RU2580454C2 (en) Method, device and system for network testing at work mechanism ipsec
CN1725718A (en) Network QoS test method and system
WO2017198132A1 (en) Data sending method and apparatus
US20150350938A1 (en) Technique for monitoring data traffic
EP2652985B1 (en) Performance monitoring in a mobile communication network
CN109120540B (en) Method for transmitting message, proxy server and computer readable storage medium
US20100299446A1 (en) Method and apparatus for controlling service data flows transmitted in a tunnel
WO2011000330A1 (en) Method, device and system for measuring internet protocol network performance
US9591515B2 (en) Feedback-based profiling for transport networks
CN107018518B (en) Method and system for acquiring link detection information
US20180317108A1 (en) Network performed measurements
Zheng et al. An analysis of impact of IPv6 on QoS in LTE networks
KR101918141B1 (en) Method for managing communication quality in a wireless access system
CN117641443A (en) Data packet processing method, device, system, electronic equipment and storage medium
WO2012114328A1 (en) System and method for active queue management per flow over a packet switched network
CN115665678A (en) 5G signaling message generation method and system

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

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

Country of ref document: EP

Kind code of ref document: A1