[go: up one dir, main page]

CN101860423A - Retransmission method and device for protocol packet transmission - Google Patents

Retransmission method and device for protocol packet transmission Download PDF

Info

Publication number
CN101860423A
CN101860423A CN201010195870A CN201010195870A CN101860423A CN 101860423 A CN101860423 A CN 101860423A CN 201010195870 A CN201010195870 A CN 201010195870A CN 201010195870 A CN201010195870 A CN 201010195870A CN 101860423 A CN101860423 A CN 101860423A
Authority
CN
China
Prior art keywords
acknowledgement frame
frame
transmission
grouping
send
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201010195870A
Other languages
Chinese (zh)
Inventor
刘培
徐平平
王岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Southeast University
Original Assignee
Huawei Technologies Co Ltd
Southeast University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd, Southeast University filed Critical Huawei Technologies Co Ltd
Priority to CN201010195870A priority Critical patent/CN101860423A/en
Publication of CN101860423A publication Critical patent/CN101860423A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Communication Control (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)

Abstract

本发明实施例提供协议分组传输的重传方法和装置,以缓解窗口内数据帧重传导致的传输资源浪费和系统吞吐量降低,所述方法包括:发送传输窗口内的分组;启动第一定时;若在所述第一定时超时时没有收到对已发送分组的确认帧,则发送用于请求接收方发送确认帧的消息,并启动第二定时;若在所述第二定时超时前收到所述确认帧,则根据所述确认帧携带的确认信息确定是否重传所述已发送分组。本发明实施例提供的技术方案有效地减少了重传开销,提高了网络的吞吐量,减少网络拥塞或瘫痪的可能,与此同时,降低了端到端的重传时延,在传输窗口越大,重传次数越多,即重传的分组数越多,本发明实施例提供的技术方案在上述技术效果方面也更加明显。

Embodiments of the present invention provide a retransmission method and device for protocol packet transmission, so as to alleviate the waste of transmission resources and the reduction of system throughput caused by the retransmission of data frames in the window. The method includes: sending the packets in the transmission window; starting the first timing ; If the acknowledgment frame to the sent group is not received when the first timing is overtime, then send a message for requesting the receiver to send an acknowledgment frame, and start the second timing; When the acknowledgment frame is received, determine whether to retransmit the sent packet according to the acknowledgment information carried in the acknowledgment frame. The technical solution provided by the embodiment of the present invention effectively reduces the retransmission overhead, improves the throughput of the network, and reduces the possibility of network congestion or paralysis. At the same time, it reduces the end-to-end retransmission delay. The larger the transmission window , the more times of retransmission, that is, the more the number of retransmitted packets, the more obvious the above technical effect of the technical solution provided by the embodiment of the present invention.

Description

一种协议分组传输的重传方法和装置 Retransmission method and device for protocol packet transmission

技术领域technical field

本发明涉及无线通信领域,尤其涉及一种协议分组传输的重传方法和装置。The invention relates to the field of wireless communication, in particular to a retransmission method and device for protocol packet transmission.

背景技术Background technique

ZigBee技术具有功耗低、成本低、网络容量大、时延短、安全可靠、工作频段灵活等诸多优点,目前是被普遍看好的无线个域网解决方案,也被很多人视为无线传感器网络的事实标准。ZigBee联盟对网络层协议和应用程序接口(Application Programming Interfaces,API)进行了标准化。ZigBee协议栈架构基于开放系统互连模型七层模型,包含IEEE 802.15.4标准以及由该联盟独立定义的网络层和应用层协议。与传统的七层模型相比,ZigBee协议栈没有独立地定义传输层,而是将应用层直接放在网络层之上,但这并不意味ZigBee不需要传输层,而是因为ZigBee将传输层的功能包含在应用层包括的应用支持子层(Application Support Sub-layer,APS)中。ZigBee的传输机制主要包含以下几个方面:1.无连接;2.基于端点寻址;3.支持不可靠传输和可靠传输;4.拒绝重复。其中,不可靠传输指的是传输过程无需确认,而可靠传输指的是传输过程需要确认。ZigBee 2007在原有传输机制基础上又加入了分割重组功能。ZigBee technology has many advantages such as low power consumption, low cost, large network capacity, short delay, safety and reliability, and flexible working frequency band. de facto standard. The ZigBee Alliance has standardized network layer protocols and application programming interfaces (Application Programming Interfaces, API). The ZigBee protocol stack architecture is based on the seven-layer model of the open system interconnection model, including the IEEE 802.15.4 standard and the network layer and application layer protocols independently defined by the alliance. Compared with the traditional seven-layer model, the ZigBee protocol stack does not define the transport layer independently, but puts the application layer directly on the network layer, but this does not mean that ZigBee does not need the transport layer, but because ZigBee puts the transport layer The functions are included in the Application Support Sub-layer (Application Support Sub-layer, APS) included in the application layer. ZigBee's transmission mechanism mainly includes the following aspects: 1. No connection; 2. Based on endpoint addressing; 3. Support unreliable transmission and reliable transmission; 4. Deny repetition. Among them, unreliable transmission means that no confirmation is required during the transmission process, and reliable transmission means that confirmation is required during the transmission process. ZigBee 2007 added the function of segmentation and reassembly on the basis of the original transmission mechanism.

ZigBee 2007APS子层规定:若应用服务数据单元(APS service data unit,ASDU)太大而不能在一个媒体接入控制(Medium Access Control,MAC)数据帧中传输时,则请求一个有确认的单播传输,并且允许该ASDU分片。所谓ASDU分片是指ASDU被分割为一些若干小的八位位组流,这些小的八位位组流被称为块(Block),其中的每一块在不同的数据帧中进行传输。为了实现业务的按序传输,收发双方需要维护一个传输窗口(一方处于发送状态时维护的传输窗口可以简称为发送窗口,另一方处于接收状态时维护的传输窗口可以简称为接收窗口),最大传输窗口apscMaxWindowSize的容量设为8。ZigBee 2007 APS sublayer stipulates: If the application service data unit (APS service data unit, ASDU) is too large to be transmitted in a medium access control (Medium Access Control, MAC) data frame, then request a unicast with confirmation transmission, and allow fragmentation of the ASDU. The so-called ASDU fragmentation means that the ASDU is divided into several small octet streams, and these small octet streams are called blocks, and each block is transmitted in a different data frame. In order to realize the sequential transmission of services, the sending and receiving parties need to maintain a transmission window (the transmission window maintained when one party is in the sending state can be referred to as the sending window for short, and the transmission window maintained when the other party is in the receiving state can be referred to as the receiving window for short), the maximum transmission The capacity of window apscMaxWindowSize is set to 8.

APS通用帧结构、APS扩展头部字段定义和APS扩展帧控制字段定义分别如附图1、附图2和附图3所示,ASDU被分割的块带有相同的APS计数器值,扩展头部字段将包含在帧结构中,其中,第一块的扩展帧控制字段中的分片子字段设为0b01,后续块的为0b10。第一块的块序号字段设为该业务传输总块数,第二块设为0x01,后续块的依次递增。使用ZigBee协议的收发双方收发数据的原理如下:APS general frame structure, APS extended header field definition and APS extended frame control field definition are shown in Figure 1, Figure 2 and Figure 3 respectively. field shall be included in the frame structure with the Fragmentation subfield in the Extended Frame Control field set to 0b01 for the first block and 0b10 for subsequent blocks. The block number field of the first block is set to the total number of blocks transmitted by the service, the second block is set to 0x01, and the subsequent blocks are incremented in turn. The principle of sending and receiving data between the sending and receiving parties using the ZigBee protocol is as follows:

发送方依次发送其传输窗口内的数据块,每发送完一块,就启动帧间定时器。在延时apsInterframeDelay(设定的时间)后,再接着发送下一块,直到窗口内所有数据块被发送完。数据块也可称为分组。当传输窗口内所有数据块发送完以后,发送方启动超时定时器,超时时间设为apscAckWaitDuration。如果发送方在设定的apscAckWaitDuration时间内没有收到确认帧,即超时定时器溢出,那么重传所有未被确认的数据块,同时重传计数器retryCounter的计数值加1。当retryCounter的计数值达到最大重传次数apscMaxFrameRetries,则认为该业务传输失败,返回状态值为NO_ACK的APSDE-DATA.confirm原语。The sender sends the data blocks in its transmission window in turn, and starts the interframe timer every time a block is sent. After apsInterframeDelay (set time) is delayed, the next block is sent until all data blocks in the window are sent. Blocks of data may also be referred to as packets. When all data blocks in the transmission window are sent, the sender starts the timeout timer, and the timeout period is set to apscAckWaitDuration. If the sender does not receive an acknowledgment frame within the set apscAckWaitDuration time, that is, the timeout timer overflows, then retransmit all unacknowledged data blocks, and increase the count value of the retransmission counter retryCounter by 1. When the count value of retryCounter reaches the maximum number of retransmissions apscMaxFrameRetries, it is considered that the service transmission fails, and the APSDE-DATA.confirm primitive with the status value of NO_ACK is returned.

如果发送方在设定的apscAckWaitDuration时间内收到确认帧,并且其地址字段、APS计数器和块序号的值均与所发数据块相匹配,则暂停超时定时器,并将计数器retryCounter复位为0。发送方根据确认帧的确认比特信息检查已发送数据块的传输状况,如果当前传输窗口内所有数据块均传输成功,那么继续发送后续数据块,同时发送传输窗口以apscMaxWindowSize为单位增加,否则,重传传输过程中丢失的数据块。如果某业务的所有数据块均传输完毕并且得到确认,那么返回状态值为SUCCESS的APSDE-DATA.confirm原语。If the sender receives the acknowledgment frame within the set apscAckWaitDuration time, and the values of its address field, APS counter and block sequence number all match the sent data block, the timeout timer is suspended and the counter retryCounter is reset to 0. The sender checks the transmission status of the sent data block according to the confirmation bit information of the confirmation frame. If all the data blocks in the current transmission window are successfully transmitted, then continue to send the subsequent data blocks, and at the same time, the sending transmission window is increased by apscMaxWindowSize. Otherwise, repeat Data blocks lost during transmission. If all the data blocks of a service have been transmitted and confirmed, then return the APSDE-DATA.confirm primitive whose status is SUCCESS.

如果接收方收到一个分组,其扩展帧控制字段中的分片子字段无效,则拒绝该帧;如果接收方收到的分组其地址字段或APS计数器与正在处理的的分组业务不匹配,则拒绝该帧或者将其作为另一项业务单独处理;如果接收方在没有业务处理的情况下,收到一个分组,那么尝试重组。另外,如果当前收到的业务与之前业务的APS计数器和源地址相同,那么将新业务作为之前业务的副本拒绝。If the receiver receives a packet whose fragmentation subfield in the extended frame control field is invalid, the frame is rejected; if the address field or APS counter of the packet received by the receiver does not match the packet service being processed, it is rejected The frame is either handled separately as another transaction; if the receiver receives a packet without transaction processing, reassembly is attempted. In addition, if the currently received traffic has the same APS counter and source address as the previous traffic, the new traffic is rejected as a duplicate of the previous traffic.

如果当前传输窗口内的所有数据块均已收到,或者收到当前业务的最后一个数据块,那么接收方向发送方发送确认帧。其中,确认帧的APS计数器字段指示被确认帧相应字段的字段值,块序号字段指示当前接收窗口的最小块序号,0值指示第一块。如果当前传输窗口的第一个数据块被成功接收,那么确认比特字段的第一位设为1,否则设为0,后续位的设置类似,对应当前接收窗口的后续分组。如果apsMaxWindowSize小于8,那么剩余位均设为1。If all data blocks in the current transmission window have been received, or the last data block of the current service is received, the receiver sends an acknowledgment frame to the sender. Wherein, the APS counter field of the confirmation frame indicates the field value of the corresponding field of the confirmed frame, the block number field indicates the minimum block number of the current receiving window, and the value of 0 indicates the first block. If the first data block of the current transmission window is successfully received, then the first bit of the acknowledgment bit field is set to 1, otherwise it is set to 0, and the setting of subsequent bits is similar, corresponding to subsequent packets of the current receiving window. If apsMaxWindowSize is less than 8, then the remaining bits are all set to 1.

如果接收方收到一个块数高于当前接收窗口的数据块,那么接收窗口以apscMaxWindowSize为单位增加。If the receiver receives a data block whose number of blocks is higher than the current receive window, then the receive window is increased in units of apscMaxWindowSize.

如果接收窗口在(apscAckWaitDuration+apscAckWaitDuration×MaxFrameRetries)时间内没有向前滑动,那么该业务视为失败。If the receiving window does not slide forward within (apscAckWaitDuration+apscAckWaitDuration×MaxFrameRetries) time, the service is regarded as failure.

一旦当前业务的所有数据块均已收到,APS提出包含重组信息的APSDE-DATA.indication,该业务视为完成。Once all data blocks for the current transaction have been received, the APS issues an APSDE-DATA.indication containing reassembly information, and the transaction is considered complete.

上述现有ZigBee 2007APS子层的分组传输机制利用确认帧决定是否进行选择性重传,它规定:如果发送方在设定时间之后(超时定时器溢出)没有收到确认帧,则重传发送窗口内所有未确认的数据,直到收到这些数据的确认帧或达到最大重传次数。这种重传机制的缺陷在于:实际网络中确认帧延时、确认帧丢失和发送窗口内最后一帧丢失等等都会导致发送方不能在超时计时器溢出前收到确认帧。无论是上述任何一种情况,如果按照协议原有规定,重传发送窗口内所有的数据帧,则浪费了传输资源,大大降低了系统的吞吐量,严重情况下还可能使网络发生拥塞甚至瘫痪。The packet transmission mechanism of the above existing ZigBee 2007APS sublayer utilizes the confirmation frame to decide whether to carry out selective retransmission. It stipulates that if the sender does not receive the confirmation frame after the set time (timeout timer overflows), the retransmission sending window All unacknowledged data in it until the acknowledgment frame for these data is received or the maximum number of retransmissions is reached. The defect of this retransmission mechanism is that in the actual network, the confirmation frame delay, the loss of the confirmation frame and the loss of the last frame in the sending window, etc. will cause the sender to fail to receive the confirmation frame before the timeout timer overflows. Regardless of any of the above situations, if all data frames in the sending window are retransmitted according to the original provisions of the protocol, the transmission resources will be wasted, the throughput of the system will be greatly reduced, and the network may be congested or even paralyzed in severe cases. .

发明内容Contents of the invention

本发明实施例提供协议分组传输的重传方法和装置,以缓解窗口内数据帧重传导致的传输资源浪费和系统吞吐量降低。Embodiments of the present invention provide a retransmission method and device for protocol packet transmission, so as to alleviate the waste of transmission resources and the reduction of system throughput caused by the retransmission of data frames within a window.

本发明实施例提供一种协议分组传输的重传方法,包括:发送传输窗口内的分组;启动第一定时;若在所述第一定时超时时没有收到对已发送分组的确认帧,则发送用于请求接收方发送确认帧的消息,并启动第二定时;若在所述第二定时超时前收到所述确认帧,则根据所述确认帧携带的确认信息确定是否重传所述已发送分组。An embodiment of the present invention provides a retransmission method for protocol packet transmission, including: sending a packet within a transmission window; starting a first timing; if no confirmation frame for the sent packet is received when the first timing times out, then Sending a message for requesting the recipient to send an acknowledgment frame, and starting a second timing; if the acknowledgment frame is received before the second timing expires, then determine whether to retransmit the Packet sent.

本发明实施例提供一种协议分组传输的重传装置,包括:发送模块,用于发送传输窗口内分组;第一定时模块,用于在所述分组发送完成时,启动第一定时;请求模块,用于若在所述第一定时超时时没有收到对已发送分组的确认帧,则发送用于请求接收方发送确认帧的消息,并触发第二定时模块;第二定时模块,用于根据所述触发,启动第二定时;重传确定模块,用于若在所述第二定时超时前收到所述确认帧,则根据所述确认帧携带的确认信息确定是否重传所述已发送分组。An embodiment of the present invention provides a retransmission device for protocol packet transmission, including: a sending module, used to send a packet within a transmission window; a first timing module, used to start a first timing when the sending of the packet is completed; a request module , used to send a message for requesting the recipient to send a confirmation frame if no acknowledgment frame for the sent packet is received when the first timing expires, and trigger a second timing module; the second timing module is used for According to the trigger, the second timing is started; the retransmission determination module is configured to determine whether to retransmit the received message according to the confirmation information carried by the confirmation frame if the confirmation frame is received before the second timing expires Send packets.

在本发明实施例中,由于在发送完传输窗口内所有的分组后等待接收方的确认帧时,若超时定时器溢出前仍然没有收到确认帧,则请求接收方发送确认帧的消息而不是重传传输窗口内所有的分组。因此,与现有技术相比,本发明实施例提供的技术方案有效地减少了重传开销,提高了网络的吞吐量,减少网络拥塞或瘫痪的可能,与此同时,降低了端到端的重传时延,在传输窗口越大,重传次数越多,即重传的分组数越多,本发明实施例提供的技术方案在上述技术效果方面也更加明显。In the embodiment of the present invention, when waiting for the acknowledgment frame of the receiver after sending all the packets in the transmission window, if the acknowledgment frame is still not received before the timeout timer overflows, the message of requesting the receiver to send the acknowledgment frame is not Retransmit all packets within the transmission window. Therefore, compared with the prior art, the technical solution provided by the embodiment of the present invention effectively reduces the retransmission overhead, improves the throughput of the network, reduces the possibility of network congestion or paralysis, and at the same time reduces the end-to-end retransmission For the transmission delay, the larger the transmission window, the more times of retransmission, that is, the more the number of retransmitted packets, the technical solution provided by the embodiment of the present invention is also more obvious in terms of the above technical effects.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以如这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only of the present invention. For some embodiments, those of ordinary skill in the art can also obtain other drawings like these drawings without paying creative efforts.

图1是现有技术提供的APS通用帧结构示意图;FIG. 1 is a schematic diagram of an APS general frame structure provided by the prior art;

图2是现有技术提供的APS扩展头部字段定义示意图;Fig. 2 is a schematic diagram of the definition of the APS extension header field provided by the prior art;

图3是现有技术提供的APS扩展帧字段定义示意图;Fig. 3 is a schematic diagram of field definition of an APS extended frame provided by the prior art;

图4是本发明实施例提供的使用ZigBee协议的收发双方传输业务示意图;Fig. 4 is a schematic diagram of the transmission services of both the transceiver and the transceiver using the ZigBee protocol provided by the embodiment of the present invention;

图5是本发明实施例提供的使用ZigBee协议的收发双方传输业务过程中某个数据块丢失时分组重传示意图;Fig. 5 is a schematic diagram of packet retransmission when a certain data block is lost in the transmitting and receiving parties using the ZigBee protocol provided by an embodiment of the present invention;

图6是本发明实施例提供的使用ZigBee协议的收发双方传输业务过程中多个确认帧丢失时分组重传示意图;Fig. 6 is a schematic diagram of packet retransmission when a plurality of confirmation frames are lost during the transmission business process of both the transceiver and the transceiver using the ZigBee protocol provided by the embodiment of the present invention;

图7是本发明实施例一提供的协议分组传输的重传方法基本流程示意图;FIG. 7 is a schematic flow diagram of a basic flowchart of a retransmission method for protocol packet transmission provided by Embodiment 1 of the present invention;

图8本发明实施例提供的请求确认帧结构示意图;FIG. 8 is a schematic diagram of a request confirmation frame structure provided by an embodiment of the present invention;

图9本发明实施例提供的请求确认帧的帧控制字段的帧类型子字段定义示意图;FIG. 9 is a schematic diagram of the definition of the frame type subfield of the frame control field of the request confirmation frame provided by the embodiment of the present invention;

图10本发明实施例提供的收发双方传输业务过程中确认帧丢失一次时分组重传示意图;FIG. 10 is a schematic diagram of packet retransmission when the confirmation frame is lost once during the transmission service process of the sending and receiving parties provided by the embodiment of the present invention;

图11本发明实施例提供的收发双方传输业务过程中确认帧丢失一次时分组重传方法流程示意图;Fig. 11 is a schematic flow diagram of a packet retransmission method when a confirmation frame is lost once during the transmission service process of the sending and receiving parties provided by the embodiment of the present invention;

图12本发明实施例提供的收发双方传输业务过程中确认帧丢失多次时分组重传示意图;FIG. 12 is a schematic diagram of packet retransmission when the confirmation frame is lost multiple times during the transmission service process of the sending and receiving parties provided by the embodiment of the present invention;

图13本发明实施例提供的本发明的技术方案和现有技术方案在确认帧丢失一次时端到端延时方面进行比较的仿真图;Fig. 13 is a simulation diagram for comparing the technical solution of the present invention provided by the embodiment of the present invention with the prior art solution in terms of end-to-end delay when the acknowledgment frame is lost once;

图14本发明实施例提供的本发明的技术方案和现有技术方案在确认帧丢失一次时网络吞吐量方面进行比较的仿真图;Fig. 14 is a simulation diagram for comparing the technical solution of the present invention provided by the embodiment of the present invention with the prior art solution in terms of network throughput when the acknowledgment frame is lost once;

图15本发明实施例提供的本发明的技术方案和现有技术方案在确认帧丢失多次时端到端延时方面进行比较的仿真图;Fig. 15 is a simulation diagram for comparing the technical solution of the present invention provided by the embodiment of the present invention with the prior art solution in terms of end-to-end delay when acknowledging frame loss for multiple times;

图16是本发明实施例一提供的协议分组传输的重传装置基本逻辑结构示意图;FIG. 16 is a schematic diagram of a basic logical structure of a retransmission device for protocol packet transmission provided by Embodiment 1 of the present invention;

图17是本发明实施例二提供的协议分组传输的重传装置基本逻辑结构示意图;FIG. 17 is a schematic diagram of a basic logical structure of a retransmission device for protocol packet transmission provided in Embodiment 2 of the present invention;

图18是本发明实施例三提供的协议分组传输的重传装置基本逻辑结构示意图。FIG. 18 is a schematic diagram of a basic logical structure of a retransmission device for protocol packet transmission provided by Embodiment 3 of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

请参阅图7,本发明实施例一提供的一种协议分组传输的重传方法基本流程示意图,主要包括步骤:Please refer to FIG. 7 , which is a schematic flow chart of a retransmission method for protocol packet transmission provided by Embodiment 1 of the present invention, which mainly includes steps:

S701,发送传输窗口内的分组。S701. Send the packets within the transmission window.

S702,启动第一定时。S702, start the first timer.

S703,若在第一定时超时时没有收到对已发送分组的确认帧,则发送用于请求接收方发送确认帧的消息,并启动第二定时。S703. If no acknowledgment frame for the sent packet is received when the first timing expires, send a message for requesting the receiver to send the acknowledgment frame, and start the second timing.

在本发明实施例中,可以使用一个或若干个超时定时器设定等待一个反馈的确认帧的最长时间,例如,设定第一定时,在发送完传输窗口内的分组后即启动第一定时,等待接收方反馈确认帧。等待确认帧的最长时间(例如,第一定时)可以根据网络中链路传输状况灵活调整。In the embodiment of the present invention, one or several timeout timers can be used to set the maximum time for waiting for a feedback confirmation frame, for example, the first timing is set, and the first timing is started after sending the packets in the transmission window. Timing, waiting for the receiver to feed back an acknowledgment frame. The maximum time for waiting for an acknowledgment frame (for example, the first timing) can be flexibly adjusted according to the link transmission status in the network.

S704,若在第二定时超时前收到确认帧,则根据确认帧携带的确认信息确定是否重传已发送分组。S704. If the confirmation frame is received before the second timing expires, determine whether to retransmit the sent packet according to the confirmation information carried in the confirmation frame.

在本发明实施例中,第二定时与第一定时可以采用同一个定时器或不同的定时器,本实施例对此不进行限定。In this embodiment of the present invention, the second timing and the first timing may use the same timer or different timers, which is not limited in this embodiment.

以下分组是ZigBee 2007协议应用支持子层服务数据单元分割成的八位位组为例,说明本发明实施例的技术方案。需要说明的是,本发明实施例虽然是以ZigBee 2007协议的分组传输为例,但并不局限于ZigBee网络,也不局限于分组传输。本领域技术人员能够理解,凡是基于多个数据块成组传输和需要对数据块进行确认的网络或传输机制,无需再做出创造性劳动即可采用本发明实施例提供的技术方案。The following grouping is an example of octets divided into ZigBee 2007 protocol application support sublayer service data unit, illustrating the technical solution of the embodiment of the present invention. It should be noted that although the embodiment of the present invention takes the packet transmission of the ZigBee 2007 protocol as an example, it is not limited to the ZigBee network, nor is it limited to the packet transmission. Those skilled in the art can understand that any network or transmission mechanism based on group transmission of multiple data blocks and requiring confirmation of data blocks can adopt the technical solutions provided by the embodiments of the present invention without further creative work.

为了更好地对比本发明提供的技术方案和使用现有ZigBee协议的技术方案之间的差异,以下以附图4至附图6为例说明。In order to better compare the difference between the technical solution provided by the present invention and the technical solution using the existing ZigBee protocol, the accompanying drawings 4 to 6 are used as examples for illustration below.

请参阅附图4,是使用现有ZigBee协议的收发双方传输业务的实施例。在附图4示例中,当前的传输窗口(发送窗口)的容量apscMaxWindowSize为3,某业务被分为5块。发送窗口的范围为0~2,意味着发送端只能发送块序号为0~2的数据块。由于0块数据块是该业务的第一块,因此它的块序号是该业务总的分组数5,以便通知接收端做好该业务的接收工作。然后发送方等待长为apsInterframeDelay的时间(帧间定时器的设定溢出时间)后,再发送块序号为1的数据块,接着等待长为apsInterframeDelay的时间后,发送块序号为2的数据块,最后等待确认。当发送方收到块序号为0的确认帧后,知道是对本发送窗口数据块进行确认,然后检查确认比特信息,发现确认比特信息为0xFF,即11111111,说明块序号为0~2的数据块传输成功。由于本业务尚未完成,还有数据块待发,因此发送窗口进行更新,范围为3~4,同理可知,当块序号3和4均传输成功后,接收方的APS向其相邻高层提出包含重组信息的APSDE-DATA.indication原语,而发送方的APS向其相邻高层返回状态值为SUCCESS的APSDE-DATA.confirm原语,该业务传输完毕。Please refer to accompanying drawing 4, it is the embodiment that uses the existing ZigBee protocol to send and receive both parties to transmit the business. In the example of FIG. 4 , the capacity apscMaxWindowSize of the current transmission window (sending window) is 3, and a certain service is divided into 5 blocks. The range of the sending window is 0~2, which means that the sending end can only send data blocks whose block numbers are 0~2. Since block 0 is the first block of the service, its block sequence number is the total number of packets of the service, 5, so as to notify the receiving end to do a good job of receiving the service. Then the sender waits for the time of apsInterframeDelay (the overflow time of the interframe timer), and then sends the data block with the block number 1, and then waits for the time of apsInterframeDelay, and then sends the data block with the block number 2. Finally wait for confirmation. When the sender receives the confirmation frame whose block number is 0, it knows that it is confirming the data block of the sending window, and then checks the confirmation bit information, and finds that the confirmation bit information is 0xFF, that is, 11111111, indicating that the block number is 0~2 Data blocks The transfer was successful. Since the business has not been completed yet and there are still data blocks to be sent, the sending window is updated, and the range is 3 to 4. Similarly, when block numbers 3 and 4 are successfully transmitted, the receiver's APS proposes to its adjacent high-level The APSDE-DATA.indication primitive containing the reassembly information, and the APS of the sender returns the APSDE-DATA.confirm primitive with a status value of SUCCESS to its adjacent upper layer, and the transmission of the service is completed.

附图5某个数据块丢失时分组重传的示意图,从附图5可知,发送方第一次收到的确认比特信息不是0xFF,而是0xFD,即11111101。说明第2个数据块丢失,于是发送方重传该数据块,直到收到成功的确认。Figure 5 is a schematic diagram of packet retransmission when a certain data block is lost. It can be seen from Figure 5 that the confirmation bit information received by the sender for the first time is not 0xFF, but 0xFD, that is, 11111101. It means that the second data block is lost, so the sender retransmits the data block until a successful confirmation is received.

从附图4和附图5可知,ZigBee 2007APS子层在进行分组传输时采用滑动窗口的流控制、块确认和基于确认比特信息的选择性重传。但是,实际中不是每一次都能收到对方的确认帧,如附图6是多个确认帧(ACK)丢失时分组重传的示意图。在多个确认帧丢失的情况下,根据ZigBee 2007的规定,发送方需多次重传发送窗口内所有数据帧,直到达到重传次数。假设重传次数为3,那么,对于附图4所示当前发送窗口容量apscMaxWindowSize为3的情形,需要重传9帧。As can be seen from accompanying drawing 4 and accompanying drawing 5, ZigBee 2007APS sublayer adopts flow control of sliding window, block confirmation and selective retransmission based on confirmation bit information when carrying out packet transmission. However, in practice, it is not always possible to receive an acknowledgment frame from the other party, as shown in FIG. 6 , which is a schematic diagram of packet retransmission when multiple acknowledgment frames (ACK) are lost. In the case of multiple acknowledgment frames being lost, according to ZigBee 2007, the sender needs to retransmit all data frames in the sending window multiple times until the number of retransmissions is reached. Assuming that the number of retransmissions is 3, then, for the situation where the current sending window capacity apscMaxWindowSize is 3 as shown in FIG. 4 , 9 frames need to be retransmitted.

而在本发明实施例中,发送方在超时定时器溢出还没有收到对已发送分组的确认帧时,不是重传已发送分组,而是生成一个用于请求接收方发送确认帧的消息发送出去。However, in the embodiment of the present invention, when the sender has not received the acknowledgment frame for the sent packet when the timeout timer overflows, instead of retransmitting the sent packet, it generates a message for requesting the receiver to send an acknowledgment frame. go out.

作为本发明一个实施例,可以生成一个与通信协议,例如ZigBee 2007协议中确认帧结构类似的请求确认帧(Request ForACK,RFA)作为请求接收方发送确认帧的消息,该请求确认帧的特殊之处在于,它可以与确认帧有相同的帧结构,例如,相同的字段,但它由发送方发给接收方,因此,请求确认帧不是一个确认帧。请求确认帧携带需要接收方确认的分组的序号和用于标识该请求确认帧类型的帧类型字段。As an embodiment of the present invention, one can generate a communication protocol, such as a request for acknowledgment frame (Request ForACK, RFA) similar to the acknowledgment frame structure in the ZigBee 2007 protocol as a message for requesting the receiver to send an acknowledgment frame, the particularity of the request for acknowledgment frame The advantage is that it can have the same frame structure as the acknowledgment frame, for example, the same fields, but it is sent from the sender to the receiver, so the request acknowledgment frame is not an acknowledgment frame. The acknowledgment request frame carries the sequence number of the packet requiring acknowledgment by the receiver and a frame type field used to identify the type of the acknowledgment request frame.

附图8给出了本发明实施例中生成的请求确认帧结构,从附图可知,请求确认帧只包含帧头,不包含帧载荷,这样不仅不占用额外的资源,而且由于与ZigBee 2007协议的确认帧结构类似,因此可以与ZigBee 2007协议很好地兼容。Accompanying drawing 8 has provided the request confirmation frame structure that generates in the embodiment of the present invention, as can be seen from accompanying drawing, request confirmation frame only comprises frame header, does not comprise frame load, not only does not take extra resource like this, and because with ZigBee 2007 agreement The acknowledgment frame structure is similar, so it can be well compatible with the ZigBee 2007 protocol.

作为本发明的实施例,可以通过这种方式生成请求确认帧,即,将APS确认帧的帧控制字段的帧类型子字段保留不用的2比特“11”定义为“请求确认”类型,其他字段的值保持不变,如附图9所示。As an embodiment of the present invention, the request confirmation frame can be generated in this way, that is, the reserved 2-bit "11" of the frame type subfield of the frame control field of the APS confirmation frame is defined as the "request confirmation" type, and other fields The value of remains unchanged, as shown in Figure 9.

由于请求确认帧用于分组传输时请求确认,因此其帧控制字段(也是确认帧的帧控制字段)的确认请求子字段和扩展头部存在子字段的值都应设为有效。地址字段和APS计数器字段的值设置同其他类型帧,扩展头部与要确认的帧保持一致,且确认比特信息为空。Since the acknowledgment request frame is used for packet transmission to request acknowledgment, the values of the acknowledgment request subfield and the extended header existence subfield of its frame control field (also the frame control field of the acknowledgment frame) should be set to be valid. The value setting of the address field and the APS counter field is the same as that of other types of frames, the extension header is consistent with the frame to be confirmed, and the confirmation bit information is empty.

以下以附图10所示传输窗口大小为3、传输业务总的分组数为5、传输过程中ACK丢失一次为例,说明本发明技术方案,流程图如附图11所示,包括步骤:Taking the transmission window size shown in Figure 10 as 3, the total number of packets in the transmission service as 5, and the ACK loss once during the transmission process as an example, the technical solution of the present invention is described below. The flow chart is shown in Figure 11, including steps:

S111,发送方初始化传输窗口,确定在本次传输窗口内可以传输的分组数,之后开始发送分组并启动帧间定时器(超时定时器);S111, the sender initializes the transmission window, determines the number of packets that can be transmitted in the current transmission window, and then starts sending packets and starts an interframe timer (overtime timer);

S112,每次等待帧间定时器设定的溢出时间apsInterframeDelay后即发送一个分组,直到发送完传输窗口内最后一个分组并启动超时定时器;S112, sending a packet after waiting for the overflow time apsInterframeDelay set by the interframe timer each time, until sending the last packet in the transmission window and starting the timeout timer;

S113,若在超时定时器溢出时仍然没有收到对已发送分组的确认帧,则生成一个请求确认帧后发送至接收方,与此同时,将溢出后的超时定时器复位并再次启动之;S113, if the confirmation frame to the sent packet is still not received when the timeout timer overflows, then generate a request confirmation frame and send it to the receiver, at the same time, reset the timeout timer after overflow and start it again;

S114,若在再次启动的超时定时器溢出前收到确认帧,则为了避免收到错误的确认帧或重复的确认帧,可判断该确认帧是否为有效的确认帧。S114, if the confirmation frame is received before the restarted timeout timer overflows, in order to avoid receiving wrong confirmation frames or repeated confirmation frames, it may be determined whether the confirmation frame is a valid confirmation frame.

在本发明实施例中,可以通过以下方式判断收到的确认帧是否为有效的确认帧:首先检查确认帧的地址字段是否正确,若正确,则进一步检查APS计数器字段是否匹配,若匹配,则判断该确认帧为有效的确认帧;In the embodiment of the present invention, it can be judged whether the received confirmation frame is an effective confirmation frame in the following manner: first check whether the address field of the confirmation frame is correct, if correct, then further check whether the APS counter field matches, if it matches, then judging that the acknowledgment frame is an effective acknowledgment frame;

在确定收到的确认帧为有效的确认帧后,根据确认帧携带的确认信息的指示,重传已发送分组中未被接收方正确接收的分组,包括:After determining that the received acknowledgment frame is a valid acknowledgment frame, according to the indication of the acknowledgment information carried by the acknowledgment frame, retransmit the packets that have not been correctly received by the receiver in the sent packets, including:

判断确认帧携带的确认信息是否与“分组全部达到接收方”信息相符(S115);Judging whether the acknowledgment information carried by the acknowledgment frame matches the information of "all the packets have reached the receiver" (S115);

例如,若收发双方约定确认信息全为比特“1”表明“分组全部达到接收方”,则发送方只需检查确认帧携带的确认信息是否全部为比特“1”;For example, if the sending and receiving parties agree that the acknowledgment information is all bit "1" indicating that "the packets all reach the receiver", the sender only needs to check whether the acknowledgment information carried by the confirmation frame is all bit "1";

若检查确认帧携带的确认信息与“分组全部达到接收方”信息不相符,例如,确认帧携带的确认信息部分为比特“1”,部分为比特“0”,则重传未到达接收方的分组,即重传与比特“0”对应的分组并启动超时定时器(S116)。If it is checked that the confirmation information carried by the confirmation frame does not match the information that "all packets have reached the receiver", for example, part of the confirmation information carried by the confirmation frame is bit "1" and part is bit "0", then the retransmission does not reach the receiver. packet, that is, retransmit the packet corresponding to the bit "0" and start the timeout timer (S116).

S117,若在再次启动的超时定时器溢出前仍然没有收到确认帧,则重传请求确认帧。S117. If the acknowledgment frame is still not received before the restarted timeout timer overflows, retransmit the request acknowledgment frame.

考虑到实际网络环境下,确实偶尔存在由于某种原因导致确认帧延时发送的情况,为了避免在短时间内频繁重传请求确认帧给网络造成的额外负荷,可以在每重传一次请求确认帧后,将超时定时器的定时时间aspACKWaitDuration适当延长。Considering that in the actual network environment, there are occasional delays in sending confirmation frames for some reason, in order to avoid the additional load caused by frequent retransmission of request confirmation frames in a short period of time, you can request confirmation every time you retransmit After the frame, the timing time aspACKWaitDuration of the timeout timer is extended appropriately.

附图12给出了传输窗口大小为3、传输业务总的分组数为5、传输过程中ACK多次丢失时分组重传的示意图。在附图11中,在超时定时器每溢出一次且没有收到对已发送分组的确认帧时,则生成一个请求确认帧(RFA)后发送出去,直到请求确认帧的重传次数达到最大值或在再次启动的超时定时器溢出前收到确认帧。Figure 12 shows a schematic diagram of packet retransmission when the transmission window size is 3, the total number of packets of the transmission service is 5, and ACK is lost multiple times during the transmission process. In accompanying drawing 11, when the timeout timer overflows once and does not receive the acknowledgment frame to the sent packet, then generate a request acknowledgment frame (RFA) and send it out until the number of retransmissions of the request acknowledgment frame reaches the maximum Or an acknowledgment frame is received before the restarted timeout timer expires.

将附图6所示的实施例和附图12所示实施例技术方案对比,假设共有3次在超时定时器溢出前没有收到确认帧,则附图6所示的实施例在整个重传过程中重传了9帧数据帧(9个分组),所用时间为(2×apsInterframeDelay+3×apscAckWaitDuration),而附图11所示实施例技术方案在整个重传过程中只传输了3个请求确认帧,所用时间为3×apscAckWaitDuration。由此可见,本发明技术方案有效地减少了重传开销,同时降低了端到端的重传时延。Comparing the embodiment shown in accompanying drawing 6 with the technical solution of the embodiment shown in accompanying drawing 12, assuming that a total of 3 times the confirmation frame is not received before the timeout timer overflows, then the embodiment shown in accompanying drawing 6 is in the whole retransmission During the retransmission process, 9 data frames (9 packets) were retransmitted, and the time used was (2×apsInterframeDelay+3×apscAckWaitDuration), while the technical solution of the embodiment shown in Figure 11 only transmitted 3 requests during the entire retransmission process Acknowledgment frame, the time used is 3×apscAckWaitDuration. It can be seen that the technical solution of the present invention effectively reduces the retransmission overhead and at the same time reduces the end-to-end retransmission delay.

显然,如果传输窗口越大,重传次数越多,即重传的分组数越多,那么本发明技术方案相对于现有技术的方案的优势也更加明显。Apparently, if the transmission window is larger and the number of retransmissions is greater, that is, the number of retransmitted packets is greater, then the technical solution of the present invention has more obvious advantages over the solutions of the prior art.

对于接收方,若收到的是普通的分组,则处理流程和现有技术类似,此处不做赘述,若收到的是请求确认帧,则判断发送方已发送完发送窗口内所有分组,但是没有收到确认帧。此时,接收方应立即向发送方发送确认帧。如果接收方之前并没有发送确认帧,说明发送窗口内最后一帧或最后数帧丢失,则应在确认帧中给出没有收到相应数据帧(分组)的指示(例如,将确认比特信息中的相应比特设为0),然后发送确认帧;如果接收方之前发送了确认帧,说明确认帧延时或丢失,则应重传上一个确认帧。For the receiver, if it receives a normal packet, the processing flow is similar to that of the prior art, and will not be described here. If it receives a request confirmation frame, it is judged that the sender has sent all the packets in the sending window. But no acknowledgment frame was received. At this point, the receiver should immediately send an acknowledgment frame to the sender. If the receiver has not sent an acknowledgment frame before, indicating that the last frame or the last few frames in the sending window are lost, an indication that the corresponding data frame (packet) has not been received should be given in the acknowledgment frame (for example, the acknowledgment bit information in The corresponding bit is set to 0), and then send a confirmation frame; if the receiver has sent a confirmation frame before, it means that the confirmation frame is delayed or lost, and the previous confirmation frame should be retransmitted.

考虑到发送方在发送分组时,有可能是传输窗口内最后一个分组丢失导致发送方不能在超时定时器溢出前收到确认帧。在这种情况下,也可以不采用发送请求确认帧(RAF帧)的方式,即,作为本发明一个实施例,可以以传输窗口内最后一个分组代替特殊数据帧,在超时定时器溢出时还没有收到对已发送分组的确认帧时,向接收方重传传输窗口内最后一个分组。由于通常的通信协议中,传输窗口内最后一个分组都携带一个“请求反馈确认帧”的信息,当传输窗口内最后一个分组到达接收方时,接收方会立即反馈确认帧,同样可以避免重传传输窗口内的所有分组,从而减小重传开销,提高网络吞吐量。Considering that when the sender sends a packet, it is possible that the last packet in the transmission window is lost, so that the sender cannot receive the confirmation frame before the timeout timer overflows. In this case, the method of sending a request confirmation frame (RAF frame) may not be used, that is, as an embodiment of the present invention, the last packet in the transmission window may be used to replace the special data frame, and when the timeout timer overflows, the special data frame may be replaced. Retransmits the last packet in the transmission window to the receiver when no acknowledgment frame is received for the sent packet. Because in the usual communication protocol, the last packet in the transmission window carries a "request feedback confirmation frame" information, when the last packet in the transmission window reaches the receiver, the receiver will immediately feedback the confirmation frame, which can also avoid retransmission All packets within the window are transmitted, thereby reducing retransmission overhead and improving network throughput.

为了验证本发明实施例技术方案有效,用OPNET14.0进行仿真,观察本发明实施例提供的技术方案能够减少传输业务的端到端延时,提高网络的吞吐量。假设仿真区域为100m×100m的校园网,仿真对象为两个节点之间的单跳传输,媒体接入控制(Media Access Control,MAC)协议采用IEEE802.11,路由协议为动态源路由(Dynamic Source Route,DSR)协议,传输协议为模拟的ZigBee 2007APS传输机制和基于请求确认的可靠传输方法(Request ForACK Reliable Transmission Protocol,RARTP),应用配置为视频会议,其他一些重要的仿真参数和取值如表1示。In order to verify that the technical solution of the embodiment of the present invention is effective, OPNET14.0 is used for simulation to observe that the technical solution provided by the embodiment of the present invention can reduce the end-to-end delay of the transmission service and improve the throughput of the network. Assuming that the simulation area is a 100m×100m campus network, the simulation object is single-hop transmission between two nodes, the Media Access Control (MAC) protocol adopts IEEE802.11, and the routing protocol is Dynamic Source Routing (Dynamic Source Route, DSR) protocol, the transmission protocol is the simulated ZigBee 2007APS transmission mechanism and the reliable transmission method based on request confirmation (Request ForACK Reliable Transmission Protocol, RARTP), the application configuration is video conference, and some other important simulation parameters and values are shown in the table 1 shows.

  仿真参数Simulation parameters   取值value   帧间隔(apsInterframeDelay)Frame interval (apsInterframeDelay)   0.001s0.001s   超时时间(apscAckWaitDuration)Timeout (apscAckWaitDuration)   1.5s1.5s   最大重传次数(apscMaxFrameRetries)Maximum number of retransmissions (apscMaxFrameRetries)   33   最大传输窗口(apscMaxWindowSize)Maximum transfer window (apscMaxWindowSize)   8 8   应用包载荷(ASDU)Application packet payload (ASDU)   32000,64000,96000,12800032000, 64000, 96000, 128000   最大传输载荷(APSDU)Maximum transmission payload (APSDU)   1600016000

表1(仿真参数和取值)Table 1 (simulation parameters and values)

仿真通过横向比较和纵向比较,分析本发明两种实施例在端到端延时和网络吞吐量方面的情况。仿真过程中,首先设定传输窗口大小为4,比较两种方法在端到端延时和吞吐量方面的情况,仿真曲线如附图13和附图14。设定不同的传输窗口大小,仿真情况类似(横向比较)。然后根据附图6所示和附图12所示的极端情况(即ACK多次丢失导致多次重传),选择不同的传输窗口大小,比较两种方法在平均端到端延时方面的情况(纵向比较),如附图15所示。The simulation analyzes the end-to-end delay and network throughput of the two embodiments of the present invention through horizontal comparison and vertical comparison. During the simulation process, first set the transmission window size to 4, and compare the end-to-end delay and throughput of the two methods. The simulation curves are shown in Figure 13 and Figure 14. Setting different transmission window sizes, the simulation situation is similar (horizontal comparison). Then, according to the extreme situations shown in Figure 6 and Figure 12 (that is, multiple retransmissions due to multiple ACK losses), select different transmission window sizes, and compare the average end-to-end delay of the two methods (Longitudinal comparison), as shown in Figure 15.

附图13是传输窗口为4时本发明实施例提供的方法在端到端延时的比较情况。此处,定义端到端延时为成功发送传输窗口内所有分组所需时间,即从发送传输窗口内第一个分组到收到全确认信息为全部收到(确认比特全为1)的确认帧的时间,其中包含了重传时间。由附图13可知,与使用ZigBee分组传输机制相比,使用RARTP算法可以减小网络的端到端延时。而且,随着时间的流逝,重传次数不断增加,端到端延时减小的趋势也更加明显,直到达到最大重传次数。这是因为RARTP有效地减少了重传开销,降低了重传时间,从而减小了网络的端到端延时。Figure 13 is a comparison of the end-to-end delay of the method provided by the embodiment of the present invention when the transmission window is 4. Here, the end-to-end delay is defined as the time required to successfully send all packets in the transmission window, that is, from sending the first packet in the transmission window to receiving the full confirmation information is the confirmation of all received (confirmation bits are all 1) The time of the frame, which includes the retransmission time. It can be seen from FIG. 13 that compared with the ZigBee packet transmission mechanism, the use of the RARTP algorithm can reduce the end-to-end delay of the network. Moreover, as time goes by, the number of retransmissions increases, and the end-to-end delay tends to decrease more obviously until the maximum number of retransmissions is reached. This is because RARTP effectively reduces the retransmission overhead and the retransmission time, thereby reducing the end-to-end delay of the network.

附图14是传输窗口为4时本发明实施例提供的方法在吞吐量的比较情况。这里我们以传输窗口大小为单位业务量,定义吞吐量为每秒中成功传输的业务量,不包含重传的业务量。由附图14可知,与ZigBee分组传输机制相比,使用RARTP算法可在一定程度上提高网络的吞吐量。Figure 14 is a comparison of the throughput of the method provided by the embodiment of the present invention when the transmission window is 4. Here we take the size of the transmission window as the unit of business volume, and define the throughput as the successfully transmitted business volume per second, excluding the retransmitted business volume. It can be known from Figure 14 that, compared with the ZigBee packet transmission mechanism, the use of the RARTP algorithm can improve the throughput of the network to a certain extent.

附图15是根据附图6和附图12所描述的极端情况,比较本发明实施例提供的方法的平均端到端延时情况。由附图15可知,与ZigBee分组传输的重传方法相比,使用RARTP算法可以有效地降低网络的平均端到端延时。并且,随着传输窗口的增大,这种优势就表现得越明显。Fig. 15 compares the average end-to-end delay of the method provided by the embodiment of the present invention according to the extreme situation described in Fig. 6 and Fig. 12 . It can be seen from FIG. 15 that, compared with the retransmission method of ZigBee packet transmission, using the RARTP algorithm can effectively reduce the average end-to-end delay of the network. And, as the transmission window increases, this advantage becomes more obvious.

请参阅图16,本发明实施例一提供的协议分组传输的重传装置基本逻辑结构示意图。为了便于说明,仅仅示出了与本发明实施例相关的部分。该装置包含的功能模块可以是软件模块、硬件模块或软硬件相结合的模块,包括发送模块161、第一定时模块162、请求模块163、第二定时模块164、重传确定模块165,其中:Please refer to FIG. 16 , which is a schematic diagram of a basic logical structure of a retransmission device for protocol packet transmission provided by Embodiment 1 of the present invention. For ease of description, only parts related to the embodiments of the present invention are shown. The functional modules included in the device may be software modules, hardware modules or a combination of software and hardware, including a sending module 161, a first timing module 162, a request module 163, a second timing module 164, and a retransmission determination module 165, wherein:

发送模块161,用于发送传输窗口内分组;A sending module 161, configured to send packets within the transmission window;

在本实施例中,分组可以是ZigBee 2007协议应用支持子层服务数据单元分割成的八位位组。In this embodiment, the packets may be octets divided into ZigBee 2007 protocol application support sublayer service data units.

第一定时模块162,用于在传输窗口内分组发送完成时,启动第一定时;The first timing module 162 is configured to start the first timing when the packet transmission in the transmission window is completed;

请求模块163,用于若在第一定时超时时没有收到对已发送分组的确认帧,则发送用于请求接收方发送确认帧的消息,并触发第二定时模块164;The request module 163 is used to send a message for requesting the receiver to send a confirmation frame if the confirmation frame to the sent packet is not received when the first timing expires, and trigger the second timing module 164;

第二定时模块164,用于根据请求模块163的触发,启动第二定时;The second timing module 164 is configured to start the second timing according to the trigger of the request module 163;

重传确定模块165,用于若在第二定时超时前收到确认帧,则根据该确认帧携带的确认信息确定是否重传所述已发送分组。The retransmission determination module 165 is configured to determine whether to retransmit the sent packet according to the confirmation information carried in the confirmation frame if the confirmation frame is received before the second timing expires.

作为本发明一个实施例,可以生成一个与通信协议,例如ZigBee 2007协议中确认帧结构类似的请求确认帧作为请求接收方发送确认帧的消息,该请求确认帧的特殊之处在于,它可以与确认帧有相同的帧结构,例如,相同的字段,但它由发送方发给接收方,因此,请求确认帧不是一个确认帧。请求确认帧携带需要接收方确认的分组的序号和用于标识该请求确认帧类型的帧类型字段。As an embodiment of the present invention, one can generate a communication protocol, such as a request confirmation frame similar to the confirmation frame structure in the ZigBee 2007 protocol as a message requesting the recipient to send the confirmation frame. The special feature of the request confirmation frame is that it can be used with An acknowledgment frame has the same frame structure, ie, the same fields, but it is sent from the sender to the receiver, so a request acknowledgment frame is not an acknowledgment frame. The acknowledgment request frame carries the sequence number of the packet requiring acknowledgment by the receiver and a frame type field used to identify the type of the acknowledgment request frame.

请求确认帧只包含帧头,不包含帧载荷,这样不仅不占用额外的资源,而且由于与ZigBee 2007协议的确认帧结构类似,因此可以与与ZigBee 2007协议很好地兼容。The request acknowledgment frame only contains the frame header and does not contain the frame load, which not only does not occupy additional resources, but also is well compatible with the ZigBee 2007 protocol due to its similar structure to the acknowledgment frame of the ZigBee 2007 protocol.

作为本发明的实施例,可以通过这种方式生成请求确认帧,即,将APS确认帧的帧控制字段的帧类型子字段保留不用的2比特“11”定义为“请求确认”类型,其他字段的值保持不变,如附图9所示。As an embodiment of the present invention, the request confirmation frame can be generated in this way, that is, the reserved 2-bit "11" of the frame type subfield of the frame control field of the APS confirmation frame is defined as the "request confirmation" type, and other fields The value of remains unchanged, as shown in Figure 9.

由于请求确认帧用于分组传输时请求确认,因此其帧控制字段(也是确认帧的帧控制字段)的确认请求子字段和扩展头部存在子字段的值都应设为有效。地址字段和APS计数器字段的值设置同其他类型帧,扩展头部与要确认的帧保持一致,且确认比特信息为空。Since the acknowledgment request frame is used for packet transmission to request acknowledgment, the values of the acknowledgment request subfield and the extended header existence subfield of its frame control field (also the frame control field of the acknowledgment frame) should be set to be valid. The value setting of the address field and the APS counter field is the same as that of other types of frames, the extension header is consistent with the frame to be confirmed, and the confirmation bit information is empty.

作为本发明另一个实施例,可以以传输窗口内最后一个分组代替请求确认帧。在超时定时器溢出时还没有收到对已发送分组的确认帧时,向接收方重传传输窗口内最后一个分组,该分组到达接收方时,接收方会立即反馈确认帧,同样可以避免重传传输窗口内的所有分组,从而减小重传开销,提高网络吞吐量。As another embodiment of the present invention, the request confirmation frame can be replaced by the last packet in the transmission window. When the acknowledgment frame for the sent packet has not been received when the timeout timer expires, retransmit the last packet in the transmission window to the receiver. When the packet arrives at the receiver, the receiver will immediately feed back the acknowledgment frame, which can also avoid retransmission All packets within the transmission window are transmitted, thereby reducing retransmission overhead and improving network throughput.

图16示例的重传确定模块165可以进一步包括判断子模块171和重传子模块172,如图17所示本发明实施例二提供的协议分组传输的重传装置基本逻辑结构示意图,其中:The retransmission determination module 165 illustrated in FIG. 16 may further include a judging submodule 171 and a retransmission submodule 172. FIG. 17 shows a schematic diagram of the basic logical structure of a retransmission device for protocol packet transmission provided by Embodiment 2 of the present invention, wherein:

判断子模块171,用于判断确认帧是否为有效的确认帧;Judgment sub-module 171, used to judge whether the confirmation frame is an effective confirmation frame;

重传子模块172,用于在判断子模块171判断确认帧为有效的确认帧时,确认帧是有效的,根据确认帧携带的确认信息的指示,重传所述已发送分组中未被接收方正确接收的分组。The retransmission submodule 172 is configured to retransmit the unreceived packets in the sent packets according to the indication of the confirmation information carried by the confirmation frame when the judging submodule 171 judges that the confirmation frame is a valid confirmation frame. packets correctly received by the party.

在本实施例中,判断子模块171确定收到的确认帧为有效的确认帧后,重传子模块172判断确认帧携带的确认信息是否与“分组全部达到接收方”信息相符。例如,若收发双方约定确认信息全为比特“1”表明“分组全部达到接收方”,则重传子模块172只需检查确认帧携带的确认信息是否全部为比特“1”;若检查确认帧携带的确认信息与“分组全部达到接收方”信息不相符,例如,确认帧携带的确认信息部分为比特“1”,部分为比特“0”,则重传子模块172重传未到达接收方的分组,即重传与比特“0”对应的分组并启动超时定时器。In this embodiment, after the judging sub-module 171 determines that the received acknowledgment frame is valid, the retransmission sub-module 172 judges whether the acknowledgment information carried in the acknowledgment frame is consistent with the information that "all packets have reached the receiver". For example, if the sending and receiving parties agree that the acknowledgment information is all bits "1" to indicate that "all the packets have reached the receiver", the retransmission submodule 172 only needs to check whether the acknowledgment information carried by the confirmation frame is all bits "1"; The acknowledgment information carried does not match the information that "all the packets have reached the receiver". For example, if the acknowledgment information carried by the acknowledgment frame is partly bit "1" and partly bit "0", then the retransmission sub-module 172 does not reach the receiver. , that is, retransmit the packet corresponding to bit "0" and start the timeout timer.

图16或17示例的请求模块163可以进一步包括请求重传单元181,如图18所示本发明实施例三提供的协议分组传输的重传装置基本逻辑结构示意图。请求重传单元181用于若在第二定时超时时未收到确认帧,重传用于请求接收方发送确认帧的消息,并启动第二定时。The request module 163 illustrated in FIG. 16 or 17 may further include a request retransmission unit 181, as shown in FIG. 18, a schematic diagram of a basic logical structure of a retransmission device for protocol packet transmission provided by Embodiment 3 of the present invention. The request retransmission unit 181 is configured to retransmit the message for requesting the receiver to send the confirmation frame if no confirmation frame is received when the second timing times out, and start the second timing.

需要说明的是,上述设备各模块/单元之间的信息交互、执行过程等内容,由于与本发明方法实施例基于同一构思,其带来的技术效果与本发明方法实施例相同,具体内容可参见本发明方法实施例中的叙述,此处不再赘述。It should be noted that the information interaction and execution process among the various modules/units of the above-mentioned equipment are based on the same concept as the method embodiment of the present invention, and the technical effect brought by it is the same as that of the method embodiment of the present invention, and the specific content can be Refer to the descriptions in the method embodiments of the present invention, and details are not repeated here.

本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can include: Read Only Memory (ROM, Read Only Memory), Random Access Memory (RAM, Random Access Memory), disk or CD, etc.

以上对本发明实施例提供的一种协议分组传输的重传方法和装置进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。本领域技术人员可以了解,所述各实施例在不发生冲突的情况下可以互相结合形成新的实施例。The method and device for retransmitting a protocol packet transmission provided by the embodiment of the present invention have been described in detail above. In this paper, specific examples are used to illustrate the principle and implementation of the present invention. The description of the above embodiment is only used to help Understand the method of the present invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation and scope of application. In summary, the content of this specification is not It should be understood as a limitation of the present invention. Those skilled in the art can understand that the various embodiments described above can be combined with each other to form new embodiments without conflicts.

Claims (10)

1. the repeating method of a transmitted in packets is characterized in that, comprising:
Send the grouping in the transmission window;
Start first regularly;
If when described first timing is overtime, do not receive that to sending the acknowledgement frame of grouping then transmission is used to ask the recipient to send the message of acknowledgement frame, and start second regularly;
If receive described acknowledgement frame before described second timing is overtime, then the affirmation information of carrying according to described acknowledgement frame determines whether to retransmit the described grouping that sent.
2. the method for claim 1 is characterized in that, also comprises:
If do not receive described acknowledgement frame when regularly overtime, then retransmit and describedly be used to ask the recipient to send the message of acknowledgement frame, and start described second regularly described second.
3. method as claimed in claim 2 is characterized in that, if repeatedly retransmit described message and the number of retransmissions that is used to ask the recipient to send acknowledgement frame and reach a threshold value, then stops to continue to retransmit and describedly is used to ask the recipient to send the message of acknowledgement frame.
4. as each described method in the claim 1 to 3, it is characterized in that the described message that is used for asking the recipient to send acknowledgement frame is a request acknowledgement frame or has describedly sent last grouping that sends of grouping.
5. method as claimed in claim 4 is characterized in that, the described request acknowledgement frame carries the sequence number of the grouping that needs described recipient's affirmation and is used to identify the frame type field of this request acknowledgement frame type.
6. as each described method in the claim 1 to 3, it is characterized in that described affirmation information of carrying according to described acknowledgement frame determines whether to retransmit described the transmission and divides into groups to comprise:
The indication of the affirmation information of carrying according to acknowledgement frame retransmits described the transmission and is not received the upright grouping that really receives in the grouping.
7. method as claimed in claim 6 is characterized in that, describedly judges whether described acknowledgement frame is that effective acknowledgement frame comprises:
Whether the address field of checking described acknowledgement frame is correct;
If correct, check further then whether the application support sublayer counter field of described acknowledgement frame mates, if coupling judges that then described acknowledgement frame is effective acknowledgement frame.
8. the retransmission arrangement of a protocol packet transmission is characterized in that, comprising:
Sending module is used to send grouping in the transmission window;
First time block is used for when described grouping is sent completely, and starts first regularly;
Request module is used for if do not receive sending the acknowledgement frame of grouping when described first timing is overtime, then sends to be used to ask the recipient to send the message of acknowledgement frame, and triggers second time block;
Second time block is used for according to described triggering, starts second regularly;
Retransmit determination module, be used for if receive described acknowledgement frame before described second timing is overtime, then the affirmation information of carrying according to described acknowledgement frame determines whether to retransmit the described grouping that sent.
9. device as claimed in claim 8 is characterized in that, described re-transmission determination module comprises:
Judge submodule, be used to judge whether described acknowledgement frame is effective acknowledgement frame;
Retransmit submodule, be used for if described acknowledgement frame is effectively, the indication of the affirmation information of carrying according to acknowledgement frame retransmits described the transmission and is not received the upright really grouping of reception in the grouping.
10. install as claimed in claim 8 or 9, it is characterized in that the described request module also comprises: the request retransmission unit is used for if do not receive described acknowledgement frame when described second timing is overtime, retransmit and describedly be used to ask the recipient to send the message of acknowledgement frame, and start described second regularly.
CN201010195870A 2010-06-07 2010-06-07 Retransmission method and device for protocol packet transmission Pending CN101860423A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010195870A CN101860423A (en) 2010-06-07 2010-06-07 Retransmission method and device for protocol packet transmission

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010195870A CN101860423A (en) 2010-06-07 2010-06-07 Retransmission method and device for protocol packet transmission

