Movatterモバイル変換


[0]ホーム

URL:


CN116963175A - Data transmission method, device and system - Google Patents

Data transmission method, device and system
Download PDF

Info

Publication number
CN116963175A
CN116963175ACN202210395709.0ACN202210395709ACN116963175ACN 116963175 ACN116963175 ACN 116963175ACN 202210395709 ACN202210395709 ACN 202210395709ACN 116963175 ACN116963175 ACN 116963175A
Authority
CN
China
Prior art keywords
wireless device
tcp
message
wireless
sending
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
CN202210395709.0A
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
Original Assignee
Huawei Technologies Co Ltd
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 LtdfiledCriticalHuawei Technologies Co Ltd
Priority to CN202210395709.0ApriorityCriticalpatent/CN116963175A/en
Publication of CN116963175ApublicationCriticalpatent/CN116963175A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

A data transmission method, device and system are disclosed, which belong to the communication technical field. After receiving the TCP message from the sender device, the first wireless device stores the TCP message. The first wireless device sends a MAC frame including the TCP message to the second wireless device over the wireless network. The first wireless device sends a TCP acknowledgement message to the sender device before receiving an acknowledgement frame for the MAC frame over the wireless network, the TCP acknowledgement message indicating that the TCP message transmission was successful. The first wireless device does not need to wait for receiving the TCP acknowledgement message from the receiving end device, but generates the TCP acknowledgement message by itself and sends the TCP acknowledgement message to the sending end device. The second wireless device does not need to send all TCP acknowledgement messages from the receiving end device to the first wireless device through the wireless network, and the number of TCP acknowledgement messages transmitted through the wireless network can be reduced, so that the burden of the wireless network is reduced.

Description

Translated fromChinese
数据传输方法、装置及系统Data transmission method, device and system

技术领域Technical field

本申请涉及通信技术领域,特别涉及一种数据传输方法、装置及系统。The present application relates to the field of communication technology, and in particular to a data transmission method, device and system.

背景技术Background technique

传输控制协议(Transmission Control Protocol,TCP)通过确认应答机制和重传机制等实现可靠性传输。在确认应答机制下,如果接收端设备接收到来自发送端设备的TCP报文,则接收端设备向发送端设备发送TCP确认(acknowledgement,ACK)报文,以指示该TCP报文传输成功。在重传机制下,如果发送端设备确定接收端设备未接收到该发送端设备发送的TCP报文,则发送端设备向接收端设备重传该TCP报文。Transmission Control Protocol (TCP) achieves reliable transmission through acknowledgment response mechanisms and retransmission mechanisms. Under the acknowledgment mechanism, if the receiving device receives a TCP message from the sending device, the receiving device sends a TCP acknowledgment (ACK) message to the sending device to indicate that the TCP message is successfully transmitted. Under the retransmission mechanism, if the sending device determines that the receiving device has not received the TCP message sent by the sending device, the sending device retransmits the TCP message to the receiving device.

当发送端设备与接收端设备之间通过无线网络通信时,接收端设备向发送端设备传输TCP确认报文以及发送端设备向接收端设备重传TCP报文都需要占用无线资源,导致无线网络的负担较大。When the sending device and the receiving device communicate through the wireless network, the receiving device transmits the TCP confirmation message to the sending device and the sending device retransmits the TCP message to the receiving device. Both need to occupy wireless resources, resulting in wireless network The burden is greater.

发明内容Contents of the invention

本申请提供了一种数据传输方法、装置及系统,可以解决通过无线网络传输TCP流时无线网络的负担较大的问题。This application provides a data transmission method, device and system, which can solve the problem of a heavy burden on the wireless network when transmitting TCP streams through the wireless network.

第一方面,提供了一种数据传输方法。其中第一无线设备为与发送端设备连接的无线设备,第二无线设备为与接收端设备连接的无线设备。该方法包括:第一无线设备接收来自发送端设备的TCP报文。第一无线设备存储该TCP报文。第一无线设备通过无线网络向第二无线设备发送第一媒体访问控制(Medium Access Control,MAC)帧,第一MAC帧包括该TCP报文。第一无线设备在通过无线网络接收到针对第一MAC帧的确认帧之前,向发送端设备发送TCP确认报文,该TCP确认报文指示该TCP报文传输成功。In the first aspect, a data transmission method is provided. The first wireless device is a wireless device connected to the sending device, and the second wireless device is a wireless device connected to the receiving device. The method includes: the first wireless device receives a TCP message from a sending device. The first wireless device stores the TCP message. The first wireless device sends a first media access control (Medium Access Control, MAC) frame to the second wireless device through the wireless network, and the first MAC frame includes the TCP message. Before receiving the acknowledgment frame for the first MAC frame through the wireless network, the first wireless device sends a TCP acknowledgment message to the sending device, and the TCP acknowledgment message indicates that the TCP message is successfully transmitted.

本申请中,第一无线设备无需等待接收来自接收端设备的TCP确认报文,而是自行生成TCP确认报文并发送给发送端设备。这样第二无线设备无需通过无线网络向第一无线设备发送来自接收端设备的所有TCP确认报文,可以减少通过无线网络传输的TCP确认报文的数量,从而降低无线网络的负担。另外,由于第一无线设备存储了来自发送端设备的TCP报文,因此第一无线设备可以在接收到来自第二无线设备的确认帧之前,就向发送端设备发送TCP确认报文。一方面,可以提高向发送端设备回复TCP确认报文的效率,从而保证发送端设备对后续TCP报文的发送速率,进而提高TCP吞吐量。另一方面,第一无线设备在确定第二无线设备未接收到MAC帧或接收端设备未接收到TCP报文时,可以采用MAC帧向第二无线设备重新发送存储的TCP报文,从而保证TCP传输的可靠性。In this application, the first wireless device does not need to wait to receive a TCP confirmation message from the receiving device, but generates a TCP confirmation message by itself and sends it to the sending device. In this way, the second wireless device does not need to send all TCP acknowledgment messages from the receiving device to the first wireless device through the wireless network, which can reduce the number of TCP acknowledgment messages transmitted through the wireless network, thereby reducing the burden on the wireless network. In addition, since the first wireless device stores the TCP message from the sending device, the first wireless device can send the TCP acknowledgment message to the sending device before receiving the acknowledgment frame from the second wireless device. On the one hand, it can improve the efficiency of replying TCP confirmation messages to the sending device, thereby ensuring the sending rate of subsequent TCP messages by the sending device, thereby improving TCP throughput. On the other hand, when the first wireless device determines that the second wireless device has not received the MAC frame or the receiving end device has not received the TCP message, it can use the MAC frame to resend the stored TCP message to the second wireless device, thereby ensuring Reliability of TCP transmission.

可选地,当第一无线设备通过无线网络接收到来自第二无线设备的对TCP报文传输失败的传输层指示时,第一无线设备通过无线网络向第二无线设备发送第二MAC帧,第二MAC帧包括第一无线设备存储的TCP报文。Optionally, when the first wireless device receives a transport layer indication of TCP packet transmission failure from the second wireless device through the wireless network, the first wireless device sends the second MAC frame to the second wireless device through the wireless network, The second MAC frame includes the TCP message stored by the first wireless device.

本申请中,第一无线设备在确定TCP报文传输失败后,通过第二无线设备向接收端设备重传存储的TCP报文,以保证TCP传输的可靠性。In this application, after determining that the TCP message transmission fails, the first wireless device retransmits the stored TCP message to the receiving end device through the second wireless device to ensure the reliability of TCP transmission.

可选地,当第一无线设备通过无线网络接收到来自第二无线设备的对TCP报文传输成功的传输层指示时,第一无线设备删除存储的TCP报文。Optionally, when the first wireless device receives a transport layer indication of successful transmission of the TCP message from the second wireless device through the wireless network, the first wireless device deletes the stored TCP message.

本申请中,第一无线设备在确定TCP报文传输成功后,删除存储的TCP报文,以释放存储空间。In this application, after determining that the TCP message is successfully transmitted, the first wireless device deletes the stored TCP message to release storage space.

可选地,第一无线设备与发送端设备通过有线网络连接。第二无线设备与接收端设备通过有线网络连接。Optionally, the first wireless device and the sending end device are connected through a wired network. The second wireless device is connected to the receiving end device through a wired network.

本申请中,在发送端设备与接收端设备之间的无线网络仅包括第一无线设备与第二无线设备之间的无线网络的情况下,通过第一无线设备存储来自发送端设备的TCP报文,并向发送端设备发送TCP确认报文,解决了由于发送端设备与接收端设备之间的无线网络的不稳定性而影响发送端设备对TCP流的发送速率的问题,从而能够有效提高发送端设备与接收端设备之间的TCP吞吐量。In this application, when the wireless network between the sending device and the receiving device only includes the wireless network between the first wireless device and the second wireless device, the first wireless device stores the TCP packet from the sending device. text, and sends a TCP confirmation message to the sending device, which solves the problem of affecting the sending rate of the TCP flow by the sending device due to the instability of the wireless network between the sending device and the receiving device, thus effectively improving the TCP throughput between the sending device and the receiving device.

第二方面,提供了一种数据传输方法。其中第一无线设备为与接收端设备连接的无线设备,第二无线设备为与发送端设备连接的无线设备。该方法包括:第一无线设备通过无线网络接收来自第二无线设备的一个或多个MAC帧,该一个或多个MAC帧包括来自发送端设备的多个TCP报文。第一无线设备通过无线网络向第二无线设备发送针对该一个或多个MAC帧的确认帧。第一无线设备向接收端设备发送多个TCP报文。第一无线设备通过无线网络向第二无线设备发送传输层指示,该传输层指示用于指示多个TCP报文是否传输成功。The second aspect provides a data transmission method. The first wireless device is a wireless device connected to the receiving end device, and the second wireless device is a wireless device connected to the sending end device. The method includes: the first wireless device receives one or more MAC frames from the second wireless device through the wireless network, where the one or more MAC frames include multiple TCP messages from the sending end device. The first wireless device sends an acknowledgment frame for the one or more MAC frames to the second wireless device over the wireless network. The first wireless device sends multiple TCP messages to the receiving device. The first wireless device sends a transport layer indication to the second wireless device through the wireless network, where the transport layer indication is used to indicate whether the multiple TCP messages are successfully transmitted.

本申请中,第一无线设备通过传输层指示向第二无线设备一次性指示多个TCP报文是否传输成功。由于第二无线设备自行生成TCP确认报文并发送给发送端设备,因此第一无线设备是否向第二无线设备发送来自接收端设备的TCP确认报文,以及第一无线设备通过无线网络向第二无线设备发送传输层指示的数量和时机都不会对发送端设备造成影响,相较于需要传输TCP确认报文以使发送端设备调整发送窗口的现有方案,发送传输层指示可以减少无线网络所需传输的数据量,从而降低无线网络的负担。另外,虽然传输层指示和现有的TCP确认报文都是用于指示TCP报文是否传输成功,但是现有的TCP确认报文是需要传递给发送端设备的,即用于发送端设备确定TCP报文是否传输成功,会影响发送端设备的发送窗口,而本申请中的传输层指示不会传递给发送端设备,用于第一无线设备确定TCP报文是否传输成功。In this application, the first wireless device indicates to the second wireless device whether multiple TCP packets are successfully transmitted at once through a transport layer indication. Since the second wireless device generates the TCP confirmation message by itself and sends it to the sending device, whether the first wireless device sends the TCP confirmation message from the receiving device to the second wireless device, and the first wireless device sends the TCP confirmation message to the third wireless device through the wireless network. The number and timing of transport layer instructions sent by the wireless device will not affect the sending device. Compared with the existing solution that requires the transmission of TCP confirmation messages to allow the sending device to adjust the sending window, sending transport layer instructions can reduce the number of wireless devices. The amount of data that the network needs to transmit, thereby reducing the burden on the wireless network. In addition, although the transport layer indication and the existing TCP confirmation message are used to indicate whether the TCP message is successfully transmitted, the existing TCP confirmation message needs to be passed to the sending device, that is, it is used by the sending device to determine Whether the TCP message is successfully transmitted will affect the sending window of the sending device, and the transport layer indication in this application will not be passed to the sending device and is used by the first wireless device to determine whether the TCP message is successfully transmitted.

可选地,第一无线设备根据第一无线设备与接收端设备之间的往返时延以及第一无线设备对TCP报文所属的TCP流的接收速率,确定用于指示该TCP流中的TCP报文是否传输成功的传输层指示的发送频率。可选地,传输层指示的发送频率跟第一无线设备与接收端设备之间的往返时延负相关,跟第一无线设备对TCP报文所属的TCP流的接收速率正相关。Optionally, the first wireless device determines the TCP value used to indicate the TCP flow in the TCP flow according to the round-trip delay between the first wireless device and the receiving end device and the reception rate of the TCP flow to which the TCP message belongs. The sending frequency indicated by the transport layer whether the message is successfully transmitted. Optionally, the transmission frequency indicated by the transport layer is negatively correlated with the round-trip delay between the first wireless device and the receiving end device, and positively correlated with the first wireless device's reception rate of the TCP flow to which the TCP message belongs.

由于本申请中,传输层指示的发送频率不会影响发送端设备对TCP流的发送速率,因此第一无线设备可以根据自身对TCP报文和TCP确认报文的实际接收情况确定传输层指示的发送频率,例如可以将传输层指示的发送频率设置的较小,以减少传输层指示对无线网络的占用,从而降低无线网络的负担。Since in this application, the sending frequency indicated by the transport layer will not affect the sending rate of the TCP stream by the sending device, the first wireless device can determine the sending frequency indicated by the transport layer based on its actual reception of TCP messages and TCP confirmation messages. The sending frequency, for example, the sending frequency of the transport layer indication can be set smaller to reduce the occupation of the wireless network by the transport layer indication, thereby reducing the burden on the wireless network.

可选地,传输层指示为TCP确认报文。这样第二无线设备接收到传输层指示后,可以基于普通的TCP协议栈解析TCP确认报文,以确定对应的TCP报文的传输状态,无需改变第一无线设备与第二无线设备之间的传输协议,实现方式简单。Optionally, the transport layer indication is a TCP confirmation message. In this way, after receiving the transport layer indication, the second wireless device can parse the TCP confirmation message based on the ordinary TCP protocol stack to determine the transmission status of the corresponding TCP message without changing the communication between the first wireless device and the second wireless device. Transmission protocol, simple to implement.

可选地,传输层指示在一个MAC帧中。Optionally, the transport layer indication is in a MAC frame.

本申请中,第一无线设备采用一个MAC帧携带用于指示多个TCP报文是否传输成功的传输层指示,可以减少对无线网络的资源消耗,从而降低无线网络的负担。In this application, the first wireless device uses a MAC frame to carry a transport layer indication indicating whether multiple TCP messages are successfully transmitted, which can reduce resource consumption on the wireless network, thereby reducing the burden on the wireless network.

第三方面,提供了一种数据传输方法。其中第一无线设备为与接收端设备连接的无线设备,第二无线设备为与发送端设备连接的无线设备。第一无线设备通过无线网络接收来自第二无线设备的MAC帧,该MAC帧包括来自发送端设备的TCP报文。第一无线设备存储该TCP报文。第一无线设备通过无线网络向第二无线设备发送针对该MAC帧的确认帧。第一无线设备向接收端设备发送该TCP报文。当第一无线设备确定该TCP报文传输失败时,第一无线设备向接收端设备重传存储的该TCP报文。The third aspect provides a data transmission method. The first wireless device is a wireless device connected to the receiving end device, and the second wireless device is a wireless device connected to the sending end device. The first wireless device receives a MAC frame from the second wireless device through the wireless network, where the MAC frame includes a TCP message from the sending end device. The first wireless device stores the TCP message. The first wireless device sends an acknowledgment frame for the MAC frame to the second wireless device over the wireless network. The first wireless device sends the TCP message to the receiving end device. When the first wireless device determines that the TCP message transmission fails, the first wireless device retransmits the stored TCP message to the receiving end device.

本申请中,由于第一无线设备存储了来自发送端设备的TCP报文,因此在确定接收端设备对TCP报文接收失败后,第一无线设备可以直接向接收端设备重发存储的TCP报文,而无需由第二无线设备再通过无线网络重发TCP报文,进而可以减少通过无线网络重传的TCP报文的数量,从而降低无线网络的负担。In this application, since the first wireless device stores the TCP message from the sending device, after determining that the receiving device fails to receive the TCP message, the first wireless device can directly resend the stored TCP message to the receiving device. message without the need for the second wireless device to resend the TCP message through the wireless network, thereby reducing the number of TCP messages retransmitted through the wireless network, thereby reducing the burden on the wireless network.

可选地,第一无线设备不向第二无线设备转发来自接收端设备的TCP确认报文。Optionally, the first wireless device does not forward the TCP confirmation message from the receiving end device to the second wireless device.

本申请中,第二无线设备无需等待接收来自接收端设备的TCP确认报文,而是在接收到针对MAC帧的确认帧之后,确定第一无线设备已成功接收到该MAC帧中的TCP报文,然后自行生成TCP确认报文并发送给发送端设备。由于第二无线设备能够自行生成TCP确认报文并发送给发送端设备,因此第一无线设备无需通过无线网络向第二无线设备发送来自接收端设备的TCP确认报文,可以进一步降低无线网络的负担。In this application, the second wireless device does not need to wait to receive the TCP confirmation message from the receiving device. Instead, after receiving the confirmation frame for the MAC frame, it determines that the first wireless device has successfully received the TCP message in the MAC frame. message, and then generates a TCP confirmation message by itself and sends it to the sending device. Since the second wireless device can generate a TCP confirmation message by itself and send it to the sending device, the first wireless device does not need to send a TCP confirmation message from the receiving device to the second wireless device through the wireless network, which can further reduce the wireless network's burden.

可选地,当第一无线设备确定TCP报文传输成功时,第一无线设备删除存储的该TCP报文,以释放存储空间。Optionally, when the first wireless device determines that the TCP message is successfully transmitted, the first wireless device deletes the stored TCP message to release storage space.

可选地,当第一无线设备接收到来自接收端设备的指示TCP报文传输失败的TCP确认报文时,确定TCP报文传输失败。或者,当第一无线设备在发送TCP报文后的一定时长内未接收到指示该TCP报文的传输状态的TCP确认报文时,确定该TCP报文传输失败。Optionally, when the first wireless device receives a TCP confirmation message from the receiving end device indicating that the TCP message transmission fails, it is determined that the TCP message transmission fails. Alternatively, when the first wireless device does not receive a TCP confirmation message indicating the transmission status of the TCP message within a certain period of time after sending the TCP message, it is determined that the TCP message transmission fails.

可选地,第一无线设备与接收端设备通过有线网络连接。Optionally, the first wireless device and the receiving end device are connected through a wired network.

第四方面,提供了一种无线设备。所述无线设备包括多个功能模块,所述多个功能模块相互作用,实现上述第一方面或其各实施方式中的方法。所述多个功能模块可以基于软件、硬件或软件和硬件的结合实现,且所述多个功能模块可以基于具体实现进行任意组合或分割。A fourth aspect provides a wireless device. The wireless device includes multiple functional modules, and the multiple functional modules interact to implement the method in the above first aspect or each implementation manner thereof. The multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementation.

第五方面,提供了一种无线设备。所述无线设备包括多个功能模块,所述多个功能模块相互作用,实现上述第二方面或其各实施方式中的方法。所述多个功能模块可以基于软件、硬件或软件和硬件的结合实现,且所述多个功能模块可以基于具体实现进行任意组合或分割。In a fifth aspect, a wireless device is provided. The wireless device includes multiple functional modules, and the multiple functional modules interact to implement the method in the above second aspect or each implementation manner thereof. The multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementation.

第六方面,提供了一种无线设备。所述无线设备包括多个功能模块,所述多个功能模块相互作用,实现上述第三方面或其各实施方式中的方法。所述多个功能模块可以基于软件、硬件或软件和硬件的结合实现,且所述多个功能模块可以基于具体实现进行任意组合或分割。A sixth aspect provides a wireless device. The wireless device includes multiple functional modules, and the multiple functional modules interact to implement the method in the above third aspect or each implementation manner thereof. The multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementation.

第七方面,提供了一种数据传输系统,包括:第一无线设备和第二无线设备,所述第一无线设备与所述第二无线设备通过无线网络连接。所述第一无线设备用于执行上述第一方面或其各实施方式中的方法,所述第二无线设备用于执行上述第二方面或其各实施方式中的方法。In a seventh aspect, a data transmission system is provided, including: a first wireless device and a second wireless device, the first wireless device and the second wireless device being connected through a wireless network. The first wireless device is configured to perform the method in the above-mentioned first aspect or its various embodiments, and the second wireless device is configured to perform the method in the above-mentioned second aspect or its various embodiments.

第八方面,提供了一种数据传输系统,包括:第一无线设备和第二无线设备,所述第一无线设备与所述第二无线设备通过无线网络连接。第一无线设备用于执行上述第三方面或其各实施方式中的方法。所述第二无线设备用于接收来自发送端设备的TCP报文,并通过所述无线网络向所述第一无线设备发送MAC帧,所述MAC帧包括所述TCP报文。所述第二无线设备还用于响应于通过所述无线网络接收到针对所述MAC帧的确认帧,向所述发送端设备发送TCP确认报文,所述TCP确认报文指示所述TCP报文传输成功。In an eighth aspect, a data transmission system is provided, including: a first wireless device and a second wireless device, the first wireless device and the second wireless device being connected through a wireless network. The first wireless device is configured to perform the method in the above third aspect or its various implementations. The second wireless device is configured to receive a TCP message from a sending device, and send a MAC frame to the first wireless device through the wireless network, where the MAC frame includes the TCP message. The second wireless device is further configured to, in response to receiving an acknowledgment frame for the MAC frame through the wireless network, send a TCP acknowledgment message to the sending device, where the TCP acknowledgment message indicates that the TCP message The file transfer was successful.

第九方面,提供了一种无线设备,包括:处理器和收发器;A ninth aspect provides a wireless device, including: a processor and a transceiver;

所述处理器,用于调用计算机程序,协同所述收发器实现上述第一方面至第三方面中的任一方面或其各实施方式中的方法。The processor is configured to call a computer program and cooperate with the transceiver to implement any one of the above first to third aspects or the method in each implementation manner thereof.

第十方面,提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有指令,当所述指令被处理器执行时,实现上述第一方面至第三方面中的任一方面或其各实施方式中的方法。In a tenth aspect, a computer-readable storage medium is provided. Instructions are stored on the computer-readable storage medium. When the instructions are executed by a processor, any one of the above-mentioned first to third aspects is implemented. or methods in various embodiments thereof.

第十一方面,提供了一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时,实现上述第一方面至第三方面中的任一方面或其各实施方式中的方法。In an eleventh aspect, a computer program product is provided, including a computer program that, when executed by a processor, implements any one of the above-mentioned first to third aspects or the methods in each embodiment thereof.

第十二方面,提供了一种芯片,芯片包括可编程逻辑电路和/或程序指令,当芯片运行时,实现上述第一方面至第三方面中的任一方面或其各实施方式中的方法。In a twelfth aspect, a chip is provided. The chip includes programmable logic circuits and/or program instructions. When the chip is run, any one of the above-mentioned first to third aspects or the method in each embodiment thereof is implemented. .

附图说明Description of the drawings

图1是本申请实施例提供的一种TCP报文的传输示意图;Figure 1 is a schematic diagram of TCP packet transmission provided by an embodiment of the present application;

图2是本申请实施例提供的一种数据传输系统的结构示意图;Figure 2 is a schematic structural diagram of a data transmission system provided by an embodiment of the present application;

图3是本申请实施例提供的一种数据传输方法的流程示意图;Figure 3 is a schematic flow chart of a data transmission method provided by an embodiment of the present application;

图4是本申请实施例提供的另一种数据传输方法的流程示意图;Figure 4 is a schematic flow chart of another data transmission method provided by an embodiment of the present application;

图5是本申请实施例提供的一种无线设备的结构示意图;Figure 5 is a schematic structural diagram of a wireless device provided by an embodiment of the present application;

图6是本申请实施例提供的另一种无线设备的结构示意图;Figure 6 is a schematic structural diagram of another wireless device provided by an embodiment of the present application;

图7是本申请另一实施例提供的一种无线设备的结构示意图;Figure 7 is a schematic structural diagram of a wireless device provided by another embodiment of the present application;

图8是本申请另一实施例提供的另一种无线设备的结构示意图;Figure 8 is a schematic structural diagram of another wireless device provided by another embodiment of the present application;

图9是本申请又一实施例提供的一种无线设备的结构示意图;Figure 9 is a schematic structural diagram of a wireless device provided by another embodiment of the present application;

图10是本申请又一实施例提供的另一种无线设备的结构示意图;Figure 10 is a schematic structural diagram of another wireless device provided by yet another embodiment of the present application;

图11是本申请实施例提供的一种无线设备的框图。Figure 11 is a block diagram of a wireless device provided by an embodiment of the present application.

具体实施方式Detailed ways

为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

TCP提供一种面向连接的、可靠的字节流服务。TCP通过确认应答机制和重传机制等实现可靠性传输。确认应答机制使得发送端设备能够确定接收端设备已接收到该发送端设备所传输的数据。重传机制使得发送端设备在确定接收端设备未接收到该发送端设备所传输的数据之后,能够向接收端设备重传数据。TCP provides a connection-oriented, reliable byte stream service. TCP achieves reliable transmission through acknowledgment response mechanism and retransmission mechanism. The acknowledgment response mechanism enables the sending device to determine that the receiving device has received the data transmitted by the sending device. The retransmission mechanism enables the sending device to retransmit the data to the receiving device after determining that the receiving device has not received the data transmitted by the sending device.

在确认应答机制下,如果接收端设备接收到来自发送端设备的TCP报文,则接收端设备向发送端设备发送TCP确认报文,以指示该TCP报文传输成功。将一条TCP连接的生存周期内传输的所有数据当作一个字节流,字节流中的每个字节都有一个编号。一个TCP报文包括一个数据段,该数据段通常包含多个字节的数据。TCP报文中携带有序列号(sequencenumber),该序列号为该TCP报文中的数据段的第一个字节的编号。例如,一个TCP报文携带的序列号为401,该TCP报文的数据长度为100,则表示该TCP报文中的数据段属于字节流中的第401字节至第500字节。TCP的报文到达确认,是接收端设备对接收到的TCP报文的最高序列号的确认。接收端设备接收到一个TCP报文后,会向发送端设备返回TCP确认报文,该TCP确认报文携带有确认号(ACK number),该确认号为期望下次接收的TCP报文所携带的序列号。例如,接收端设备接收到携带有序列号401的TCP报文,该TCP报文的数据长度为100,则接收端设备向发送端设备返回携带有确认号501的TCP确认报文。本申请实施例涉及的数据长度的单位为字节。Under the acknowledgment response mechanism, if the receiving device receives a TCP message from the sending device, the receiving device sends a TCP acknowledgment message to the sending device to indicate that the TCP message is successfully transmitted. Treat all data transmitted during the lifetime of a TCP connection as a byte stream, and each byte in the byte stream has a number. A TCP message includes a data segment, which usually contains multiple bytes of data. The TCP message carries a sequence number, which is the number of the first byte of the data segment in the TCP message. For example, if the sequence number carried by a TCP packet is 401 and the data length of the TCP packet is 100, it means that the data segment in the TCP packet belongs to the 401st to 500th bytes in the byte stream. TCP packet arrival confirmation is the receiving end device's confirmation of the highest sequence number of the received TCP packet. After the receiving device receives a TCP message, it will return a TCP confirmation message to the sending device. The TCP confirmation message carries an acknowledgment number (ACK number), which is carried by the TCP message expected to be received next time. serial number. For example, if the receiving device receives a TCP message carrying sequence number 401, and the data length of the TCP message is 100, the receiving device returns a TCP confirmation message carrying acknowledgment number 501 to the sending device. The unit of data length involved in the embodiment of this application is bytes.

例如,图1是本申请实施例提供的一种TCP报文的传输示意图。如图1所示,发送端设备向接收端设备发送携带有序列号1、数据长度为1000的TCP报文a。接收端设备向发送端设备回复携带有确认号1001的TCP确认报文a。然后,发送端设备再向接收端设备发送携带有序列号1001、数据长度为1000的TCP报文b。接收端设备向发送端设备回复携带有确认号2001的TCP确认报文b。For example, FIG. 1 is a schematic diagram of TCP packet transmission provided by an embodiment of the present application. As shown in Figure 1, the sending device sends a TCP message a carrying sequence number 1 and data length 1000 to the receiving device. The receiving device replies to the sending device with a TCP confirmation message a carrying confirmation number 1001. Then, the sending device sends the TCP message b carrying the sequence number 1001 and the data length 1000 to the receiving device. The receiving device replies to the sending device with a TCP confirmation message b carrying confirmation number 2001.

但在错综复杂的网络中,TCP流在传输过程中可能会出现丢包。TCP采用重传机制来应对丢包问题。在重传机制下,如果发送端设备确定向接收端设备发送的TCP报文传输失败,则发送端设备向接收端设备重传该TCP报文。TCP采用的重传机制包括超时重传方式、快速重传方式和选择性确认(selective acknowledgment,SACK)重传方式。However, in complex networks, TCP streams may experience packet loss during transmission. TCP uses a retransmission mechanism to deal with packet loss. Under the retransmission mechanism, if the sending device determines that the TCP message sent to the receiving device fails to be transmitted, the sending device retransmits the TCP message to the receiving device. The retransmission mechanisms used by TCP include timeout retransmission, fast retransmission and selective acknowledgment (SACK) retransmission.

超时重传是指,发送端设备在发送数据时,设定一个定时器,当超过指定的时间后,没有收到对方的TCP确认报文,就会重发该数据。Timeout retransmission means that the sending device sets a timer when sending data. When the specified time exceeds and no TCP confirmation message is received from the other party, the data will be resent.

快速重传方式是一种不以时间为驱动,而是以数据为驱动的重传方式。快速重传的工作方式是,当发送端设备收到携带有相同确认号的多个TCP确认报文时,会在定时器过期之前,重传丢失的数据。该丢失的数据包括TCP确认报文携带的确认号所指示的数据。触发快速重传的TCP确认报文也称为重复确认(duplicate ACK,DACK)报文。The fast retransmission method is a retransmission method that is not time-driven but data-driven. The way fast retransmission works is that when the sending device receives multiple TCP confirmation messages carrying the same confirmation number, it will retransmit the lost data before the timer expires. The lost data includes the data indicated by the confirmation number carried in the TCP confirmation message. The TCP acknowledgment message that triggers fast retransmission is also called a duplicate acknowledgment (duplicate ACK, DACK) message.

SACK重传方式下,接收端设备会在TCP确认报文的TCP头部的选项(option)字段中添加SACK信息,该SACK信息指示哪些数据收到了,哪些数据没收到,这样发送端设备只需重传接收端设备未接收到的数据。SACK重传方式下的TCP确认报文也称为SACK报文。In SACK retransmission mode, the receiving device will add SACK information in the option field of the TCP header of the TCP confirmation message. The SACK information indicates which data has been received and which data has not been received. In this way, the sending device only needs to Retransmit data not received by the receiving device. The TCP confirmation message in SACK retransmission mode is also called a SACK message.

对于采用TCP的通信双方,当发送端设备与接收端设备之间通过无线网络通信时,接收端设备向发送端设备传输TCP确认报文以及发送端设备向接收端设备重传TCP报文都需要占用较多的无线资源,导致无线网络的负担较大。对此,本申请实施例提供了一种应用于TCP的数据传输方法,通过在发送侧和接收侧分别部署无线设备。这里,将部署在发送侧的无线设备称为发送侧无线设备,发送侧无线设备与发送端设备连接。将部署在接收侧的无线设备称为接收侧无线设备,接收侧无线设备与接收端设备连接。发送侧无线设备与接收侧无线设备之间通过无线网络连接。本申请实施例通过发送侧无线设备或接收侧无线设备存储来自发送端设备的TCP报文,以减少通过发送侧无线设备与接收侧无线设备之间的无线网络重传的TCP报文的数量和/或传输的TCP确认报文的数量,从而降低无线网络的负担。For both communicating parties using TCP, when the sending device and the receiving device communicate through the wireless network, it is necessary for the receiving device to transmit a TCP confirmation message to the sending device and for the sending device to retransmit the TCP message to the receiving device. Occupies more wireless resources, resulting in greater burden on the wireless network. In this regard, embodiments of the present application provide a data transmission method applied to TCP by deploying wireless devices on the sending side and the receiving side respectively. Here, the wireless device deployed on the sending side is called the sending side wireless device, and the sending side wireless device is connected to the sending end device. The wireless device deployed on the receiving side is called the receiving side wireless device, and the receiving side wireless device is connected to the receiving end device. The sending-side wireless device and the receiving-side wireless device are connected through a wireless network. In the embodiment of the present application, the sending-side wireless device or the receiving-side wireless device stores TCP messages from the sending-side device to reduce the number of TCP messages retransmitted through the wireless network between the sending-side wireless device and the receiving-side wireless device. / Or the number of TCP acknowledgment messages transmitted, thereby reducing the burden on the wireless network.

传输控制协议/互联网协议(Transmission Control Protocol/InternetProtocol,TCP/IP)使用四层网络模型,包括应用层、传输层、网络层和链路层。其中,网络层又称为网络互联层。链路层又称为网络接口层。链路层可细分为数据链路层和物理层。数据链路层又称为MAC层。TCP确认报文用于在传输层指示TCP报文是否传输成功。当发送侧无线设备通过无线网络采用MAC帧向接收侧无线设备发送TCP报文,接收侧无线设备需要通过无线网络向发送侧无线设备回复确认帧,以在链路层确认接收到该MAC帧。Transmission Control Protocol/Internet Protocol (TCP/IP) uses a four-layer network model, including application layer, transport layer, network layer and link layer. Among them, the network layer is also called the network interconnection layer. The link layer is also called the network interface layer. The link layer can be subdivided into the data link layer and the physical layer. The data link layer is also called the MAC layer. The TCP acknowledgment message is used to indicate at the transport layer whether the TCP message is successfully transmitted. When the sending-side wireless device uses a MAC frame to send a TCP message to the receiving-side wireless device through the wireless network, the receiving-side wireless device needs to reply with an acknowledgment frame to the sending-side wireless device through the wireless network to confirm receipt of the MAC frame at the link layer.

一种实现方式下,发送侧无线设备接收到来自发送端设备的TCP报文后,存储该TCP报文,并通过无线网络向接收侧无线设备发送包括该TCP报文的MAC帧。然后发送侧无线设备在通过无线网络接收到针对该MAC帧的确认帧之前,向发送端设备发送TCP确认报文,该TCP确认报文指示TCP报文传输成功。本实现方式中,发送侧无线设备无需等待接收来自接收端设备的TCP确认报文,而是自行生成TCP确认报文并发送给发送端设备。这样接收侧无线设备无需通过无线网络向发送侧无线设备发送来自接收端设备的所有TCP确认报文,可以减少通过无线网络传输的TCP确认报文的数量,从而降低无线网络的负担。另外,由于发送侧无线设备存储了来自发送端设备的TCP报文,因此发送侧无线设备可以在接收到来自接收侧无线设备的确认帧之前,就向发送端设备发送TCP确认报文。一方面,可以提高向发送端设备回复TCP确认报文的效率,从而保证发送端设备对后续TCP报文的发送速率,进而提高TCP吞吐量。另一方面,发送侧无线设备在确定接收侧无线设备未接收到MAC帧或接收端设备未接收到TCP报文时,可以采用MAC帧向接收侧无线设备重新发送存储的TCP报文,从而保证TCP传输的可靠性。In one implementation, after receiving a TCP message from the sending device, the sending wireless device stores the TCP message and sends a MAC frame including the TCP message to the receiving wireless device through the wireless network. Then, before receiving the acknowledgment frame for the MAC frame through the wireless network, the sending-side wireless device sends a TCP acknowledgment message to the sending-end device. The TCP acknowledgment message indicates that the TCP message is transmitted successfully. In this implementation, the sending wireless device does not need to wait to receive a TCP confirmation message from the receiving device, but generates a TCP confirmation message by itself and sends it to the sending device. In this way, the receiving wireless device does not need to send all TCP acknowledgment messages from the receiving device to the sending wireless device through the wireless network, which can reduce the number of TCP acknowledgment messages transmitted through the wireless network, thereby reducing the burden on the wireless network. In addition, since the sending-side wireless device stores the TCP message from the sending-side device, the sending-side wireless device can send the TCP confirmation message to the sending-side device before receiving the acknowledgment frame from the receiving-side wireless device. On the one hand, it can improve the efficiency of replying TCP confirmation messages to the sending device, thereby ensuring the sending rate of subsequent TCP messages by the sending device, thereby improving TCP throughput. On the other hand, when the sending wireless device determines that the receiving wireless device has not received the MAC frame or the receiving device has not received the TCP message, it can use the MAC frame to resend the stored TCP message to the receiving wireless device, thereby ensuring Reliability of TCP transmission.

该实现方式下,接收侧无线设备通过无线网络接收到来自发送侧无线设备的一个或多个MAC帧后,通过无线网络向发送侧无线设备发送针对该一个或多个MAC帧的确认帧。接收侧无线设备还向接收端设备发送该一个或多个MAC帧中的多个TCP报文,并通过无线网络向发送侧无线设备发送传输层指示,该传输层指示用于指示该多个TCP报文是否传输成功。In this implementation, after receiving one or more MAC frames from the sending-side wireless device through the wireless network, the receiving-side wireless device sends an acknowledgment frame for the one or more MAC frames to the sending-side wireless device through the wireless network. The receiving-side wireless device also sends multiple TCP messages in the one or more MAC frames to the receiving-side device, and sends a transport layer indication to the sending-side wireless device through the wireless network, where the transport layer indication is used to indicate the multiple TCP Whether the message is transmitted successfully.

发送侧无线设备可根据传输层指示执行相应的操作。可选地,若发送侧无线设备基于传输层指示确定TCP报文传输成功,则删除存储的该TCP报文。若发送侧无线设备基于传输层指示确定TCP报文传输失败,则通过无线网络向接收侧无线设备发送包括该TCP报文的MAC帧。此过程发送端设备无感知,因此不会影响用户体验。The sending side wireless device can perform corresponding operations according to the transport layer instructions. Optionally, if the sending-side wireless device determines that the TCP message is successfully transmitted based on the transport layer indication, the stored TCP message is deleted. If the sending-side wireless device determines that the TCP message transmission fails based on the transport layer indication, it sends a MAC frame including the TCP message to the receiving-side wireless device through the wireless network. This process is unaware of the sending device, so it will not affect the user experience.

另一种实现方式下,接收侧无线设备通过无线网络接收到来自发送侧无线设备的MAC帧后,存储该MAC帧中来自发送端设备的TCP报文,并通过无线网络向发送侧无线设备发送针对该MAC帧的确认帧。接收侧无线设备还向接收端设备发送TCP报文,并在该TCP报文传输失败时,向接收端设备重传存储的该TCP报文。本实现方式中,由于接收侧无线设备存储了来自发送端设备的TCP报文,因此在确定接收端设备对TCP报文接收失败后,接收侧无线设备可以直接向接收端设备重发存储的TCP报文,而无需由发送侧无线设备再通过无线网络重发TCP报文,可以减少通过无线网络重传的TCP报文的数量,从而降低无线网络的负担。In another implementation, after receiving the MAC frame from the sending-side wireless device through the wireless network, the receiving-side wireless device stores the TCP message from the sending-side device in the MAC frame, and sends it to the sending-side wireless device through the wireless network. Acknowledgment frame for this MAC frame. The receiving-side wireless device also sends a TCP message to the receiving-end device, and when the transmission of the TCP message fails, retransmits the stored TCP message to the receiving-end device. In this implementation, since the receiving-side wireless device stores the TCP message from the sending-end device, after determining that the receiving-end device fails to receive the TCP message, the receiving-side wireless device can directly resend the stored TCP message to the receiving-end device. message without the need for the sending wireless device to resend the TCP message through the wireless network, which can reduce the number of TCP messages retransmitted through the wireless network, thereby reducing the burden on the wireless network.

该实现方式下,发送侧无线设备接收到来自发送端设备的TCP报文后,通过无线网络向接收侧无线设备发送包括该TCP报文的MAC帧。发送侧无线设备在通过无线网络接收到来自接收侧无线设备的针对该MAC帧的确认帧后,向发送端设备发送TCP确认报文,该TCP确认报文用于指示该TCP报文传输成功。本实现方式下,发送侧无线设备无需等待接收来自接收端设备的TCP确认报文,而是在接收到针对MAC帧的确认帧之后,确定接收侧无线设备已成功接收到TCP报文,然后自行生成TCP确认报文并发送给发送端设备。这样,接收侧无线设备无需通过无线网络向发送侧无线设备发送来自接收端设备的TCP确认报文,进一步降低了无线网络的负担。另外,发送侧无线设备在接收到确认帧之后,无需再等待来自接收端设备的TCP报文,直接向发送端设备发送TCP确认报文,可以提高向发送端设备回复TCP确认报文的效率,从而保证发送端设备对后续TCP报文的发送速率,进而提高TCP吞吐量。In this implementation, after receiving the TCP message from the sending device, the sending wireless device sends a MAC frame including the TCP message to the receiving wireless device through the wireless network. After receiving the acknowledgment frame for the MAC frame from the receiving wireless device through the wireless network, the sending-side wireless device sends a TCP acknowledgment message to the sending-end device. The TCP acknowledgment message is used to indicate that the TCP message is successfully transmitted. In this implementation, the sending wireless device does not need to wait to receive the TCP confirmation message from the receiving device. Instead, after receiving the confirmation frame for the MAC frame, it determines that the receiving wireless device has successfully received the TCP message, and then automatically Generate a TCP confirmation message and send it to the sending device. In this way, the receiving-side wireless device does not need to send the TCP confirmation message from the receiving-side device to the sending-side wireless device through the wireless network, further reducing the burden on the wireless network. In addition, after receiving the acknowledgment frame, the sending wireless device no longer needs to wait for the TCP message from the receiving device and directly sends the TCP acknowledgment message to the sending device, which can improve the efficiency of replying to the TCP acknowledgment message from the sending device. This ensures the sending rate of subsequent TCP packets sent by the sending device, thereby improving TCP throughput.

下面从系统、方法流程、软件装置、硬件装置等多个角度,对本技术方案进行详细介绍。The following is a detailed introduction to this technical solution from multiple perspectives such as system, method flow, software device, and hardware device.

例如,图2是本申请实施例提供的一种数据传输系统的结构示意图。如图2所示,该数据传输系统包括发送端设备201、无线设备202A-202B(统称为无线设备202)以及接收端设备203。图2中各种设备的数量仅用作示例性说明,不作为对本申请实施例提供的数据传输系统的限制。For example, FIG. 2 is a schematic structural diagram of a data transmission system provided by an embodiment of the present application. As shown in Figure 2, the data transmission system includes a sending device 201, wireless devices 202A-202B (collectively referred to as wireless devices 202), and a receiving device 203. The number of various devices in Figure 2 is only used for illustrative purposes and is not intended to limit the data transmission system provided by the embodiments of the present application.

请参见图2,无线设备202A与发送端设备201连接。无线设备202B与接收端设备203连接。可选地,无线设备202A与发送端设备201通过有线网络或无线网络连接。无线设备202A与发送端设备201直接连接或间接连接。无线设备202B与接收端设备203通过有线网络或无线网络连接。无线设备202B与接收端设备203直接连接或间接连接。Referring to Figure 2, the wireless device 202A is connected to the sending end device 201. The wireless device 202B is connected to the receiving device 203. Optionally, the wireless device 202A is connected to the sending device 201 through a wired network or a wireless network. The wireless device 202A is directly or indirectly connected to the sending device 201 . The wireless device 202B is connected to the receiving device 203 through a wired network or a wireless network. The wireless device 202B is directly connected or indirectly connected to the receiving end device 203 .

请参见图2,无线设备202A与无线设备202B之间通过无线网络连接。可选地,无线设备202A与无线设备202B之间的无线网络可以是无线局域网(wireless local areanetwork,WLAN)、紫峰(ZigBee)网络、蓝牙网络或蜂窝移动网络等。Referring to Figure 2, wireless device 202A and wireless device 202B are connected through a wireless network. Optionally, the wireless network between the wireless device 202A and the wireless device 202B may be a wireless local area network (WLAN), ZigBee network, Bluetooth network, or cellular mobile network, etc.

可选地,发送端设备201和接收端设备203为电脑、手机、智能可穿戴设备、物联网(internet of things,IoT)终端等终端设备,或者为服务器、云平台等具有通信需求的其它设备。本申请实施例以无线设备202A与无线设备202B之间的无线网络为WLAN为例进行说明,则无线设备202为WLAN设备。例如无线设备202可以为无线接入点(access point,AP)、用户前置设备(customer premise equipment,CPE)、网格点(mesh point)或网格入口点(mesh portal point,MPP)等。Optionally, the sending device 201 and the receiving device 203 are terminal devices such as computers, mobile phones, smart wearable devices, Internet of things (IoT) terminals, or other devices with communication requirements such as servers and cloud platforms. . This embodiment of the present application takes the wireless network between the wireless device 202A and the wireless device 202B as a WLAN as an example. In this case, the wireless device 202 is a WLAN device. For example, the wireless device 202 may be a wireless access point (AP), customer premise equipment (CPE), mesh point (mesh point) or mesh portal point (MPP), etc.

例如在一种应用场景中,无线设备202A为CPE,无线设备202B为AP。无线设备202A与发送端设备201通过有线网络连接。无线设备202B与接收端设备203通过有线网络连接。该应用场景例如可以是工业场景。又例如在另一种应用场景中,无线设备202A为MP,无线设备202B为MPP,无线设备202A和无线设备202B构成mesh网络。无线设备202A与发送端设备201通过无线网络连接。无线设备202B与接收端设备203通过无线网络连接。该应用场景例如可以是无线mesh场景。本申请实施例对提供的数据传输系统所应用的场景不做限定。For example, in one application scenario, wireless device 202A is a CPE and wireless device 202B is an AP. The wireless device 202A is connected to the sending device 201 through a wired network. The wireless device 202B and the receiving device 203 are connected through a wired network. The application scenario may be an industrial scenario, for example. For example, in another application scenario, the wireless device 202A is an MP, the wireless device 202B is an MPP, and the wireless device 202A and the wireless device 202B form a mesh network. The wireless device 202A is connected to the sending device 201 through a wireless network. The wireless device 202B is connected to the receiving end device 203 through a wireless network. The application scenario may be a wireless mesh scenario, for example. The embodiments of this application do not limit the application scenarios of the provided data transmission system.

本申请实施例提供的数据传输方法能够应用于如图2所示的数据传输系统。下面对方法流程进行举例说明。The data transmission method provided by the embodiment of the present application can be applied to the data transmission system shown in Figure 2. The following is an example of the method process.

在本申请的一个实施例中,由发送侧无线设备在接收到来自发送端设备的TCP报文后,存储该TCP报文。例如,图3是本申请实施例提供的一种数据传输方法的流程示意图。其中,无线设备1例如可以是如图2所示的无线设备202A,无线设备2例如可以是如图2所示的无线设备202B。如图3所示,该方法包括以下步骤301至步骤306。In one embodiment of the present application, after receiving the TCP message from the sending-end device, the sending-side wireless device stores the TCP message. For example, FIG. 3 is a schematic flowchart of a data transmission method provided by an embodiment of the present application. The wireless device 1 may be, for example, the wireless device 202A as shown in FIG. 2 , and the wireless device 2 may be, for example, the wireless device 202B as shown in FIG. 2 . As shown in Figure 3, the method includes the following steps 301 to 306.

步骤301、发送端设备向无线设备1发送TCP报文1。Step 301: The sending device sends TCP message 1 to wireless device 1.

TCP报文1的源IP地址为发送端设备的IP地址。TCP报文1的目的IP地址为接收端设备的IP地址。可选地,发送端设备通过有线网络向无线设备1发送TCP报文1。The source IP address of TCP message 1 is the IP address of the sending device. The destination IP address of TCP message 1 is the IP address of the receiving device. Optionally, the sending end device sends the TCP message 1 to the wireless device 1 through the wired network.

步骤302、无线设备1存储TCP报文1。Step 302: Wireless device 1 stores TCP message 1.

可选地,无线设备1存储TCP报文1之后,生成指示TCP报文1传输成功的TCP确认报文1。TCP确认报文1的源IP地址为接收端设备的IP地址。TCP确认报文1的目的IP地址为发送端设备的IP地址。也即是,无线设备1模拟接收端设备生成TCP确认报文1,以使发送端设备无感知接收端设备对TCP报文1的实际接收情况,进而使得发送端设备的发送窗口不受无线设备1与接收端设备之间的网络波动影响,保证了发送端设备对后续TCP报文的发送速率。Optionally, after storing the TCP message 1, the wireless device 1 generates a TCP confirmation message 1 indicating that the TCP message 1 is successfully transmitted. The source IP address of TCP confirmation message 1 is the IP address of the receiving device. The destination IP address of TCP confirmation message 1 is the IP address of the sending device. That is to say, wireless device 1 simulates the receiving device to generate TCP confirmation message 1, so that the sending device does not perceive the actual reception of TCP message 1 by the receiving device, thereby making the sending window of the sending device not affected by the wireless device. The influence of network fluctuations between 1 and the receiving end device ensures the sending rate of subsequent TCP messages from the sending end device.

步骤303、无线设备1通过无线网络向无线设备2发送MAC帧1,MAC帧1包括TCP报文1。Step 303: Wireless device 1 sends MAC frame 1 to wireless device 2 through the wireless network. MAC frame 1 includes TCP message 1.

可选地,MAC帧1包括一个或多个MAC协议数据单元(MAC protocol data unit,MPDU),每个MPDU包括一个TCP报文。Optionally, MAC frame 1 includes one or more MAC protocol data units (MAC protocol data units, MPDUs), and each MPDU includes a TCP message.

在一种实现方式下,无线设备1接收到来自发送端设备的TCP报文后,在MAC层将该TCP报文封装成MPDU,并采用一个物理层协议数据单元(physical layer protocol dataunit,PPDU)传输该MPDU。In one implementation, after receiving the TCP message from the sending device, the wireless device 1 encapsulates the TCP message into an MPDU at the MAC layer, and uses a physical layer protocol data unit (PPDU) Transmit the MPDU.

另一种实现方式下,无线设备1接收到来自发送端设备的多个TCP报文后,在MAC层采用帧聚合技术将该多个TCP报文封装成一个聚合MPDU(aggregated MPDU,A-MPDU),并采用一个PPDU传输该A-MPDU。In another implementation, after wireless device 1 receives multiple TCP messages from the sending device, it uses frame aggregation technology at the MAC layer to encapsulate the multiple TCP messages into an aggregated MPDU (A-MPDU). ), and uses one PPDU to transmit the A-MPDU.

由于同一A-MPDU中的所有TCP报文采用一个PPDU传输,因此相较于每个TCP报文分别采用一个PPDU传输的实现方式,可以减小PPDU前导码的开销,进而提高了传输效率。Since all TCP messages in the same A-MPDU are transmitted using one PPDU, compared with the implementation of using one PPDU to transmit each TCP message, the overhead of the PPDU preamble can be reduced, thereby improving the transmission efficiency.

步骤304、无线设备1在接收到针对MAC帧1的确认帧1之前,向发送端设备发送TCP确认报文1,TCP确认报文1指示TCP报文1传输成功。Step 304: Before receiving the confirmation frame 1 for the MAC frame 1, the wireless device 1 sends the TCP confirmation message 1 to the sending device. The TCP confirmation message 1 indicates that the TCP message 1 is transmitted successfully.

发送端设备接收到TCP确认报文1之后,可以确定接收端设备已成功接收TCP报文1,并经由无线设备1继续向接收端设备发送后续TCP报文。After the sending device receives the TCP confirmation message 1, it can determine that the receiving device has successfully received the TCP message 1, and continues to send subsequent TCP messages to the receiving device via the wireless device 1.

无线通信可以采用消息确认机制。该消息确认机制的实现方式包括:若接收方成功接收发送方发送的MAC帧,向发送方回复ACK帧。若接收方未成功接收发送方发送的MAC帧,则不向发送方回复ACK帧。若发送方在发送MAC帧后的一定时长内,未接收到针对该MAC帧的ACK帧,则确定该MAC帧传输失败。为了避免接收方在成功接收到发送方发送的MAC帧后再去竞争信道,接收方通常需要在接收到MAC帧后的短帧间距(short interframe space,SIFS)内向发送方回复ACK帧。Wireless communications can use message acknowledgment mechanisms. The implementation of the message acknowledgment mechanism includes: if the receiver successfully receives the MAC frame sent by the sender, it replies with an ACK frame to the sender. If the receiver fails to successfully receive the MAC frame sent by the sender, it will not reply to the sender with an ACK frame. If the sender does not receive an ACK frame for the MAC frame within a certain period of time after sending the MAC frame, it is determined that the transmission of the MAC frame has failed. In order to prevent the receiver from competing for the channel after successfully receiving the MAC frame sent by the sender, the receiver usually needs to reply to the sender with an ACK frame within the short interframe space (SIFS) after receiving the MAC frame.

本申请实施例中,无线设备1与无线设备2之间的无线通信采用消息确认机制。In the embodiment of this application, the wireless communication between wireless device 1 and wireless device 2 adopts a message confirmation mechanism.

可选地,无线设备1在发送MAC帧1后的一定时长内未接收到针对MAC帧1的确认帧1,无线设备1通过无线网络向无线设备2发送MAC帧2,MAC帧2包括TCP报文1。Optionally, wireless device 1 does not receive confirmation frame 1 for MAC frame 1 within a certain period of time after sending MAC frame 1. Wireless device 1 sends MAC frame 2 to wireless device 2 through the wireless network. MAC frame 2 includes a TCP packet. Text 1.

本申请实施例中,由于无线设备1存储了来自发送端设备的TCP报文,因此无线设备1无需确定无线设备2是否成功接收包括存储的TCP报文的MAC帧,也即可以在接收到来自无线设备2的确认帧之前,就向发送端设备发送TCP确认报文。这样可以提高向发送端设备回复TCP确认报文的效率,从而保证发送端设备对后续TCP报文的发送速率,进而提高TCP吞吐量。后续如果无线设备1确定无线设备2未接收到MAC帧或接收端设备未接收到TCP报文,则可以利用存储的TCP报文,向无线设备2发送包括该TCP报文的MAC帧,从而保证TCP传输的可靠性。In the embodiment of the present application, since the wireless device 1 stores the TCP message from the sending device, the wireless device 1 does not need to determine whether the wireless device 2 successfully receives the MAC frame including the stored TCP message, that is, it can receive the MAC frame from the sending device. Before the confirmation frame of wireless device 2, a TCP confirmation message is sent to the sending device. This can improve the efficiency of replying TCP confirmation messages to the sending device, thereby ensuring the sending rate of subsequent TCP messages by the sending device, thereby improving TCP throughput. Subsequently, if wireless device 1 determines that wireless device 2 has not received the MAC frame or the receiving device has not received the TCP message, it can use the stored TCP message to send the MAC frame including the TCP message to wireless device 2, thereby ensuring Reliability of TCP transmission.

可选地,无线设备2通过无线网络接收到来自无线设备1的一个或多个MAC帧后,通过无线网络向无线设备1发送针对该一个或多个MAC帧的确认帧。该一个或多个MAC帧包括来自发送端设备的多个TCP报文。当无线设备1向无线设备2发送A-MPDU时,相应地,无线设备2采用块确认(block ACK,BA)帧来确认是否正确接收该A-MPDU。Optionally, after receiving one or more MAC frames from the wireless device 1 through the wireless network, the wireless device 2 sends an acknowledgment frame for the one or more MAC frames to the wireless device 1 through the wireless network. The one or more MAC frames include multiple TCP messages from the sending device. When wireless device 1 sends an A-MPDU to wireless device 2, accordingly, wireless device 2 uses a block acknowledgment (block ACK, BA) frame to confirm whether the A-MPDU is received correctly.

步骤305、无线设备2向接收端设备发送来自发送端设备的多个TCP报文。Step 305: The wireless device 2 sends multiple TCP messages from the sending device to the receiving device.

本申请实施例中,无线设备1持续接收来自发送端设备的TCP报文,并重复执行上述步骤302至步骤304,采用MAC帧将来自发送端设备的多个TCP报文通过无线网络发送给无线设备2。无线设备2每通过无线网络接收到来自无线设备1的一个MAC帧,可以向接收端设备发送该MAC帧中的TCP报文。例如在上述步骤303执行之后,若无线设备2通过无线网络接收到来自无线设备1的MAC帧1,则无线设备2向接收端设备发送TCP报文1。后续若无线设备2通过无线网络接收到来自无线设备1的包括TCP报文2的MAC帧3,则无线设备再向接收端设备发送TCP报文2。此步骤305中,无线设备2向接收端设备发送的多个TCP报文,可以来自无线设备1发送的一个MAC帧,或者也可以来自无线设备1发送的多个MAC帧。另外,这里无线设备2向接收端设备发送多个TCP报文,旨在说明无线设备2向接收端设备发送的TCP报文的总数量不止一个,而并非强调无线设备2一次性向接收端设备发送多个TCP报文,实际情况下,无线设备2通常会按照接收到TCP报文的先后顺序,依次向接收端设备发送相应的TCP报文。In the embodiment of this application, the wireless device 1 continues to receive TCP messages from the sending device, and repeatedly performs the above steps 302 to 304, using MAC frames to send multiple TCP messages from the sending device to the wireless device through the wireless network. Device 2. Each time wireless device 2 receives a MAC frame from wireless device 1 through the wireless network, it can send the TCP message in the MAC frame to the receiving device. For example, after the above step 303 is executed, if the wireless device 2 receives the MAC frame 1 from the wireless device 1 through the wireless network, the wireless device 2 sends the TCP message 1 to the receiving end device. Subsequently, if the wireless device 2 receives the MAC frame 3 including the TCP message 2 from the wireless device 1 through the wireless network, the wireless device then sends the TCP message 2 to the receiving end device. In this step 305, the multiple TCP messages sent by the wireless device 2 to the receiving device may come from one MAC frame sent by the wireless device 1, or may also come from multiple MAC frames sent by the wireless device 1. In addition, here the wireless device 2 sends multiple TCP messages to the receiving device, which is intended to illustrate that the total number of TCP messages sent by the wireless device 2 to the receiving device is more than one, rather than emphasizing that the wireless device 2 sends it to the receiving device at once. Multiple TCP messages, in actual situations, the wireless device 2 usually sends corresponding TCP messages to the receiving end device in sequence according to the order in which the TCP messages are received.

可选地,接收端设备接收到来自发送端设备的TCP报文后,针对每个TCP报文回复一个TCP确认报文。该TCP确认报文的目的IP地址为发送端设备的IP地址。TCP确认报文能够指示TCP报文是否传输成功。Optionally, after receiving the TCP message from the sending device, the receiving device replies with a TCP confirmation message for each TCP message. The destination IP address of the TCP confirmation message is the IP address of the sending device. The TCP confirmation message can indicate whether the TCP message is successfully transmitted.

步骤306、无线设备2通过无线网络向无线设备1发送传输层指示,该传输层指示用于指示该多个TCP报文是否传输成功。Step 306: The wireless device 2 sends a transport layer indication to the wireless device 1 through the wireless network. The transport layer indication is used to indicate whether the multiple TCP packets are successfully transmitted.

可选地,当无线设备2确定多个TCP报文传输成功时,无线设备2向无线设备1发送的传输层指示用于指示该多个TCP报文传输成功。当无线设备2确定多个TCP报文传输失败时,无线设备2向无线设备1发送的传输层指示用于指示该多个TCP报文传输失败。当无线设备2确定多个TCP报文中的一部分TCP报文传输成功、另一部分TCP报文传输失败时,无线设备2向无线设备1发送的传输层指示用于指示哪些TCP报文传输成功了,哪些TCP报文传输失败了。Optionally, when the wireless device 2 determines that the multiple TCP packets are successfully transmitted, the transport layer indication sent by the wireless device 2 to the wireless device 1 is used to indicate that the multiple TCP packets are successfully transmitted. When the wireless device 2 determines that the transmission of multiple TCP packets has failed, the transport layer indication sent by the wireless device 2 to the wireless device 1 is used to indicate that the transmission of the multiple TCP packets has failed. When the wireless device 2 determines that part of the TCP packets in the multiple TCP packets are successfully transmitted and the other part of the TCP packets fail to be transmitted, the transport layer indication sent by the wireless device 2 to the wireless device 1 is used to indicate which TCP packets were successfully transmitted. , which TCP packet transmission failed.

可选地,如果无线设备2在向接收端设备发送TCP报文后的一定时长内,未接收到来自接收端设备的用于指示该TCP报文的传输状态的TCP确认报文,则无线设备2确定该TCP报文传输失败。或者,如果无线设备2在向接收端设备发送TCP报文后的一定时长内,接收到了来自接收端设备的指示该TCP报文的传输状态的TCP确认报文,则无线设备2根据该TCP确认报文确定该TCP报文是否传输成功。Optionally, if the wireless device 2 does not receive a TCP confirmation message from the receiving device indicating the transmission status of the TCP message within a certain period of time after sending the TCP message to the receiving device, the wireless device 2 2. Confirm that the TCP packet transmission failed. Alternatively, if the wireless device 2 receives a TCP confirmation message from the receiving device indicating the transmission status of the TCP message within a certain period of time after sending the TCP message to the receiving device, the wireless device 2 will message to determine whether the TCP message was successfully transmitted.

例如,传输层指示用于指示来自发送端设备的5个TCP报文是否传输成功。这5个TCP报文的数据长度均为100。这5个TCP报文所携带的序列号分别为101、201、301、401和501。无线设备2向接收端设备依次发送分别携带有序列号101、201、301、401和501的TCP报文。如果无线设备2在向接收端设备发送携带有序列号501的TCP报文之后,接收到携带有确认号601的TCP确认报文,则无线设备2确定这5个TCP报文均传输成功。如果无线设备2在向接收端设备发送携带有序列号501的TCP报文之后,多次接收到携带有确认号301的TCP确认报文,则无线设备2确定这5个TCP报文中携带有序列号101的TCP报文和携带有序列号102的TCP报文传输成功,携带有序列号301的TCP报文传输失败,此时无线设备2不确定携带有确认号401的TCP报文和携带有确认号501的TCP报文是否传输成功,这种情况下,无线设备2可以对无法确定传输状态的TCP报文做传输失败处理。如果无线设备2在向接收端设备发送携带有序列号501的TCP报文之后接收到了携带有SACK信息的TCP确认报文,则无线设备2根据SACK信息确定哪些TCP报文传输成功了,哪些TCP报文传输失败了。For example, the transport layer indication is used to indicate whether five TCP packets from the sending device are successfully transmitted. The data length of these five TCP messages is all 100. The sequence numbers carried by these five TCP packets are 101, 201, 301, 401 and 501 respectively. Wireless device 2 sequentially sends TCP packets carrying sequence numbers 101, 201, 301, 401, and 501 to the receiving device. If wireless device 2 receives a TCP confirmation message carrying confirmation number 601 after sending a TCP message carrying sequence number 501 to the receiving device, then wireless device 2 determines that all five TCP messages are successfully transmitted. If wireless device 2 receives TCP confirmation messages carrying confirmation number 301 multiple times after sending TCP messages carrying sequence number 501 to the receiving device, then wireless device 2 determines that these five TCP messages carry The TCP packet with sequence number 101 and the TCP packet carrying sequence number 102 are transmitted successfully, but the TCP packet carrying sequence number 301 fails to be transmitted. At this time, wireless device 2 is not sure whether the TCP packet carrying confirmation number 401 and the TCP packet carrying sequence number 301 are transmitted successfully. Whether the TCP message with confirmation number 501 is successfully transmitted. In this case, the wireless device 2 can perform transmission failure processing on the TCP message whose transmission status cannot be determined. If wireless device 2 receives a TCP confirmation message carrying SACK information after sending a TCP message carrying sequence number 501 to the receiving end device, wireless device 2 determines which TCP messages were successfully transmitted and which TCP messages were transmitted based on the SACK information. Message transmission failed.

可选地,无线设备2可以采用TCP确认报文作为传输层指示。这样无线设备1可以基于普通的TCP协议栈解析该TCP确认报文,以确定对应的TCP报文的传输状态,无需改变无线设备1与无线设备2之间的传输协议,实现方式简单。或者,无线设备2也可以采用与无线设备1事先约定好的报文格式来发送传输层指示。本申请实施例对传输层指示的报文格式不做限定。Optionally, the wireless device 2 may use the TCP confirmation message as the transport layer indication. In this way, the wireless device 1 can parse the TCP confirmation message based on the ordinary TCP protocol stack to determine the transmission status of the corresponding TCP message without changing the transmission protocol between the wireless device 1 and the wireless device 2, and the implementation method is simple. Alternatively, the wireless device 2 may also use a message format agreed in advance with the wireless device 1 to send the transport layer indication. The embodiment of this application does not limit the message format indicated by the transport layer.

可选地,用于指示多个TCP报文是否传输成功的传输层指示在一个MAC帧中。无线设备2采用一个MAC帧携带用于指示多个TCP报文是否传输成功的传输层指示,可以减少对无线网络的资源消耗,从而降低无线网络的负担。另外,由于无线设备1自行生成TCP确认报文并发送给发送端设备,因此无线设备2是否向无线设备1发送来自接收端设备的TCP确认报文,以及无线设备2通过无线网络向无线设备1发送传输层指示的数量和时机都不会对发送端设备造成影响,相较于需要传输TCP确认报文以使发送端设备调整发送窗口的现有方案,发送传输层指示可以减少无线网络所需传输的数据量,从而降低无线网络的负担。本申请实施例中的传输层指示的作用不同于现有的TCP确认报文,这里的传输层指示用于触发无线设备1基于存储的TCP报文,删除传输成功的TCP报文,重传传输失败的TCP报文。Optionally, the transport layer indication used to indicate whether multiple TCP messages are successfully transmitted is in one MAC frame. The wireless device 2 uses one MAC frame to carry a transport layer indication indicating whether multiple TCP messages are successfully transmitted, which can reduce resource consumption on the wireless network, thereby reducing the burden on the wireless network. In addition, since wireless device 1 generates a TCP confirmation message by itself and sends it to the sending device, whether wireless device 2 sends a TCP confirmation message from the receiving device to wireless device 1, and whether wireless device 2 sends a TCP confirmation message from the receiving device to wireless device 1 through the wireless network The number and timing of sending transport layer instructions will not affect the sending device. Compared with the existing solution that needs to transmit TCP confirmation messages to allow the sending device to adjust the sending window, sending transport layer instructions can reduce the requirements of the wireless network. The amount of data transmitted thereby reducing the burden on the wireless network. The function of the transport layer indication in the embodiment of the present application is different from the existing TCP confirmation message. The transport layer indication here is used to trigger the wireless device 1 to delete the successfully transmitted TCP message based on the stored TCP message, and retransmit the transmission. Failed TCP packet.

可选地,当无线设备1通过无线网络接收到来自无线设备2的对TCP报文1传输失败的传输层指示时,无线设备1通过无线网络向无线设备2发送MAC帧4,MAC帧4包括无线设备1存储的该TCP报文1。或者,当无线设备1通过无线网络接收到来自无线设备2的对TCP报文1传输成功的传输层指示时,无线设备1删除存储的TCP报文1,以释放存储空间。Optionally, when the wireless device 1 receives a transport layer indication from the wireless device 2 that the TCP message 1 fails to be transmitted through the wireless network, the wireless device 1 sends a MAC frame 4 to the wireless device 2 through the wireless network, and the MAC frame 4 includes The TCP message 1 stored by wireless device 1. Or, when the wireless device 1 receives a transport layer indication from the wireless device 2 that the TCP message 1 is successfully transmitted through the wireless network, the wireless device 1 deletes the stored TCP message 1 to release storage space.

可选地,无线设备2根据无线设备2与接收端设备之间的往返时延(round triptime,RTT)以及无线设备2对TCP报文所属的TCP流的接收速率,确定用于指示该TCP流中的TCP报文是否传输成功的传输层指示的发送频率。传输层指示的发送频率例如可以是每秒发送多少个传输层指示。可选地,无线设备2可以将向接收端设备发出TCP报文的时刻与接收到该TCP报文对应的TCP确认报文的时刻之间的时间差作为无线设备2与接收端设备之间的往返时延。Optionally, the wireless device 2 determines the method used to indicate the TCP flow according to the round trip time (RTT) between the wireless device 2 and the receiving end device and the reception rate of the TCP flow to which the TCP message belongs. The sending frequency indicated by the transport layer whether the TCP message in the TCP message is successfully transmitted. The sending frequency of the transport layer indication may be, for example, how many transport layer indications are sent per second. Optionally, the wireless device 2 may use the time difference between the time when the TCP message is sent to the receiving device and the time when the TCP confirmation message corresponding to the TCP message is received as the round trip between the wireless device 2 and the receiving device. time delay.

例如,传输层指示的发送频率f满足:f=max{min{BW/(L*MSS),β/RTT},α}。其中,BW为无线设备1对TCP流的接收速率,单位为字节/秒。L为可调参数,例如可以取100。MSS为平均包长,例如可以取不超过1500的任意值,单位为字节。β为可调参数,例如可以取10,单位为包个数,β的取值可根据发送端设备针对TCP流的发送窗口的大小进行设置。RTT为无线设备2与接收端设备之间的往返时延。α为预设的最小发送频率,例如每秒20个,即每50毫秒(大于10个PPDU的传输时间)发送一个传输层指示。For example, the transmission frequency f indicated by the transport layer satisfies: f=max{min{BW/(L*MSS), β/RTT}, α}. Among them, BW is the reception rate of the TCP stream by wireless device 1, in bytes/second. L is an adjustable parameter, for example, it can be 100. MSS is the average packet length, which can be any value not exceeding 1500, for example, and the unit is bytes. β is an adjustable parameter, for example, it can be 10, and the unit is the number of packets. The value of β can be set according to the size of the sending window of the sending device for the TCP stream. RTT is the round-trip delay between wireless device 2 and the receiving device. α is the preset minimum sending frequency, for example, 20 per second, that is, a transport layer indication is sent every 50 milliseconds (greater than the transmission time of 10 PPDUs).

由于本申请实施例中,传输层指示的发送频率不会影响发送端设备对TCP流的发送速率,因此可以将传输层指示的发送频率设置的较小,以减少传输层指示对无线网络的占用,从而降低无线网络的负担。Since in the embodiment of the present application, the sending frequency of the transport layer indication will not affect the sending rate of the TCP stream by the sending device, the sending frequency of the transport layer indication can be set smaller to reduce the occupation of the wireless network by the transport layer indication. , thereby reducing the burden on the wireless network.

在本申请实施例提供的数据传输方法中,无线设备1无需等待接收来自接收端设备的TCP确认报文,而是自行生成TCP确认报文并发送给发送端设备。这样无线设备2无需通过无线网络向无线设备1发送来自接收端设备的所有TCP确认报文,可以减少通过无线网络传输的TCP确认报文的数量,从而降低无线网络的负担。另外,由于无线设备1存储了来自发送端设备的TCP报文,因此无线设备1无需确定无线设备2是否成功接收包括存储的TCP报文的MAC帧,也即可以在接收到来自无线设备2的确认帧之前,就向发送端设备发送TCP确认报文。这样可以提高向发送端设备回复TCP确认报文的效率,从而保证发送端设备对后续TCP报文的发送速率,进而提高TCP吞吐量。后续如果无线设备1确定无线设备2未接收到MAC帧或接收端设备未接收到TCP报文,则可以利用存储的TCP报文,向无线设备2发送包括该TCP报文的MAC帧,从而保证TCP传输的可靠性。无线设备2通过传输层指示向无线设备1一次性指示多个TCP报文是否传输成功,由于无线设备2是否向无线设备1发送来自接收端设备的TCP确认报文,以及无线设备2通过无线网络向无线设备1发送传输层指示的数量和时机都不会对发送端设备造成影响,相较于需要传输TCP确认报文以使发送端设备调整发送窗口的现有方案,发送传输层指示可以减少无线网络所需传输的数据量,从而降低无线网络的负担。In the data transmission method provided by the embodiment of the present application, the wireless device 1 does not need to wait to receive a TCP confirmation message from the receiving device, but generates a TCP confirmation message by itself and sends it to the sending device. In this way, the wireless device 2 does not need to send all TCP acknowledgment messages from the receiving device to the wireless device 1 through the wireless network, which can reduce the number of TCP acknowledgment messages transmitted through the wireless network, thereby reducing the burden on the wireless network. In addition, since the wireless device 1 stores the TCP message from the sending device, the wireless device 1 does not need to determine whether the wireless device 2 successfully receives the MAC frame including the stored TCP message, that is, it can receive the MAC frame from the wireless device 2. Before confirming the frame, a TCP confirmation message is sent to the sending device. This can improve the efficiency of replying TCP confirmation messages to the sending device, thereby ensuring the sending rate of subsequent TCP messages by the sending device, thereby improving TCP throughput. Subsequently, if wireless device 1 determines that wireless device 2 has not received the MAC frame or the receiving device has not received the TCP message, it can use the stored TCP message to send the MAC frame including the TCP message to wireless device 2, thereby ensuring Reliability of TCP transmission. Wireless device 2 indicates to wireless device 1 through the transport layer indication whether multiple TCP messages are successfully transmitted at once, because whether wireless device 2 sends a TCP confirmation message from the receiving end device to wireless device 1, and wireless device 2 passes the wireless network The number and timing of sending transport layer indications to wireless device 1 will not affect the sending device. Compared with the existing solution that requires the transmission of TCP confirmation messages to allow the sending device to adjust the sending window, sending transport layer indications can be reduced. The amount of data that the wireless network needs to transmit, thereby reducing the burden on the wireless network.

在本申请的另一个实施例中,由接收侧无线设备在接收到来自发送端设备的TCP报文后,存储该TCP报文。例如,图4是本申请实施例提供的另一种数据传输方法的流程示意图。其中,无线设备3例如可以是如图2所示的无线设备202A,无线设备4例如可以是如图2所示的无线设备202B。如图4所示,该方法包括以下步骤401至步骤407。In another embodiment of the present application, after receiving the TCP message from the sending device, the receiving-side wireless device stores the TCP message. For example, FIG. 4 is a schematic flowchart of another data transmission method provided by an embodiment of the present application. The wireless device 3 may be, for example, the wireless device 202A shown in FIG. 2 , and the wireless device 4 may be, for example, the wireless device 202B shown in FIG. 2 . As shown in Figure 4, the method includes the following steps 401 to 407.

步骤401、发送端设备向无线设备3发送TCP报文1。Step 401: The sending end device sends TCP message 1 to wireless device 3.

此步骤401的解释和实现过程具体可参考上述步骤301中的相关描述,本申请实施例在此不再赘述。For the explanation and implementation process of this step 401, reference may be made to the relevant description in the above-mentioned step 301, which will not be described again in the embodiment of the present application.

步骤402、无线设备3通过无线网络向无线设备4发送MAC帧1,MAC帧1包括TCP报文1。Step 402: Wireless device 3 sends MAC frame 1 to wireless device 4 through the wireless network. MAC frame 1 includes TCP message 1.

此步骤402的解释和实现过程具体可参考上述步骤303中的相关描述,本申请实施例在此不再赘述。For the explanation and implementation process of this step 402, reference may be made to the relevant description in the above-mentioned step 303, which will not be described again in this embodiment of the present application.

步骤403、无线设备4存储TCP报文1。Step 403: Wireless device 4 stores TCP message 1.

无线设备4通过无线网络接收到来自无线设备3的MAC帧1后,解析MAC帧1得到TCP报文1,并存储TCP报文1。After receiving the MAC frame 1 from the wireless device 3 through the wireless network, the wireless device 4 parses the MAC frame 1 to obtain the TCP message 1, and stores the TCP message 1.

步骤404、无线设备4通过无线网络向无线设备3发送针对MAC帧1的确认帧1。Step 404: The wireless device 4 sends the confirmation frame 1 for the MAC frame 1 to the wireless device 3 through the wireless network.

无线设备3与无线设备4之间的无线通信采用消息确认机制。无线设备4通过无线网络接收到来自无线设备3的MAC帧后,通过无线网络向无线设备3发送针对该MAC帧的确认帧。当无线设备3向无线设备4发送A-MPDU时,相应地,无线设备4采用BA帧来确认是否正确接收该A-MPDU。The wireless communication between wireless device 3 and wireless device 4 adopts a message confirmation mechanism. After receiving the MAC frame from the wireless device 3 through the wireless network, the wireless device 4 sends an acknowledgment frame for the MAC frame to the wireless device 3 through the wireless network. When the wireless device 3 sends an A-MPDU to the wireless device 4, accordingly, the wireless device 4 uses the BA frame to confirm whether the A-MPDU is received correctly.

步骤405、无线设备3响应于接收到确认帧1,向发送端设备发送TCP确认报文1,TCP确认报文1指示TCP报文1传输成功。Step 405: In response to receiving the confirmation frame 1, the wireless device 3 sends a TCP confirmation message 1 to the sending device. The TCP confirmation message 1 indicates that the TCP message 1 is transmitted successfully.

本申请实施例中,无线设备3无需等待接收来自接收端设备的TCP确认报文,而是在接收到针对MAC帧的确认帧之后,确定无线设备4已成功接收到TCP报文,然后自行生成TCP确认报文并发送给发送端设备。这样,无线设备3无需等待来自接收端设备的TCP报文,而可以直接向发送端设备发送TCP确认报文,提高了向发送端设备回复TCP确认报文的效率,从而保证发送端设备对后续TCP报文的发送速率,进而提高TCP吞吐量。In the embodiment of this application, the wireless device 3 does not need to wait to receive the TCP confirmation message from the receiving device. Instead, after receiving the confirmation frame for the MAC frame, the wireless device 3 determines that the wireless device 4 has successfully received the TCP message, and then generates it by itself. TCP confirms the message and sends it to the sending device. In this way, the wireless device 3 does not need to wait for the TCP message from the receiving device, but can directly send the TCP confirmation message to the sending device, which improves the efficiency of replying the TCP confirming message to the sending device, thereby ensuring that the sending device can respond to subsequent The sending rate of TCP messages, thereby improving TCP throughput.

步骤406、无线设备4向接收端设备发送TCP报文1。Step 406: The wireless device 4 sends the TCP message 1 to the receiving device.

接收端设备在接收到来自无线设备4的TCP报文后,向无线设备4发送TCP确认报文,该TCP确认报文的目的IP地址为发送端设备的IP地址。该TCP确认报文能够指示哪些TCP报文已传输成功。After receiving the TCP message from the wireless device 4, the receiving device sends a TCP confirmation message to the wireless device 4. The destination IP address of the TCP confirmation message is the IP address of the sending device. The TCP confirmation message can indicate which TCP messages have been successfully transmitted.

步骤407、无线设备4在确定TCP报文1传输失败时,向接收端设备重传存储的TCP报文1。Step 407: When the wireless device 4 determines that the transmission of the TCP message 1 fails, it retransmits the stored TCP message 1 to the receiving device.

可选地,当无线设备4接收到来自接收端设备的指示TCP报文1传输失败的TCP确认报文时,确定TCP报文1传输失败。或者,当无线设备4在发送TCP报文1后的一定时长内未接收到指示TCP报文1的传输状态的TCP确认报文时,确定该TCP报文1传输失败。无线设备4确定TCP报文是否传输成功的具体实现方式可参考上述步骤306中无线设备2确定TCP报文是否传输成功的相关描述,本申请实施例在此不再赘述。Optionally, when the wireless device 4 receives a TCP confirmation message from the receiving end device indicating that the transmission of the TCP message 1 has failed, it is determined that the transmission of the TCP message 1 has failed. Or, when the wireless device 4 does not receive the TCP confirmation message indicating the transmission status of the TCP message 1 within a certain period of time after sending the TCP message 1, it is determined that the TCP message 1 has failed to be transmitted. The specific implementation method for the wireless device 4 to determine whether the TCP message is successfully transmitted may refer to the relevant description of the wireless device 2 determining whether the TCP message is successfully transmitted in step 306, which will not be described again in this embodiment of the present application.

本申请实施例中,由于无线设备4存储了来自发送端设备的TCP报文,因此在确定接收端设备对TCP报文接收失败后,无线设备4可以直接向接收端设备重发存储的TCP报文,而无需由无线设备3再通过无线网络重发TCP报文,进而可以减少通过无线网络重传的TCP报文的数量,从而降低无线网络的负担。In the embodiment of the present application, since the wireless device 4 stores the TCP message from the sending device, after determining that the receiving device fails to receive the TCP message, the wireless device 4 can directly resend the stored TCP message to the receiving device. message, without the need for the wireless device 3 to retransmit the TCP message through the wireless network, thereby reducing the number of TCP messages retransmitted through the wireless network, thereby reducing the burden on the wireless network.

可选地,无线设备4不向无线设备3转发来自接收端设备的TCP确认报文。本申请实施例中,由于无线设备3能够自行生成TCP确认报文并发送给发送端设备,因此无线设备4无需通过无线网络向无线设备3发送来自接收端设备的TCP确认报文,可以进一步降低无线网络的负担。Optionally, the wireless device 4 does not forward the TCP confirmation message from the receiving end device to the wireless device 3. In the embodiment of the present application, since the wireless device 3 can generate a TCP confirmation message by itself and send it to the sending device, the wireless device 4 does not need to send a TCP confirmation message from the receiving device to the wireless device 3 through the wireless network, which can further reduce the cost. The burden of wireless networks.

可选地,当无线设备4确定TCP报文1传输成功时,无线设备4删除存储的TCP报文1,以释放存储空间。Optionally, when the wireless device 4 determines that the TCP message 1 is successfully transmitted, the wireless device 4 deletes the stored TCP message 1 to release storage space.

在本申请实施例提供的数据传输方法中,由于无线设备4存储了来自发送端设备的TCP报文,因此在确定接收端设备对TCP报文接收失败后,无线设备4可以直接向接收端设备重发存储的TCP报文,而无需由无线设备3再通过无线网络重发TCP报文,进而可以减少通过无线网络重传的TCP报文的数量,从而降低无线网络的负担。另外,无线设备3无需等待接收来自接收端设备的TCP确认报文,而是在接收到针对MAC帧的确认帧之后,确定无线设备4已成功接收到TCP报文,然后自行生成TCP确认报文并发送给发送端设备。这样,无线设备3无需等待来自接收端设备的TCP报文,而可以直接向发送端设备发送TCP确认报文,提高了向发送端设备回复TCP确认报文的效率,从而保证发送端设备对后续TCP报文的发送速率,进而提高TCP吞吐量。并且,无线设备4无需通过无线网络向无线设备3发送来自接收端设备的TCP确认报文,可以进一步降低无线网络的负担。In the data transmission method provided by the embodiment of the present application, since the wireless device 4 stores the TCP message from the sending device, after determining that the receiving device fails to receive the TCP message, the wireless device 4 can directly send a message to the receiving device. Resending the stored TCP messages eliminates the need for the wireless device 3 to resend the TCP messages through the wireless network, thereby reducing the number of TCP messages retransmitted through the wireless network, thereby reducing the burden on the wireless network. In addition, wireless device 3 does not need to wait to receive the TCP confirmation message from the receiving device. Instead, after receiving the confirmation frame for the MAC frame, it determines that wireless device 4 has successfully received the TCP message, and then generates a TCP confirmation message by itself. and sent to the sending device. In this way, the wireless device 3 does not need to wait for the TCP message from the receiving device, but can directly send the TCP confirmation message to the sending device, which improves the efficiency of replying the TCP confirming message to the sending device, thereby ensuring that the sending device can respond to subsequent The sending rate of TCP messages, thereby improving TCP throughput. Moreover, the wireless device 4 does not need to send the TCP confirmation message from the receiving end device to the wireless device 3 through the wireless network, which can further reduce the burden on the wireless network.

可选地,本申请实施例中的无线设备,例如上述无线设备1或无线设备4,还用于处理同步序列编号(synchronize sequence numbers,SYN)报文、结束连接(finish theconnection,FIN)报文、重置连接(reset the connection,RST)报文,以维护或拆除发送端设备与接收端设备之间的TCP链路。Optionally, the wireless device in the embodiment of the present application, such as the above-mentioned wireless device 1 or wireless device 4, is also used to process synchronize sequence numbers (SYN) messages and finish the connection (FIN) messages. , reset the connection (reset the connection, RST) message to maintain or tear down the TCP link between the sending device and the receiving device.

本申请实施例提供的上述数据传输方法的步骤的先后顺序能够进行适当调整,例如上述步骤303可以在步骤302之前执行,或者上述步骤303和步骤302也可以同时执行。又例如上述步骤404可以在步骤403之前执行,或者上述步骤404和步骤403也可以同时执行。又例如上述步骤404至步骤405与步骤406至步骤407可以同时执行,或者步骤406至步骤407也可以在步骤404至步骤405之前执行。步骤也能够根据情况进行相应增减。例如在无线设备4确定TCP报文2传输成功时,上述步骤407可以不执行。任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化的方法,都应涵盖在本申请的保护范围之内。The order of the steps of the above-mentioned data transmission method provided by the embodiment of the present application can be adjusted appropriately. For example, the above-mentioned step 303 can be performed before step 302, or the above-mentioned step 303 and step 302 can also be performed at the same time. For another example, the above-mentioned step 404 may be executed before step 403, or the above-mentioned step 404 and step 403 may also be executed at the same time. For another example, the above-mentioned steps 404 to 405 and steps 406 to 407 may be executed at the same time, or steps 406 to 407 may be executed before steps 404 to 405. The steps can also be increased or decreased according to the situation. For example, when the wireless device 4 determines that the TCP message 2 is successfully transmitted, the above step 407 may not be executed. Any person familiar with the technical field can easily think of modified methods within the technical scope disclosed in this application, and they should be covered by the protection scope of this application.

本申请实施例提供了一种数据传输方法。该方法包括以下步骤S101至S104。The embodiment of the present application provides a data transmission method. The method includes the following steps S101 to S104.

在步骤S101中,第一无线设备接收来自发送端设备的TCP报文。In step S101, the first wireless device receives the TCP message from the sending device.

在步骤S102中,第一无线设备存储TCP报文。In step S102, the first wireless device stores the TCP message.

在步骤S103中,第一无线设备通过无线网络向第二无线设备发送第一MAC帧,第一MAC帧包括TCP报文。In step S103, the first wireless device sends a first MAC frame to the second wireless device through the wireless network, where the first MAC frame includes a TCP message.

在步骤S104中,第一无线设备在通过无线网络接收到针对第一MAC帧的确认帧之前,向发送端设备发送TCP确认报文,该TCP确认报文指示TCP报文传输成功。In step S104, before receiving the acknowledgment frame for the first MAC frame through the wireless network, the first wireless device sends a TCP acknowledgment message to the sending device. The TCP acknowledgment message indicates that the TCP message is successfully transmitted.

该方法具体用于实现图3示出的方法。第一无线设备例如是附图3所描述的实施例中的无线设备1,第二无线设备例如是附图3所描述的实施例中的无线设备2。TCP报文例如是TCP报文1,第一MAC帧例如是MAC帧1,TCP确认报文例如是TCP确认报文1。步骤S101至步骤S104的具体实现过程参考图3示出的方法中的相关步骤,本申请实施例在此不再赘述。This method is specifically used to implement the method shown in Figure 3. The first wireless device is, for example, the wireless device 1 in the embodiment depicted in FIG. 3 , and the second wireless device is, for example, the wireless device 2 in the embodiment depicted in FIG. 3 . The TCP message is, for example, TCP message 1, the first MAC frame is, for example, MAC frame 1, and the TCP confirmation message is, for example, TCP confirmation message 1. For the specific implementation process of steps S101 to S104, refer to the relevant steps in the method shown in FIG. 3, which will not be described again in the embodiment of the present application.

可选地,当第一无线设备通过无线网络接收到来自第二无线设备的对TCP报文传输失败的传输层指示时,第一无线设备通过无线网络向第二无线设备发送第二MAC帧,第二MAC帧包括第一无线设备存储的TCP报文。可选地,该方式具体用于实现图3示出的方法。第二MAC帧例如是MAC帧4。Optionally, when the first wireless device receives a transport layer indication of TCP packet transmission failure from the second wireless device through the wireless network, the first wireless device sends the second MAC frame to the second wireless device through the wireless network, The second MAC frame includes the TCP message stored by the first wireless device. Optionally, this method is specifically used to implement the method shown in Figure 3. The second MAC frame is MAC frame 4, for example.

可选地,当第一无线设备通过无线网络接收到来自第二无线设备的对TCP报文传输成功的传输层指示时,第一无线设备删除存储的TCP报文。Optionally, when the first wireless device receives a transport layer indication of successful transmission of the TCP message from the second wireless device through the wireless network, the first wireless device deletes the stored TCP message.

本申请实施例还提供了另一种数据传输方法。该方法包括以下步骤S201至S204。The embodiment of the present application also provides another data transmission method. The method includes the following steps S201 to S204.

在步骤S201中,第一无线设备通过无线网络接收来自第二无线设备的一个或多个MAC帧,该一个或多个MAC帧包括来自发送端设备的多个TCP报文。In step S201, the first wireless device receives one or more MAC frames from the second wireless device through the wireless network, where the one or more MAC frames include multiple TCP messages from the sending device.

在步骤S202中,第一无线设备通过无线网络向第二无线设备发送针对该一个或多个MAC帧的确认帧。In step S202, the first wireless device sends an acknowledgment frame for the one or more MAC frames to the second wireless device through the wireless network.

在步骤S203中,第一无线设备向接收端设备发送多个TCP报文。In step S203, the first wireless device sends multiple TCP messages to the receiving device.

在步骤S204中,第一无线设备通过无线网络向第二无线设备发送传输层指示,传输层指示用于指示多个TCP报文是否传输成功。In step S204, the first wireless device sends a transport layer indication to the second wireless device through the wireless network. The transport layer indication is used to indicate whether the multiple TCP messages are successfully transmitted.

该方法具体用于实现图3示出的方法。第一无线设备例如是附图3所描述的实施例中的无线设备2,第二无线设备例如是附图3所描述的实施例中的无线设备1。多个TCP报文例如包括TCP报文1,一个或多个MAC帧例如包括MAC帧1和/或MAC帧3。步骤S201至步骤S204的具体实现过程参考图3示出的方法中的相关步骤,本申请实施例在此不再赘述。This method is specifically used to implement the method shown in Figure 3. The first wireless device is, for example, the wireless device 2 in the embodiment depicted in FIG. 3 , and the second wireless device is, for example, the wireless device 1 in the embodiment depicted in FIG. 3 . The multiple TCP messages include, for example, TCP message 1, and the one or more MAC frames include, for example, MAC frame 1 and/or MAC frame 3. For the specific implementation process of steps S201 to S204, refer to the relevant steps in the method shown in FIG. 3 , which will not be described again in this embodiment of the present application.

可选地,第一无线设备根据第一无线设备与接收端设备之间的往返时延以及第一无线设备对TCP报文所属的TCP流的接收速率,确定用于指示TCP流中的TCP报文是否传输成功的传输层指示的发送频率。Optionally, the first wireless device determines, based on the round-trip delay between the first wireless device and the receiving end device and the first wireless device's reception rate of the TCP flow to which the TCP packet belongs, the TCP packet used to indicate the TCP flow. The sending frequency indicated by the transport layer whether the text is successfully transmitted.

本申请实施例还提供了又一种数据传输方法。该方法包括以下步骤S301至S305。The embodiment of the present application also provides yet another data transmission method. The method includes the following steps S301 to S305.

在步骤S301中,第一无线设备通过无线网络接收来自第二无线设备的MAC帧,该MAC帧包括来自发送端设备的TCP报文。In step S301, the first wireless device receives a MAC frame from the second wireless device through the wireless network, where the MAC frame includes a TCP message from the sending device.

在步骤S302中,第一无线设备存储TCP报文。In step S302, the first wireless device stores the TCP message.

在步骤S303中,第一无线设备通过无线网络向第二无线设备发送针对该MAC帧的确认帧。In step S303, the first wireless device sends an acknowledgment frame for the MAC frame to the second wireless device through the wireless network.

在步骤S304中,第一无线设备向接收端设备发送TCP报文。In step S304, the first wireless device sends a TCP message to the receiving device.

在步骤S305中,当第一无线设备确定TCP报文传输失败时,第一无线设备向接收端设备重传存储的TCP报文。In step S305, when the first wireless device determines that the TCP message transmission fails, the first wireless device retransmits the stored TCP message to the receiving end device.

该方法具体用于实现图4示出的方法。第一无线设备例如是附图4所描述的实施例中的无线设备4,第二无线设备例如是附图4所描述的实施例中的无线设备3。TCP报文例如是TCP报文1,MAC帧例如是MAC帧1。步骤S301至步骤S305的具体实现过程参考图4示出的方法中的相关步骤,本申请实施例在此不再赘述。This method is specifically used to implement the method shown in Figure 4. The first wireless device is, for example, the wireless device 4 in the embodiment depicted in FIG. 4 , and the second wireless device is, for example, the wireless device 3 in the embodiment depicted in FIG. 4 . The TCP message is, for example, TCP message 1, and the MAC frame is, for example, MAC frame 1. For the specific implementation process of steps S301 to S305, refer to the relevant steps in the method shown in FIG. 4, which will not be described again in the embodiment of the present application.

可选地,第一无线设备不向第二无线设备转发来自接收端设备的TCP确认报文。Optionally, the first wireless device does not forward the TCP confirmation message from the receiving end device to the second wireless device.

可选地,当第一无线设备确定TCP报文传输成功时,第一无线设备删除存储的TCP报文。Optionally, when the first wireless device determines that the TCP message is successfully transmitted, the first wireless device deletes the stored TCP message.

图5是本申请实施例提供的一种无线设备的结构示意图。该无线设备为第一无线设备。如图5所示,无线设备500包括:Figure 5 is a schematic structural diagram of a wireless device provided by an embodiment of the present application. The wireless device is the first wireless device. As shown in Figure 5, wireless device 500 includes:

接收模块501,用于接收来自发送端设备的TCP报文。The receiving module 501 is used to receive TCP messages from the sending device.

存储模块502,用于存储TCP报文。Storage module 502 is used to store TCP messages.

第一发送模块503,用于通过无线网络向第二无线设备发送第一MAC帧,第一MAC帧包括TCP报文。The first sending module 503 is configured to send a first MAC frame to the second wireless device through the wireless network, where the first MAC frame includes a TCP message.

第二发送模块504,用于在通过无线网络接收到针对第一MAC帧的确认帧之前,向发送端设备发送TCP确认报文,TCP确认报文指示TCP报文传输成功。The second sending module 504 is configured to send a TCP confirmation message to the sending device before receiving the confirmation frame for the first MAC frame through the wireless network. The TCP confirmation message indicates that the TCP message is successfully transmitted.

可选地,第一发送模块503,还用于当该无线设备通过无线网络接收到来自第二无线设备的对TCP报文传输失败的传输层指示时,通过无线网络向第二无线设备发送第二MAC帧,第二MAC帧包括该无线设备存储的TCP报文。Optionally, the first sending module 503 is also configured to send the second wireless device to the second wireless device via the wireless network when the wireless device receives a transport layer indication of TCP packet transmission failure from the second wireless device through the wireless network. Two MAC frames, the second MAC frame includes the TCP message stored by the wireless device.

可选地,如图6所示,无线设备500还包括:删除模块505,用于当该无线设备通过无线网络接收到来自第二无线设备的对TCP报文传输成功的传输层指示时,删除存储的TCP报文。Optionally, as shown in Figure 6, the wireless device 500 also includes: a deletion module 505, configured to delete the TCP packet when the wireless device receives a transport layer indication of successful transmission of the TCP packet from the second wireless device through the wireless network. Stored TCP messages.

