Connect public, paid and private patent data with Google Patents Public Datasets

Method and device for detecting data packet, and storage medium

Info

Publication number
WO2015058613A1
WO2015058613A1 PCT/CN2014/088153 CN2014088153W WO2015058613A1 WO 2015058613 A1 WO2015058613 A1 WO 2015058613A1 CN 2014088153 W CN2014088153 W CN 2014088153W WO 2015058613 A1 WO2015058613 A1 WO 2015058613A1
Authority
WO
Grant status
Application
Patent type
Prior art keywords
data
sequence
number
packet
sending
Prior art date
Application number
PCT/CN2014/088153
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

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic regulation in packet switching networks
    • H04L47/10Flow control or congestion control
    • H04L47/34Sequence integrity, e.g. sequence numbers

Abstract

A method and device for detecting a data packet, and a storage medium. The method comprises: acquiring a sending sequence number of a received data packet; marking a mark sequence number position corresponding to the sending sequence number in a preset mark sequence number linear queue; and when the mark sequence number positions corresponding to the sending sequence numbers which are acquired for two successive times are discontinuous, determining that data packet loss or disorder occurs, thereby realizing that a data receiver detects a data packet sent by a data sender in an unreliable transmission process.

Description

一种检测数据包的方法、装置及存储介质 A method for detecting a data packet, and a storage medium means

本专利申请要求于2013年10月21日提交的、申请号为201310495811.9、申请人为腾讯科技(深圳)有限公司、发明名称为“一种丢包检测的方法及检测装置”的中国专利申请的优先权,该申请的全文以引用的方式并入本申请中。 This patent application claims October 21, 2013 filed Application No. 201310495811.9, the applicant is Tencent Technology (Shenzhen) Co., Ltd., entitled "A method and a detection device that detects packet loss," the Chinese patent application priority right, which is incorporated by reference into this application.

技术领域 FIELD

本发明涉及互联网技术领域,具体涉及一种检测数据包的方法、装置及存储介质。 The present invention relates to Internet technologies, and particularly relates to a method for detecting a data packet, an apparatus and a storage medium.

背景技术 Background technique

终端通过用户数据协议(User Data Protocol,UDP)向服务器发送网络数据,通常将数据按照指定大小切片后,加上发送序号传输。 The network terminal transmits data to the server via User Datagram Protocol (User Data Protocol, UDP), generally in accordance with the specified data size of the cut, the send sequence number transmitted together.

网络数据传输分为可靠传输和不可靠传输。 Into reliable transmission network data transmission and unreliable transmission.

可靠传输时,数据发送方和数据接收方需要维护连接状态,并对每个传输的字节分配序列号,依赖数据超时重传和数据确认应答来保证传输可靠。 When the reliable transmission, the data transmission side and data reception side needs to maintain a connection state, and the sequence number assigned to each byte transmitted, and data-dependent timeout retransmission acknowledgment data to ensure reliable transmission. 但由于当网络波动时,数据发送方和数据接收方通过降低发送速率保证可靠性,不能最大化利用网络带宽,因此不适合音视频实时交互场景。 However, due to fluctuations in the network when the data transmission side and the reception side data reliability by reducing the transmission rate, does not maximize the use of network bandwidth, and therefore is not suitable for real-time interactive audio and video scenes.

而不可靠传输过程中,由于数据发送方和数据接收方不需要维护连接状态,数据接收方也不对数据包的接收情况进行检测,因而不可靠传输过程中不存在数据重传和数据确认,能最大化利用网络带宽,因此适合音视频实时交互场景。 Unreliable transmission, since the data sender and the data receiver does not need to maintain the connection state, the received data is not the case of the receiver data packet is detected, and thus the data retransmission and the data confirm that there are no reliable transmission process, can maximize use of network bandwidth, suitable for real-time interactive audio and video scene.

但是,由于网络数据在传输过程中,受网络介质和链路影响,可能丢失或乱序。 However, since the network during transmission of data, by the network media and link impact, may be lost or scrambled. 因此,不可靠传输过程中,数据接收方不对数据包的接收进行检测,也导致数据接收方接收的数据包可能乱序,或者可能接收不到数据发送方发送的数据包,而使得音视频文件不能正常播放。 Therefore, no reliable transmission, the receiver receives the data packet is not detected, the receiver also can cause the data packet received out of order may or may not receive packet data transmitted by the sender, such that audio and video files You can not play properly.

发明内容 SUMMARY

本发明实施例提供一种检测数据包的方法、装置及存储介质,以实现对不可靠传输中的数据包检测。 It provides a method for detecting a data packet, an apparatus and a storage medium of the present embodiment of the invention, to enable detection of the unreliable packet transmission.

本发明第一方面提供一种检测数据包的方法,包括: A first aspect the present invention provides a method for detecting a data packet, comprising:

获取接收到的数据包的发送序号; Get send sequence number of the received data packet;

将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记; The preset number of linear tag queue send sequence number corresponding to the ordinal position of mark marking;

当连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序。 When two consecutive number corresponding to the acquired transmission sequence number position mark discontinuous, determine packet loss or scrambled.

结合第一方面,在第一种可能的实现方式中, With the first aspect, in a first possible implementation manner,

所述标记序号线性队列上设置有固定长度的移动性检测窗口,初始状态下,所述检测窗口的覆盖范围为[a,a+n-1],其中,a为所述标记序号线性队列中最小的标记序号,n为所述固定长度; Reference numerals provided on the linear movement of the detection window queue has a fixed length, in the initial state, coverage of the detection window is [a, a + n-1], wherein, a is a linear queue tag number the minimum number of markers, n is a fixed length;

所述当连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序,包括: When the consecutive number corresponding to the acquired transmission sequence number position mark discontinuous, determine packet loss or scrambled, comprising:

当所述发送序号对应的标记序号不在所述检测窗口覆盖范围内时,移动所述检测窗口,使得所述检测窗口覆盖的最大标记序号为所述发送序号对应的标记序号; When the transmission sequence number corresponding to the number of markers detected is not within the coverage area of ​​the window, the detection window is moved, so that the maximum sequence number of the mark detection window covering send sequence number corresponding to the number marked;

当所述最大标记序号与所述检测窗口移动前覆盖的最大标记序号之间的序号跨度大于1时,确定有数据包丢失或乱序。 When the maximum number between markers before the sequence number of the mobile coverage of the maximum number and a mark detection window span greater than 1, determined that there is packet loss or scrambled.

结合第一方面的第一种可能的实现方式,在第二种可能的实现方式中, Binding a first possible implementation of the first aspect, in a second possible implementation manner,

所述确定有数据包丢失或乱序,包括: Determining said data packet is lost or out of order, comprising:

确定所述检测窗口移动前覆盖的最大标记序号,与移动后覆盖的最大标记序号之间的标记序号对应的数据包丢失或乱序。 Reference numerals determining the maximum detection window before moving the cover, corresponding to the number of marks between the marks the maximum number of mobile coverage after packet loss or scrambled.

结合第一方面的第一种或第二种可能的实现方式,在第三种可能的实现方式中, Combination with the first or second possible implementation of the first aspect, in a third possible implementation manner,

将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记,包括: The preset number mark linear transmission queue number corresponding to the number of marking locations marker, comprising:

将预置的标记序号线性队列中与所述发送序号对应的标记序号位置标记为已接收状态,所述标记序号线性队列中标记序号位置被标记前为未接收状态。 The preset number mark linear transmission queue tag number position mark number corresponding to the state as received, the queue tag number linear position marker sequence number is marked as not received prior state.

结合第一方面第三种可能的实现方式,在第四种可能的实现方式中,所述 确定有数据包丢失或乱序之后,所述方法还包括: After combination with the first aspect of the third possible implementation manner, in a fourth possible implementation manner, the packet loss determining data or scrambled, the method further comprising:

判断确定为丢失或乱序的数据包对应的标记序号脱离所述检测窗口覆盖后,是否仍为未接收状态; Analyzing determined as missing or out of order data packets corresponding to said mark detection window number from the cover, if the state is still not received;

若是,则判定所述确定为丢失或乱序的数据包已丢失。 If, it is determined that the determination is missing or out of order data packets have been lost.

本发明第二方面提供一种检测数据包的装置,包括: A second aspect of the present invention provides an apparatus for detecting a data packet, comprising:

获取单元,用于获取接收到的数据包的发送序号; Obtaining unit, configured to obtain the received data packet send sequence number;

标记单元,用于将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记; Marking unit, for marking the preset number corresponding to the number of linear transmission queue tag number and position of the mark;

确定单元,用于当所述获取单元连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序。 Determination means for, when said acquisition unit acquires two consecutive transmission sequence number corresponding to the ordinal position of mark discontinuous, determine packet loss or scrambled.

结合第二方面,在第一种可能的实现方式中, Binding a second aspect, in a first possible implementation manner,

所述标记单元标记的所述标记序号线性队列上设置有固定长度的移动性检测窗口,初始状态下,所述检测窗口的覆盖范围为[a,a+n-1],其中,a为所述标记序号线性队列中最小的标记序号,n为所述固定长度; Is provided with a fixed length movement detection window on the marking unit marks the queue tag number linear, in the initial state, coverage of the detection window is [a, a + n-1], wherein, a is the Reference numerals said linear tag queue smallest number, n is a fixed length;

所述确定单元,还用于当所述发送序号对应的标记序号不在所述检测窗口覆盖范围内时,移动所述检测窗口,使得所述检测窗口覆盖的最大标记序号为所述发送序号对应的标记序号;当所述最大标记序号与所述检测窗口移动前覆盖的最大标记序号之间的序号跨度大于1时,确定有数据包丢失或乱序。 When the determination unit is further configured to send sequence number when the sequence number corresponding to the mark is not detected within the coverage area of ​​the window, the detection window is moved, so that the maximum number of the tag detection window is covered with the send sequence number corresponding to Reference numerals; when the maximum number of marks between the maximum number and a serial number tag cover before moving the detection window span greater than 1, determined that there is packet loss or scrambled.

结合第二方面第一种可能的实现方式,在第二种可能的实现方式中, Combination with the second aspect of the first possible implementation mode, in a second possible implementation manner,

所述确定单元具体用于确定所述检测窗口移动前覆盖的最大标记序号,与移动后覆盖的最大标记序号之间的标记序号对应的数据包丢失或乱序。 The determining unit is configured to determine the maximum detection flag sequence number window before moving the cover, corresponding to the number of marks between the marks the maximum number of mobile coverage after packet loss or scrambled.

结合第二方面的第一种或第二种可能的实现方式,在第三种可能的实现方式中,所述标记单元具体用于将预置的标记序号线性队列中与所述发送序号对应的标记序号位置标记为已接收状态,所述标记序号线性队列中标记序号位置被标记前为未接收状态。 Combination with the first or second possible implementation of the second aspect, in a third possible implementation, the marking unit configured to mark a preset number of linear transmission queue to the corresponding sequence number ordinal position mark is marked as received state, the queue tag number linear position marker sequence number is marked as not received prior state.

结合第二方面第三种可能的实现方式,在第四种可能的实现方式中,所述装置还包括: Combination with the second aspect of the third possible implementation manner, in a fourth possible implementation, the apparatus further comprising:

判断单元,用于判断确定为丢失或乱序的数据包对应的标记序号脱离所述 检测窗口覆盖后,是否仍为未接收状态; Judging means for judging as to determine lost or out of order data packets corresponding to the detected tag ID from the rear window covers, whether or not the state is still not received;

所述确定单元,还用于当所述判断单元判断出确定为丢失或乱序的数据包对应的标记序号脱离所述检测窗口覆盖后仍为未接收状态时,则判定所述确定为丢失或乱序的数据包已丢失。 The determining unit is further configured to, when said determination means determines that a determination of the missing or out of order packet sequence number from the corresponding mark detecting window covering state is still not received, it is determined that the determination is missing or out of order packets have been lost.

本发明第三方面提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行上述任一种检测数据包的方法。 The third aspect of the present invention provide a storage medium containing computer-executable instructions, computer-executable instructions for performing the method of any of the above detection data packet when executed by a computer processor.

本发明实施例提供的检测数据包的方法、装置及存储介质,通过获取接收到的数据包的发送序号;将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记;当连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序,实现了不可靠传输过程数据接收方对数据发送方发送的数据包的检测,从而使得数据接收方当检测到数据包丢失时,可以仅仅对丢失后的数据包向数据发送方发送重传请求,在保证网络最大化利用的前提下,降低了真正丢包的概率;或者当检测到数据包乱序时,对数据包的顺序进行调整,保证了音视频文件的正常播放。 The method provided in the present embodiment the detection data packet invention, apparatus and a storage medium, by acquiring the send sequence number of the received data packet; preset tag ID number corresponding to the linear transmission queue tag number of the position marks; when two consecutive number corresponding to the acquired transmission sequence number position mark discontinuous, determine packet loss or disorder, achieve a reliable transmission is not detected during the data reception side data packet sent by the sender, so that the received data side when detecting packet loss, a retransmission request can be transmitted only to the sender of the data packet after the loss, under the premise of ensure maximum use of the network, reduce the probability of loss of true; or when a packet is detected when out of order, the order of the packets is adjusted to ensure the normal play audio and video files.

附图说明 BRIEF DESCRIPTION

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。 In order to more clearly illustrate the technical solutions in the embodiments of the present invention, briefly describes the accompanying drawings required for describing the embodiments used in the following embodiments will be apparent in the following description of the accompanying drawings are merely some embodiments of the present invention, skilled in the art is concerned, without creative efforts, can obtain other drawings based on these drawings.

图1是本发明实施例中检测数据包的方法的一实施例示意图; FIG 1 is an embodiment of the method according to the detection data packet schematic embodiment of the present invention;

图2是本发明实施例中检测数据包的方法的另一实施例示意图; FIG 2 is a schematic diagram of another embodiment of the method of detecting packet embodiment of the present invention;

图3是本发明实施例中检测数据包的方法的另一实施例示意图; FIG 3 is a schematic diagram of another embodiment of the method of detecting packet embodiment of the present invention;

图4是本发明实施例中检测数据包的方法的另一实施例示意图; FIG 4 is a schematic diagram of another embodiment of a method embodiment for detecting packets embodiment of the present invention;

图5是本发明实施例中检测数据包的装置的一实施例示意图; FIG 5 is an embodiment of the device in detecting packet schematic embodiment of the present invention;

图6是本发明实施例中检测数据包的装置的另一实施例示意图; FIG 6 is a schematic diagram of another embodiment of the detecting apparatus of the embodiment of the present invention, a data packet embodiment;

图7是本发明实施例中终端的一实施例示意图; FIG 7 is a diagram of the embodiment of the present invention in a terminal a schematic diagram of an embodiment;

图8是本发明实施例中服务器的一实施例示意图。 FIG 8 is a schematic diagram of a server according to the embodiment of the present invention.

具体实施方式 detailed description

本发明实施例提供一种检测数据包的方法,可以快速检测出丢失或乱序的数据包。 Embodiment provides a method of detecting a data packet of the present invention can quickly detect missing or out of order packets. 本发明实施例还提供了相应的检测装置。 Embodiments of the present invention further provides a corresponding detection means. 以下分别进行详细说明。 The following are described in detail.

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。 Below in conjunction with the accompanying drawings of the present invention in embodiments, the technical solutions in the embodiments of the present invention are clearly and completely described, obviously, the described embodiments are merely part of embodiments of the present invention rather than all embodiments. 基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。 Based on the embodiments of the present invention, those skilled in the art to make all other embodiments without creative work obtained by, it falls within the scope of the present invention.

参阅图1,本发明实施例提供的检测数据包的方法包括:步骤101至步骤103。 Method Referring to Figure 1, a data packet is detected according to an embodiment of the present invention comprises: step 101 to step 103.

步骤101中,获取接收到的数据包的发送序号。 In step 101, acquires the transmission sequence number of the received packet.

由于数据包发送方在发送数据包时,会在数据包中写入数据包的发送序号,因此,数据接收方接收到数据包后,能够从中得到数据包的发送序号。 Since the data packet sender when sending a packet, the packet send sequence number is written in the packet, and therefore, the receiving side receives the data packet, can be obtained from the packet send sequence number.

步骤102中,将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记。 In step 102, the preset number of linear tag ID transmitting queue corresponding to the ordinal position of mark to mark.

本发明实施例中的标记序号线性队列与数据发送方发送的数据包的发送序号对应,例如数据发送方设置的数据包的发送序号为0、1、2、3、4……,则数据接收方也预先设置序号为0、1、2、3、4……的线性序号队列,且队列中的序号从小到大依次排列。 Send sequence number of the data packet in the queue tag number linear data sent by the sender to the embodiment of the present invention corresponds to, for example, a data packet send sequence number set for the sender 0,1,2,3,4 ......, data reception Reference is also set in advance side 0,1,2,3,4 ...... linear queue number, queue number and arranged in order from small to large. 假如数据接收方接收到的数据包的发送序号为m,则在队列中找到序号m,并在m所在的位置进行标记,以表明发送序号为m的数据包已被接收。 If the recipient receives the transmission data sequence number to the data packet is m, the number m is found in the queue, and marked at a position where m to indicate that the transmission sequence number has been received as a packet m.

步骤103中,当连续两次获取的发送序号对应的标记序号的位置不连续时,确定有数据包丢失或乱序。 In step 103, when the number of consecutive position mark acquired sequence number corresponding to discontinuous transmission, determine packet loss or scrambled.

本实施例中,所述连续两次获取可以理解为两次获取,且该两次获取的发送序号连续。 In this embodiment, the acquisition may be understood as two consecutive twice acquired, and the acquisition of two successive transmission sequence number. 例如,第一次接收到的数据包的发送序号为11,该第一次获取到的发送序号对应的标记序号为11;第二次接收到的数据包的发送序号为15且该第二次获取到的发送序号对应的标记序号为15,由此可以判定,第一次获取的发送序号对应的标记序号与第二次获取的发送序号对应的标记序号在序号线性队列中不连续,也就是说,该连续两次获取到的发送序号所对应的标记序号在 序号线性队列中的位置不连续,因此可以确定标记序号11和15之间的序号12、13和14对应的数据包丢失或乱序,也就是说,序号12至14对应的数据包有可能彻底收不到(即为丢失),也有可能在接收到序号15对应的数据包之后收到(即为乱序)。 For example, the first transmission sequence number of the received data packet is 11, the first number corresponding to the acquired transmission sequence number is labeled 11; a second transmission sequence number of the received packet 15 and the second send sequence number corresponding to the acquired mark number is 15, whereby it can be determined, the first transmission sequence number corresponding to the acquired tag ID and the second transmission sequence number corresponding to the acquired tag ID numbers are not continuous linear queue, i.e. said acquired twice the send sequence number corresponding to the number marked ordinal position in the queue linear discontinuities, mark number is assigned can be determined between 11 and 15 12, 13 and 14 corresponding to packet loss or out sequence, i.e., the serial number 12 to 14, the corresponding data packets may not receive complete (i.e. lost), also possible to receive (i.e. scrambled) 15 after receiving a corresponding number of data packets.

可以看出,在不可靠传输过程中,数据接收方通过采用上述实施例提供的检测数据包的方法,能够实现对数据包的丢失或乱序进行检测,这样,当数据接收方检测到有数据包丢失时,可以仅仅对丢失后的数据包向数据发送方发送重传请求,从而在保证网络最大化利用的前提下,降低了真正丢包的概率;当数据接收方检测到有数据包乱序时,可以预先采取调整措施,从而保证传输的音视频文件能够正常播放,提高了不可靠传输的可靠性。 As can be seen, unreliable transmission process, the data receiving side by using the method of detecting packet data to the above embodiment, it is possible to realize a lost or scrambled packet is detected, so that, when the data receiver detects the data when packet loss, may only send packets to the loss of a data sender a retransmission request to the premise of ensuring maximum utilization of the network, reduce the probability of loss of true; when the data receiver detects the data packet chaos timing, you can adjust the pre-emptive measures to ensure the transmission of audio and video file plays correctly, improve the reliability of an unreliable transmission.

本实施例中,在上述图1对应的实施例的基础上,本发明实施例提供的检测数据包的方法的另一实施例中,所述标记序号线性队列上设置有固定长度的移动性检测窗口,初始状态下,所述检测窗口的覆盖范围为[a,a+n-1],其中,a为所述标记序号线性队列中最小的标记序号,n为所述固定长度; In this embodiment, on the basis of FIG. 1 corresponds to the above-described embodiment, the method further detection data packet according to an embodiment of the present invention embodiment, the ID mark is provided on the linear movement detection queue has a fixed length under the window, an initial state, the detection range of the window covering as [a, a + n-1], wherein, a is the number linear marking indicia minimum queue number, said n-fixed length;

所述当连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序,可以包括: When the consecutive number corresponding to the acquired transmission sequence number position mark discontinuous, determine packet loss or scrambled, may include:

当所述发送序号对应的标记序号不在所述检测窗口覆盖范围内时,移动所述检测窗口,使得所述检测窗口覆盖的最大标记序号为所述发送序号对应的标记序号; When the transmission sequence number corresponding to the number of markers detected is not within the coverage area of ​​the window, the detection window is moved, so that the maximum sequence number of the mark detection window covering send sequence number corresponding to the number marked;

当所述最大标记序号与所述检测窗口移动前覆盖的最大标记序号之间的序号跨度大于1时,确定有数据包丢失或乱序。 When the maximum number between markers before the sequence number of the mobile coverage of the maximum number and a mark detection window span greater than 1, determined that there is packet loss or scrambled.

本发明实施例中,移动性检测窗口的长度可以预先规定好,例如:可以设定为1024个序号长度,也可以为其他数量个序号长度,如1025、1026、1027….2048等等。 Embodiments of the present invention, the length of the detection window can move a predetermined good, for example: the serial number 1024 can be set to a length, the length may be a number of other numbers, such as 1025,1026,1027 ... .2048 like.

以移动性检测窗口的长度是1024为例,参阅图2,在初始时刻,移动性检测窗口的左侧在标记序号线性队列标记序号0的位置,右侧在标记序号1023的位置,也可以说,移动性检测窗口覆盖的最小标记序号为0,覆盖的最大标记序号为1023。 Length of movement of the detection window 1024 is an example, referring to Figure 2, at the initial time of detection window moves to the left in the queue tag number flag linear ordinal position 0, in the right position marker sequence number 1023, it can be said , minimum mark detection window covering mobile number is 0, the maximum number flag 1023 is covered. 当接收到的数据包的发送序号小于1024时,该移动性检测窗口不移 动;当接收到的数据包的发送序号大于1023时,该移动性检测窗口向标记序号线性队列的队尾方向即标记序号增大的方向移动。 When the transmission sequence number of the received data packet is less than 1024, the movement detection window does not move; when the send sequence number of the received packet is greater than 1023, the movement detection window queue to tag ID linear queue tail direction, that tag moving direction of increasing number. 以接收到的数据包的发送序号是1024为例,该移动性检测窗口移动后,覆盖的最大标记序号变为1024,覆盖的最小标记序号变为1,该移动性检测窗口向右移动了1个序号的位移,可以确定没有数据包丢失或乱序。 To receive the packet send sequence number 1024 is an example, after the movement detection window moves to cover the maximum number flag 1024 changes, the covering becomes minimum mark No. 1, the mobility of a detection window moves to the right displacement of a serial number, can be determined without packet loss or scrambled.

参阅图3,当数据接收方接收到发送序号为1024的数据包之后,紧接着接收到的数据包的发送序号是1027时,该移动性检测窗口就要向右移动3个序号的位移,其覆盖的最大标记序号从1024变为1027,覆盖的最小标记序号从1变为4,该移动性检测窗口一次性移动的序号跨度为3,3大于1,可以确定序号为1025和1026的数据包丢失或乱序。 Referring to Figure 3, when the recipient receives the transmitted data packet with sequence number 1024, followed by transmission sequence number of the received data packet is 1027, the detection window should move rightward displacement of the sequence number 3, which is the maximum number of tag cover from 1024 becomes 1027, covering the sequence number from 1 to a minimum mark 4, the movement detection window span disposable movement 3,3 number greater than 1, may be determined as the number of packets 1025 and 1026 missing or out of order.

本实施例中,在上述图1对应的实施例的基础上,本发明实施例提供的检测数据包的方法的另一实施例中,所述确定有数据包丢失或乱序,可以包括: Another embodiment of the method of the present embodiment, on the basis of the above-described embodiment of FIG. 1 corresponds to the embodiment, detecting packet according to an embodiment of the present invention embodiment, the packet loss determining data or scrambled, may include:

确定所述检测窗口移动前覆盖的最大标记序号,与移动后覆盖的最大标记序号之间的标记序号对应的数据包丢失或乱序。 Reference numerals determining the maximum detection window before moving the cover, corresponding to the number of marks between the marks the maximum number of mobile coverage after packet loss or scrambled.

例如,参阅图3,在移动前,移动性检测窗口覆盖的最大标记序号为1024,移动后移动性检测窗口覆盖的最大标记序号为1027,直接跨过了标记序号1025和1026,因此,可以确定发送序号为1025和1026的数据包丢失或乱序。 For example, the maximum number marks refer to FIG. 3, before moving, the movement detection window covering 1024, the maximum number mark detection window after the movement of the movable cover 1027 is directly across a number of labeled 1025 and 1026, thus, may be determined Nos. 1025 and 1026 transmit a data packet is lost or out of order.

在上述图1对应的实施例或图1对应的任一实施例的基础上,本发明实施例提供的检测数据包的方法的另一实施例中,将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记,可以包括: Another method described in FIG. 1 or FIG embodiment corresponding to Example 1 according to any embodiment corresponding to an embodiment based on the detection data packet according to an embodiment of the present embodiment of the invention, the preset number of linear marks and the queues send sequence number corresponding to said ID mark position mark, may include:

将预置的标记序号线性队列中与所述发送序号对应的标记序号位置标记为已接收状态,所述标记序号线性队列中标记序号位置被标记前为未接收状态。 The preset number mark linear transmission queue tag number position mark number corresponding to the state as received, the queue tag number linear position marker sequence number is marked as not received prior state.

如初始状态下,将标记序号线性队列中各个标记序号所在位置的值都设置为0,当数据接收方接收到发送序号与标记序号对应的或与标记序号相同的数据包时,则将对应的标记序号所在位置的值设置为1。 As the initial state, the value of the position of each marker tag serial number is located in a linear queue are set to 0, when the recipient receives the data sent to the same number with the number corresponding to the marker or markers with the number of data packets, then the corresponding flag value of the position where the number is 1.

在上一个实施例的基础上,本发明实施例提供的检测数据包的方法的另一实施例中,所述确定有数据包丢失或乱序之后,所述方法还可以包括: After one embodiment based on the embodiment, another method according to an embodiment of the detected data packet in the embodiment of the present invention, there is determined the packet loss or scrambled, the method may further comprise:

判断确定为丢失或乱序的数据包对应的标记序号脱离所述检测窗口覆盖 后,是否仍为未接收状态; Analyzing determined as missing or out of order data packets corresponding to said mark detection window number from the cover, if the state is still not received;

若是,则判定所述确定为丢失或乱序的数据包已丢失。 If, it is determined that the determination is missing or out of order data packets have been lost.

本发明实施例中,因数据包在传输过程中可能会乱序,针对图3中发送序号是1025或1026的数据包可能只是乱序导致接收延迟了,所以需要在一段时间后才能判断这两个数据包是否丢失。 Embodiments of the present invention, because the data packet during transmission may be scrambled for the transmission sequence number in FIG. 3 is a 1025 or 1026 may only be out of order data packets cause the receiving delays, it is necessary both in order to determine at a later time a packet is lost. 如当移动性检测窗口更进一步移向标记序号线性队列的队尾,而不再覆盖之前确认丢失或乱序的数据包对应的标记序号时,判断确认丢失或乱序的数据包对应的标记序号所在位置的值表示的状态是已接收还是未接收。 Such as when the detection window moves further toward Reference numerals linear end of the queue, an acknowledgment packet corresponding to the missing sequence number indicia or scrambled before no longer covers, judges acknowledgment is lost or scrambled packet sequence number corresponding to the tag state value indicates the location has been received or is not received. 如果状态是未接收,则可以判定之前确认丢失或乱序的数据包已丢失;如果状态是已接收,则可以判定之前确认丢失或乱序的数据包乱序。 If the status is not received, it can be determined that the acknowledgment is lost or scrambled packet is lost before; If the status is received, it can be determined that the acknowledgment is lost or scrambled data packets scrambled before. 参阅图4,移动前,移动性检测窗口覆盖的最小标记序号是1025,移动性检测窗口覆盖的最小标记序号是1026,这时就检测标记序号1025位置处所标记的状态,当检测到该位置的状态为未接收时,确定发送序号为1025的数据包丢失;如果状态是已接收,说明该发送序号为1025的数据包接收时发生乱序。 Referring to Figure 4, before moving, the minimum mark detection window covering mobile number is 1025, the smallest number mark movement detection window covering is 1026, then the status flag is detected the position number 1025 of the premises tag, when the detected position state is not received, determining the send sequence number 1025 as packet loss; if the state has been received, indicating that occurs out of sequence transmission sequence number of the received data packet 1025.

参阅图5,本发明实施例提供的检测数据包的装置用于实现上述图1所示实施例提供的检测数据包的方法,包括:获取单元201、标记单元202和确定单元203。 Referring to Figure 5, detecting device provided in the embodiment of the present invention, data packets used to implement the method of detecting packet according to an embodiment shown in FIG. 1 described above, comprising: an acquisition unit 201, determination unit 202 and marking unit 203.

获取单元201用于获取接收到的数据包的发送序号。 Acquisition unit 201 for acquiring a transmission sequence number of the received packet.

标记单元202用于将预置的标记序号线性队列中与所述获取单元201获取的发送序号对应的标记序号位置进行标记。 Marking unit 202 for marking the position of a preset number of linear tag queue number acquisition unit 201 acquires the send sequence number corresponding labeled.

确定单元203用于当所述获取单元201连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序。 When the determination unit 203 for acquisition unit 201 acquires two consecutive transmission sequence number corresponding to the ordinal position of mark discontinuous, determine packet loss or scrambled.

本发明实施例提供的检测数据包的装置,通过获取单元获取接收到的数据包的发送序号,通过标记单元将预置的标记序号线性队列中与发送序号对应的标记序号位置进行标记;通过确定单元当连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序。 Means for detecting a data packet according to an embodiment of the present invention, to obtain the transmission sequence number of data packets received by the obtaining unit, by the marking unit marks the preset number of linear transmission queue number corresponding to the ordinal position of mark marked; by determining when two consecutive acquisition unit send sequence number corresponding to the ordinal position of mark discontinuous, determine packet loss or scrambled. 该检测数据包的装置可以作为数据接收方,也可以是数据接收方的一部分,这样,在不可靠传输过程中,数据接收方检测到有数据包丢失时,可以仅仅对丢失后的数据包向数据发送方发送重传请求,从而在保证网络最大化利用的前提下,降低了真正丢包的概率; 当数据接收方检测到有数据包乱序时,可以预先采取调整措施,从而保证传输的音视频文件能够正常播放,提高了不可靠传输的可靠性。 The detection device packet can be used as data receiver, it may be a part of the data reception side, so that, in the unreliable transmission process, the data receiving side detects that a packet loss may be only the data packet loss to the data sender transmits a retransmission request to the premise of ensuring maximum utilization of the network and reduce the packet loss probability of the true; when the data reception side detects a packet is out of order, can be adjusted in advance to take measures to ensure the transmission of normal play audio and video files can improve the reliability of an unreliable transmission.

本发明实施例提供的检测数据包的装置中,所述标记单元202标记的所述标记序号线性队列上设置有固定长度的移动性检测窗口,初始状态下,所述检测窗口的覆盖范围为[a,a+n-1],其中,a为所述标记序号线性队列中最小的标记序号,n为所述固定长度; Embodiment of the present invention, means for detecting a data packet provided by the embodiment, the marking disposed on the marking unit 202 marks the number of the linear movement of the detection window queue has a fixed length, in the initial state, coverage of the detection window for [ a, a + n-1], where, a queue tag number minimum linear mark the serial number, n is a fixed length;

相应的,所述确定单元203还可用于 Accordingly, the determination unit 203 may also be used

当所述发送序号对应的标记序号不在所述检测窗口覆盖范围内时,移动所述检测窗口,使得所述检测窗口覆盖的最大标记序号为所述发送序号对应的标记序号; When the transmission sequence number corresponding to the number of markers detected is not within the coverage area of ​​the window, the detection window is moved, so that the maximum sequence number of the mark detection window covering send sequence number corresponding to the number marked;

当所述最大标记序号与所述检测窗口移动前覆盖的最大标记序号之间的序号跨度大于1时,确定有数据包丢失或乱序。 When the maximum number between markers before the sequence number of the mobile coverage of the maximum number and a mark detection window span greater than 1, determined that there is packet loss or scrambled.

,本发明实施例提供的检测数据包的装置中, Embodiment, the present invention, means for detecting a data packet in the embodiment provided,

所述确定单元203可具体用于确定所述检测窗口移动前覆盖的最大标记序号,与移动后覆盖的最大标记序号之间的标记序号对应的数据包丢失或乱序。 In particular the determination unit 203 may mark the maximum number is determined before the movement of the detection window covering, corresponding to the number of marks between the marks the maximum number of mobile coverage after packet loss or scrambled.

本发明实施例提供的检测数据包的装置中,所述标记单元202可具体用于将预置的标记序号线性队列中与所述发送序号对应的标记序号位置标记为已接收状态,所述标记序号线性队列中标记序号位置被标记前为未接收状态。 Embodiment of the present invention, means for detecting a data packet in the embodiment provided, the marking unit 202 may mark a particular sequence number position mark preset number of linear tag queue corresponding to the transmission sequence number is marked as the reception state, Reference numerals ID linear position before the queue is not marked as received state.

在上述图5对应的实施例的基础上,参阅图6,本发明实施例提供的检测数据包的装置的另一实施例中,所述装置20还可包括:判断单元205。 On the basis of the above-described embodiment of FIG. 5 corresponds to the upper, referring to Figure 6, another apparatus for detecting a packet according to an embodiment of the present invention embodiment, the apparatus 20 further comprising: a determination unit 205.

判断单元205用于判断确定为丢失或乱序的数据包对应的标记序号脱离所述检测窗口覆盖后,是否仍为未接收状态; Judging unit 205 for judging determined to be lost or out of order data packets corresponding to said mark detection window number from the cover, if the state is still not received;

相应的,所述确定单元203还可用于当所述判断单元205判断出确定为丢失或乱序的数据包对应的标记序号脱离所述检测窗口覆盖后仍为未接收状态时,则判定所述确定为丢失或乱序的数据包已丢失。 Accordingly, the determining unit 203 may also be used if the judging unit 205 judges that it is determined to be missing or out of order after the corresponding packet sequence number from the tag detection window covering state is still not received, it is determined that the It is determined to be missing or out of order data packets have been lost.

本发明实施例中的检测数据包的装置可以为终端,也可以为服务器。 Means for detecting a data packet in the embodiment of the present invention may be a terminal, it may be a server.

当所述检测数据包的装置为终端时,请参考图7,其示出了本发明实施例所涉及的终端的结构示意图,该终端可以用于实施上述实施例中提供的检测数据 包的方法。 The method of detecting means when said data packet is the terminal, please refer to FIG. 7, which shows a schematic view of a terminal structure of the present invention according to an embodiment, the terminal may detect packets used to implement the above-described embodiments provided . 具体来讲: Specifically:

终端1200可以包括RF(Radio Frequency,射频)电路110、包括有一个或一个以上计算机可读存储介质的存储器120、输入单元130、显示单元140、传感器150、音频电路160、WiFi(wireless fidelity,无线保真)模块170、包括有一个或者一个以上处理核心的处理器180、以及电源190等部件。 Terminal 1200 may include a RF (Radio Frequency, RF) circuit 110, comprising one or more computer-readable storage medium, a memory 120, an input unit 130, display unit 140, a sensor 150, an audio circuit 160, WiFi (wireless fidelity, wireless fidelity) module 170, processor 180 includes one or more processing cores, and a power supply 190 and other components. 本领域技术人员可以理解,图7中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。 Those skilled in the art will be appreciated, the structure of the terminal shown in FIG. 7 do not limit the terminal, may include more or fewer components than shown, or a combination of some of the components, or a different arrangement of components. 其中: among them:

RF电路110可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器180处理;另外,将涉及上行的数据发送给基站。 RF circuit 110 may be used during a call or send and receive information, the receive and transmit signals, in particular, the base station receives the downlink information, referred to the one or more processors 180 process; Further, the uplink data directed to the base station . 通常,RF电路110包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM)卡、收发信机、耦合器、LNA(Low Noise Amplifier,低噪声放大器)、双工器等。 Typically, RF circuitry 110 include, but are not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a subscriber identity module (SIM) card, a transceiver, a coupler, LNA (Low Noise Amplifier, LNA) a duplexer. 此外,RF电路110还可以通过无线通信与网络和其他设备通信。 In addition, RF circuitry 110 is also in communication with a wireless communication network and other devices through. 所述无线通信可以使用任一通信标准或协议,包括但不限于GSM(Global System of Mobile communication,全球移动通讯系统)、GPRS(General Packet Radio Service,通用分组无线服务)、CDMA(Code Division Multiple Access,码分多址)、WCDMA(Wideband Code Division Multiple Access,宽带码分多址)、LTE(Long Term Evolution,长期演进)、电子邮件、SMS(Short Messaging Service,短消息服务)等。 The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication, Global System for Mobile Communications), GPRS (General Packet Radio Service, General Packet Radio Service), CDMA (Code Division Multiple Access , Code Division Multiple Access), WCDMA (wideband Code Division Multiple Access, wideband Code Division Multiple Access), LTE (long Term Evolution, long Term Evolution), e-mail, SMS (short messaging service, short message service) and so on.

存储器120可用于存储软件程序以及模块,处理器180通过运行存储在存储器120的软件程序以及模块,从而执行各种功能应用以及数据处理。 The memory 120 may be used to store software programs and modules, a processor 180, to perform various functions and data processing applications in a memory, and a software program storage module 120 via running. 存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端1200的使用所创建的数据(比如音频数据、电话本等)等。 The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, at least a function of the desired application (such as a sound playback function, an image playback function, etc.); data storage area may store terminal 1200 using the created data (such as audio data, telephone book, etc.). 此外,存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。 In addition, memory 120 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage devices, flash memory devices, or other volatile solid-state memory device. 相应地,存储器120还可以包括存储器控制器,以提供处理器180和输入单元130对存储器120的访问。 Accordingly, the memory 120 may further include a memory controller to provide the processor 180 and the input unit 130 of the memory access 120.

输入单元130可用于接收输入的数字或字符信息,以及产生与用户设置以 及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。 The input unit 130 may be used to receive input numeric or character information, and to generate user setting and function control for a keyboard, mouse, joystick, trackball, or the optical input signal. 具体地,输入单元130可包括触敏表面131以及其他输入设备132。 Specifically, the input unit 130 may include a touch sensitive surface 131 and other input devices 132. 触敏表面131,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面131上或在触敏表面131附近的操作),并根据预先设定的程式驱动相应的连接装置。 Touch sensitive surface 131, also known as a touch screen or a touch panel, the user may collect on or near the touch operation (such as a user finger, a pen or any other suitable object or accessory on the touch sensitive surface 131 or a touch-sensitive surface 131 close operation), and drive the corresponding connection device in accordance with a preset program. 触敏表面131可包括触摸检测装置和触摸控制器两个部分。 A touch-sensitive surface 131 may include a touch detection device and a touch controller. 其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器180,并能接收处理器180发来的命令并加以执行。 The touch detecting means detects a user touch position, and the detection signal caused by the touch operation, the touch signal to the controller; a touch controller receives touch information from the touch detecting device, and converts it into contact coordinates, sending to processor 180 and command processor 180 can receive and execute sent. 此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面131。 Further, using resistive, capacitive, infrared and surface acoustic wave type implementations, and other touch sensitive surface 131. 除了触敏表面131,输入单元130还可以包括其他输入设备132。 In addition to the touch-sensitive surface 131, input unit 130 may further include other input device 132. 具体地,其他输入设备132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。 In particular, other input device 132 may include but is not limited to a physical keyboard, function keys (such as volume control keys, key switches, etc.), a trackball, a mouse, a joystick, one or more.

显示单元140可用于显示由用户输入的信息或提供给用户的信息以及终端1200的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。 The display unit 140 may be used to display information input by the user or various graphical user interfaces provided to the user information and the terminal 1200, the graphical user interface may be composed of graphics, text, icons, video, and any combination thereof. 显示单元140可包括显示面板141,该显示面板141可以采用LCD(Liquid Crystal Display,液晶显示器)、OLED(Organic Light-Emitting Diode,有机发光二极管)等形式来配置显示面板141。 The display unit 140 may include a display panel 141, the display panel 141 may employ LCD (Liquid Crystal Display, LCD displays), OLED (Organic Light-Emitting Diode, OLED) or the like to form a display panel 141. 进一步的,触敏表面131可覆盖显示面板141,当触敏表面131检测到在其上或附近的触摸操作后,传送给处理器180以确定触摸事件的类型,随后处理器180根据触摸事件的类型在显示面板141上提供相应的视觉输出。 Further, the touch-sensitive surface 131 may cover the display panel 141, the touch-sensitive surface 131 when the detected on or near the touch operation, to the processor 180 to determine the type of touch event, then processor 180 according to a touch event provide a corresponding type of visual output on the display panel 141. 虽然在图7中,触敏表面131与显示面板141是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面131与显示面板141集成而实现输入和输出功能。 Although in FIG 7, the touch-sensitive surface 131 and the display panel 141 as two separate components to achieve input and output functions, in some embodiments, may be a touch-sensitive surface 131 and the display panel 141 integrated to implement the input and output functions.

终端1200还可包括至少一种传感器150,比如光传感器、运动传感器以及其他传感器。 Terminal 1200 may further include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. 具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板141的亮度,接近传感器可在终端1200移动到耳边时,关闭显示面板141和/或背光。 Specifically, the optical sensor may include an ambient light sensor and proximity sensor, an ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of ambient light, the proximity sensor 1200 can be moved to the terminal ear, and turn off the display panel 141 / or backlighting. 作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静 止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端1200还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。 As a motion sensor, the accelerometer may detect the size of the respective directions (usually three axes) acceleration may be stationary detect the magnitude and direction of gravity, it is used for identifying of a cell phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), related to vibration identification features (such as a pedometer, percussion) and the like; As for the other gyroscope sensor, a barometer, hygrometer, a thermometer, an infrared sensor may also be configured to terminal 1200, which is not then repeat.

音频电路160、扬声器161,传声器162可提供用户与终端1200之间的音频接口。 Audio circuitry 160, speaker 161, a microphone 162 provide an audio interface between a user and terminal 1200. 音频电路160可将接收到的音频数据转换后的电信号,传输到扬声器161,由扬声器161转换为声音信号输出;另一方面,传声器162将收集的声音信号转换为电信号,由音频电路160接收后转换为音频数据,再将音频数据输出处理器180处理后,经RF电路110以发送给比如另一终端,或者将音频数据输出至存储器120以便进一步处理。 Electrical signal circuit 160 converts the audio data may be audio received, transmitted to a speaker 161, a sound signal output from the speaker 161 is converted to; the other hand, the microphone 162 converts the sound signals into electrical signals collected by the audio circuit 160 after receiving the data into audio, then the audio processor 180 outputs the data processed by RF circuitry 110 for transmission to another terminal such as or the audio data is output to the memory 120 for further processing. 音频电路160还可能包括耳塞插孔,以提供外设耳机与终端1200的通信。 The audio circuit 160 may also include an earphone jack, and to provide communication between a peripheral earphone terminal 1200.

WiFi属于短距离无线传输技术,终端1200通过WiFi模块170可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。 WiFi is a short-range wireless transmission technology, the WiFi module 170 by the terminal 1200 can help users to send and receive e-mail, web browsing, and access to streaming media, etc., which provides wireless broadband Internet access for the user. 虽然图7示出了WiFi模块170,但是可以理解的是,其并不属于终端1200的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。 Although FIG. 7 shows the WiFi module 170, it will be appreciated that it is not configured to be part of the terminal 1200, and can be omitted without changing the essence of the invention in the ranges as needed.

处理器180是终端1200的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器120内的软件程序和/或模块,以及调用存储在存储器120内的数据,执行终端1200的各种功能和处理数据,从而对手机进行整体监控。 Terminal processor 180 is a control center 1200, using various interfaces and circuits connecting the various portions of the entire mobile phone, the data in the memory 120 in the software program in the memory 120 and / or module, and invoke the stored memory by running or executing, perform various functions and data processing terminal 1200, and thus the overall mobile phone monitoring. 处理器180可包括一个或多个处理核心;例如,处理器180可集成应用处理器和调制解调处理器,其中,应用处理器处理操作系统、用户界面和应用程序等,调制解调处理器处理无线通信。 The processor 180 may include one or more processing cores; e.g., processor 180 may be integrated application processor and the modem processor, wherein the application processor operating system, user interface, and application programs, a modem processor The wireless communication processing. 可以理解的是,上述调制解调处理器也可以不集成到处理器180中。 It will be appreciated that the modem processor may not be integrated into the processor 180.

终端1200还包括给各个部件供电的电源190(比如电池),电源190可以通过电源管理系统与处理器180逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。 Further comprising a terminal 1200 to the various components of the power supply 190 (such as a battery), the power supply 190 through a power management system 180 is logically connected to the processor to manage power management system is achieved by charging, discharging, and power management functions. 电源190还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。 The power supply 190 may also include one or more DC or AC power supply, any recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator and the like.

尽管未示出,终端1200还可以包括摄像头、蓝牙模块等,在此不再赘述。 Although not shown, the terminal 1200 may further include a camera, a Bluetooth module, etc., which are not repeated herein. 具体在本实施例中,终端的显示单元是触摸屏显示器,终端还包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行述一个或者一个以上程序包含用于进行以下操作的指令: In the illustrated embodiment, the display unit of the terminal is a touch screen display terminal further comprises a memory, and one or more than one program, wherein the one or more programs stored in the memory, and configured to more processing by one or performs said one or more programs including instructions for performing the following operations:

获取接收到的数据包的发送序号; Get send sequence number of the received data packet;

将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记; The preset number of linear tag queue send sequence number corresponding to the ordinal position of mark marking;

当连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序。 When two consecutive number corresponding to the acquired transmission sequence number position mark discontinuous, determine packet loss or scrambled.

假设上述为第一种可能的实施方式,则在第一种可能的实施方式作为基础而提供的第二种可能的实施方式中,所述终端的存储器中,还包含用于执行以下操作的指令: A second possible embodiment of the above embodiment assumed a first possible embodiment, it is possible to provide in a first embodiment as a basis, the memory of the terminal, further comprising instructions for performing the following operations :

所述标记序号线性队列上设置有固定长度的移动性检测窗口,初始状态下,所述检测窗口的覆盖范围为[a,a+n-1],其中,a为所述标记序号线性队列中最小的标记序号,n为所述固定长度; Reference numerals provided on the linear movement of the detection window queue has a fixed length, in the initial state, coverage of the detection window is [a, a + n-1], wherein, a is a linear queue tag number the minimum number of markers, n is a fixed length;

当所述发送序号对应的标记序号不在所述检测窗口覆盖范围内时,移动所述检测窗口,使得所述检测窗口覆盖的最大标记序号为所述发送序号对应的标记序号; When the transmission sequence number corresponding to the number of markers detected is not within the coverage area of ​​the window, the detection window is moved, so that the maximum sequence number of the mark detection window covering send sequence number corresponding to the number marked;

当所述最大标记序号与所述检测窗口移动前覆盖的最大标记序号之间的序号跨度大于1时,确定有数据包丢失或乱序。 When the maximum number between markers before the sequence number of the mobile coverage of the maximum number and a mark detection window span greater than 1, determined that there is packet loss or scrambled.

在第二种可能的实施方式作为基础而提供的第三种可能的实施方式中,所述终端的存储器中,还包含用于执行以下操作的指令: In a third embodiment of a second possible embodiment provided as a basis for a possible embodiment, the memory of the terminal, further comprising instructions for performing the following operations:

确定所述检测窗口移动前覆盖的最大标记序号,与移动后覆盖的最大标记序号之间的标记序号对应的数据包丢失或乱序。 Reference numerals determining the maximum detection window before moving the cover, corresponding to the number of marks between the marks the maximum number of mobile coverage after packet loss or scrambled.

在第一种、第二种或第三种可能的实施方式作为基础而提供的第四种可能的实施方式中,所述终端的存储器中,还包含用于执行以下操作的指令: In a fourth first, second or third possible embodiment provided as a basis for a possible embodiment, the memory of the terminal, further comprising instructions for performing the following operations:

将预置的标记序号线性队列中与所述发送序号对应的标记序号位置标记为已接收状态,所述标记序号线性队列中标记序号位置被标记前为未接收状态。 The preset number mark linear transmission queue tag number position mark number corresponding to the state as received, the queue tag number linear position marker sequence number is marked as not received prior state.

在第四种可能的实施方式作为基础而提供的第五种可能的实施方式中,所述终端的存储器中,还包含用于执行以下操作的指令: In a fifth possible embodiment of a fourth possible embodiment provided as a basis for the memory of the terminal, further comprising instructions for performing the following operations:

判断确定为丢失或乱序的数据包对应的标记序号脱离所述检测窗口覆盖后,是否仍为未接收状态; Analyzing determined as missing or out of order data packets corresponding to said mark detection window number from the cover, if the state is still not received;

若是,则判定所述确定为丢失或乱序的数据包已丢失。 If, it is determined that the determination is missing or out of order data packets have been lost.

综上所述,本实施例提供的终端,采用获取接收到的数据包的发送序号;将所述发送序号填充到预置的标记序号线性队列中对应的标记序号位置;当连续两次填充发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序。 As described above, the terminal according to this embodiment, the received data using the acquired packet send sequence number; filling the transmission to the tag serial number position mark number corresponding to the linear preset queue; when transmitting two consecutive filling Reference numerals corresponding to the sequence number of discrete positions, to determine a packet is lost or scrambled. 与现有技术中过逐个记录数据包的发送序号的方法进行丢包检测相比,本发明实施例中提供的检测数据包的方法,可以快速检测出丢失或乱序的数据包。 Over the prior art method of transmitting packet loss is detected by one of the number of packets recorded compared to a method for detecting a data packet according to embodiments of the present invention is provided, it can quickly detect missing or out of order packets.

作为另一方面,本发明再一实施例还提供了一种包含计算机可执行指令的存储介质,即计算机可读存储介质,该计算机可读存储介质可以是上述实施例中的存储器中所包含的计算机可读存储介质;也可以是单独存在,未装配入终端中的计算机可读存储介质。 As another aspect, the present invention further provides another embodiment of a storage medium comprising computer-executable instructions, i.e. a computer-readable storage medium, the computer-readable storage medium may be the above-described embodiments of the memory contained the computer-readable storage medium; may be present alone, not fitted into a computer-readable storage medium of the terminal. 所述计算机可读存储介质存储有一个或者一个以上程序,所述一个或者一个以上程序被一个或者一个以上的处理器用来执行上述检测数据包的方法,或者所述计算机可执行指令在由计算机处理器执行时用于执行上述检测数据包的方法,所述方法包括: The computer-readable storage medium storing one or more programs, the one or more programs with one or more than one processor for performing the above-described method for detecting a data packet, the computer-executable instructions or processing by a computer a method for performing the above-described detecting packet is executing, said method comprising:

获取接收到的数据包的发送序号; Get send sequence number of the received data packet;

将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记; The preset number of linear tag queue send sequence number corresponding to the ordinal position of mark marking;

当连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序。 When two consecutive number corresponding to the acquired transmission sequence number position mark discontinuous, determine packet loss or scrambled.

假设上述为第一种可能的实施方式,则在第一种可能的实施方式作为基础而提供的第二种可能的实施方式中,所述标记序号线性队列上设置有固定长度的移动性检测窗口,初始状态下,所述检测窗口的覆盖范围为[a,a+n-1],其中,a为所述标记序号线性队列中最小的标记序号,n为所述固定长度; A second possible embodiment of the above embodiment assumed a first possible embodiment, it is possible to provide in a first embodiment as a base, the indicia on the queue is provided with a fixed number of linear movement of the detection window length , the initial state, the detection range of the window covering as [a, a + n-1], wherein, a is the number linear marking indicia minimum queue number, said n-fixed length;

所述当连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序,包括: When the consecutive number corresponding to the acquired transmission sequence number position mark discontinuous, determine packet loss or scrambled, comprising:

当所述发送序号对应的标记序号不在所述检测窗口覆盖范围内时,移动所述检测窗口,使得所述检测窗口覆盖的最大标记序号为所述发送序号对应的标记序号; When the transmission sequence number corresponding to the number of markers detected is not within the coverage area of ​​the window, the detection window is moved, so that the maximum sequence number of the mark detection window covering send sequence number corresponding to the number marked;

当所述最大标记序号与所述检测窗口移动前覆盖的最大标记序号之间的序号跨度大于1时,确定有数据包丢失或乱序。 When the maximum number between markers before the sequence number of the mobile coverage of the maximum number and a mark detection window span greater than 1, determined that there is packet loss or scrambled.

在第二种可能的实施方式作为基础而提供的第三种可能的实施方式中,所述确定有数据包丢失或乱序,包括: In a third possible embodiment of a second possible embodiment provided on the basis of the determined data packet is lost or out of order, comprising:

确定所述检测窗口移动前覆盖的最大标记序号,与移动后覆盖的最大标记序号之间的标记序号对应的数据包丢失或乱序。 Reference numerals determining the maximum detection window before moving the cover, corresponding to the number of marks between the marks the maximum number of mobile coverage after packet loss or scrambled.

在第一种、第二种或第三种可能的实施方式作为基础而提供的第四种可能的实施方式中,将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记,包括: In a fourth first, second or third possible embodiment provided as a basis for a possible embodiment, the preset number of linear tag queue for the send sequence number corresponding to the ordinal position of mark markers, including:

将预置的标记序号线性队列中与所述发送序号对应的标记序号位置标记为已接收状态,所述标记序号线性队列中标记序号位置被标记前为未接收状态。 The preset number mark linear transmission queue tag number position mark number corresponding to the state as received, the queue tag number linear position marker sequence number is marked as not received prior state.

在第四种可能的实施方式作为基础而提供的第五种可能的实施方式中,所述确定有数据包丢失或乱序之后,所述方法还包括: After the fifth possible embodiment of a fourth possible embodiment provided on the basis of the determined data packet is lost or out of order, said method further comprising:

判断确定为丢失或乱序的数据包对应的标记序号脱离所述检测窗口覆盖后,是否仍为未接收状态; Analyzing determined as missing or out of order data packets corresponding to said mark detection window number from the cover, if the state is still not received;

若是,则判定所述确定为丢失或乱序的数据包已丢失。 If, it is determined that the determination is missing or out of order data packets have been lost.

本发明实施例中的检测数据包的装置可以为终端,也可以为服务器,当所述检测数据包的装置为服务器时: Examples of means for detecting a data packet may be a terminal, a server may implement the present invention, when the device detection data packet for the server:

图8是本发明实施例服务器600的结构示意图。 FIG 8 is a schematic structural diagram of a server 600 of the present invention. 服务器600可包括输入设备601、输出设备604、处理器602和存储器603。 Server 600 may include an input device 601, an output device 604, a processor 602 and memory 603.

存储器603可以包括只读存储器和随机存取存储器,并向处理器602提供指令和数据。 The memory 603 may include read only memory and random access memory, and processor 602 provides instructions and data. 存储器603的一部分还可以包括非易失性随机存取存储器(NVRAM)。 Portion of the memory 603 may also include non- volatile random access memory (NVRAM).

存储器603存储了如下的元素,可执行模块或者数据结构,或者它们的子集,或者它们的扩展集: The memory 603 stores the following elements, executable modules or data structures, or a subset or superset thereof:

操作指令:包括各种操作指令,用于实现各种操作。 Instruction: includes various operation instructions to implement various operations.

操作系统:包括各种系统程序,用于实现各种基础业务以及处理基于硬件的任务。 Operating system: including various system programs for implementing various basic services and process hardware-based tasks.

在本发明实施例中,处理器602通过调用存储器603存储的操作指令(该操作指令可存储在操作系统中),执行如下操作: In an embodiment of the present invention, processor 602 by calling operation instruction stored in memory 603 (the operation instructions may be stored in the operating system), perform the following operations:

获取接收到的数据包的发送序号; Get send sequence number of the received data packet;

将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记; The preset number of linear tag queue send sequence number corresponding to the ordinal position of mark marking;

当连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序。 When two consecutive number corresponding to the acquired transmission sequence number position mark discontinuous, determine packet loss or scrambled.

本发明实施例中,服务器600采用获取接收到的数据包的发送序号;将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记;当连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序。 Embodiments of the present invention, the server 600 acquires the received data using the packet send sequence number; preset queue tag number linear to the send sequence number corresponding to the ordinal position of mark marking; when two consecutive transmission sequence number corresponding to the acquired when the ordinal position of mark discontinuous, determine packet loss or scrambled. 这样,服务器600作为数据发送方,在不可靠传输过程中,服务器600检测到有数据包丢失时,可以仅仅对丢失后的数据包向数据发送方发送重传请求,从而在保证网络最大化利用的前提下,降低了真正丢包的概率;当服务器600检测到有数据包乱序时,可以预先采取调整措施,从而保证传输的音视频文件能够正常播放,提高了不可靠传输的可靠性。 Thus, server 600 as a data sender, unreliable transmission process, the server 600 detects that a packet loss, a retransmission request can be transmitted only to the sender of the data packet after the loss, thus ensuring maximum use of the network under the premise of reducing the probability of loss of true; server 600 detects when a packet is out of order, it can be adjusted in advance to take measures to ensure the transmission of audio and video files can be normal play, improving the reliability of an unreliable transmission.

处理器602控制服务器600的操作,处理器602还可以称为CPU(Central Processing Unit,中央处理单元)。 The processor 602 controls the operation of server 600, processor 602 may also be referred to as a CPU (Central Processing Unit, central processing unit). 存储器603可以包括只读存储器和随机存取存储器,并向处理器602提供指令和数据。 The memory 603 may include read only memory and random access memory, and processor 602 provides instructions and data. 存储器603的一部分还可以包括非易失性随机存取存储器(NVRAM)。 Portion of the memory 603 may also include non- volatile random access memory (NVRAM). 具体的应用中,服务器600的各个组件通过总线系统605耦合在一起,其中总线系统605除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。 Particular application, the server 600 of the various components of system 605 are coupled together by a bus, wherein the bus system 605 in addition to a data bus, but also may include a power bus, a control bus, and a status signal bus, and the like. 但是为了清楚说明起见,在图中将各种总线都标为总线系统605。 However, for clarity, the various buses are labeled in FIG as the bus system 605.

上述本发明实施例揭示的方法可以应用于处理器602中,或者由处理器602实现。 The method of the above-described embodiment of the disclosed embodiment of the present invention may be applied to the processor 602, or implemented by the processor 602. 处理器602可能是一种集成电路芯片,具有信号的处理能力。 The processor 602 may be an integrated circuit chip having signal processing capability. 在实现过程中,上述方法的各步骤可以通过处理器602中的硬件的集成逻辑电路或者软件形式的指令完成。 During implementation, the steps of the method described above can be accomplished by the processor 602 in hardware or software in the form of an integrated logic circuit command. 上述的处理器602可以是通用处理器、数字信号处理器(DSP)、 专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。 The above-described processor 602 may be a general purpose processor, a digital signal processor (DSP), application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. 可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。 It may implement or execute the methods disclosed embodiment, the steps and logic diagram of the present embodiment of the invention. 通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。 A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. 结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。 The steps of the method according to the present invention, the disclosed embodiments may be embodied directly in hardware performing the decoding completion of the processor, or a combination of hardware and the decoding processor software module executed is completed. 软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。 Software module may reside in random access memory, flash memory, read only memory, programmable read-only memory or an electrically erasable programmable memory storage medium mature, register or the like in the art. 该存储介质位于存储器603,处理器602读取存储器603中的信息,结合其硬件完成上述方法的步骤。 The information storage medium is located in memory 603, processor 602 reads the memory 603, combined with the step of the above process hardware.

可选地,所述标记序号线性队列上设置有固定长度的移动性检测窗口,初始状态下,所述检测窗口的覆盖范围为[a,a+n-1],其中,a为所述标记序号线性队列中最小的标记序号,n为所述固定长度; Alternatively, the label is provided with a fixed length of the moving linear detection window number queue, in the initial state, coverage of the detection window is [a, a + n-1], wherein, a is the marker Reference numerals smallest linear queue number, n is a fixed length;

处理器602当所述发送序号对应的标记序号不在所述检测窗口覆盖范围内时,移动所述检测窗口,使得所述检测窗口覆盖的最大标记序号为所述发送序号对应的标记序号; When the processor 602 when the transmission sequence number corresponding to the number of markers detected is not within the coverage area of ​​the window, the detection window is moved, so that the maximum sequence number of the mark detection window covering send sequence number corresponding to the number marked;

当所述最大标记序号与所述检测窗口移动前覆盖的最大标记序号之间的序号跨度大于1时,确定有数据包丢失或乱序。 When the maximum number between markers before the sequence number of the mobile coverage of the maximum number and a mark detection window span greater than 1, determined that there is packet loss or scrambled.

处理器602确定所述检测窗口移动前覆盖的最大标记序号,与移动后覆盖的最大标记序号之间的标记序号对应的数据包丢失或乱序。 Detecting processor 602 determines the maximum number flag before moving the window covering, corresponding to the number of marks between the marks the maximum number of mobile coverage after packet loss or scrambled.

处理器602将预置的标记序号线性队列中与所述发送序号对应的标记序号位置标记为已接收状态,所述标记序号线性队列中标记序号位置被标记前为未接收状态。 The pre-processor 602 marks the number of linear transmission queue tag number position mark number corresponding to the state as received, the queue tag number linear position marker sequence number is marked as not received prior state.

处理器602还在确定有数据包丢失或乱序之后, Processor 602 also determines a packet is lost or scrambled after

判断确定为丢失或乱序的数据包对应的标记序号脱离所述检测窗口覆盖后,是否仍为未接收状态; Analyzing determined as missing or out of order data packets corresponding to said mark detection window number from the cover, if the state is still not received;

若是,则判定所述确定为丢失或乱序的数据包已丢失。 If, it is determined that the determination is missing or out of order data packets have been lost.

本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存 储介质中,存储介质可以包括:ROM、RAM、磁盘或光盘等。 Those of ordinary skill in the art can appreciate that various embodiments of the method of the above-described embodiments all or part of the steps may be by a program instructing relevant hardware to complete, the program may be stored in a computer-readable storage medium, the storage medium may include: ROM, RAM, magnetic or optical disk.

以上对本发明实施例所提供的检测数据包的方法、装置及存储介质进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。 The method of detection of the data packet provided by the above embodiment of the present invention, apparatus and storage medium described in detail herein through specific examples of the principles and embodiments of the invention are set forth in the above embodiment will be described only to help understanding of the method and core ideas of the present invention; while those of ordinary skill in the art, according to the ideas of the present invention, there are modifications to the specific embodiments and application scope of the specification content is not It should be construed as limiting the present invention.

Claims (11)

  1. 一种检测数据包的方法,其特征在于,包括: A method for detecting a data packet, characterized by comprising:
    获取接收到的数据包的发送序号; Get send sequence number of the received data packet;
    将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记; The preset number of linear tag queue send sequence number corresponding to the ordinal position of mark marking;
    当连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序。 When two consecutive number corresponding to the acquired transmission sequence number position mark discontinuous, determine packet loss or scrambled.
  2. 根据权利要求1所述的方法,其特征在于,所述标记序号线性队列上设置有固定长度的移动性检测窗口,初始状态下,所述检测窗口的覆盖范围为[a,a+n-1],其中,a为所述标记序号线性队列中最小的标记序号,n为所述固定长度; The method according to claim 1, wherein the marker is provided on the linear number of the detection window movement queue has a fixed length, in the initial state, coverage of the detection window is [a, a + n-1 ], where, a is a queue tag number smallest linear tag number, said n-fixed length;
    所述当连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序,包括: When the consecutive number corresponding to the acquired transmission sequence number position mark discontinuous, determine packet loss or scrambled, comprising:
    当所述发送序号对应的标记序号不在所述检测窗口覆盖范围内时,移动所述检测窗口,使得所述检测窗口覆盖的最大标记序号为所述发送序号对应的标记序号; When the transmission sequence number corresponding to the number of markers detected is not within the coverage area of ​​the window, the detection window is moved, so that the maximum sequence number of the mark detection window covering send sequence number corresponding to the number marked;
    当所述最大标记序号与所述检测窗口移动前覆盖的最大标记序号之间的序号跨度大于1时,确定有数据包丢失或乱序。 When the maximum number between markers before the sequence number of the mobile coverage of the maximum number and a mark detection window span greater than 1, determined that there is packet loss or scrambled.
  3. 根据权利要求2所述的方法,其特征在于,所述确定有数据包丢失或乱序,包括: The method according to claim 2, wherein said determining a packet is lost or out of order, comprising:
    确定所述检测窗口移动前覆盖的最大标记序号,与移动后覆盖的最大标记序号之间的标记序号对应的数据包丢失或乱序。 Reference numerals determining the maximum detection window before moving the cover, corresponding to the number of marks between the marks the maximum number of mobile coverage after packet loss or scrambled.
  4. 根据权利要求2-3任一所述的方法,其特征在于,将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记,包括: The method according to any one of claims 2-3, characterized in that the preset number of labeled linear transmission queue number corresponding to the number of marking locations marker, comprising:
    将预置的标记序号线性队列中与所述发送序号对应的标记序号位置标记为已接收状态,所述标记序号线性队列中标记序号位置被标记前为未接收状态。 The preset number mark linear transmission queue tag number position mark number corresponding to the state as received, the queue tag number linear position marker sequence number is marked as not received prior state.
  5. 根据权利要求4所述的方法,其特征在于,所述确定有数据包丢失或乱序之后,所述方法还包括: After the method as claimed in claim 4, wherein said determining a packet is lost or out of order, said method further comprising:
    判断确定为丢失或乱序的数据包对应的标记序号脱离所述检测窗口覆盖 后,是否仍为未接收状态; Analyzing determined as missing or out of order data packets corresponding to said mark detection window number from the cover, if the state is still not received;
    若是,则判定所述确定为丢失或乱序的数据包已丢失。 If, it is determined that the determination is missing or out of order data packets have been lost.
  6. 一种检测数据包的装置,其特征在于,包括: An apparatus for detecting a data packet, characterized by, comprising:
    获取单元,用于获取接收到的数据包的发送序号; Obtaining unit, configured to obtain the received data packet send sequence number;
    标记单元,用于将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记; Marking unit, for marking the preset number corresponding to the number of linear transmission queue tag number and position of the mark;
    确定单元,用于当所述获取单元连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序。 Determination means for, when said acquisition unit acquires two consecutive transmission sequence number corresponding to the ordinal position of mark discontinuous, determine packet loss or scrambled.
  7. 根据权利要求6所述的装置,其特征在于,所述标记单元标记的所述标记序号线性队列上设置有固定长度的移动性检测窗口,初始状态下,所述检测窗口的覆盖范围为[a,a+n-1],其中,a为所述标记序号线性队列中最小的标记序号,n为所述固定长度; The apparatus according to claim 6, wherein said linear tag queue number provided on the marking unit marks, shifting the detection window of a fixed length, in the initial state, coverage of the detection window is [a , a + n-1], wherein, a is the number linear marking indicia minimum queue number, n is a fixed length;
    所述确定单元,还用于当所述发送序号对应的标记序号不在所述检测窗口覆盖范围内时,移动所述检测窗口,使得所述检测窗口覆盖的最大标记序号为所述发送序号对应的标记序号;当所述最大标记序号与所述检测窗口移动前覆盖的最大标记序号之间的序号跨度大于1时,确定有数据包丢失或乱序。 When the determination unit is further configured to send sequence number when the sequence number corresponding to the mark is not detected within the coverage area of ​​the window, the detection window is moved, so that the maximum number of the tag detection window is covered with the send sequence number corresponding to Reference numerals; when the maximum number of marks between the maximum number and a serial number tag cover before moving the detection window span greater than 1, determined that there is packet loss or scrambled.
  8. 根据权利要求7所述的装置,其特征在于, The apparatus according to claim 7, wherein,
    所述确定单元具体用于确定所述检测窗口移动前覆盖的最大标记序号,与移动后覆盖的最大标记序号之间的标记序号对应的数据包丢失或乱序。 The determining unit is configured to determine the maximum detection flag sequence number window before moving the cover, corresponding to the number of marks between the marks the maximum number of mobile coverage after packet loss or scrambled.
  9. 根据权利要求7-8任一所述的装置,其特征在于,所述标记单元具体用于将预置的标记序号线性队列中与所述发送序号对应的标记序号位置标记为已接收状态,所述标记序号线性队列中标记序号位置被标记前为未接收状态。 An apparatus according to any one of claims 7-8, wherein said marking unit configured to mark a preset number of linear transmission queue number corresponding to the ordinal position of mark state is marked as received, the said linear tag serial number in the queue before the labeled location is marked as non-receiving state.
  10. 根据权利要求9所述的装置,其特征在于,所述装置还包括: The apparatus according to claim 9, characterized in that said apparatus further comprises:
    判断单元,用于判断确定为丢失或乱序的数据包对应的标记序号脱离所述检测窗口覆盖后,是否仍为未接收状态; Judging means for judging as to determine lost or out of order data packets corresponding to the detected tag ID from the rear window covers, whether or not the state is still not received;
    所述确定单元,还用于当所述判断单元判断出确定为丢失或乱序的数据包对应的标记序号脱离所述检测窗口覆盖后仍为未接收状态时,则判定所述确定为丢失或乱序的数据包已丢失。 The determining unit is further configured to, when said determination means determines that a determination of the missing or out of order packet sequence number from the corresponding mark detecting window covering state is still not received, it is determined that the determination is missing or out of order packets have been lost.
  11. 一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行上述权利要求1-5任一项所述的检测数据包的方法。 Storage medium comprising computer-executable instructions, the computer-executable instructions for performing the above-described method for detecting the data packet according to any one of claims 1-5 when executed by a computer processor.
PCT/CN2014/088153 2013-10-21 2014-10-08 Method and device for detecting data packet, and storage medium WO2015058613A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN 201310495811 CN103501259B (en) 2013-10-21 2013-10-21 A method of detecting the packet loss detecting means and
CN201310495811.9 2013-10-21

Publications (1)

Publication Number Publication Date
WO2015058613A1 true true WO2015058613A1 (en) 2015-04-30

Family

ID=49866434

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/088153 WO2015058613A1 (en) 2013-10-21 2014-10-08 Method and device for detecting data packet, and storage medium

Country Status (2)

Country Link
CN (1) CN103501259B (en)
WO (1) WO2015058613A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103501259B (en) * 2013-10-21 2016-08-31 腾讯科技(深圳)有限公司 A method of detecting the packet loss detecting means and
CN105471825A (en) * 2014-09-03 2016-04-06 中兴通讯股份有限公司 Method and device for identifying lost data message
CN105607859A (en) * 2016-03-02 2016-05-25 腾讯科技(深圳)有限公司 Data processing method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488841A (en) * 2009-02-18 2009-07-22 中兴通讯股份有限公司 Frame retransmission method and apparatus for radio link protocol
CN101527927A (en) * 2008-03-04 2009-09-09 大唐移动通信设备有限公司 Data receiving method and data receiving device for radio link control layer in long time evolution system
CN102333337A (en) * 2011-10-11 2012-01-25 中兴通讯股份有限公司 Script transmission method, wireless network simulation system (iNES) and server
US20130044595A1 (en) * 2011-08-19 2013-02-21 Futurewei Technologies, Inc. System and Method for Transmission Control Protocol Service Delivery in Wireless Communications Systems
CN103338131A (en) * 2013-06-20 2013-10-02 百度在线网络技术(北京)有限公司 Method and equipment for testing log transmitting loss rate
CN103501259A (en) * 2013-10-21 2014-01-08 腾讯科技(深圳)有限公司 Packet loss detection method and detector

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101527927A (en) * 2008-03-04 2009-09-09 大唐移动通信设备有限公司 Data receiving method and data receiving device for radio link control layer in long time evolution system
CN101488841A (en) * 2009-02-18 2009-07-22 中兴通讯股份有限公司 Frame retransmission method and apparatus for radio link protocol
US20130044595A1 (en) * 2011-08-19 2013-02-21 Futurewei Technologies, Inc. System and Method for Transmission Control Protocol Service Delivery in Wireless Communications Systems
CN102333337A (en) * 2011-10-11 2012-01-25 中兴通讯股份有限公司 Script transmission method, wireless network simulation system (iNES) and server
CN103338131A (en) * 2013-06-20 2013-10-02 百度在线网络技术(北京)有限公司 Method and equipment for testing log transmitting loss rate
CN103501259A (en) * 2013-10-21 2014-01-08 腾讯科技(深圳)有限公司 Packet loss detection method and detector

Also Published As

Publication number Publication date Type
CN103501259A (en) 2014-01-08 application
CN103501259B (en) 2016-08-31 grant

Similar Documents

Publication Publication Date Title
CN102832975A (en) Data transmission method, data transmission device and terminal with touch screen
CN103414766A (en) Method, device and terminal equipment for installing application
CN103458016A (en) Method and device for picture management and terminal device
CN103365419A (en) Method and device for triggering alarm clock control command
CN103312597A (en) Voice message generating method and voice message generating device
CN103401982A (en) Information display method and device and mobile terminal
CN103473092A (en) Method and device for processing downloaded applications and terminal equipment
CN103513769A (en) Method, device and mobile terminal for setting key function
CN103294515A (en) Method, device and system for acquiring application programs
US20150111616A1 (en) Electronic device, control method, and control program
US20140112120A1 (en) Server, client device, and control methods thereof
CN103488450A (en) Method, device and terminal equipment for projecting picture
US20130254345A1 (en) Method and apparatus for receiving multimedia contents
CN103455256A (en) Method and terminal for rotating display picture of screen
CN103389863A (en) Display control method and device
US20150304336A1 (en) Multi-screen interaction method of multimedia resource and terminal device
US20140317483A1 (en) Method and terminal for adding quick link
CN204886955U (en) The antenna device and a mobile terminal
WO2015067169A1 (en) Method, apparatus and terminal device for obtaining call log
CN103390034A (en) Image display method, device, terminal and server
US20140366094A1 (en) Communication method, communication apparatus and terminal
CN104571787A (en) Message display method and communication terminal
CN103631625A (en) Data acquisition method, user terminal, server and system
CN104123210A (en) Method, device and system for testing performance of browser
WO2015043505A1 (en) Method, apparatus, and system for sending and receiving social network information

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase in:

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 06.09.2016)

122 Ep: pct application non-entry in european phase

Ref document number: 14856047

Country of ref document: EP

Kind code of ref document: A1