Publications (1)

Publication Number Publication Date
CN101860423A true CN101860423A (en) 2010-10-13

Family

ID=42946098

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010195870A Pending CN101860423A (en) 2010-06-07 2010-06-07 Retransmission method and device for protocol packet transmission

Country Status (1)

Country Link
CN (1) CN101860423A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103763073A (en) * 2014-01-09 2014-04-30 深圳市迪威视讯股份有限公司 Method for retransmission of lost data packet and terminal
CN105765893A (en) * 2013-11-27 2016-07-13 高通股份有限公司 System and method for multicast communications in wireless networks
CN106256102A (en) * 2014-03-21 2016-12-21 诺基亚通信公司 The HARQ of TDM mode optimizes
CN106688218A (en) * 2014-04-15 2017-05-17 飞利浦灯具控股公司 Method and apparatus for controlling handshaking in a packet transport network
CN108476579A (en) * 2016-01-11 2018-08-31 飞利浦照明控股有限公司 Method for operating communication device and communication device
CN108965441A (en) * 2018-07-23 2018-12-07 济南大学 A kind of real-time radio data collection shows storage system, collecting board and receiver board
CN110677221A (en) * 2018-07-02 2020-01-10 华为技术有限公司 Retransmission control method, communication interface and electronic equipment
CN111193577A (en) * 2018-11-15 2020-05-22 迈络思科技有限公司 Network system communication method and communication device using transmission timeout
CN112532728A (en) * 2020-11-30 2021-03-19 中国航空工业集团公司西安航空计算技术研究所 Deterministic airborne high-performance file transmission method and system
CN115395988A (en) * 2021-05-25 2022-11-25 瑞昱半导体股份有限公司 Bluetooth communication device and data transmission method
CN115604187A (en) * 2021-07-09 2023-01-13 诺博汽车科技有限公司(Cn) CAN bus data sending method and device, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000052868A2 (en) * 1999-03-03 2000-09-08 Nokia Corporation A method and a device for re-transmitting data transfer packets
CN1849772A (en) * 2003-08-08 2006-10-18 英特尔公司 Sdma communications with non-immediate block acknowledgment
CN101124762A (en) * 2004-07-30 2008-02-13 诺基亚公司 System and method for variable length acknowledgments in a shared resource network
CN101568147A (en) * 2009-05-15 2009-10-28 刘建 Method and device of overtime processing of wireless local area network authentication infrastructure
CN101667897A (en) * 2008-09-01 2010-03-10 华为技术有限公司 Method, device and system for implementing retransmission on physical layer

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000052868A2 (en) * 1999-03-03 2000-09-08 Nokia Corporation A method and a device for re-transmitting data transfer packets
CN1342355A (en) * 1999-03-03 2002-03-27 诺基亚有限公司 Method and device for re-transmitting data transfer poakets
CN1849772A (en) * 2003-08-08 2006-10-18 英特尔公司 Sdma communications with non-immediate block acknowledgment
CN101124762A (en) * 2004-07-30 2008-02-13 诺基亚公司 System and method for variable length acknowledgments in a shared resource network
CN101667897A (en) * 2008-09-01 2010-03-10 华为技术有限公司 Method, device and system for implementing retransmission on physical layer
CN101568147A (en) * 2009-05-15 2009-10-28 刘建 Method and device of overtime processing of wireless local area network authentication infrastructure

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105765893A (en) * 2013-11-27 2016-07-13 高通股份有限公司 System and method for multicast communications in wireless networks
CN103763073A (en) * 2014-01-09 2014-04-30 深圳市迪威视讯股份有限公司 Method for retransmission of lost data packet and terminal
CN106256102A (en) * 2014-03-21 2016-12-21 诺基亚通信公司 The HARQ of TDM mode optimizes
CN106256102B (en) * 2014-03-21 2020-03-03 诺基亚技术有限公司 Apparatus, method, and storage medium for communication
CN106688218A (en) * 2014-04-15 2017-05-17 飞利浦灯具控股公司 Method and apparatus for controlling handshaking in a packet transport network
CN106688218B (en) * 2014-04-15 2020-07-28 飞利浦灯具控股公司 Method and apparatus for controlling handshaking in a packet transport network
CN108476579A (en) * 2016-01-11 2018-08-31 飞利浦照明控股有限公司 Method for operating communication device and communication device
CN108476579B (en) * 2016-01-11 2020-07-10 飞利浦照明控股有限公司 Method for operating a communication device and communication device
US11671210B2 (en) 2018-07-02 2023-06-06 Huawei Technologies Co., Ltd. Retransmission control method, communications interface, and electronic device
CN110677221A (en) * 2018-07-02 2020-01-10 华为技术有限公司 Retransmission control method, communication interface and electronic equipment
CN108965441A (en) * 2018-07-23 2018-12-07 济南大学 A kind of real-time radio data collection shows storage system, collecting board and receiver board
CN111193577A (en) * 2018-11-15 2020-05-22 迈络思科技有限公司 Network system communication method and communication device using transmission timeout
CN112532728A (en) * 2020-11-30 2021-03-19 中国航空工业集团公司西安航空计算技术研究所 Deterministic airborne high-performance file transmission method and system
CN115395988A (en) * 2021-05-25 2022-11-25 瑞昱半导体股份有限公司 Bluetooth communication device and data transmission method
CN115395988B (en) * 2021-05-25 2024-08-23 瑞昱半导体股份有限公司 Bluetooth communication device and data transmission method
CN115604187A (en) * 2021-07-09 2023-01-13 诺博汽车科技有限公司(Cn) CAN bus data sending method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN101860423A (en) Retransmission method and device for protocol packet transmission
CN101779408B (en) Method for sending status information in mobile telecommunications system and receiver of mobile telecommunications
US7609697B2 (en) Optimizing IEEE 802.11 for TCP/IP data transfer
US9397791B2 (en) Transmitting data in a mobile communication system
US8428086B2 (en) Transmitting data in a mobile communication system
US6629261B1 (en) Enhanced data link layer selective reject mechanism in noisy wireless environment
WO2011079777A1 (en) Data transmission method and network side device
US11502986B2 (en) Reducing transmission delay of transmitting data in Wi-Fi
KR100714675B1 (en) Data frame retransmission method and network device using the method
WO2016161594A1 (en) Data transmission method and apparatus
CN111131179A (en) Service processing method, device, network device and storage medium
CN100505608C (en) An adaptive congestion control method and system suitable for satellite networks
CN102801692B (en) A kind of transmission control protocol optimization method and system connecting based on division
WO2022094974A1 (en) Data transmission method and apparatus, computer device and storage medium
CN112822720A (en) Cross-layer congestion control method based on MAC (media Access control) layer link quality in unmanned aerial vehicle networking technology
JP2005244897A (en) Reliable communication method and apparatus
CN102201901A (en) Data retransmission method and device
US20140341028A1 (en) Reducing superfluous traffic in a network
Maisuria et al. Overview of techniques for improving QoS of TCP over wireless links
CN116963175A (en) Data transmission method, device and system
JP2005051738A (en) Method of efficiently transmitting/receiving data using transport layer in mobile ad hoc network, and network device using the method
KR100913897B1 (en) Transmission Control Protocol Congestion Control Method to Reduce the Number of Retransmission Timeouts
Chandra et al. TCP performance for future IP-based wireless networks
WO2021253268A1 (en) Information transmission method for communication system, communication system, and communication device
CN116032436A (en) Data transmission method and device, transmitting end equipment and receiving end equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20101013