WO2014086154A1 - 近场通信软件栈逻辑链路层的流量控制方法 - Google Patents

近场通信软件栈逻辑链路层的流量控制方法 Download PDF

Info

Publication number
WO2014086154A1
WO2014086154A1 PCT/CN2013/079965 CN2013079965W WO2014086154A1 WO 2014086154 A1 WO2014086154 A1 WO 2014086154A1 CN 2013079965 W CN2013079965 W CN 2013079965W WO 2014086154 A1 WO2014086154 A1 WO 2014086154A1
Authority
WO
WIPO (PCT)
Prior art keywords
data frame
window
receiving
sequence number
flow control
Prior art date
Application number
PCT/CN2013/079965
Other languages
English (en)
French (fr)
Inventor
周宝忠
肖堃
申杰
Original Assignee
惠州Tcl移动通信有限公司
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 惠州Tcl移动通信有限公司 filed Critical 惠州Tcl移动通信有限公司
Priority to US14/388,078 priority Critical patent/US9264106B2/en
Priority to EP13859956.8A priority patent/EP2930895B1/en
Publication of WO2014086154A1 publication Critical patent/WO2014086154A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • H04B5/70Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes
    • H04B5/72Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes for local intradevice communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1809Selective-repeat protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1825Adaptation of specific ARQ protocol parameters according to transmission conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1829Arrangements specially adapted for the receiver end
    • H04L1/1832Details of sliding window management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1829Arrangements specially adapted for the receiver end
    • H04L1/1835Buffer management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/04Wireless resource allocation
    • H04W72/044Wireless resource allocation based on the type of the allocated resource
    • H04W72/0446Resources in time domain, e.g. slots or frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/27Evaluation or update of window size, e.g. using information derived from acknowledged [ACK] packets