图7是本申请另一实施例提供的一种无线设备的结构示意图。该无线设备为第一无线设备。如图7所示,无线设备700包括:Figure 7 is a schematic structural diagram of a wireless device provided by another embodiment of the present application. The wireless device is the first wireless device. As shown in Figure 7, wireless device 700 includes:

接收模块701,用于通过无线网络接收来自第二无线设备的一个或多个MAC帧,一个或多个MAC帧包括来自发送端设备的多个TCP报文。The receiving module 701 is configured to receive one or more MAC frames from the second wireless device through the wireless network, where the one or more MAC frames include multiple TCP messages from the sending device.

第一发送模块702,用于通过无线网络向第二无线设备发送针对一个或多个MAC帧的确认帧。The first sending module 702 is configured to send an acknowledgment frame for one or more MAC frames to the second wireless device through the wireless network.

第二发送模块703,用于向接收端设备发送多个TCP报文。The second sending module 703 is used to send multiple TCP messages to the receiving end device.

第一发送模块703,还用于通过无线网络向第二无线设备发送传输层指示,传输层指示用于指示多个TCP报文是否传输成功。The first sending module 703 is also configured to send a transport layer indication to the second wireless device through the wireless network. The transport layer indication is used to indicate whether the multiple TCP messages are successfully transmitted.

可选地,如图8所示,无线设备700还包括:确定模块704,用于根据该无线设备与接收端设备之间的往返时延以及该无线设备对TCP报文所属的TCP流的接收速率,确定用于指示TCP流中的TCP报文是否传输成功的传输层指示的发送频率。Optionally, as shown in Figure 8, the wireless device 700 also includes: a determining module 704, configured to determine the destination according to the round-trip delay between the wireless device and the receiving end device and the wireless device's reception of the TCP flow to which the TCP message belongs. Rate, determines the sending frequency of the transport layer indication used to indicate whether the TCP packet in the TCP stream is successfully transmitted.

图9是本申请又一实施例提供的一种无线设备的结构示意图。该无线设备为第一无线设备。如图9所示,无线设备900包括:Figure 9 is a schematic structural diagram of a wireless device provided by yet another embodiment of the present application. The wireless device is the first wireless device. As shown in Figure 9, wireless device 900 includes:

接收模块901,用于通过无线网络接收来自第二无线设备的MAC帧,MAC帧包括来自发送端设备的TCP报文。The receiving module 901 is configured to receive a MAC frame from the second wireless device through the wireless network, where the MAC frame includes a TCP message from the sending device.

存储模块902,用于存储TCP报文。Storage module 902, used to store TCP messages.

第一发送模块903,用于通过无线网络向第二无线设备发送针对MAC帧的确认帧。The first sending module 903 is configured to send an acknowledgment frame for the MAC frame to the second wireless device through the wireless network.

第二发送模块904,用于向接收端设备发送TCP报文。The second sending module 904 is used to send TCP messages to the receiving end device.

第二发送模块904,还用于当第一无线设备确定TCP报文传输失败时,向接收端设备重传存储的TCP报文。The second sending module 904 is also configured to retransmit the stored TCP message to the receiving end device when the first wireless device determines that the TCP message transmission fails.

可选地,该无线设备不向第二无线设备转发来自接收端设备的TCP确认报文。Optionally, the wireless device does not forward the TCP confirmation message from the receiving end device to the second wireless device.

可选地,如图10所示,无线设备900还包括:删除模块905,用于当该无线设备确定TCP报文传输成功时,删除存储的TCP报文。Optionally, as shown in Figure 10, the wireless device 900 also includes a deletion module 905, configured to delete the stored TCP message when the wireless device determines that the TCP message is successfully transmitted.

关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the devices in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

本申请实施例提供了一种无线设备,包括:处理器和收发器。所述处理器,用于调用计算机程序,协同所述收发器实现如图3或图4所示实施例中任一无线设备执行的动作。An embodiment of the present application provides a wireless device, including: a processor and a transceiver. The processor is configured to call a computer program and cooperate with the transceiver to implement actions performed by any wireless device in the embodiment shown in Figure 3 or Figure 4.

例如,图11是本申请实施例提供的一种无线设备的框图。如图11所示,该无线设备1100包括:处理器1101和收发器1102。处理器1101,用于调用计算机程序,协同收发器1102实现如图3所示实施例中无线设备1或无线设备2执行的动作,或者实现如图4所示实施例中无线设备3或无线设备4执行的动作。For example, FIG. 11 is a block diagram of a wireless device provided by an embodiment of the present application. As shown in Figure 11, the wireless device 1100 includes: a processor 1101 and a transceiver 1102. The processor 1101 is used to call a computer program and cooperate with the transceiver 1102 to implement the actions performed by the wireless device 1 or the wireless device 2 in the embodiment shown in Figure 3, or to implement the wireless device 3 or the wireless device in the embodiment shown in Figure 4 4 actions performed.

可选地,该无线设备1100还包括存储器1103、通信总线1104和通信接口1105。Optionally, the wireless device 1100 also includes a memory 1103, a communication bus 1104, and a communication interface 1105.

处理器1101可以是一个通用中央处理器(central processing unit,CPU)、特定应用集成电路(无线设备plication-specific integrated circuit,ASIC)或一个或多个用于控制本申请方案程序执行的集成电路。The processor 1101 may be a general central processing unit (CPU), an application-specific integrated circuit (wireless device application-specific integrated circuit, ASIC), or one or more integrated circuits used to control program execution of the solution of the present application.

通信总线1104可包括一通路,在上述组件之间传送信息。Communication bus 1104 may include a path that carries information between the above-mentioned components.

存储器1103可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compactdisc read-only memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘或者其它磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器1103可以是独立存在,通过通信总线1104与处理器1101相连接。存储器1103也可以和处理器1101集成在一起。The memory 1103 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (random access memory (RAM)) or other type that can store information and instructions. The dynamic storage device can also be electrically erasable programmable read-only memory (EEPROM), compactdisc read-only memory (CD-ROM) or other optical disk storage, optical disk storage ( Including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disks or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer Any other medium, without limitation. The memory 1103 may exist independently and be connected to the processor 1101 through the communication bus 1104. The memory 1103 may also be integrated with the processor 1101.

其中,存储器1103用于存储执行本申请方案的程序代码,并由处理器1101来控制执行。处理器1101用于执行存储器1103中存储的程序代码。程序代码中可以包括一个或多个软件模块。这一个或多个软件模块可以为图5至图10任一所示实施例中提供的软件模块。Among them, the memory 1103 is used to store the program code for executing the solution of the present application, and the processor 1101 controls the execution. The processor 1101 is used to execute program codes stored in the memory 1103. The program code may include one or more software modules. The one or more software modules may be software modules provided in any of the embodiments shown in FIGS. 5 to 10 .

通信接口1105,使用收发器1102,用于与其它设备或通信网络通信,如以太网,无线接入网(radio access network,RAN),WLAN或移动蜂窝网等。The communication interface 1105 uses the transceiver 1102 to communicate with other devices or communication networks, such as Ethernet, radio access network (radio access network, RAN), WLAN or mobile cellular network, etc.

在具体实现中,作为一种实施例,无线设备可以包括多个处理器。这些处理器中的每一个可以是一个单核处理器,也可以是一个多核处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an example, a wireless device may include multiple processors. Each of these processors can be a single-core processor or a multi-core processor. A processor here may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).

本申请实施例提供了一种数据传输系统,包括:第一无线设备和第二无线设备,第一无线设备与第二无线设备通过无线网络连接。第一无线设备用于执行图3示出的方法中无线设备1执行的动作,第二无线设备用于执行图3示出的方法中无线设备2执行的动作。An embodiment of the present application provides a data transmission system, including: a first wireless device and a second wireless device, and the first wireless device and the second wireless device are connected through a wireless network. The first wireless device is used to perform the actions performed by the wireless device 1 in the method shown in Figure 3, and the second wireless device is used to perform the actions performed by the wireless device 2 in the method shown in Figure 3.

本申请实施例还提供了另一种数据传输系统,包括:第一无线设备和第二无线设备,第一无线设备与第二无线设备通过无线网络连接。第一无线设备用于执行图4示出的方法中无线设备3执行的动作,第二无线设备用于执行图4示出的方法中无线设备4执行的动作。An embodiment of the present application also provides another data transmission system, including: a first wireless device and a second wireless device, and the first wireless device and the second wireless device are connected through a wireless network. The first wireless device is used to perform the actions performed by the wireless device 3 in the method shown in FIG. 4 , and the second wireless device is used to perform the actions performed by the wireless device 4 in the method shown in FIG. 4 .

具体地,第一无线设备用于接收来自发送端设备的TCP报文。第一无线设备用于通过无线网络向第二无线设备发送MAC帧,该MAC帧包括该TCP报文。第二无线设备用于存储该TCP报文,并通过无线网络向第二无线设备发送针对该MAC帧的确认帧。第一无线设备还用于响应于通过无线网络接收到该确认帧,向发送端设备发送TCP确认报文,该TCP确认报文指示该TCP报文传输成功。第二无线设备还用于向接收端设备发送该TCP报文,并在确定该TCP报文传输失败时,向接收端设备重传存储的该TCP报文。Specifically, the first wireless device is used to receive TCP messages from the sending end device. The first wireless device is configured to send a MAC frame to the second wireless device through the wireless network, where the MAC frame includes the TCP message. The second wireless device is configured to store the TCP message and send an acknowledgment frame for the MAC frame to the second wireless device through the wireless network. The first wireless device is further configured to, in response to receiving the acknowledgment frame through the wireless network, send a TCP acknowledgment message to the sending end device, where the TCP acknowledgment message indicates that the TCP message is successfully transmitted. The second wireless device is also configured to send the TCP message to the receiving device, and when it is determined that the TCP message fails to be transmitted, retransmit the stored TCP message to the receiving device.

本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有指令,当所述指令被处理器执行时,实现如图3或图4所示实施例中任一无线设备执行的动作。Embodiments of the present application also provide a computer-readable storage medium. Instructions are stored on the computer-readable storage medium. When the instructions are executed by a processor, any of the embodiments shown in Figure 3 or Figure 4 can be implemented. An action performed by a wireless device.

本申请实施例还提供了一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时,实现如图3或图4所示实施例中任一无线设备执行的动作。An embodiment of the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the actions performed by any wireless device in the embodiment shown in Figure 3 or Figure 4 are implemented.

本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium. The above-mentioned The storage media mentioned can be read-only memory, magnetic disks or optical disks, etc.

在本申请实施例中,术语“第一”、“第二”和“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性。In the embodiments of the present application, the terms "first", "second" and "third" are only used for description purposes and cannot be understood as indicating or implying relative importance.

本申请中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。The term "and/or" in this application is just an association relationship describing related objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, alone There are three situations B. In addition, the character "/" in this article generally indicates that the related objects are an "or" relationship.

需要说明的是,本申请所涉及的信息(包括但不限于用户设备信息、用户个人信息等)、数据(包括但不限于用于分析的数据、存储的数据、展示的数据等)以及信号,均为经用户授权或者经过各方充分授权的,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。例如,本申请中涉及到的TCP报文、TCP确认报文、传输层指示等都是在充分授权的情况下获取的。It should be noted that the information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application, All are authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions. For example, the TCP messages, TCP confirmation messages, transport layer instructions, etc. involved in this application were all obtained with full authorization.

以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的构思和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the concepts and principles of the present application shall be included in the protection of the present application. within the range.

Claims (21)

CN202210395709.0A2022-04-142022-04-14 Data transmission method, device and systemPendingCN116963175A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202210395709.0ACN116963175A (en)2022-04-142022-04-14 Data transmission method, device and system

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202210395709.0ACN116963175A (en)2022-04-142022-04-14 Data transmission method, device and system

Publications (1)

Publication NumberPublication Date
CN116963175Atrue CN116963175A (en)2023-10-27

Family

ID=88458958

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202210395709.0APendingCN116963175A (en)2022-04-142022-04-14 Data transmission method, device and system

Country Status (1)

CountryLink
CN (1)CN116963175A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN117579233A (en)*2024-01-152024-02-20杭州优云科技股份有限公司Message retransmission method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN117579233A (en)*2024-01-152024-02-20杭州优云科技股份有限公司Message retransmission method and device
CN117579233B (en)*2024-01-152024-04-23杭州优云科技股份有限公司Message retransmission method and device

Similar Documents

PublicationPublication DateTitle
US10237153B2 (en)Packet retransmission method and apparatus
TWI387256B (en)Method and apparatus for improving transmission time interval bundling
CN112436994B (en)Data transmission method and electronic equipment
CN108881008A (en) A method, device and system for data transmission
CN109120540B (en)Method for transmitting message, proxy server and computer readable storage medium
CN103973414B (en)A kind of data transmission method and device
WO2020147453A1 (en)Data transmission method and related apparatus
CN101860423A (en) Retransmission method and device for protocol packet transmission
CN104618007B (en)A kind of synchronous satellite Transmission Control Protocol segmentation connection optimization method
WO2020010511A1 (en)Data transmission method and base station
US11502986B2 (en)Reducing transmission delay of transmitting data in Wi-Fi
WO2022083371A1 (en)Data transmission method and device
EP3637840B1 (en)Uplink data transmission method, timer configuration method and related equipment
JP2020507963A (en) Data transmission method and apparatus, and customer premises equipment
KR20190011898A (en)Terminal, base station, and transmitting method thereof in a wireless communication system
CN115567977A (en) A transmission optimization method, system, electronic device and storage medium
CN116963175A (en) Data transmission method, device and system
WO2020154872A1 (en)Transmission control protocol acceleration method and apparatus
US11316620B2 (en)Enhanced HARQ algorithm for large round trip delay links
CN115499108B (en)Closed loop network communication method and system based on UDP protocol
EP4518209A2 (en)Communication method and apparatus
CN120614642A (en) Communication method and device, and computer-readable storage medium
WO2024032354A1 (en)Data processing method and apparatus
CN118694487A (en) Communication method and communication device
WO2024032352A1 (en)Data processing method and apparatus

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp