Search Images Maps Play YouTube News Gmail Drive More »
Sign in
Screen reader users: click this link for accessible mode. Accessible mode has the same essential features but works better with your reader.

Patents

  1. Advanced Patent Search
Publication numberWO2015058613 A1
Publication typeApplication
Application numberPCT/CN2014/088153
Publication date30 Apr 2015
Filing date8 Oct 2014
Priority date21 Oct 2013
Also published asCN103501259A, CN103501259B
Publication numberPCT/2014/88153, PCT/CN/14/088153, PCT/CN/14/88153, PCT/CN/2014/088153, PCT/CN/2014/88153, PCT/CN14/088153, PCT/CN14/88153, PCT/CN14088153, PCT/CN1488153, PCT/CN2014/088153, PCT/CN2014/88153, PCT/CN2014088153, PCT/CN201488153, WO 2015/058613 A1, WO 2015058613 A1, WO 2015058613A1, WO-A1-2015058613, WO2015/058613A1, WO2015058613 A1, WO2015058613A1
Inventors管坤, Kun GUAN, 曾新海, Xinhai ZENG
Applicant腾讯科技(深圳)有限公司, Tencent Technology (Shenzhen) Company Limited
Export CitationBiBTeX, EndNote, RefMan
External Links: Patentscope, Espacenet
Method and device for detecting data packet, and storage medium
WO 2015058613 A1
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.
Images(8)
Previous page
Next page
Claims(11)  translated from Chinese
  1. 一种检测数据包的方法,其特征在于,包括: A method for detecting data packets, characterized in that, comprising:
    获取接收到的数据包的发送序号; Get send sequence number of the received packet;
    将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记; The numbers mark the preset linear transmit queue number corresponding marker labeled with the ordinal position;
    当连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序。 When two consecutive acquired send sequence number corresponding to the ordinal position of mark is not continuous, determine packet loss or disorder.
  2. 根据权利要求1所述的方法,其特征在于,所述标记序号线性队列上设置有固定长度的移动性检测窗口,初始状态下,所述检测窗口的覆盖范围为[a,a+n-1],其中,a为所述标记序号线性队列中最小的标记序号,n为所述固定长度; The method according to claim 1, characterized in that said mark is provided on the queue has a fixed number of linear movement of the detection window length, the initial state, the coverage of the detection window is [a, a + n-1 ], wherein, a is the linear tag ID tag queue smallest number, n is the length of the fixed;
    所述当连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序,包括: Get twice when the send sequence number corresponding to the ordinal position mark is not continuous, determine packet loss or disorder, comprising:
    当所述发送序号对应的标记序号不在所述检测窗口覆盖范围内时,移动所述检测窗口,使得所述检测窗口覆盖的最大标记序号为所述发送序号对应的标记序号; When the send sequence number corresponding to the detected tag ID is not within the coverage of the window, move the detection window, so that the detection window covering maximum mark number is the number corresponding to the tag number sent;
    当所述最大标记序号与所述检测窗口移动前覆盖的最大标记序号之间的序号跨度大于1时,确定有数据包丢失或乱序。 When the maximum number of the maximum mark ID tag number and the detection window before moving between coverage spans more than 1, it is determined there is packet loss or disorder.
  3. 根据权利要求2所述的方法,其特征在于,所述确定有数据包丢失或乱序,包括: A method according to claim 2, characterized in that said determination data is missing or out of order packets, comprising:
    确定所述检测窗口移动前覆盖的最大标记序号,与移动后覆盖的最大标记序号之间的标记序号对应的数据包丢失或乱序。 Determining whether the detected tag ID largest mobile coverage of the front window, mark tag number and a serial number corresponding to the maximum coverage moved between packets lost or out of order.
  4. 根据权利要求2-3任一所述的方法,其特征在于,将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记,包括: 2-3 Method according to any one of the preceding claims, characterized in that the preset number of linear tag queue transmits the ID number corresponding to the marker position marker, comprising:
    将预置的标记序号线性队列中与所述发送序号对应的标记序号位置标记为已接收状态,所述标记序号线性队列中标记序号位置被标记前为未接收状态。 The preset number of linear tag queue send sequence number corresponding to the position marked with the tag ID as reception state, the tag ID number linear position of the front marking the queue is marked as non-reception state.
  5. 根据权利要求4所述的方法,其特征在于,所述确定有数据包丢失或乱序之后,所述方法还包括: After the method according to claim 4, wherein said determination data is missing or out of order packets, the method further comprising:
    判断确定为丢失或乱序的数据包对应的标记序号脱离所述检测窗口覆盖 后,是否仍为未接收状态; Analyzing determined to be lost or out of order data packets corresponding to the detected tag ID from the window covering, the state is still not received;
    若是,则判定所述确定为丢失或乱序的数据包已丢失。 If it is determined that the determination is missing or out of order packet it has been lost.
  6. 一种检测数据包的装置,其特征在于,包括: An apparatus for detecting a packet, characterized by comprising:
    获取单元,用于获取接收到的数据包的发送序号; Acquisition means for acquiring the received data packet send sequence number;
    标记单元,用于将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记; Marking means for marking the preset number of linear transmission queue tag ID number corresponding to the marker position;
    确定单元,用于当所述获取单元连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序。 Determining means for obtaining time when the unit is sent twice to obtain the corresponding mark ordinal position number is not continuous, determine packet loss or disorder.
  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 has a fixed length of mark detection window mobility, the initial state, the coverage of the detection window is [a , a + n-1], wherein, a is the linear tag ID tag queue smallest number, n is the length of the fixed;
    所述确定单元,还用于当所述发送序号对应的标记序号不在所述检测窗口覆盖范围内时,移动所述检测窗口,使得所述检测窗口覆盖的最大标记序号为所述发送序号对应的标记序号;当所述最大标记序号与所述检测窗口移动前覆盖的最大标记序号之间的序号跨度大于1时,确定有数据包丢失或乱序。 When the determination unit is further configured to send sequence number corresponding to when the tag ID is not detected within the coverage of the window, moving the detection window, so that the detection window covering maximum number of marks corresponding to the send sequence number tag number; when the sequence number of the tag number and a maximum number of the maximum mark detection window before moving between coverage spans more than 1, it is determined there is packet loss or disorder.
  8. 根据权利要求7所述的装置,其特征在于, The apparatus of claim 7, wherein, wherein,
    所述确定单元具体用于确定所述检测窗口移动前覆盖的最大标记序号,与移动后覆盖的最大标记序号之间的标记序号对应的数据包丢失或乱序。 The determination unit is configured to determine the maximum mark No. window covering the front of the mobile detection, marking tag number and a serial number corresponding to the maximum movement between the rear cover of the packet loss or disorder.
  9. 根据权利要求7-8任一所述的装置,其特征在于,所述标记单元具体用于将预置的标记序号线性队列中与所述发送序号对应的标记序号位置标记为已接收状态,所述标记序号线性队列中标记序号位置被标记前为未接收状态。 7-8 apparatus according to any one of the preceding claims, characterized in that said marker unit specific marker for the preset number of linear transmission queue number corresponding to the ordinal position of the marker is marked as received state, the said linear queue tag ID tag before the ordinal position is marked as not receiving state.
  10. 根据权利要求9所述的装置,其特征在于,所述装置还包括: The apparatus according to claim 9, characterized in that said apparatus further comprises:
    判断单元,用于判断确定为丢失或乱序的数据包对应的标记序号脱离所述检测窗口覆盖后,是否仍为未接收状态; Judgment means for judging identified as missing or out of order packets corresponding tag numbers from the window covering the post-test, if still not receiving state;
    所述确定单元,还用于当所述判断单元判断出确定为丢失或乱序的数据包对应的标记序号脱离所述检测窗口覆盖后仍为未接收状态时,则判定所述确定为丢失或乱序的数据包已丢失。 The determination unit is further for, when said determination means determines that the reception state is not determined remain missing or out of order data packets corresponding to the detected tag ID from the rear window covering when it is determined that the determination is missing or out of order packet it has been lost.
  11. 一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行上述权利要求1-5任一项所述的检测数据包的方法。 A storage medium containing computer-executable instructions, the computer-executable instructions, when executed by a computer processor for executing the preceding packet detection method according to any one of claim 1-5.
Description  translated from Chinese
一种检测数据包的方法、装置及存储介质 A method of detecting packet method, apparatus and storage medium

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

技术领域 Technical Field

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

背景技术 Background

终端通过用户数据协议(User Data Protocol,UDP)向服务器发送网络数据,通常将数据按照指定大小切片后,加上发送序号传输。 End user data protocol (User Data Protocol, UDP) network by sending data to the server, usually the data according to the specified size sliced, plus send sequence number transmission.

网络数据传输分为可靠传输和不可靠传输。 Network data transmission into reliable transmission and unreliable transport.

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

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

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

发明内容 DISCLOSURE

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

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

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

将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记; The numbers mark the preset linear transmit queue number corresponding marker labeled with the ordinal position;

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

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

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

所述当连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序,包括: Get twice when the send sequence number corresponding to the ordinal position mark is not continuous, determine packet loss or disorder, comprising:

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

当所述最大标记序号与所述检测窗口移动前覆盖的最大标记序号之间的序号跨度大于1时,确定有数据包丢失或乱序。 When the maximum number of the maximum mark ID tag number and the detection window before moving between coverage spans more than 1, it is determined there is packet loss or disorder.

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

所述确定有数据包丢失或乱序,包括: Said determining a packet is lost or out of order, including:

确定所述检测窗口移动前覆盖的最大标记序号,与移动后覆盖的最大标记序号之间的标记序号对应的数据包丢失或乱序。 Determining whether the detected tag ID largest mobile coverage of the front window, mark tag number and a serial number corresponding to the maximum coverage moved between packets lost or out of order.

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

将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记,包括: The numbers mark the preset linear transmit queue and the number corresponding to the ordinal position of labeled markers, including:

将预置的标记序号线性队列中与所述发送序号对应的标记序号位置标记为已接收状态,所述标记序号线性队列中标记序号位置被标记前为未接收状态。 The preset number of linear tag queue send sequence number corresponding to the position marked with the tag ID as reception state, the tag ID number linear position of the front marking the queue is marked as non-reception state.

结合第一方面第三种可能的实现方式,在第四种可能的实现方式中,所述 确定有数据包丢失或乱序之后,所述方法还包括: Connection with the first aspect of the third possible implementation, the fourth possible implementations, the data packet is determined out of order or lost after the method further comprising:

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

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

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

获取单元,用于获取接收到的数据包的发送序号; Acquisition means for acquiring the received data packet send sequence number;

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

确定单元,用于当所述获取单元连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序。 Determining means for obtaining time when the unit is sent twice to obtain the corresponding mark ordinal position number is not continuous, determine packet loss or disorder.

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

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

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

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

所述确定单元具体用于确定所述检测窗口移动前覆盖的最大标记序号,与移动后覆盖的最大标记序号之间的标记序号对应的数据包丢失或乱序。 The determination unit is configured to determine the maximum mark No. window covering the front of the mobile detection, marking tag number and a serial number corresponding to the maximum movement between the rear cover of the packet loss or disorder.

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

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

判断单元,用于判断确定为丢失或乱序的数据包对应的标记序号脱离所述 检测窗口覆盖后,是否仍为未接收状态; Judgment means for judging identified as missing or out of order packets corresponding tag numbers from the window covering the post-test, if still not receiving state;

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

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

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

附图说明 Brief Description

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。 In order to more clearly illustrate the technical solution example embodiment of the present invention, will implement the following figures for the cases described in the need to use a simple introduction, Obviously, the following description of the drawings are only some embodiments of the invention, For this skill in the art, without creative efforts of the premise, you can also obtain other drawings based on these drawings.

图1是本发明实施例中检测数据包的方法的一实施例示意图; Figure 1 is an embodiment of the method of the embodiment of the invention in a schematic view of a packet is detected;

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

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

图4是本发明实施例中检测数据包的方法的另一实施例示意图; Figure 4 is another example of a method to detect data packets embodiment of the invention schematic illustration;

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

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

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

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

具体实施方式 DETAILED DESCRIPTION

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

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。 The present invention will now be combined with the implementation of the drawings, it was a clear example of the technical solutions of the present invention, a complete description of, obviously, the described embodiments are only part of the embodiments of the present invention, but not all embodiments. 基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。 Based on the embodiments of the present invention, those skilled in all other embodiments not made without creative efforts obtained are within the scope of protection of the present invention.

参阅图1,本发明实施例提供的检测数据包的方法包括:步骤101至步骤103。 1, the present invention detects a packet see FIG embodiment provided includes: a step 101 to step 103.

步骤101中,获取接收到的数据包的发送序号。 Step 101, it gets sent to the number of packets received.

由于数据包发送方在发送数据包时,会在数据包中写入数据包的发送序号,因此,数据接收方接收到数据包后,能够从中得到数据包的发送序号。 After Since the data packet sender when sending packets, packet send sequence number is written in the data package, therefore, the data recipient receives a packet, you can derive the packet send sequence number.

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

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

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

本实施例中,所述连续两次获取可以理解为两次获取,且该两次获取的发送序号连续。 In this embodiment, the acquisition can be understood as two consecutive twice acquired, and the acquired two consecutive 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 packet 11, the first number corresponding to the acquired transmission sequence number of marks 11; the send sequence number of the received second data packet and the second 15 Get the serial number corresponding to the transmission number is marked 15, whereby it can be determined, the first transmission sequence number corresponding to the acquired tag ID number corresponding to the transmission sequence number of the second tag ID acquired in a linear queue discontinuous, i.e. He said the twice acquired send sequence number corresponding to the number of linear mark ordinal position in the queue is not continuous, so you can determine mark No. 11 and No. 12, 13, 15 and 14 between the corresponding packet loss or chaos sequence, i.e., numbers 12-14 corresponding completely received packet may not (i.e., loss), it is possible to receive, after receiving the corresponding packet sequence number 15 (i.e. out of order).

可以看出,在不可靠传输过程中,数据接收方通过采用上述实施例提供的检测数据包的方法,能够实现对数据包的丢失或乱序进行检测,这样,当数据接收方检测到有数据包丢失时,可以仅仅对丢失后的数据包向数据发送方发送重传请求,从而在保证网络最大化利用的前提下,降低了真正丢包的概率;当数据接收方检测到有数据包乱序时,可以预先采取调整措施,从而保证传输的音视频文件能够正常播放,提高了不可靠传输的可靠性。 As can be seen, unreliable transmission, data reception detection packet by using the method provided in the embodiments described above can be achieved for lost or out of order packets can be detected, so that when the data receiver detects data When packet loss, packet loss can only after the sender sends the data retransmission request, so the premise of ensuring maximum utilization of the network, reducing the probability of loss is real; when the receiver detects data packets chaos timing, adjustment measures can be taken in advance to ensure the transmission of audio and video files can play correctly, to improve the reliability of an unreliable transmission.

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

所述当连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序,可以包括: Get twice when the send sequence number corresponding to the ordinal position mark is not continuous, determine packet loss or out of order, they may include:

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

当所述最大标记序号与所述检测窗口移动前覆盖的最大标记序号之间的序号跨度大于1时,确定有数据包丢失或乱序。 When the maximum number of the maximum mark ID tag number and the detection window before moving between coverage spans more than 1, it is determined there is packet loss or disorder.

本发明实施例中,移动性检测窗口的长度可以预先规定好,例如:可以设定为1024个序号长度,也可以为其他数量个序号长度,如1025、1026、1027….2048等等。 Embodiment of the invention, the length of the detection window of mobility can be pre-ordained, 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 and so on ... .2048.

以移动性检测窗口的长度是1024为例,参阅图2,在初始时刻,移动性检测窗口的左侧在标记序号线性队列标记序号0的位置,右侧在标记序号1023的位置,也可以说,移动性检测窗口覆盖的最小标记序号为0,覆盖的最大标记序号为1023。 Mobility in length detection window is 1024, for example, refer to Figure 2, at the initial moment, the left movement in the mark detection window ID tag number linear queue position 0, the right of the mark ordinal position 1023, it can be said , minimum mark detection window covering mobile number is 0, the maximum coverage for 1023 mark number. 当接收到的数据包的发送序号小于1024时,该移动性检测窗口不移 动;当接收到的数据包的发送序号大于1023时,该移动性检测窗口向标记序号线性队列的队尾方向即标记序号增大的方向移动。 When the send sequence number of the received packet is less than 1024, the mobile detection window does not move; when the send sequence number of the received packet is greater than 1023, the linear movement of the detection window to mark end of the queue number that is marked direction increasing the number of direction. 以接收到的数据包的发送序号是1024为例,该移动性检测窗口移动后,覆盖的最大标记序号变为1024,覆盖的最小标记序号变为1,该移动性检测窗口向右移动了1个序号的位移,可以确定没有数据包丢失或乱序。 In the received packet send sequence number is 1024, for example, after the mobile detection window moves, marking the largest number coverage becomes 1024, covering a minimum mark number becomes 1, the mobile detection window move 1 right the displacement of a number, you can make sure that no packet loss or disorder.

参阅图3,当数据接收方接收到发送序号为1024的数据包之后,紧接着接收到的数据包的发送序号是1027时,该移动性检测窗口就要向右移动3个序号的位移,其覆盖的最大标记序号从1024变为1027,覆盖的最小标记序号从1变为4,该移动性检测窗口一次性移动的序号跨度为3,3大于1,可以确定序号为1025和1026的数据包丢失或乱序。 Referring to Figure 3, when the data received by the receiver for the packet send sequence number 1024, followed by sending the serial number of the received packet is the 1027, the mobile detection window should move to the right shift three numbers, which maximum marker number covered from 1024 into 1027, covering a minimum mark number from 1 to 4, the mobility-time movement detection window number greater than 1 span of 3,3, may be determined as a packet sequence number 1025 and 1026 missing or out of order.

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

确定所述检测窗口移动前覆盖的最大标记序号,与移动后覆盖的最大标记序号之间的标记序号对应的数据包丢失或乱序。 Determining whether the detected tag ID largest mobile coverage of the front window, mark tag number and a serial number corresponding to the maximum coverage moved between packets lost or out of order.

例如,参阅图3,在移动前,移动性检测窗口覆盖的最大标记序号为1024,移动后移动性检测窗口覆盖的最大标记序号为1027,直接跨过了标记序号1025和1026,因此,可以确定发送序号为1025和1026的数据包丢失或乱序。 For example, the maximum marker number refer to Figure 3, before moving, movement detection window covering 1024, marking the largest number of mobile detection window covering after moving to 1027, directly across the tag number 1025 and 1026, therefore, can be determined packet send sequence number of 1025 and 1026 are missing or out of order.

在上述图1对应的实施例或图1对应的任一实施例的基础上,本发明实施例提供的检测数据包的方法的另一实施例中,将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记,可以包括: Another method in the above embodiment of FIG. 1 corresponds or showing one embodiment of any one of the cases a reciprocal basis, test data packet according to an embodiment of the present invention embodiment, the pre-labeled with the number of linear queue said transmission numbers corresponding to mark ordinal position mark, may include:

将预置的标记序号线性队列中与所述发送序号对应的标记序号位置标记为已接收状态,所述标记序号线性队列中标记序号位置被标记前为未接收状态。 The preset number of linear tag queue send sequence number corresponding to the position marked with the tag ID as reception state, the tag ID number linear position of the front marking the queue is marked as non-reception state.

如初始状态下,将标记序号线性队列中各个标记序号所在位置的值都设置为0,当数据接收方接收到发送序号与标记序号对应的或与标记序号相同的数据包时,则将对应的标记序号所在位置的值设置为1。 As the initial state, the value of the location where the tag number of each tag number linear queues are set to 0, when the data receiver receives the transmission sequence number and tag number or tag number corresponding to the same packet, then the corresponding set the value of the location where the tag number is 1.

在上一个实施例的基础上,本发明实施例提供的检测数据包的方法的另一实施例中,所述确定有数据包丢失或乱序之后,所述方法还可以包括: After the foundation of the one of the embodiment, another method for detecting packet provided in this embodiment of the invention, the determining data packet loss or out of order, the method may further comprise:

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

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

本发明实施例中,因数据包在传输过程中可能会乱序,针对图3中发送序号是1025或1026的数据包可能只是乱序导致接收延迟了,所以需要在一段时间后才能判断这两个数据包是否丢失。 Embodiments of the invention, because the packets in transit may be out of order for Figure 3 is a packet send sequence number 1025 or 1026 may be just out of order leads to a reception delay, so after a period of time required to determine both a packet is lost. 如当移动性检测窗口更进一步移向标记序号线性队列的队尾,而不再覆盖之前确认丢失或乱序的数据包对应的标记序号时,判断确认丢失或乱序的数据包对应的标记序号所在位置的值表示的状态是已接收还是未接收。 Such as when the movement of the detection window further toward the tail queue linear tag number, and the acknowledgment is lost or out of order packets corresponding tag numbers are no longer covered before the judge confirmed missing or out of order packets corresponding tag numbers state value indicates the location is received or not received. 如果状态是未接收,则可以判定之前确认丢失或乱序的数据包已丢失;如果状态是已接收,则可以判定之前确认丢失或乱序的数据包乱序。 If the status is not received, it can be determined missing or out of order acknowledgment packet is lost before; if the status is received, it can be determined or confirmed lost packets out of order out of order before. 参阅图4,移动前,移动性检测窗口覆盖的最小标记序号是1025,移动性检测窗口覆盖的最小标记序号是1026,这时就检测标记序号1025位置处所标记的状态,当检测到该位置的状态为未接收时,确定发送序号为1025的数据包丢失;如果状态是已接收,说明该发送序号为1025的数据包接收时发生乱序。 Referring to Figure 4, before moving, the minimum mark detection window covering mobile number is 1025, the minimum number of mobility mark detection window covering is 1026, then mark the position of spaces No. 1025 marked state is detected when it is detected that location status is not received, the packet send sequence number to determine the loss of 1025; if the status is received, indicating disorder occurs when the send sequence number of the received data packet 1025.

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

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

标记单元202用于将预置的标记序号线性队列中与所述获取单元201获取的发送序号对应的标记序号位置进行标记。 Marking unit 202 marks for the preset number of linear alignment with the acquisition unit 201 transmits the acquired tag ID number corresponding to the position mark.

确定单元203用于当所述获取单元201连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序。 Unit 203 for determining the time when the acquiring unit 201 transmits the acquired two consecutive numbers on the ordinal position of the mark is not continuous, determine packet loss or disorder.

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

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

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

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

当所述最大标记序号与所述检测窗口移动前覆盖的最大标记序号之间的序号跨度大于1时,确定有数据包丢失或乱序。 When the maximum number of the maximum mark ID tag number and the detection window before moving between coverage spans more than 1, it is determined there is packet loss or disorder.

,本发明实施例提供的检测数据包的装置中, Embodiment, the present invention apparatus for detecting packet example provided,

所述确定单元203可具体用于确定所述检测窗口移动前覆盖的最大标记序号,与移动后覆盖的最大标记序号之间的标记序号对应的数据包丢失或乱序。 The determination unit 203 may determine the specific numbers for the maximum mark before moving the detection window is covered, labeled with numbers corresponding to the maximum number of mobile and covered with marks between packets lost or out of order.

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

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

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

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

本发明实施例中的检测数据包的装置可以为终端,也可以为服务器。 Examples of the apparatus for detecting packets embodiment of the present invention may be terminal, but also for the server.

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

终端1200可以包括RF(Radio Frequency,射频)电路110、包括有一个或一个以上计算机可读存储介质的存储器120、输入单元130、显示单元140、传感器150、音频电路160、WiFi(wireless fidelity,无线保真)模块170、包括有一个或者一个以上处理核心的处理器180、以及电源190等部件。 Terminal 1200 can include RF (Radio Frequency, RF) circuit 110, comprising one or more computer-readable storage medium memory 120, an input unit 130, display unit 140, sensor 150, audio circuitry 160, WiFi (wireless fidelity, wireless fidelity) module 170, comprising one or more than one processing core processor 180, and a power supply 190 and other components. 本领域技术人员可以理解,图7中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。 Those skilled in the art can appreciate that the terminal structure shown in Figure 7 does not constitute a limitation of 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 to send and receive information or a call, after receiving and transmitting signals, in particular, the base station downlink information received by the one or more processors 180 process; in addition, the data relating to uplink to the base station . 通常,RF电路110包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM)卡、收发信机、耦合器、LNA(Low Noise Amplifier,低噪声放大器)、双工器等。 Typically, RF circuit 110 includes but is 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) , diplexers and so on. 此外,RF电路110还可以通过无线通信与网络和其他设备通信。 In addition, RF circuit 110 may also through wireless communications and other equipment to communicate with the network. 所述无线通信可以使用任一通信标准或协议,包括但不限于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 communications standards or protocols, including but not limited to GSM (Global System of Mobile communication, global system for mobile communications system), GPRS (General Packet Radio Service, General Packet Radio Service), CDMA (Code Division Multiple Access , Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access, WCDMA), LTE (Long Term Evolution, LTE), e-mail, SMS (Short Messaging Service, Short Message Service) and the like.

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

输入单元130可用于接收输入的数字或字符信息,以及产生与用户设置以 及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。 The input unit 130 may be used to enter numbers or characters of information received, and generates user settings and function controls relating to the keyboard, mouse, joystick or trackball optical signal input. 具体地,输入单元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 touch screen or trackpad, users can collect on or near the touch operation (such as the user using a finger, stylus and any other suitable object or accessory on the touch sensitive surface 131, or Nearby operating touch-sensitive surface 131), and drive the corresponding connection apparatus according to a preset program. 触敏表面131可包括触摸检测装置和触摸控制器两个部分。 The touch-sensitive surface 131 may comprise two parts touch detection device and the touch controller. 其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器180,并能接收处理器180发来的命令并加以执行。 Wherein, the touch detecting means detects a user touch position, and detecting a touch operation to bring the signal, the signal is transmitted to a touch controller; touch controller receives touch information from the touch detecting device, and convert it into contact coordinates, sending to processor 180, and can receive commands sent to the processor 180 and implemented. 此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面131。 In addition, the use of resistive, capacitive, infrared and surface acoustic wave type implementations, and other touch sensitive surface 131. 除了触敏表面131,输入单元130还可以包括其他输入设备132。 In addition to touch-sensitive surface 131, input unit 130 may also include other input devices 132. 具体地,其他输入设备132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。 In particular, other input devices 132 may include, but are not limited to, physical keyboard, function keys (such as volume control buttons, switches, keys, etc.), a trackball, a mouse, the operating lever in one or more of the like.

显示单元140可用于显示由用户输入的信息或提供给用户的信息以及终端1200的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。 The display unit 140 may be used to display information input by the user or provide a graphical user interface to a variety of user information and terminal 1200, which may be formed of a graphical user interface graphics, text, icons, video, and any combination thereof to form. 显示单元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, organic light emitting diodes) configured to form a display panel 141. 进一步的,触敏表面131可覆盖显示面板141,当触敏表面131检测到在其上或附近的触摸操作后,传送给处理器180以确定触摸事件的类型,随后处理器180根据触摸事件的类型在显示面板141上提供相应的视觉输出。 Further, the touch-sensitive surface 131 may cover the display panel 141, when the touch-sensitive surface 131 is detected on or near the touch operation after it, delivered to the processor 180 to determine the type of touch event, then processor 180 according to a touch event provide the appropriate 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 the input and output functions, in some embodiments, may be a touch sensitive surface 131 and the display panel 141 to achieve integration and input and output functions.

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

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

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

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

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

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

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

将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记; The numbers mark the preset linear transmit queue number corresponding marker labeled with the ordinal position;

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

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

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

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

当所述最大标记序号与所述检测窗口移动前覆盖的最大标记序号之间的序号跨度大于1时,确定有数据包丢失或乱序。 When the maximum number of the maximum mark ID tag number and the detection window before moving between coverage spans more than 1, it is determined there is packet loss or disorder.

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

确定所述检测窗口移动前覆盖的最大标记序号,与移动后覆盖的最大标记序号之间的标记序号对应的数据包丢失或乱序。 Determining whether the detected tag ID largest mobile coverage of the front window, mark tag number and a serial number corresponding to the maximum coverage moved between packets lost or out of order.

在第一种、第二种或第三种可能的实施方式作为基础而提供的第四种可能的实施方式中,所述终端的存储器中,还包含用于执行以下操作的指令: In a fourth the 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 of linear tag queue send sequence number corresponding to the position marked with the tag ID as reception state, the tag ID number linear position of the front marking the queue is marked as non-reception state.

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

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

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

综上所述,本实施例提供的终端,采用获取接收到的数据包的发送序号;将所述发送序号填充到预置的标记序号线性队列中对应的标记序号位置;当连续两次填充发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序。 In summary, the terminal provided in this embodiment, the use of acquisition of the received packet send sequence number; fill the send sequence number to the preset linear queue tag ID numbers mark the corresponding position; when two consecutive fill send When the number corresponding to the ordinal position of the mark is not continuous, determine packet loss or disorder. 与现有技术中过逐个记录数据包的发送序号的方法进行丢包检测相比,本发明实施例中提供的检测数据包的方法,可以快速检测出丢失或乱序的数据包。 Over the prior art recording packet send sequence number of the packet loss is detected by one method compared to the detection method described in the packet provided by the present invention can quickly detect missing or out of order packets.

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

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

将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记; The numbers mark the preset linear transmit queue number corresponding marker labeled with the ordinal position;

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

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

所述当连续两次获取的发送序号对应的标记序号位置不连续时,确定有数据包丢失或乱序,包括: Get twice when the send sequence number corresponding to the ordinal position mark is not continuous, determine packet loss or disorder, comprising:

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

当所述最大标记序号与所述检测窗口移动前覆盖的最大标记序号之间的序号跨度大于1时,确定有数据包丢失或乱序。 When the maximum number of the maximum mark ID tag number and the detection window before moving between coverage spans more than 1, it is determined there is packet loss or disorder.

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

确定所述检测窗口移动前覆盖的最大标记序号,与移动后覆盖的最大标记序号之间的标记序号对应的数据包丢失或乱序。 Determining whether the detected tag ID largest mobile coverage of the front window, mark tag number and a serial number corresponding to the maximum coverage moved between packets lost or out of order.

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

将预置的标记序号线性队列中与所述发送序号对应的标记序号位置标记为已接收状态,所述标记序号线性队列中标记序号位置被标记前为未接收状态。 The preset number of linear tag queue send sequence number corresponding to the position marked with the tag ID as reception state, the tag ID number linear position of the front marking the queue is marked as non-reception state.

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

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

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

本发明实施例中的检测数据包的装置可以为终端,也可以为服务器,当所述检测数据包的装置为服务器时: Examples of the device may be a terminal server can also detect packets embodiment of the present invention, when the device detects packets of the server:

图8是本发明实施例服务器600的结构示意图。 Figure 8 is a block diagram 600 of an embodiment of the present invention server. 服务器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提供指令和数据。 Memory 603 may include read only memory and random access memory, provides instructions and data to the processor 602. 存储器603的一部分还可以包括非易失性随机存取存储器(NVRAM)。 Portion of the memory 603 may also include non-volatile random access memory (NVRAM).

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

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

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

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

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

将预置的标记序号线性队列中与所述发送序号对应的标记序号位置进行标记; The numbers mark the preset linear transmit queue number corresponding marker labeled with the ordinal position;

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

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

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

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

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

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

当所述最大标记序号与所述检测窗口移动前覆盖的最大标记序号之间的序号跨度大于1时,确定有数据包丢失或乱序。 When the maximum number of the maximum mark ID tag number and the detection window before moving between coverage spans more than 1, it is determined there is packet loss or disorder.

处理器602确定所述检测窗口移动前覆盖的最大标记序号,与移动后覆盖的最大标记序号之间的标记序号对应的数据包丢失或乱序。 Processor 602 determines the maximum marker No. window covering the front of the mobile detection, marking tag number and a serial number corresponding to the maximum movement between the rear cover of the packet loss or disorder.

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

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

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

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

本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存 储介质中,存储介质可以包括:ROM、RAM、磁盘或光盘等。 Those of ordinary skill will be appreciated that the above-described embodiments of the various methods of whole or part of the steps 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, disk, or CD-ROM.

以上对本发明实施例所提供的检测数据包的方法、装置及存储介质进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。 The method of the invention has detected the data packet provided by the implementation, device and storage medium described in detail in this article applies specifically a case of principle and embodiments of the present invention have been set forth above embodiment is described only to help understanding of the method and its core idea of the invention; the same time, those of ordinary skill in the art, according to the idea of the invention, in the specific embodiments and applications are subject to change place, summary, contents of this manual are not It shall be construed as limiting the present invention.

Patent Citations
Cited PatentFiling datePublication dateApplicantTitle
CN101488841A *18 Feb 200922 Jul 2009中兴通讯股份有限公司Frame retransmission method and apparatus for radio link protocol
CN101527927A *4 Mar 20089 Sep 2009大唐移动通信设备有限公司Data receiving method and data receiving device for radio link control layer in long time evolution system
CN102333337A *11 Oct 201125 Jan 2012中兴通讯股份有限公司Script transmission method, wireless network simulation system (iNES) and server
CN103338131A *20 Jun 20132 Oct 2013百度在线网络技术(北京)有限公司Method and equipment for testing log transmitting loss rate
CN103501259A *21 Oct 20138 Jan 2014腾讯科技(深圳)有限公司Packet loss detection method and detector
US20130044595 *29 Dec 201121 Feb 2013Futurewei Technologies, Inc.System and Method for Transmission Control Protocol Service Delivery in Wireless Communications Systems
Classifications
International ClassificationH04L12/26
Cooperative ClassificationH04L47/34
Legal Events
DateCodeEventDescription
10 Jun 2015121Ep: 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
21 Apr 2016NENPNon-entry into the national phase in:
Ref country code: DE
14 Dec 201632PNEp: 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)
3 May 2017122Ep: pct application non-entry in european phase
Ref document number: 14856047
Country of ref document: EP
Kind code of ref document: A1