Definitions

  • the present invention relates to the field of short-range wireless communication technologies, and in particular, to a flow control method for a logical link layer of a near field communication software stack.
  • NFC Near Field Communication
  • RFID Radio Frequency IDentification
  • interconnection technology integration evolved, in order to promote the development and popularization of NFC technology, the industry created the Near Field Communication Forum (NFC Forum), NFC Forum defines the NFC protocol system, in which the NFC software stack is a middleware that provides support for application development at the upper level and NFC controllers at the bottom.
  • the data link layer is set in the NFC software stack. Its most basic function is to provide transparent and reliable data transmission services to users in this layer. In addition, the data link layer is also responsible for framing, error correction, order preservation and traffic. Controlled tasks.
  • the size of the receiving window is not mandatory. It is only recommended that the receiving window size range from 0 to 15. Because the physical layer of the near field communication protocol is a wireless communication protocol, it is easy to make mistakes. If the receiving window size is too small, Will result in wasted bandwidth.
  • the logical link control protocol is for P2P (PeertoPeer, Peer-to-Peer) services. The data volume of such services is generally large, and the corresponding data frames are also large. Therefore, if the receiving window size is too large, it will be required. Large buffers, while the NFC software stack generally works in an embedded environment. Memory resources are relatively limited, and larger buffers will have an impact on system performance.
  • the present invention aims to provide a flow control method for a logical link layer of a near field communication software stack, which aims to solve the imbalance of bandwidth utilization and memory resource consumption in near field communication in the prior art. Big problem.
  • a flow control method for a logical link layer of a near field communication software stack comprising the steps of:
  • a sending window and a receiving window for performing flow control on the transmitted data frame are set at the logical link layer;
  • ReceiveWindow [FWT ⁇ DATARATE_MAX ]/[(2+Link Miu) ⁇ 8], wherein ReceiveWindow indicates the receiving window size, FWT indicates the communication delay time, and DATARATE_MAX indicates the transmission rate, Link Miu indicates the parameters specified when the sender establishes a connection with the receiver; and FWT and DATARATE_MAX are read by the near field communication controller at the receiver;
  • the sending window performs flow control on the sending end according to the size of the sending window
  • the receiving window performs flow control on the receiving end according to the size of the receiving window.
  • the flow control method of the logical link layer of the near field communication software stack wherein the transmission rate is 106 bit rate, 212 bit rate or 424 bit rate.
  • the flow control method of the logical link layer of the near field communication software stack establishes a buffer at the receiving end for buffering the received data frame.
  • the flow control method of the logical link layer of the near field communication software stack, the process of receiving the data frame by the receiving end includes the following steps:
  • A1 receiving, by using the receiving end, the data frame sent by the sending end;
  • A2. Determine whether the data frame sequence number is within the receiving window.
  • the received data frame and the data frame capable of forming a continuous sequence form a data frame group.
  • the receiving end returns an acknowledgement frame, and confirms that the data frame with the largest sequence number in the data frame group is received: the i-th data frame.
  • the transmitting end when the transmitting end sends a new data frame, the upper boundary of the sending window is incremented by one.
  • the flow control method of the logical link layer of the near field communication software stack when the sending end receives the acknowledgement frame returned by the receiving end, determining whether the acknowledgement frame is an acknowledgement frame corresponding to a lower bound of the sending window, and if so, Add 1 to the lower bound of the transmission window, otherwise add 1 to the sequence number of the acknowledgement frame as the lower boundary of the new transmission window.
  • a flow control method for a logical link layer of a near field communication software stack comprising the steps of:
  • a sending window and a receiving window for performing flow control on the transmitted data frame are set at the logical link layer;
  • the sending window performs flow control on the sending end according to the size of the sending window
  • the receiving window performs flow control on the receiving end according to the size of the receiving window.
  • ReceiveWindow [FWT ⁇ DATARATE_MAX]/[(2+Link Miu) ⁇ 8]
  • ReceiveWindow represents the receive window size
  • FWT represents the communication delay time
  • DATARATE_MAX represents the transfer rate
  • Link Miu indicates the parameter specified when the sender establishes a connection with the receiver.
  • the flow control method of the logical link layer of the near field communication software stack wherein the transmission rate is 106 kbps, 212 Kbps or 424 kbps.
  • the flow control method of the logical link layer of the near field communication software stack, wherein the process of receiving the data frame includes the following steps:
  • the receiving end receives the data frame sent by the sending end.
  • A6 When a data frame capable of forming a continuous sequence with the data frame sequence number is not found in the buffer, return an acknowledgement frame to the receiving end, and confirm that the data frame whose data frame number is equal to the lower boundary of the receiving window is received;
  • the received data frame and the data frame capable of forming a continuous sequence form a data frame group, and return to the receiving end. Confirming the frame and confirming that the data frame with the largest sequence number in the data frame group is received: the i-th data frame.
  • the flow control method of the logical link layer of the near field communication software stack wherein when the transmitting end sends a new data frame, the upper boundary of the sending window is incremented by one.
  • the flow control method of the logical link layer of the near field communication software stack wherein when the sending end receives the acknowledgement frame returned by the receiving end, it determines whether the acknowledgement frame is an acknowledgement frame corresponding to the lower bound of the sending window, and when yes, Add 1 to the lower bound of the transmission window, otherwise add 1 to the sequence number of the confirmation frame as the lower boundary of the new transmission window.
  • the invention sets a transmission window and a reception window for performing flow control on the transmitted data frame in the logical link layer, and also dynamically adjusts the transmission window size and the reception window size according to the upper layer application, the channel quality and the data frame size, Therefore, the bandwidth utilization is balanced, and the purpose of memory resource consumption is well reduced.
  • FIG. 1 is a flow chart of a preferred embodiment of a flow control method for a logical link layer of a near field communication software stack of the present invention.
  • FIG. 2 is a schematic structural view of a transmission window in the present invention.
  • FIG. 3 is a specific flowchart of a process of receiving a data frame in the present invention.
  • the present invention provides a flow control method for a logical link layer of a near field communication software stack.
  • FIG. 1 is a flowchart of a flow control method for a logical link layer of a near field communication software stack according to a preferred embodiment of the present invention.
  • S101 Set, at a logical link layer, a sending window and a receiving window for performing flow control on the transmitted data frame.
  • the sending window performs flow control on the sending end according to the size of the sending window
  • the receiving window performs flow control on the receiving end according to the size of the receiving window.
  • the sequence number of the next data frame to be sent by the sender, the lower boundary of the transmission window is the smallest sequence number in the data frame that the sender has sent but has not received yet, and the maximum sequence number of the data frame is in the data frame to be transmitted.
  • MOD represents modular division
  • the above steps are only for convenience of explanation, and do not represent a limitation on the order. Through the above steps, the sending window of the transmitting end and the receiving window of the receiving end are adjusted, so that the two windows can better balance the bandwidth utilization and reduce the memory resource consumption.
  • the sending window and the receiving window are described in more detail below.
  • the sending window is used to control the traffic of the sending end, and the meaning of the sending window indicates a data frame number table that the transmitting end has sent but has not received the acknowledgement frame, as shown in FIG. 2, which is A transmission window with a maximum size of 2n, such that the sequence number of the data frame is 0 ⁇ 2n-1, and 2n-1 is the maximum sequence number of the data frame, wherein the black portion between the upper boundary of the transmission window and the lower boundary of the transmission window indicates the size of the transmission window ( The frame number table of the acknowledgement frame that has been sent but not yet received. When the sender sends a new data frame, the sequence number of the data frame is taken as the upper threshold of the transmission window, and the upper bound is incremented by 1.
  • the transmitting end When the transmitting end receives the acknowledgement frame of the lower boundary of the transmission window, the lower boundary of the transmission window is incremented by 1.
  • the sequence number corresponding to the acknowledgement frame is added. 1 as a new transmission window lower bound, thereby adjusting the transmission window, and continuously maintaining the flow control of the transmitting end.
  • the receiving window can be used to control which data frames can be received by the receiving end. For the receiving end, only the data frame whose serial number of the data frame falls into the receiving window can be received by the receiving end, and received.
  • the upper bound of the window indicates the data frame with the largest serial number allowed by the receiving end, and the lower bound of the receiving window indicates the serial number of the data frame that the receiving end wishes to receive. Any data frame that falls outside the receiving window will be discarded.
  • the present invention no longer adopts the conventional method of statically specifying the receiving window size and the sending window size according to the empirical value, but according to the upper layer every time communication is established.
  • the size of the receiving window and the size of the sending window are dynamically calculated based on actual conditions such as application, channel quality, and data frame size.
  • the upper layer application determines the transmission rate of the communication, and the transmission rate may be 106 Kbps (bit rate), 212 Kbps, 424 Kbps, and the variable DATARATE_MAX is used to indicate the transmission rate (generally, the transmission rate is taken as an upper layer application).
  • Determine the maximum transmission rate the generic of the NFC controller that can be established at the receiving end when communicating
  • the DATARATE_MAX parameter is read in the gate (ETSI TS 102 622 standard terminology).
  • the channel quality determines the communication delay time between the two NFC devices.
  • the communication delay time is 302us to 4949ms.
  • the variable FWT is used to indicate the communication delay time.
  • the communication can be established at the receiving end of the NFC controller.
  • the FWT parameter is read in the gate.
  • Link MIU Link Maximum Information Unit
  • ReceiveWindow size (ReceiveWindow)
  • ReceiveWindow [FWT ⁇ DATARATE_MAX]/[(2+Link Miu) ⁇ 8].
  • the transmission window size is set to be the same as the receiving window size, but when the transmission window size is acquired, its parameters FWT and DATARATE_MAX are read by the NFC controller of the transmitting end.
  • a buffer is set up in the receiving end to buffer the received data frame, and if a data frame that is within the receiving window and is not the lower bound of the receiving window is received, the data frame will be The data frame is first placed in the buffer. Specifically, as shown in FIG. 3, it includes the steps:
  • step S203 when the data frame number is within the receiving window, determining whether the data frame number is equal to the lower limit of the receiving window; when the data frame number is not within the receiving window, discarding the data frame, proceeds to step S208;
  • the present invention provides a transmission window and a reception window for performing flow control on a transmitted data frame in a logical link layer, and also dynamically adjusts a transmission window size according to an upper layer application, channel quality, and data frame size. With the size of the receiving window, the bandwidth utilization is balanced, and the memory resource consumption is well reduced.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明在逻辑链路层设置用于对传输的数据帧进行流量控制的发送窗口及接收窗口;根据上层应用确定的传输速率、信道质量确定的通信延迟时间以及数据帧的大小动态调节所述发送窗口尺寸及接收窗口尺寸;所述发送窗口根据所述发送窗口尺寸的大小对发送端进行流量控制,所述接收窗口根据所述接收窗口尺寸的大小对接收端进行流量控制。

Description

近场通信软件栈逻辑链路层的流量控制方法 技术领域
本发明涉及近距离无线通信技术领域,尤其涉及一种近场通信软件栈逻辑链路层的流量控制方法。
背景技术
NFC(Near Field Communication,近场通信)技术是由非接触式射频识别(Radio Frequency IDentification ,RFID)技术及互联互通技术整合演变而来,为了推动NFC技术的发展和普及,业界创建了近距离无线通信论坛(NFC Forum),NFC Forum定义了NFC协议体系,在该体系中,NFC软件栈是一种中间件,在上层为应用开发提供支撑;在底层操作NFC控制器。NFC软件栈中设置有数据链路层,其最基本的功能是向该层用户提供透明的和可靠的数据传送服务,此外,数据链路层还担负着成帧、纠错、保序及流量控制的任务。
在传统的逻辑链路控制协议(NFC Forum Logical Link Protocl)中,并没有对接收窗口尺寸进行强制规定,只是建议接收窗口尺寸取值范围为0~15,因为近场通信协议的物理层是无线通信协议,容易出错,如果接收窗口尺寸过小,会导致带宽的浪费。逻辑链路控制协议是为P2P(PeertoPeer,对等网络)类业务服务的,这类服务的数据量一般较大,对应的数据帧也较大,因此如果接收窗口尺寸过大,则会要求较大的缓冲区,而NFC软件栈一般是在嵌入式环境下工作,内存资源相对有限,较大的缓冲区将会对***性能带来影响。
另外,当前多数NFC控制器芯片支持P2P应用时只能工作在passive模式下,该模式时一种半双工的工作模式,只能一发一收,如果发送窗口和接收窗口尺寸过大,则可能会导致通信中的一方长期处于发送、重送的状态,另一方的发送时间被占用,从而造成带宽利用率的不平衡与内存资源消耗之间的矛盾。
因此,现有技术还有待于改进和发展。
技术问题
鉴于上述现有技术的不足,本发明的目的在于提供一种近场通信软件栈逻辑链路层的流量控制方法,旨在解决现有技术中近场通信时带宽利用率不平衡、内存资源消耗大的问题。
技术解决方案
一种近场通信软件栈逻辑链路层的流量控制方法,包括步骤:
A、在逻辑链路层设置用于对传输的数据帧进行流量控制的发送窗口及接收窗口;
B、根据上层应用确定的传输速率、信道质量确定的通信延迟时间以及数据帧的大小动态调节所述发送窗口尺寸以及所述接收窗口尺寸;所述接收窗口尺寸满足公式:ReceiveWindow=[FWT×DATARATE_MAX]/[(2+Link Miu)×8],其中,ReceiveWindow 表示所述接收窗口尺寸,FWT表示所述通信延迟时间,DATARATE_MAX表示所述传输速率,Link Miu表示发送端与接收端建立连接时指定的参数;而FWT以及DATARATE_MAX在所述接收端的近场通信控制器读取;以及
C、所述发送窗口根据所述发送窗口尺寸的大小对所述发送端进行流量控制,所述接收窗口根据所述接收窗口尺寸的大小对所述接收端进行流量控制。
所述的近场通信软件栈逻辑链路层的流量控制方法,所述传输速率为106比特率、212比特率或424比特率。
所述的近场通信软件栈逻辑链路层的流量控制方法,在所述接收端建立一缓冲区,用于缓冲接收到的所述数据帧。
所述的近场通信软件栈逻辑链路层的流量控制方法,所述接收端接收所述数据帧的过程包括步骤:
A1、利用所述接收端接收所述发送端发送的所述数据帧;
A2、判断所述数据帧序号是否在所述接收窗口之内;
A3、当所述数据帧序号在所述接收窗口之内时,判断所述数据帧序号是否等于所述接收窗口下界;
A4、当所述数据帧序号不等于所述接收窗口下界时,将所述数据帧序号对应的数据帧放入到所述缓冲区;
A5、当所述数据帧序号等于所述接收窗口下界时,在所述缓冲区中查找是否含有与所述数据帧序号组成连续序列的数据帧;
A6、当在所述缓冲区中没有找到能够与所述数据帧序号组成连续序列的数据帧时,向所述接收端返回一确认帧,确认收到所述数据帧序号等于所述接收窗口下界的数据帧;以及
A7、当在所述缓冲区中找到能够与所述数据帧序号组成连续序列的数据帧时,将接收到的所述数据帧与所述能够组成连续序列的数据帧组成数据帧组,向所述接收端返回一确认帧,确认收到所述数据帧组中序号最大的数据帧:第i个数据帧。
所述的近场通信软件栈逻辑链路层的流量控制方法,所述步骤A7中,返回所述确认帧后,所述接收窗口下界设置为:FrameExpected =i+1,所述接收窗口上界设置为:TooFar = (i + ReceiveWindow ) MOD (MaxSeq + 1),其中,FrameExpected表示所述接收窗口下界,TooFar表示所述接收窗口上界,MaxSeq表示需传输的数据帧序号的最大值,MOD表示模除。
所述的近场通信软件栈逻辑链路层的流量控制方法,所述发送端发送新的数据帧时,对所述发送窗口上界加1。
所述的近场通信软件栈逻辑链路层的流量控制方法,所述发送端接收到接收端返回的确认帧时,判断所述确认帧是否是所述发送窗口下界对应的确认帧,若是,对所述发送窗口下界加1,否则将所述确认帧的序号加1后作为新的发送窗口下界。
一种近场通信软件栈逻辑链路层的流量控制方法,其中,包括步骤:
A、在逻辑链路层设置用于对传输的数据帧进行流量控制的发送窗口及接收窗口;
B、根据上层应用确定的传输速率、信道质量确定的通信延迟时间以及数据帧的大小动态调节所述发送窗口尺寸及接收窗口尺寸;
C、所述发送窗口根据所述发送窗口尺寸的大小对发送端进行流量控制,所述接收窗口根据所述接收窗口尺寸的大小对接收端进行流量控制。
所述的近场通信软件栈逻辑链路层的流量控制方法,其中,所述接收窗口尺寸满足:ReceiveWindow=[FWT×DATARATE_MAX]/[(2+Link Miu)×8],其中,ReceiveWindow 表示接收窗口尺寸,FWT表示通信延迟时间,DATARATE_MAX表示传输速率,Link Miu表示发送端与接收端建立连接时指定的参数。
所述的近场通信软件栈逻辑链路层的流量控制方法,其中,所述传输速率为106kbps、212 kbps或424 kbps。
所述的近场通信软件栈逻辑链路层的流量控制方法,其中,在所述接收端建立一缓冲区,用于缓冲接收到的数据帧。
所述的近场通信软件栈逻辑链路层的流量控制方法,其中,接收端数据帧的过程包括步骤:
A1、接收端接收发送端发送的数据帧;
A2、判断所述数据帧序号是否在接收窗口之内;
A3、当所述数据帧序号在接收窗口之内时,判断所述数据帧序号是否等于接收窗口下界;
A4、当所述数据帧序号不等于接收窗口下界时,将该数据帧序号对应的数据帧放入到缓冲区;
A5、当所述数据帧序号等于接收窗口下界时,在所述缓冲区中查找是否含有与该数据帧序号组成连续序列的数据帧;
A6、当在所述缓冲区中没有找到能够与该数据帧序号组成连续序列的数据帧时,向接收端返回一确认帧,确认收到数据帧序号等于接收窗口下界的数据帧;
A7、当在所述缓冲区中找到能够与该数据帧序号组成连续序列的数据帧时,将接收到的数据帧与所述能够组成连续序列的数据帧组成数据帧组,向接收端返回一确认帧,确认收到所述数据帧组中序号最大的数据帧:第i个数据帧。
所述的近场通信软件栈逻辑链路层的流量控制方法,其中,所述步骤A7中,返回确认帧后,接收窗口下界设置为:FrameExpected =i+1,接收窗口上界设置为:TooFar = (i + ReceiveWindow ) MOD (MaxSeq + 1),其中,FrameExpected表示接收窗口下界,TooFar表示接收窗口上界,MaxSeq表示接收端需发送的数据帧序号的最大值,MOD表示模除。
所述的近场通信软件栈逻辑链路层的流量控制方法,其中,发送端发送新的数据帧时,对发送窗口上界加1。
所述的近场通信软件栈逻辑链路层的流量控制方法,其中,发送端接收到接收端返回的确认帧时,判断所述确认帧是否是发送窗口下界对应的确认帧,当是时,对发送窗口下界加1,否则将该确认帧的序号加1后作为新的发送窗口下界。
有益效果
本发明通过对逻辑链路层中设置用于对传输的数据帧进行流量控制的发送窗口及接收窗口,并且还根据上层应用、信道质量及数据帧大小动态的调节发送窗口尺寸与接收窗口尺寸,从而实现平衡了带宽利用率,又能很好的减少内存资源消耗的目的。
附图说明
图1为本发明近场通信软件栈逻辑链路层的流量控制方法较佳实施例的流程图。
图2为本发明中的发送窗口的结构示意图。
图3为本发明中接收端数据帧过程的具体流程图。
本发明的最佳实施方式
本发明提供一种近场通信软件栈逻辑链路层的流量控制方法,为使本发明的目的、技术方案及效果更加清楚、明确,以下对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
请参阅图1,图1为本发明近场通信软件栈逻辑链路层的流量控制方法较佳实施例的流程图,如图所示,包括步骤:
S101、在逻辑链路层设置用于对传输的数据帧进行流量控制的发送窗口及接收窗口;
S102、根据上层应用确定的传输速率、信道质量确定的通信延迟时间以及数据帧的大小动态调节所述发送窗口尺寸及接收窗口尺寸;
S103、所述发送窗口根据所述发送窗口尺寸的大小对发送端进行流量控制,所述接收窗口根据所述接收窗口尺寸的大小对接收端进行流量控制。
本发明中,所述发送窗口尺寸为:SendWindow=(NextFrameToSend- AckExpected) MOD (MaxSeq + 1),其中,SendWindow表示发送窗口尺寸,NextFrameToSend表示发送窗口上界,AckExpected表示发送窗口下界,MaxSeq表示需传输的数据帧序号的最大值;它们的意义是:所述发送窗口上界为所述发送端需要发送的下一个数据帧的序号,所述发送窗口下界为所述发送端已发送但尚未收到的数据帧中的最小序号,所述数据帧最大序号为需传输的数据帧中的最大序号;
所述接收窗口尺寸为:TooFar=(FrameExpected+ReceiveWindow)MOD (MaxSeq+ 1),其中,TooFar表示接收窗口上界,FrameExpected表示接收窗口下界,MaxSeq表示需传输的数据帧序号的最大值,ReceiveWindow表示接收窗口尺寸;它们的意义是:所述接收窗口上界为所述接收端允许接收的数据帧中的最大序号,所述接收窗口下界为所述接收端即将接收到的数据帧的序号。
其中,MOD表示模除,一种常用的二元运算,例如当a=bq+r,q是整数,并使其达到最大,此时,aMODb=r。另外,上述步骤只是为了方便说明,并不代表是对先后顺序的限定。通过上述步骤,对所述发送端的发送窗口及所述接受端的接收窗口进行了调节,从而使两种窗口能够更好的平衡带宽利用率以及减少内存资源消耗。
下面对发送窗口及接收窗口进行更详细的说明。
其中所述发送窗口用来对所述发送端的流量进行控制,所述发送窗口的含义表示所述发送端已发送但还未收到确认帧的数据帧序号表,如图2所示,其是一个最大尺寸为2n的发送窗口,这样数据帧的序号为0~2n-1,2n-1为数据帧最大序号,其中的发送窗口上界与发送窗口下界之间的黑色部分表示发送窗口尺寸(已发送但尚未收到确认帧的帧序号表),当所述发送端发送新的数据帧时,该数据帧的序号取值为发送窗口上界值,同时对上界加1,当所述发送端接收到发送窗口下界的确认帧时,发送窗口下界加1,当所述发送端接收到非下界帧的确认帧(其序号小于发送窗口上界)时,则将确认帧对应的序号加1作为新的发送窗口下界,从而对发送窗口进行调节,持续保持对所述发送端的流量进行控制。
其中所述接收窗口可以用来控制所述接收端可以接收哪些数据帧,对于所述接收端而言,只有数据帧的序号落入到接收窗口内的数据帧才能被所述接收端接收,接收窗口上界表示所述接收端允许接收的序号最大的数据帧,接收窗口下界表示所述接收端希望接收的数据帧的序号,任何落在接收窗口外面的数据帧都会被丢弃。
为了平衡带宽利用率与内存资源消耗之间的矛盾,本发明不再采用传统的做法,即根据经验值静态地指定接收窗口尺寸以及发送窗口尺寸,而是在每次通信建立连接时,根据上层应用、信道质量、数据帧大小等实际情况动态地计算接收窗口的尺寸以及发送窗口尺寸。
以所述接收端为例,其中上层应用确定了通信的传输速率,传输速率可能为106Kbps(比特率),212Kbps,424Kbps,用变量DATARATE_MAX来表示传输速率(一般来说,该传输速率取上层应用确定的最大传输速率),建立通信时可以在所述接收端的NFC控制器的generic gate(ETSI TS 102 622标准术语)中读取到DATARATE_MAX参数。
信道质量确定了两个NFC设备之间的通信延迟时间,通信延迟时间为302us至4949ms,用变量FWT来表示通信延迟时间,建立通信时可以在接收端的NFC控制器的generic gate中读取到FWT参数。
面向的通信对象不同,在Logical Link Control Protocol中采用的数据帧大小可能不同,通信双方在建立连接时需要指定参数Link Maximum Information Unit(Link MIU),根据Link MIU可以计算出通信时的数据帧大小。
如此,即可获得所需的参数,然后,将接收窗口尺寸(ReceiveWindow)设置为:
ReceiveWindow =[FWT×DATARATE_MAX]/[(2+Link Miu)×8]。
同时,将发送窗口尺寸设置为与接收窗口尺寸相同,但发送窗口尺寸获取时,其参数FWT、DATARATE_MAX是通过所述发送端的NFC控制器中读取的。通过上面的步骤,可以很好解决带宽利用率以及内存资源消耗之间的矛盾问题,发送窗口尺寸与接收窗口尺寸处于一个动态调节的过程,而不是静态地指定,从而实现即平衡了带宽利用率,又能很好的减少内存资源消耗的目的。
对于所述接收端而言,在所述接收端中会建立一个缓冲区,用来缓冲接收到的数据帧,如果接收到在接收窗口之内且不是接收窗口下界的数据帧,则会将该数据帧先放入到缓冲区。具体来说,如图3所示,其包括步骤:
S201、利用所述接收端接收所述发送端发送的数据帧;
S202、判断所述数据帧序号是否在接收窗口之内;
S203、当所述数据帧序号在接收窗口之内时,判断所述数据帧序号是否等于接收窗口下界;当该数据帧序号不在接收窗口之内时,则丢弃该数据帧,即进入步骤S208;
S204、当所述数据帧序号不等于接收窗口下界时,将该数据帧序号对应的数据帧放入到缓冲区;
S205、当所述数据帧序号等于接收窗口下界时,在所述缓冲区中查找是否含有与该数据帧序号组成连续序列的数据帧;
S206、当在所述缓冲区中没有找到能够与该数据帧序号组成连续序列的数据帧时,向所述接收端返回一确认帧,确认收到数据帧序号等于接收窗口下界的数据帧;
S207、当在所述缓冲区中找到能够与该数据帧序号组成连续序列的数据帧时,将接收到的数据帧与所述能够组成连续序列的数据帧组成数据帧组,向接收端返回一确认帧,确认收到所述数据帧组中序号最大的数据帧:第i个数据帧;
S208、丢弃该数据帧。
在上面的步骤S207中,返回确认帧后,还需对接收窗口进行如下调整:接收窗口下界设置为:FrameExpected =i+1,接收窗口上界设置为:TooFar = (i + ReceiveWindow ) MOD (MaxSeq + 1)。
综上所述,本发明通过对逻辑链路层中设置用于对传输的数据帧进行流量控制的发送窗口及接收窗口,并且还根据上层应用、信道质量及数据帧大小动态的调节发送窗口尺寸与接收窗口尺寸,从而实现平衡了带宽利用率,又能很好的减少内存资源消耗的目的。
应当理解的是,本发明的应用不限于上述的举例,对本领域普通技术人员来说,可以根据上述说明加以改进或变换,所有这些改进和变换都应属于本发明所附权利要求的保护范围。
本发明的实施方式
工业实用性
序列表自由内容

Claims (15)

  1. 一种近场通信软件栈逻辑链路层的流量控制方法,包括步骤:
    A、在逻辑链路层设置用于对传输的数据帧进行流量控制的发送窗口及接收窗口;
    B、根据上层应用确定的传输速率、信道质量确定的通信延迟时间以及数据帧的大小动态调节所述发送窗口尺寸以及所述接收窗口尺寸;所述接收窗口尺寸满足公式:ReceiveWindow=[FWT×DATARATE_MAX]/[(2+Link Miu)×8],其中,ReceiveWindow 表示所述接收窗口尺寸,FWT表示所述通信延迟时间,DATARATE_MAX表示所述传输速率,Link Miu表示发送端与接收端建立连接时指定的参数;而FWT以及DATARATE_MAX在所述接收端的近场通信控制器读取;以及
    C、所述发送窗口根据所述发送窗口尺寸的大小对所述发送端进行流量控制,所述接收窗口根据所述接收窗口尺寸的大小对所述接收端进行流量控制。
  2. 根据权利要求1所述的近场通信软件栈逻辑链路层的流量控制方法,所述传输速率为106比特率、212比特率或424比特率。
  3. 根据权利要求1所述的近场通信软件栈逻辑链路层的流量控制方法,在所述接收端建立一缓冲区,用于缓冲接收到的所述数据帧。
  4. 根据权利要求3所述的近场通信软件栈逻辑链路层的流量控制方法,所述接收端接收所述数据帧的过程包括步骤:
    A1、利用所述接收端接收所述发送端发送的所述数据帧;
    A2、判断所述数据帧序号是否在所述接收窗口之内;
    A3、当所述数据帧序号在所述接收窗口之内时,判断所述数据帧序号是否等于所述接收窗口下界;
    A4、当所述数据帧序号不等于所述接收窗口下界时,将所述数据帧序号对应的数据帧放入到所述缓冲区;
    A5、当所述数据帧序号等于所述接收窗口下界时,在所述缓冲区中查找是否含有与所述数据帧序号组成连续序列的数据帧;
    A6、当在所述缓冲区中没有找到能够与所述数据帧序号组成连续序列的数据帧时,向所述接收端返回一确认帧,确认收到所述数据帧序号等于所述接收窗口下界的数据帧;以及
    A7、当在所述缓冲区中找到能够与所述数据帧序号组成连续序列的数据帧时,将接收到的所述数据帧与所述能够组成连续序列的数据帧组成数据帧组,向所述接收端返回一确认帧,确认收到所述数据帧组中序号最大的数据帧:第i个数据帧。
  5. 根据权利要求4所述的近场通信软件栈逻辑链路层的流量控制方法,所述步骤A7中,返回所述确认帧后,所述接收窗口下界设置为:FrameExpected =i+1,所述接收窗口上界设置为:TooFar = (i + ReceiveWindow ) MOD (MaxSeq + 1),其中,FrameExpected表示所述接收窗口下界,TooFar表示所述接收窗口上界,MaxSeq表示需传输的数据帧序号的最大值,MOD表示模除。
  6. 根据权利要求5所述的近场通信软件栈逻辑链路层的流量控制方法,所述发送端发送新的数据帧时,对所述发送窗口上界加1。
  7. 根据权利要求5所述的近场通信软件栈逻辑链路层的流量控制方法,所述发送端接收到接收端返回的确认帧时,判断所述确认帧是否是所述发送窗口下界对应的确认帧,若是,对所述发送窗口下界加1,否则将所述确认帧的序号加1后作为新的发送窗口下界。
  8. 一种近场通信软件栈逻辑链路层的流量控制方法,包括步骤:
    A、在逻辑链路层设置用于对传输的数据帧进行流量控制的发送窗口及接收窗口;
    B、根据上层应用确定的传输速率、信道质量确定的通信延迟时间以及数据帧的大小动态调节所述发送窗口尺寸以及所述接收窗口尺寸;以及
    C、所述发送窗口根据所述发送窗口尺寸的大小对发送端进行流量控制,所述接收窗口根据所述接收窗口尺寸的大小对接收端进行流量控制。
  9. 根据权利要求8所述的近场通信软件栈逻辑链路层的流量控制方法,所述接收窗口尺寸满足公式:ReceiveWindow=[FWT×DATARATE_MAX]/[(2+Link Miu)×8],其中,ReceiveWindow 表示所述接收窗口尺寸,FWT表示所述通信延迟时间,DATARATE_MAX表示所述传输速率,Link Miu表示所述发送端与所述接收端建立连接时指定的参数。
  10. 根据权利要求9所述的近场通信软件栈逻辑链路层的流量控制方法,所述传输速率为106比特率、212 比特率或424比特率。
  11. 根据权利要求9所述的近场通信软件栈逻辑链路层的流量控制方法,在所述接收端建立一缓冲区,用于缓冲接收到的所述数据帧。
  12. 根据权利要求11所述的近场通信软件栈逻辑链路层的流量控制方法,所述接收端接收所述数据帧的过程包括步骤:
    A1、利用所述接收端接收所述发送端发送的所述数据帧;
    A2、判断所述数据帧序号是否在所述接收窗口之内;
    A3、当所述数据帧序号在所述接收窗口之内时,判断所述数据帧序号是否等于所述接收窗口下界;
    A4、当所述数据帧序号不等于所述接收窗口下界时,将所述数据帧序号对应的数据帧放入到所述缓冲区;
    A5、当所述数据帧序号等于接收窗口下界时,在所述缓冲区中查找是否含有与所述数据帧序号组成连续序列的数据帧;
    A6、当在所述缓冲区中没有找到能够与所述数据帧序号组成连续序列的数据帧时,向所述接收端返回一确认帧,确认收到所述数据帧序号等于所述接收窗口下界的数据帧;
    A7、当在所述缓冲区中找到能够与所述数据帧序号组成连续序列的数据帧时,将接收到的所述数据帧与所述能够组成连续序列的数据帧组成数据帧组,向所述接收端返回一确认帧,确认收到所述数据帧组中序号最大的数据帧:第i个数据帧。
  13. 根据权利要求12所述的近场通信软件栈逻辑链路层的流量控制方法,所述步骤A7中,返回所述确认帧后,所述接收窗口下界设置为:FrameExpected =i+1,所述接收窗口上界设置为:TooFar = (i + ReceiveWindow ) MOD (MaxSeq + 1),其中,FrameExpected表示所述接收窗口下界,TooFar表示所述接收窗口上界,MaxSeq表示需传输的数据帧序号的最大值,MOD表示模除。
  14. 根据权利要求13所述的近场通信软件栈逻辑链路层的流量控制方法,所述发送端发送新的数据帧时,对所述发送窗口上界加1。
  15. 根据权利要求13所述的近场通信软件栈逻辑链路层的流量控制方法,所述发送端接收到所述接收端返回的所述确认帧时,判断所述确认帧是否是所述发送窗口下界对应的确认帧,若是,对所述发送窗口下界加1,否则将所述确认帧的序号加1后作为新的发送窗口下界。
PCT/CN2013/079965 2012-12-06 2013-07-24 近场通信软件栈逻辑链路层的流量控制方法 WO2014086154A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US14/388,078 US9264106B2 (en) 2012-12-06 2013-07-24 Method for controlling flows of logical link layer in near field communication software stack
EP13859956.8A EP2930895B1 (en) 2012-12-06 2013-07-24 Traffic control method for near-field communication software stack logic link layer

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210518744.3A CN103051558B (zh) 2012-12-06 2012-12-06 一种近场通信软件栈逻辑链路层的流量控制方法
CN201210518744.3 2012-12-06

Publications (1)

Publication Number Publication Date
WO2014086154A1 true WO2014086154A1 (zh) 2014-06-12

Family

ID=48064063

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/079965 WO2014086154A1 (zh) 2012-12-06 2013-07-24 近场通信软件栈逻辑链路层的流量控制方法

Country Status (4)

Country Link
US (1) US9264106B2 (zh)
EP (1) EP2930895B1 (zh)
CN (1) CN103051558B (zh)
WO (1) WO2014086154A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114095126A (zh) * 2021-11-11 2022-02-25 北京邮电大学 一种数据发送速率调整方法、***及装置

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051558B (zh) 2012-12-06 2016-06-15 惠州Tcl移动通信有限公司 一种近场通信软件栈逻辑链路层的流量控制方法
CN106470448B (zh) * 2015-08-14 2020-10-30 中兴通讯股份有限公司 一种基站的信令接收方法和装置
WO2021056154A1 (zh) * 2019-09-23 2021-04-01 Oppo广东移动通信有限公司 一种窗口调整方法及装置、网络设备、终端设备
CN111049754B (zh) * 2019-12-18 2023-01-10 上海众源网络有限公司 数据通信方法、装置、设备和计算机可读存储介质
CN113872726B (zh) * 2020-06-30 2023-03-03 华为技术有限公司 近场通信场景下调整发送速率的方法、装置及***
CN115119216B (zh) * 2022-06-24 2024-05-14 深圳友讯达科技股份有限公司 一种常供电的LoRaWAN网络通信方法及***

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7283474B1 (en) * 1999-06-04 2007-10-16 Nokia Corporation Packet data transmission control
CN101159520A (zh) * 2007-10-29 2008-04-09 中兴通讯股份有限公司 数据传输方法
CN101895332A (zh) * 2010-08-09 2010-11-24 中国电子科技集团公司第五十四研究所 一种空间tcp流量控制和差错控制方法
CN102664867A (zh) * 2012-03-15 2012-09-12 南京邮电大学 一种卫星通信***中的传输协议的增强方法
CN103051558A (zh) * 2012-12-06 2013-04-17 惠州Tcl移动通信有限公司 一种近场通信软件栈逻辑链路层的流量控制方法

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6198941B1 (en) * 1998-08-07 2001-03-06 Lucent Technologies Inc. Method of operating a portable communication device
JP3805569B2 (ja) * 1999-07-08 2006-08-02 富士通株式会社 ウィンドウ制御機能を有する制御装置、ウィンドウ制御プログラムを記憶した記憶媒体及びウィンドウ制御機能を有する通信制御装置
AU6719200A (en) * 1999-09-20 2001-04-24 Nokia Corporation Cumulative acknowledgement transmission in an automatic repeat request
US7616638B2 (en) * 2003-07-29 2009-11-10 Orbital Data Corporation Wavefront detection and disambiguation of acknowledgments
US7516238B2 (en) * 2003-09-30 2009-04-07 Microsoft Corporation Background transport service
EP1821442A4 (en) * 2004-11-17 2011-07-20 Sharp Kk TRANSMITTER APPARATUS, RECEIVER APPARATUS AND COMMUNICATION SYSTEM
KR100748086B1 (ko) * 2005-11-10 2007-08-09 한국전자통신연구원 무선 통신 채널 품질 유지 방법 및 이를 이용한 무선 통신장치
JP4511567B2 (ja) * 2006-02-21 2010-07-28 ホアウェイ・テクノロジーズ・カンパニー・リミテッド データ伝送レートを制御する方法とシステム
US8125904B2 (en) * 2006-05-30 2012-02-28 Broadcom Corporation Method and system for adaptive queue and buffer control based on monitoring and active congestion avoidance in a packet network switch
KR101417937B1 (ko) * 2007-02-06 2014-08-05 엘지전자 주식회사 무선 통신 시스템 및 이의 데이터 전송방법
ATE505883T1 (de) * 2007-11-01 2011-04-15 Ericsson Telefon Ab L M Begrenzung der rlc-fenstergrösse in einer hsdpa- flusssteuerung
US8189532B2 (en) * 2007-12-26 2012-05-29 Nokia Corporation Mobile node, a method or handover and a computer program
US8737220B2 (en) * 2008-09-23 2014-05-27 The Trustees Of Columbia University In The City Of New York Systems for providing feedback to sending entities
US8565242B2 (en) * 2008-11-04 2013-10-22 Blackberry Limited Transport protocol performance using network bit rate information

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7283474B1 (en) * 1999-06-04 2007-10-16 Nokia Corporation Packet data transmission control
CN101159520A (zh) * 2007-10-29 2008-04-09 中兴通讯股份有限公司 数据传输方法
CN101895332A (zh) * 2010-08-09 2010-11-24 中国电子科技集团公司第五十四研究所 一种空间tcp流量控制和差错控制方法
CN102664867A (zh) * 2012-03-15 2012-09-12 南京邮电大学 一种卫星通信***中的传输协议的增强方法
CN103051558A (zh) * 2012-12-06 2013-04-17 惠州Tcl移动通信有限公司 一种近场通信软件栈逻辑链路层的流量控制方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2930895A4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114095126A (zh) * 2021-11-11 2022-02-25 北京邮电大学 一种数据发送速率调整方法、***及装置

Also Published As

Publication number Publication date
CN103051558B (zh) 2016-06-15
EP2930895A1 (en) 2015-10-14
EP2930895A4 (en) 2016-07-20
US9264106B2 (en) 2016-02-16
EP2930895B1 (en) 2020-04-15
US20150065040A1 (en) 2015-03-05
CN103051558A (zh) 2013-04-17

Similar Documents

Publication Publication Date Title
WO2014086154A1 (zh) 近场通信软件栈逻辑链路层的流量控制方法
WO2021004316A1 (zh) Uci传输方法、接收方法、终端和网络设备
CN1197279C (zh) 用于在通信链路上传送多媒体信息的设备和相关的方法
WO2014036859A1 (zh) 一种触摸屏终端的近场通信方法、***及触摸屏终端
CA2454987C (en) Efficient polled frame exchange on a shared-communications channel
WO2018066907A1 (en) Method for transferring signaling messages of terminal between network functions
KR20220025006A (ko) 사이드링크 정보 송신 방법, 수신 방법 및 이를 위한 단말, 제어 노드
CN111770428A (zh) 一种无线设备的监听方法
CN102986243A (zh) 用于在音频/视频网络中进行同步通信的方法和***
WO2010008248A2 (en) A method and an apparatus for controlling messages between host and controller.
CN1276635C (zh) 提供用于传送数据分组的串行总线通信协议的方法
EP2922365B1 (en) Method, system, and station for efficient block acknowledgement connection
CN101650872B (zh) 用电信息采集***及方法
CN1798085A (zh) 一种无线链路控制子层发送缓存大小的调整方法
CN101365185A (zh) 一种实现回程数据传输的基站、方法及移动通信***
CN101478529A (zh) 为无线通信优化功耗及降低mips要求的方法和***
EP2736189B1 (en) Status report processing method, communication device, and communication system
WO2019024850A1 (zh) 一种传输信息的方法、基站的工作方法及基站
EP3955637A1 (en) Data processing method, communication apparatus, and system
CN110224803B (zh) 一种实现beacon自主发现的LoRa通信方法
WO2020192516A1 (zh) 下行分配索引确定方法、终端和网络设备
CN201360355Y (zh) 一种无线传输装置
CN100450074C (zh) 链形组网时共享式高层数据链路控制链路传输数据的方法
CN213028055U (zh) 基于c-ran的无线接入***
CN101651612A (zh) 数据传输***与方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13859956

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2013859956

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 14388078

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE