[go: up one dir, main page]

CN116600351A - Data transmission method, device and electronic equipment - Google Patents

Data transmission method, device and electronic equipment Download PDF

Info

Publication number
CN116600351A
CN116600351A CN202310458731.XA CN202310458731A CN116600351A CN 116600351 A CN116600351 A CN 116600351A CN 202310458731 A CN202310458731 A CN 202310458731A CN 116600351 A CN116600351 A CN 116600351A
Authority
CN
China
Prior art keywords
packet loss
loss rate
wifi device
rate
data frames
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.)
Granted
Application number
CN202310458731.XA
Other languages
Chinese (zh)
Other versions
CN116600351B (en
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.)
TP Link Technologies Co Ltd
Original Assignee
TP Link 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 TP Link Technologies Co Ltd filed Critical TP Link Technologies Co Ltd
Priority to CN202310458731.XA priority Critical patent/CN116600351B/en
Priority claimed from CN202310458731.XA external-priority patent/CN116600351B/en
Publication of CN116600351A publication Critical patent/CN116600351A/en
Application granted granted Critical
Publication of CN116600351B publication Critical patent/CN116600351B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/16Central resource management; Negotiation of resources or communication parameters, e.g. negotiating bandwidth or QoS [Quality of Service]
    • H04W28/18Negotiating wireless communication parameters
    • H04W28/22Negotiating communication rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Environmental & Geological Engineering (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请适用于通信技术领域,提供了数据传输方法、装置及电子设备,所述方法包括:在第一WiFi设备通过SR功能发送数据帧之前,确定第二WiFi设备与指定终端传输第一数量的数据帧的丢包率,得到第一丢包率;在所述第一WiFi设备通过SR功能发送数据帧的过程中,确定所述第二WiFi设备与所述指定终端传输第二数量的数据帧的丢包率,得到第二丢包率;根据所述第一丢包率和所述第二丢包率计算所述第二WiFi设备的丢包率的上升比例;根据所述第二WiFi设备的丢包率的上升比例,选择是否继续通过SR功能发送数据帧。通过上述方法,能够保证第一WiFi设备在进行SR发包时的整体网络性能。

The present application is applicable to the technical field of communication, and provides a data transmission method, device, and electronic equipment. The method includes: before the first WiFi device sends a data frame through the SR function, it is determined that the second WiFi device and the designated terminal transmit the first number of The packet loss rate of the data frame is obtained to obtain the first packet loss rate; in the process of sending the data frame by the first WiFi device through the SR function, it is determined that the second WiFi device and the designated terminal transmit a second number of data frames the packet loss rate to obtain the second packet loss rate; calculate the rising ratio of the packet loss rate of the second WiFi device according to the first packet loss rate and the second packet loss rate; according to the second WiFi device The increase ratio of the packet loss rate, select whether to continue to send data frames through the SR function. Through the above method, the overall network performance when the first WiFi device sends SR packets can be guaranteed.

Description

数据传输方法、装置及电子设备Data transmission method, device and electronic equipment

技术领域technical field

本申请属于通信技术领域,尤其涉及数据传输方法、装置、电子设备及计算机可读存储介质。The present application belongs to the technical field of communication, and in particular relates to a data transmission method, device, electronic equipment and computer-readable storage medium.

背景技术Background technique

802.11协议组推出了802.11ax新版本无线协议,标志着无线局域网正式进入第六代无线网络技术(IEEE 802.11.ax,WiFi6)时代。The 802.11 protocol group launched a new version of the 802.11ax wireless protocol, marking that the wireless local area network has officially entered the era of the sixth generation of wireless network technology (IEEE 802.11.ax, WiFi6).

针对旧版WiFi协议严格的冲突避免机制所造成的空间利用率低的问题,WiFi6协议推出了空间复用(Spatial Reuse,SR)功能,该SR功能通过调整空闲信道评估(ClearChannel Assessment,CCA)阈值和发射功率的方法,允许空间相隔比较远的基本服务集(Base Service Set,BSS)同时发送无线报文,从而能够提升总体网络容量。In response to the problem of low space utilization caused by the strict conflict avoidance mechanism of the old version of the WiFi protocol, the WiFi6 protocol introduced the Spatial Reuse (SR) function, which adjusts the clear channel assessment (ClearChannel Assessment, CCA) threshold and The transmission power method allows Basic Service Sets (BSSs) that are relatively far apart in space to send wireless packets at the same time, thereby improving the overall network capacity.

Spatial Reuse要实现空间复用,需要满足如下条件:To achieve spatial reuse for Spatial Reuse, the following conditions need to be met:

(1)相同BSS内,全部WiFi6设备拥有同一个BSS color,不同的BSS的BSS color不一样,即BSS color作为BSS网络的标识符。(1) In the same BSS, all WiFi6 devices have the same BSS color, and the BSS colors of different BSSs are different, that is, the BSS color is used as the identifier of the BSS network.

(2)WiFi6设备在前导码声明自己的BSS Color,确保其他的WiFi6设备可以在前导码阶段识别接收信号是自己的BSS(Self BSS)还是重叠的基本服务集(Overlapping BasicService Set,OBSS)信号。(2) The WiFi6 device declares its own BSS Color in the preamble to ensure that other WiFi6 devices can identify whether the received signal is its own BSS (Self BSS) or an overlapping Basic Service Set (Overlapping BasicService Set, OBSS) signal at the preamble stage.

(3)当前WiFi6设备接收到的OBSS信号,若能量低于Spatial Reuse定制的阈值(采用OBSS PD表示),则该当前WiFi6设备可以终止OBSS信号解调,进行发包,从而实现线性部分的同时发包,进而达到空间复用的目的。(3) If the energy of the OBSS signal received by the current WiFi6 device is lower than the threshold value customized by Spatial Reuse (indicated by OBSS PD), the current WiFi6 device can terminate the demodulation of the OBSS signal and send packets, so as to realize the simultaneous sending of linear parts , so as to achieve the purpose of space multiplexing.

典型的Spatial Reuse的原理时序图如图1所示,在图1中,存在两个空间间隔较远的BBS,分别是BBS1和BBS2,BBS1的前导码的BSS Color为颜色1,BBS2的前导码的BSS Color为颜色2,由于接收方(图1中的平板设备)可根据BBS信号的前导码的颜色信息来判断发送方,因此,图1中的2个接收方均能够准确接收到对应的BBS信号。The schematic timing diagram of a typical Spatial Reuse is shown in Figure 1. In Figure 1, there are two BBSs that are far apart in space, namely BBS1 and BBS2. The BSS Color of the preamble of BBS1 is color 1, and the preamble of BBS2 The BSS Color of the BBS is color 2. Since the receiver (the tablet device in Figure 1) can judge the sender based on the color information of the preamble of the BBS signal, both receivers in Figure 1 can accurately receive the corresponding BBS signal.

但Spatial Reuse虽然会通过空间复用增加网络总体吞吐量,但也存在丢包现象。However, although Spatial Reuse will increase the overall throughput of the network through spatial multiplexing, there is also packet loss.

发明内容Contents of the invention

本申请实施例提供了数据传输方法、装置及电子设备,可以解决使用SR时丢包率过大的问题。The embodiment of the present application provides a data transmission method, device and electronic equipment, which can solve the problem of excessive packet loss rate when using SR.

第一方面,本申请实施例提供了一种数据传输方法,应用于第一WiFi设备,所述第一WiFi设备支持空间复用SR功能,所述数据传输方法包括:In the first aspect, the embodiment of the present application provides a data transmission method, which is applied to a first WiFi device, and the first WiFi device supports a spatial multiplexing SR function, and the data transmission method includes:

在所述第一WiFi设备通过SR功能发送数据帧之前,确定第二WiFi设备与指定终端传输第一数量的数据帧的丢包率,得到第一丢包率;Before the first WiFi device sends data frames through the SR function, determine the packet loss rate of the first number of data frames transmitted between the second WiFi device and the designated terminal to obtain the first packet loss rate;

在所述第一WiFi设备通过SR功能发送数据帧的过程中,确定所述第二WiFi设备与所述指定终端传输第二数量的数据帧的丢包率,得到第二丢包率;In the process of sending data frames by the first WiFi device through the SR function, determine the packet loss rate of the second number of data frames transmitted between the second WiFi device and the designated terminal, to obtain a second packet loss rate;

根据所述第一丢包率和所述第二丢包率计算所述第二WiFi设备的丢包率的上升比例;calculating the increase ratio of the packet loss rate of the second WiFi device according to the first packet loss rate and the second packet loss rate;

根据所述第二WiFi设备的丢包率的上升比例,选择是否继续通过SR功能发送数据帧。According to the increase ratio of the packet loss rate of the second WiFi device, it is selected whether to continue sending data frames through the SR function.

第二方面,本申请实施例提供了一种数据传输装置,应用于第一WiFi设备,所述第一WiFi设备支持空间复用SR功能,所述数据传输装置包括:In the second aspect, the embodiment of the present application provides a data transmission device, which is applied to a first WiFi device, and the first WiFi device supports a spatial multiplexing SR function, and the data transmission device includes:

第一丢包率确定模块,用于在所述第一WiFi设备通过SR功能发送数据帧之前,确定第二WiFi设备与指定终端传输第一数量的数据帧的丢包率,得到第一丢包率;The first packet loss rate determination module is used to determine the packet loss rate of the first number of data frames transmitted between the second WiFi device and the designated terminal before the first WiFi device sends the data frame through the SR function, so as to obtain the first packet loss rate Rate;

第二丢包率确定模块,用于在所述第一WiFi设备通过SR功能发送数据帧的过程中,确定所述第二WiFi设备与所述指定终端传输第二数量的数据帧的丢包率,得到第二丢包率;A second packet loss rate determining module, configured to determine the packet loss rate of the second number of data frames transmitted between the second WiFi device and the specified terminal during the process of the first WiFi device sending data frames through the SR function , get the second packet loss rate;

丢包率的上升比例计算模块,用于根据所述第一丢包率和所述第二丢包率计算所述第二WiFi设备的丢包率的上升比例;The increase ratio calculation module of the packet loss rate is used to calculate the increase ratio of the packet loss rate of the second WiFi device according to the first packet loss rate and the second packet loss rate;

SR功能选择模块,用于根据所述第二WiFi设备的丢包率的上升比例,选择是否继续通过SR功能发送数据帧。The SR function selection module is configured to select whether to continue sending data frames through the SR function according to the increase ratio of the packet loss rate of the second WiFi device.

第三方面,本申请实施例提供了一种电子设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如第一方面所述的方法。In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and operable on the processor. When the processor executes the computer program, Implement the method as described in the first aspect.

第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面所述的方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to the first aspect is implemented.

第五方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行上述第一方面所述的方法。In a fifth aspect, an embodiment of the present application provides a computer program product, which causes the electronic device to execute the method described in the first aspect when the computer program product is run on the electronic device.

本申请实施例与现有技术相比存在的有益效果是:Compared with the prior art, the embodiments of the present application have the following beneficial effects:

在本申请实施例中,由于第一丢包率是第一WiFi设备通过SR功能发送数据帧之前,第二WiFi设备与指定终端传输第一数量的数据帧的丢包率,第二丢包率是第一WiFi设备通过SR功能发送数据帧的过程中,第二WiFi设备与指定终端传输第二数量的数据帧的丢包率,因此,根据第一丢包率和第二丢包率所计算出的第二WiFi设备的丢包率的上升比例反映的是第一WiFi设备通过SR功能发送数据帧时对第二WiFi设备的丢包率的影响。即在本申请实施例中,第一WiFi设备在使用SR功能发包的时候,评估自己发包对第二WiFi设备通信的干扰程度,智能决定当前是否需要进行SR发包,从而有利于减少由于第一WiFi设备使用SR功能时所造成的第二WiFi设备的丢包率过大的现象,进而有利于保证整体网络性能。In this embodiment of the application, since the first packet loss rate is the packet loss rate of the first number of data frames transmitted between the second WiFi device and the designated terminal before the first WiFi device sends data frames through the SR function, the second packet loss rate is the packet loss rate of the second number of data frames transmitted between the second WiFi device and the designated terminal during the process of the first WiFi device sending data frames through the SR function, therefore, it is calculated according to the first packet loss rate and the second packet loss rate The calculated increase ratio of the packet loss rate of the second WiFi device reflects the impact on the packet loss rate of the second WiFi device when the first WiFi device sends data frames through the SR function. That is to say, in the embodiment of this application, when the first WiFi device uses the SR function to send packets, it evaluates the interference degree of its own packet sending to the second WiFi device communication, and intelligently decides whether to send SR packets at present, which is beneficial to reduce the When the device uses the SR function, the packet loss rate of the second WiFi device is too large, which is conducive to ensuring the overall network performance.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings that are required in the embodiments or the description of the prior art.

图1是现有技术提供的典型的Spatial Reuse的原理时序图;FIG. 1 is a schematic timing diagram of a typical Spatial Reuse provided by the prior art;

图2是本申请一实施例提供的在使用SR功能传输数据帧时存在干扰的示意图;FIG. 2 is a schematic diagram of interference when transmitting data frames using the SR function provided by an embodiment of the present application;

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

图4是本申请一实施例提供的两个不同的BSS网络所对应的上行链路的速率和下行链路的速率的示意图;FIG. 4 is a schematic diagram of uplink rates and downlink rates corresponding to two different BSS networks provided by an embodiment of the present application;

图5是本申请另一实施例提供的一种短帧间隔的示意图;Fig. 5 is a schematic diagram of a short frame interval provided by another embodiment of the present application;

图6是本申请一实施例提供的一种状态转移示意图;Fig. 6 is a schematic diagram of a state transition provided by an embodiment of the present application;

图7是本申请另一实施例提供的一种数据传输装置的结构示意图;FIG. 7 is a schematic structural diagram of a data transmission device provided by another embodiment of the present application;

图8是本申请实施例提供的一种电子设备的结构示意图。FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.

具体实施方式Detailed ways

以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.

应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and/or components, but does not exclude one or more other Presence or addition of features, wholes, steps, operations, elements, components and/or collections thereof.

还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should also be understood that the term "and/or" used in the description of the present application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

另外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In addition, in the description of the specification and the appended claims of the present application, the terms "first", "second", "third" and so on are only used to distinguish descriptions, and should not be understood as indicating or implying relative importance.

在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。Reference to "one embodiment" or "some embodiments" or the like in the specification of the present application means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically stated otherwise.

实施例一:Embodiment one:

Spatial Reuse虽然会通过空间复用增加网络总体吞吐量,但也会造成设备间的无线信号干扰,当干扰比较大时,网络会出现丢包,降低吞吐量,违背WiFi6协议设计的初衷。如图2所示,BSS2满足SR条件,进行空间复用时,该BSS2的SR数据报文干扰到BSS1的正常报文,而BSS1的终端位置较远,则该BSS1的终端被干扰后将导致数据包接收失败。Although Spatial Reuse will increase the overall network throughput through spatial multiplexing, it will also cause wireless signal interference between devices. When the interference is relatively large, the network will lose packets and reduce throughput, which violates the original intention of the WiFi6 protocol design. As shown in Figure 2, BSS2 satisfies the SR condition. When performing spatial multiplexing, the SR data message of BSS2 interferes with the normal message of BSS1, and the terminal of BSS1 is located far away. After the terminal of BSS1 is interfered, it will cause Packet reception failed.

为了在使用SR功能时减少网络出现的丢包现象,本申请实施例提供了一种数据传输方法。In order to reduce packet loss in the network when using the SR function, this embodiment of the present application provides a data transmission method.

在该数据传输方法中,第一WiFi设备在通过SR功能发送数据帧前后,分别确定第二WiFi设备与指定终端传输数据帧的丢包率(Packet Loss Rate,RER),再根据得到的两个丢包率计算出该第二WiFi设备的丢包率的上升比例,最后根据该丢包率的上升比例选择是否继续通过SR功能发送数据帧。In this data transmission method, the first WiFi device determines the packet loss rate (Packet Loss Rate, RER) of the data frame transmitted by the second WiFi device and the designated terminal before and after sending the data frame through the SR function, and then according to the obtained two The packet loss rate calculates the increase ratio of the packet loss rate of the second WiFi device, and finally selects whether to continue sending data frames through the SR function according to the increase rate of the packet loss rate.

下面结合附图对本申请实施例提供的数据传输方法进行描述。The data transmission method provided by the embodiment of the present application will be described below with reference to the accompanying drawings.

图3示出了本申请实施例提供的一种数据传输方法的流程图,该方法应用于第一WiFi设备,该第一WiFi设备支持SR功能。在本申请实施例中,第一WiFi设备可以为使用WiFi6技术的路由、无线访问节点(Access Point,AP)等,详述如下:Fig. 3 shows a flow chart of a data transmission method provided by an embodiment of the present application, the method is applied to a first WiFi device, and the first WiFi device supports the SR function. In this embodiment of the application, the first WiFi device may be a router using WiFi6 technology, a wireless access point (Access Point, AP), etc., as detailed below:

步骤S31,在第一WiFi设备通过SR功能发送数据帧之前,确定第二WiFi设备与指定终端传输第一数量的数据帧的丢包率,得到第一丢包率。Step S31 , before the first WiFi device sends data frames through the SR function, determine the packet loss rate of the first number of data frames transmitted between the second WiFi device and the designated terminal, to obtain the first packet loss rate.

其中,指定终端是指与第二WiFi设备处于同一个BSS网络内的终端,该第二WiFi设备为第一WiFi设备希望使用SR功能所对应的设备,例如,若第一WiFi设备希望在WiFi设备X传输数据帧的过程中通过SR功能发送数据帧,则该WiFi设备X即为本申请实施例的第二WiFi设备。Wherein, the designated terminal refers to a terminal in the same BSS network as the second WiFi device, and the second WiFi device is the device corresponding to the first WiFi device wishing to use the SR function. When X transmits the data frame through the SR function during the process of transmitting the data frame, the WiFi device X is the second WiFi device in the embodiment of the present application.

其中,第一数量为预设值,其可以为15个或20个等,根据实际需求进行设定,此处不作限定。Wherein, the first quantity is a preset value, which can be 15 or 20, etc., and is set according to actual needs, which is not limited here.

本申请实施例中,根据第二设备与指定终端成功传输的数据帧以及没有成功传输的数据帧,计算出该第二WiFi设备在第一WiFi设备通过SR功能发送数据帧之前的丢包率。In the embodiment of the present application, the packet loss rate of the second WiFi device before the first WiFi device sends the data frame through the SR function is calculated according to the data frames successfully transmitted and the data frames not successfully transmitted between the second device and the specified terminal.

步骤S32,在第一WiFi设备通过SR功能发送数据帧的过程中,确定上述第二WiFi设备与上述指定终端传输第二数量的数据帧的丢包率,得到第二丢包率。Step S32, during the process of the first WiFi device sending data frames through the SR function, determine the packet loss rate of the second number of data frames transmitted between the second WiFi device and the designated terminal, to obtain a second packet loss rate.

其中,第二数量可根据实际情况进行设置,如该第二数量可以等于上述的第一数量,也可以不等于上述的第一数量,此处不作限定。Wherein, the second quantity can be set according to the actual situation, for example, the second quantity can be equal to or not equal to the above-mentioned first quantity, which is not limited here.

本申请实施例中,第一WiFi设备在通过SR功能发送数据帧的过程(如该第一WiFi设备在通过SR功能向与该第一WiFi设备处于同一BSS网络内的终端发送数据帧(如发送X1(该X1可根据实际情况设定)帧数据帧)的过程)中,根据第二设备与指定终端成功传输的数据帧以及没有成功传输的数据帧,计算出该第二WiFi设备的丢包率。In the embodiment of the present application, the first WiFi device is sending a data frame through the SR function (for example, the first WiFi device is sending a data frame to a terminal in the same BSS network as the first WiFi device through the SR function (for example, sending In the process of X1 (the X1 can be set according to the actual situation) frame data frame), calculate the packet loss of the second WiFi device according to the data frames successfully transmitted between the second device and the designated terminal and the data frames not successfully transmitted Rate.

在一些实施例中,第一WiFi设备在该步骤S32中,通过SR功能发送的数据帧可以为该第一WiFi设备实际需要发送出去、对接收终端有用的数据帧,也可以为测试专用的数据帧。其中,测试专用的各个数据帧可预先生成,各个数据帧的帧内容可以相同,也可以不同。例如,在每次需要确定第一WiFi设备通过SR功能发送数据帧时对第二WiFi设备的丢包率的影响时,该第一WiFi设备均可通过发送测试专用的数据帧来确定第二丢包率。由于测试专用的数据帧是预先生成的,因此,发送该测试专用的数据帧能够提高数据帧的发送效率,进而提高第二丢包率的确定速度。In some embodiments, the data frame sent by the first WiFi device through the SR function in step S32 may be a data frame that the first WiFi device actually needs to send out and is useful to the receiving terminal, or may be test-specific data frame. Wherein, each data frame dedicated to the test may be pre-generated, and the frame content of each data frame may be the same or different. For example, when it is necessary to determine the impact of the first WiFi device on the packet loss rate of the second WiFi device when sending data frames through the SR function, the first WiFi device can determine the second packet loss rate by sending a test-specific data frame. packet rate. Since the test-specific data frame is pre-generated, sending the test-specific data frame can improve the sending efficiency of the data frame, thereby increasing the speed of determining the second packet loss rate.

步骤S33,根据第一丢包率和第二丢包率计算上述第二WiFi设备的丢包率的上升比例。Step S33 , calculating the increase ratio of the packet loss rate of the second WiFi device according to the first packet loss rate and the second packet loss rate.

具体地,根据下式计算丢包率的上升比例:(第二丢包率-第一丢包率)/第一丢包率。其中,第二丢包率是第一WiFi设备在通过SR功能发送数据帧时,该第二WiFi设备的丢包率,该第二丢包率可能大于第一丢包率,也可能不大于该第一丢包率。Specifically, the increase ratio of the packet loss rate is calculated according to the following formula: (second packet loss rate−first packet loss rate)/first packet loss rate. Wherein, the second packet loss rate is the packet loss rate of the second WiFi device when the first WiFi device sends a data frame through the SR function, and the second packet loss rate may be greater than the first packet loss rate, or may not be greater than the The first packet loss rate.

步骤S34,根据上述第二WiFi设备的丢包率的上升比例,选择是否继续通过SR功能发送数据帧。Step S34, according to the increase ratio of the packet loss rate of the second WiFi device, choose whether to continue sending data frames through the SR function.

具体地,由于第二WiFi设备的丢包率的上升比例是一个比例值,因此,可在(0,1]之间设定一个丢包率阈值,将第二WiFi设备的丢包率的上升比例与该丢包率阈值比较,第一WiFi设备根据比较结果选择是否继续通过SR功能发送数据帧。需要指出的是,若该上升比例小于或等于0,则选择继续通过SR功能发送数据帧。Specifically, since the increase ratio of the packet loss rate of the second WiFi device is a proportional value, a threshold value of the packet loss rate can be set between (0,1], and the increase rate of the packet loss rate of the second WiFi device The ratio is compared with the packet loss rate threshold, and the first WiFi device selects whether to continue sending data frames by the SR function according to the comparison result.It should be pointed out that if the rising ratio is less than or equal to 0, then select to continue sending data frames by the SR function.

本申请实施例中,由于第一丢包率是第一WiFi设备通过SR功能发送数据帧之前,第二WiFi设备与指定终端传输第一数量的数据帧的丢包率,第二丢包率是第一WiFi设备通过SR功能发送数据帧的过程中,第二WiFi设备与指定终端传输第二数量的数据帧的丢包率,因此,根据第一丢包率和第二丢包率所计算出的第二WiFi设备的丢包率的上升比例反映的是第一WiFi设备通过SR功能发送数据帧时对第二WiFi设备的丢包率的影响。即在本申请实施例中,第一WiFi设备在使用SR功能发包的时候,评估自己发包对第二WiFi设备通信的干扰程度,智能决定当前是否需要进行SR发包,从而有利于减少由于第一WiFi设备使用SR功能时所造成的第二WiFi设备的丢包率过大的现象,进而有利于保证整体网络性能。In the embodiment of this application, since the first packet loss rate is the packet loss rate of the first number of data frames transmitted between the second WiFi device and the designated terminal before the first WiFi device sends data frames through the SR function, the second packet loss rate is During the process of sending data frames by the first WiFi device through the SR function, the packet loss rate of the second number of data frames transmitted by the second WiFi device and the designated terminal, therefore, calculated according to the first packet loss rate and the second packet loss rate The increase ratio of the packet loss rate of the second WiFi device reflects the impact on the packet loss rate of the second WiFi device when the first WiFi device sends data frames through the SR function. That is to say, in the embodiment of this application, when the first WiFi device uses the SR function to send packets, it evaluates the interference degree of its own packet sending to the second WiFi device communication, and intelligently decides whether to send SR packets at present, which is beneficial to reduce the When the device uses the SR function, the packet loss rate of the second WiFi device is too large, which is conducive to ensuring the overall network performance.

在一些实施例中,上述步骤S34包括,若判断出上述第二WiFi设备的丢包率的上升比例大于预设的第一丢包率阈值,则选择不继续通过SR功能发送数据帧。由于当第二WiFi设备的丢包率的上升比例大于预设的第一丢包率阈值时,表明第一WiFi设备通过SR功能发送数据帧时,其会导致第二WiFi设备的丢包率增大,因此,为了降低对第二WiFi设备的丢包率的影响,第一WiFi设备暂停通过SR功能继续发送数据帧。在一些实施例中,为了能够及时通过SR功能发送数据帧,第一WiFi设备暂停通过SR功能继续发送数据帧时,将返回上述步骤S31以及后续步骤,以便在能够使用SR功能时及时通过SR功能发送数据帧。In some embodiments, the above step S34 includes, if it is determined that the increase ratio of the packet loss rate of the second WiFi device is greater than the preset first packet loss rate threshold, then choosing not to continue sending data frames through the SR function. When the increase ratio of the packet loss rate of the second WiFi device is greater than the preset first packet loss rate threshold, it indicates that when the first WiFi device sends data frames through the SR function, it will cause the packet loss rate of the second WiFi device to increase. Therefore, in order to reduce the impact on the packet loss rate of the second WiFi device, the first WiFi device suspends sending data frames through the SR function. In some embodiments, in order to be able to send data frames through the SR function in time, when the first WiFi device suspends to continue sending data frames through the SR function, it will return to the above step S31 and subsequent steps, so as to pass the SR function in time when the SR function can be used Send a data frame.

在一些实施例中,考虑到第一WiFi设备通过SR功能发送数据帧时,不仅会影响第二WiFi设备的丢包率,还可能会影响该第二WiFi设备传输数据帧时的平均速率,因此,本申请实施例提供的数据传输方法还包括:In some embodiments, considering that when the first WiFi device sends data frames through the SR function, it will not only affect the packet loss rate of the second WiFi device, but may also affect the average rate when the second WiFi device transmits data frames, so , the data transmission method provided in the embodiment of the present application further includes:

A1、在上述第一WiFi设备通过SR功能发送数据帧之前,确定上述第二WiFi设备与上述指定终端传输第三数量的数据帧的平均速率,得到第一速率。A1. Before the first WiFi device sends data frames through the SR function, determine an average rate at which the second WiFi device and the designated terminal transmit a third number of data frames to obtain a first rate.

其中,第三数量可根据实际情况进行设置。优选地,与丢包率的探测相比,考虑到速率的探测采用的数量较大时,所得到的速率更准确,因此,可设置上述第三数量大于上述的第一数量,以及,大于上述的第二数量。Wherein, the third quantity can be set according to actual conditions. Preferably, compared with the detection of the packet loss rate, considering that when the detection of the rate adopts a larger number, the obtained rate is more accurate. Therefore, the above-mentioned third number can be set to be greater than the above-mentioned first number, and greater than the above-mentioned the second quantity of .

具体地,第二WiFi设备与指定终端传输第三数量的数据帧的平均速率是指传输各个数据帧的速率的平均值。其中,第二WiFi设备与指定终端传输的每个数据帧的速率,可通过第一WiFi设备收集该第二WiFi设备在传输该数据帧所对应的速率信息来确定。具体地,针对收集的每一个数据帧,从该数据帧的前导码字段中收集循环前缀长度(GuardInterval,GI)、调制编码方案阶数(Modulation and Coding Scheme,MCS),空间流个数(Number of Spatial Stream,NSS)和带宽(Bandwidth,BW)等速率信息,再根据预设的速率表,查找收集的速率信息所对应的速率。其中,在802.11ax协议中,前导码HE-SIG-A字段记录数据帧的BSS color和上下行信息,并且包括了GI、MCS、NSS、BW等速率信息。其中,速率表中记录了多个速率信息所对应的速率。例如,当NSS等于2,BW等于80时,速率表如表1所示。Specifically, the average rate at which the second WiFi device transmits the third number of data frames with the specified terminal refers to an average rate at which each data frame is transmitted. Wherein, the rate of each data frame transmitted by the second WiFi device and the designated terminal can be determined by collecting the rate information corresponding to the data frame transmitted by the second WiFi device by the first WiFi device. Specifically, for each data frame collected, the cyclic prefix length (GuardInterval, GI), modulation and coding scheme order (Modulation and Coding Scheme, MCS), number of spatial streams (Number of Spatial Stream, NSS) and bandwidth (Bandwidth, BW) and other rate information, and then search for the rate corresponding to the collected rate information according to the preset rate table. Among them, in the 802.11ax protocol, the preamble HE-SIG-A field records the BSS color and uplink and downlink information of the data frame, and includes rate information such as GI, MCS, NSS, and BW. Wherein, the rates corresponding to multiple rate information are recorded in the rate table. For example, when NSS is equal to 2 and BW is equal to 80, the rate table is shown in Table 1.

表1:Table 1:

在上述的表1中,Modulation表示调制方式,包括二进制相移键控(Binary PhaseShift Keying,BPSK)、正交相移键控(Quadrature Phase Shift Keying,QPSK)、16-正交幅度调制(Quadrature Amplitude Modulation,QAM)、64-QAM、256-QAM、1024-QAM。双载波调制(Dual Carrier Modulation)是一种特殊的调制方法,DCM会将调制方式对应的符号复制到另外一半频域子载波上,会降低一半的速率来提升传输可靠性,表格列中的DCM为0代表不采用双载波调制,为1代表采用双载波调制。R表示码率、NSD表示数据子载波个数、NBPSCS表示每个空间流中每个单载波的编码比特数、NCBPS表示每个正交频分复用(OrthogonalFrequency Division Multiplexing,OFDM)符号中的编码比特数、NDBPS表示每个OFDM符号中的编码数据比特数、Data rate表示数据速率。In the above Table 1, Modulation represents the modulation method, including Binary Phase Shift Keying (Binary PhaseShift Keying, BPSK), Quadrature Phase Shift Keying (Quadrature Phase Shift Keying, QPSK), 16-Quadrature Amplitude Modulation (Quadrature Amplitude Modulation, QAM), 64-QAM, 256-QAM, 1024-QAM. Dual Carrier Modulation (Dual Carrier Modulation) is a special modulation method. DCM will copy the symbol corresponding to the modulation method to the other half of the frequency domain subcarrier, which will reduce the rate by half to improve transmission reliability. The DCM in the table column 0 means no dual-carrier modulation is used, and 1 means dual-carrier modulation is used. R represents the code rate, N SD represents the number of data subcarriers, N BPSCS represents the number of coded bits per single carrier in each spatial stream, and N CBPS represents each Orthogonal Frequency Division Multiplexing (OFDM) symbol The number of encoded bits in , N DBPS indicates the number of encoded data bits in each OFDM symbol, and Data rate indicates the data rate.

在表1中可知,当GI为3.6μs、MCS等于0、NSS等于2、BW等于80时,对应的速率为30.6Mb/s。It can be known from Table 1 that when the GI is 3.6 μs, the MCS is equal to 0, the NSS is equal to 2, and the BW is equal to 80, the corresponding rate is 30.6 Mb/s.

在一些实施例中,收集第二WiFi设备在传输数据帧所对应的速率信息包括:分别收集第二WiFi设备在发送数据帧所对应的速率信息以及接收数据帧所对应的速率信息,即分别记录第二WiFi设备在下行链路对应的速率信息和该第二WiFi设备在上行链路对应的速率信息。由于分别收集上行链路对应的速率信息和下行链路对应的速率信息,因此,能够保证后续依据不同链路的速率信息所确定的速率的准确度。如图4所示,第一WiFi设备可通过维护如表2所示的信息列表来获取第二WiFi设备在传输数据帧所对应的速率信息,即该第一WiFi设备每监听到第二WiFi设备传输的一个数据帧,就更新表2中对应方向的链路的速率。In some embodiments, collecting the rate information corresponding to the transmission data frame of the second WiFi device includes: respectively collecting the rate information corresponding to the second WiFi device sending the data frame and the rate information corresponding to the receiving data frame, that is, respectively recording Rate information corresponding to the second WiFi device in the downlink and rate information corresponding to the second WiFi device in the uplink. Since the rate information corresponding to the uplink and the rate information corresponding to the downlink are collected separately, the accuracy of the rate subsequently determined according to the rate information of different links can be guaranteed. As shown in Figure 4, the first WiFi device can obtain the rate information corresponding to the transmission data frame of the second WiFi device by maintaining the information list shown in Table 2, that is, every time the first WiFi device listens to the second WiFi device When a data frame is transmitted, the rate of the link in the corresponding direction in Table 2 is updated.

表2:Table 2:

其中,表2中的“UL”表示上行方向,“DL”表示下行方向。Wherein, "UL" in Table 2 indicates an uplink direction, and "DL" indicates a downlink direction.

A2、若上述第二WiFi设备的丢包率的上升比例不大于预设的第一丢包率阈值,则在上述第一WiFi设备通过SR功能发送数据帧的过程中,确定上述第二WiFi设备与上述指定终端传输第四数量的数据帧的平均速率,得到第二速率。A2. If the increase ratio of the packet loss rate of the second WiFi device is not greater than the preset first packet loss rate threshold, then in the process of sending data frames by the first WiFi device through the SR function, determine the second WiFi device The second rate is obtained by transmitting the average rate of the fourth number of data frames with the specified terminal.

其中,上述第四数量可根据实际需求进行设定,该第四数量可等于上述的第三数量,也可不等于上述的第三数量,此处不作限定。在一些实施例中,考虑到丢包率是短时间探测,而速率探测是长时间探测,必要有足够长的时间才能观察到速率是否存在下降,因此,可设置第四数量大于上述的第一数量,以及,大于上述的第二数量,以提高得到的第二速率的准确度。Wherein, the above-mentioned fourth quantity can be set according to actual needs, and the fourth quantity can be equal to or not equal to the above-mentioned third quantity, which is not limited here. In some embodiments, considering that the packet loss rate is a short-term detection, while the rate detection is a long-time detection, it is necessary to have a long enough time to observe whether there is a drop in the rate. Therefore, the fourth number can be set to be greater than the above-mentioned first The number, and, is larger than the above-mentioned second number, so as to improve the accuracy of the obtained second rate.

其中,第一WiFi设备通过SR功能发送的数据帧可以为该第一WiFi设备实际需要发送出去的数据帧,也可以为测试专用的数据帧。该第一WiFi设备通过SR功能发送的数据帧的数量可根据实际情况进行设定。Wherein, the data frame sent by the first WiFi device through the SR function may be a data frame actually required to be sent by the first WiFi device, or may be a test-specific data frame. The number of data frames sent by the first WiFi device through the SR function can be set according to actual conditions.

本申请实施例中,将第二WiFi设备的丢包率的上升比例与预设的第一丢包率阈值进行比较,若不大于预设的第一丢包率阈值,则表明第一WiFi设备通过SR功能发送数据帧时对第二WiFi设备的丢包率的影响不大,此时,继续通过SR功能发送数据帧,并确定上述的第二速率。In the embodiment of the present application, the increase ratio of the packet loss rate of the second WiFi device is compared with the preset first packet loss rate threshold, and if it is not greater than the preset first packet loss rate threshold, it indicates that the first WiFi device When the data frame is sent through the SR function, the packet loss rate of the second WiFi device is not greatly affected. At this time, the data frame is continued to be sent through the SR function, and the above-mentioned second rate is determined.

A3、根据上述第一速率和上述第二速率计算上述第二WiFi设备的速率的下降比例。A3. Calculate the reduction ratio of the rate of the second WiFi device according to the first rate and the second rate.

具体地,可根据下式计算第二WiFi设备的速率的下降比例:(第一速率-第二速率)/第一速率。Specifically, the decrease ratio of the rate of the second WiFi device can be calculated according to the following formula: (first rate−second rate)/first rate.

对应地,上述步骤S34包括:Correspondingly, the above step S34 includes:

B1、若上述第二WiFi设备的丢包率的上升比例不大于上述预设的第一丢包率阈值,且判断出上述第二WiFi设备的速率的下降比例不大于预设的第一速率阈值,则选择继续通过SR功能发送数据帧。B1. If the increase ratio of the packet loss rate of the second WiFi device is not greater than the preset first packet loss rate threshold, and it is determined that the decrease ratio of the rate of the second WiFi device is not greater than the preset first rate threshold , choose to continue sending data frames through the SR function.

具体地,当判断出第二WiFi设备的丢包率的上升比例不大于预设的第一丢包率阈值,且判断出上述第二WiFi设备的速率的下降比例不大于预设的第一速率阈值,表明第一WiFi设备通过SR功能发送数据帧对第二WiFi设备的丢包率以及速率的影响均不大,此时,继续通过SR功能发送数据帧能够有效提升网络容量。Specifically, when it is determined that the increase ratio of the packet loss rate of the second WiFi device is not greater than the preset first packet loss rate threshold, and it is determined that the decrease ratio of the rate of the second WiFi device is not greater than the preset first rate The threshold indicates that sending data frames through the SR function of the first WiFi device has little impact on the packet loss rate and rate of the second WiFi device. At this time, continuing to send data frames through the SR function can effectively increase the network capacity.

在本申请实施例中,第一WiFi设备继续通过SR功能发送的数据帧为该第一WiFi设备实际希望发送的数据帧,即不是测试专用的数据帧。当然,若第一WiFi设备在步骤S32发送的数据帧也为其实际需要发送的数据帧,则第一WiFi设备此时通过SR功能发送的数据帧为上述数据帧之后的数据帧(假设在步骤S32发送到第N个数据帧,则此时通过SR功能发送的数据帧为该第N个数据帧之后的数据帧)。即第一WiFi设备此时发送的数据帧的内容与步骤S32中该第一WiFi设备发送的数据帧的内容为连续的内容,以保证接收终端接收的内容的连续性。In the embodiment of the present application, the data frame that the first WiFi device continues to send through the SR function is the data frame that the first WiFi device actually wants to send, that is, it is not a test-specific data frame. Of course, if the data frame sent by the first WiFi device in step S32 is also the data frame that it actually needs to send, then the data frame sent by the first WiFi device through the SR function at this time is the data frame after the above data frame (assuming that in step S32 S32 is sent to the Nth data frame, then the data frame sent by the SR function at this time is the data frame after the Nth data frame). That is, the content of the data frame sent by the first WiFi device at this time is continuous with the content of the data frame sent by the first WiFi device in step S32, so as to ensure the continuity of the content received by the receiving terminal.

B2、若上述第二WiFi设备的丢包率的上升比例不大于上述预设的第一丢包率阈值,但判断出上述第二WiFi设备的速率的下降比例大于上述预设的第一速率阈值,则暂停通过SR功能发送数据帧,并返回上述在上述第一WiFi设备通过SR功能发送数据帧之前,确定第二WiFi设备与指定终端传输第一数量的数据帧的丢包率的步骤以及后续步骤。B2. If the increase ratio of the packet loss rate of the second WiFi device is not greater than the preset first packet loss rate threshold, but it is determined that the decrease ratio of the rate of the second WiFi device is greater than the preset first rate threshold , then suspend sending data frames through the SR function, and return to the above-mentioned steps of determining the packet loss rate of the first number of data frames transmitted between the second WiFi device and the designated terminal before the above-mentioned first WiFi device sends data frames through the SR function and the subsequent steps step.

本申请实施例中,若判断出第二WiFi设备的丢包率的上升比例不大于预设的第一丢包率阈值,但判断出第二WiFi设备的速率的下降比例大于预设的第一速率阈值,则表明第一WiFi设备通过SR功能发送数据帧对第二WiFi设备的丢包率影响不大,但对该第二WiFi设备传输数据帧的平均速率影响较大,因此,为了降低对第二WiFi设备传输数据帧的平均速率的影响,第一WiFi设备暂停通过SR功能发送数据帧,并返回步骤S31以及后续步骤(如步骤A1、步骤A2、步骤A3、步骤S32、步骤S33、步骤S34等),以便后续能够及时判断出第一WiFi设备能够使用SR功能的时机,进而能够及时通过该SR功能发送数据帧。此外,由于丢包率检测能够检测出严重干扰,而速率探测是用于检测轻微干扰,因此,先确认没严重干扰后,再确定速率有没有比较大的恶化,即在丢包率符合要求后再进行速率检测,最后在两者均符合要求后再通过SR功能发送数据帧,可以用更小的代价回避严重干扰。In the embodiment of the present application, if it is determined that the increase ratio of the packet loss rate of the second WiFi device is not greater than the preset first packet loss rate threshold, but it is determined that the decrease ratio of the rate of the second WiFi device is greater than the preset first threshold rate threshold, it indicates that the data frame sent by the first WiFi device through the SR function has little impact on the packet loss rate of the second WiFi device, but has a greater impact on the average rate of the second WiFi device's transmission data frame. Therefore, in order to reduce the impact on Influenced by the average rate of the second WiFi device transmission data frame, the first WiFi device suspends sending data frames by the SR function, and returns to step S31 and subsequent steps (such as step A1, step A2, step A3, step S32, step S33, step S34, etc.), so that the timing when the first WiFi device can use the SR function can be judged in time later, and then the data frame can be sent through the SR function in time. In addition, because packet loss rate detection can detect severe interference, and rate detection is used to detect slight interference, therefore, after confirming that there is no serious interference, determine whether the rate has a relatively large deterioration, that is, after the packet loss rate meets the requirements Then perform rate detection, and finally send data frames through the SR function after both meet the requirements, which can avoid serious interference at a lower cost.

在一些实施例中,考虑到无线通信发送成功需要双方都要发送信号,比如OBSS进行一次传输,A是发送方,B是接收方,第一WiFi设备(假设为AP)是监听方,A发送数据,对于第一WiFi设备AP而言,A和B传输的数据帧是OBSS数据帧,第一WiFi设备AP接收到信号,通过解析无线数据帧的前导码就可以知道这个数据帧不是发给自己的。如果B收到A的数据帧,就要响应一个确认(Acknowled,ACK)帧给A,通知A这个数据帧发送成功,ACK帧是紧接在OBSS数据帧之后,其他无线设备都必须退避,不允许在这个时期发包。第一WiFi设备AP如果监听到OBSS数据帧后面有功率上升,就可以确定B响应ACK帧,进而判断这次OBSS数据帧被成功传输。结合上述场景,本申请实施例中,通过以下方式确定目标丢包率,该目标丢包率为上述的第一丢包率或上述的第二丢包率:In some embodiments, considering that the successful transmission of wireless communication requires both parties to send signals, for example, OBSS performs a transmission, A is the sender, B is the receiver, the first WiFi device (assumed to be an AP) is the listener, and A sends Data, for the first WiFi device AP, the data frames transmitted by A and B are OBSS data frames, the first WiFi device AP receives the signal, and by analyzing the preamble of the wireless data frame, it can be known that the data frame is not sent to itself of. If B receives A’s data frame, it will respond with an Acknowledged (ACK) frame to A to inform A that the data frame has been sent successfully. The ACK frame is immediately after the OBSS data frame, and other wireless devices must back off. Packages are allowed during this period. If the first WiFi device AP detects that there is a power increase after the OBSS data frame, it can determine that B responds to the ACK frame, and then judge that the OBSS data frame is successfully transmitted this time. In combination with the above scenario, in the embodiment of the present application, the target packet loss rate is determined in the following manner, the target packet loss rate is the above-mentioned first packet loss rate or the above-mentioned second packet loss rate:

C1、监听第一功率和第二功率,其中,上述第一功率为上述第二WiFi设备与上述指定终端传输一个数据帧结束后的短帧间隔时间(Short interframe space,SIFS)内的功率,上述第二功率为上述第二WiFi设备与上述指定终端传输一个数据帧结束,且在上述短帧间隔时间之后的预设的ACK帧持续时间内的功率。C1. Monitor the first power and the second power, wherein the first power is the power within the short frame interval (Short interframe space, SIFS) after the second WiFi device transmits a data frame with the designated terminal, and the above The second power is the power within a preset ACK frame duration after the second WiFi device and the designated terminal have finished transmitting a data frame and after the short frame interval time.

其中,预设的ACK帧持续时间根据经验进行设置。Wherein, the preset ACK frame duration is set according to experience.

C2、若根据上述第一功率和上述第二功率判断出上述第二WiFi设备的功率存在上升现象,则判定上述第二WiFi设备成功传输数据帧,否则,判定上述第二WiFi设备未成功传输数据帧。C2. If it is judged that the power of the second WiFi device has increased according to the first power and the second power, it is determined that the second WiFi device has successfully transmitted data frames; otherwise, it is determined that the second WiFi device has not successfully transmitted data. frame.

第一WiFi设备监听到OBSS数据帧被接收完成后,监听第二WiFi设备与指定终端传输一个数据帧结束后的SIFS内的功率,即将监听到的图5中“SIFS”所对应的时间内的功率作为第一功率。若OBSS数据帧被成功发送,则在SIFS之后的预设的ACK帧持续时间(即图5中“ACK”位置所对应的时间)内,发送方将会收到一个ACK帧,此时,在该ACK所对应的时间内监听到的功率(即第二功率)将大于在SIFS所对应的时间内所监听到的功率(即第一功率),即第二WiFi设备的功率存在上升现象。当然,若OBSS数据帧没有被成功发送,则第二WiFi设备的功率不存在上升现象。由于第二WiFi设备的功率是否存在上升现象与该第二WiFi设备是否传输数据帧成功有关,因此,根据第二WiFi设备的功率是否存在上升现象能够准确判定数据帧是否被成功传输。After the first WiFi device monitors that the OBSS data frame is received, it monitors the power in SIFS after the second WiFi device and the designated terminal transmit a data frame, and the power within the time corresponding to "SIFS" in Figure 5 that is about to be monitored power as the first power. If the OBSS data frame is successfully sent, the sender will receive an ACK frame within the preset ACK frame duration after SIFS (that is, the time corresponding to the "ACK" position in Figure 5). The detected power (ie, the second power) within the time corresponding to the ACK will be greater than the detected power (ie, the first power) within the time corresponding to the SIFS, that is, the power of the second WiFi device is rising. Of course, if the OBSS data frame is not successfully sent, the power of the second WiFi device does not increase. Since whether the power of the second WiFi device rises is related to whether the second WiFi device successfully transmits the data frame, it can be accurately determined whether the data frame is successfully transmitted according to whether the power of the second WiFi device rises.

C3、统计目标数量的数据帧中,上述第二WiFi设备成功传输的数据帧的数量以及上述第二WiFi设备未成功传输的数据帧的数量,根据上述成功传输的数据帧的数量以及上述未成功传输的数据帧的数量确定上述第二WiFi设备与上述指定终端传输上述第一数量的数据帧的丢包率,得到上述目标丢包率,其中,当目标丢包率为第一丢包率时,该目标数量为上述的第一数量,当该目标丢包率为上述的第二丢包率时,该目标数量为上述第二数量。C3. Among the data frames of the statistical target number, the number of data frames successfully transmitted by the second WiFi device and the number of data frames unsuccessfully transmitted by the second WiFi device, according to the number of data frames successfully transmitted and the above unsuccessful The number of transmitted data frames determines the packet loss rate of the first number of data frames transmitted by the second WiFi device and the designated terminal to obtain the target packet loss rate, wherein, when the target packet loss rate is the first packet loss rate , the target number is the above-mentioned first number, and when the target packet loss rate is the above-mentioned second packet loss rate, the target number is the above-mentioned second number.

具体地,统计监听到的成功传输的数据帧的数量(假设为M1)以及不能成功传输的数据帧的数量(假设为M2),则第一丢包率PER为:Specifically, the number of successfully transmitted data frames monitored (assumed to be M1) and the number of data frames that cannot be successfully transmitted (assumed to be M2) are counted, then the first packet loss rate PER is:

PER=M2/(M1+M2)。PER=M2/(M1+M2).

在一些实施例中,第一WiFi设备确定的第一丢包率为第一监听周期内的丢包率,此时,上述步骤S31包括:In some embodiments, the first packet loss rate determined by the first WiFi device is the packet loss rate in the first listening period. At this time, the above step S31 includes:

在上述第一WiFi设备通过SR功能发送数据帧之前,确定第一监听周期内上述第二WiFi设备与上述指定终端传输上述第一数量的数据帧的丢包率,得到第一丢包率。Before the first WiFi device sends data frames through the SR function, determine the packet loss rate of the first number of data frames transmitted between the second WiFi device and the designated terminal within the first monitoring period, to obtain a first packet loss rate.

在上述若判断出上述第二WiFi设备的丢包率的上升比例大于预设的第一丢包率阈值之后,上述数据传输方法还包括:After it is determined that the increase ratio of the packet loss rate of the second WiFi device is greater than the preset first packet loss rate threshold, the data transmission method further includes:

确定第二监听周期,以上述第二监听周期作为新的上述第一监听周期,并返回上述在上述第一WiFi设备通过SR功能发送数据帧之前,确定第一监听周期内上述第二WiFi设备与上述指定终端传输上述第一数量的数据帧的丢包率,得到第一丢包率的步骤以及后续步骤,其中,上述第二监听周期大于上述第一监听周期。Determine the second monitoring period, use the second monitoring period as the new first monitoring period, and return to the above-mentioned before the first WiFi device sends a data frame through the SR function, determine the relationship between the second WiFi device and the first monitoring period in the first monitoring period The step of obtaining the first packet loss rate by transmitting the packet loss rate of the first number of data frames by the designated terminal, and subsequent steps, wherein the second monitoring period is longer than the first monitoring period.

本申请实施例中,若判断出第二WiFi设备的丢包率的上升比例大于预设的第一丢包率阈值,则表明第一WiFi设备在通过SR功能发送数据帧时严重干扰到其他设备(如第二WiFi设备),此时,扩大用于确定第一丢包率的监听周期,能够延迟获取第一WiFi设备通过SR功能传输数据帧时所得到的第一丢包率的时间,即通过回避当前严重干扰到其他设备的时段来更好地避免通过SR功能传输数据帧时干扰到其他设备的情况。In the embodiment of the present application, if it is judged that the increase ratio of the packet loss rate of the second WiFi device is greater than the preset first packet loss rate threshold, it indicates that the first WiFi device seriously interferes with other devices when sending data frames through the SR function (such as the second WiFi device), at this time, expanding the monitoring period for determining the first packet loss rate can delay the time to obtain the first packet loss rate obtained when the first WiFi device transmits data frames through the SR function, that is By avoiding the current period of severe interference to other devices, it is better to avoid interference to other devices when transmitting data frames through the SR function.

在一些实施例中,上述步骤S31包括:In some embodiments, the above step S31 includes:

在上述第一WiFi设备通过SR功能发送数据帧之前,确定第一监听周期内上述第二WiFi设备与上述指定终端传输上述第一数量的数据帧的丢包率,得到第一丢包率。Before the first WiFi device sends data frames through the SR function, determine the packet loss rate of the first number of data frames transmitted between the second WiFi device and the designated terminal within the first monitoring period, to obtain a first packet loss rate.

对应地,在上述步骤B2之后,上述数据传输方法还包括:Correspondingly, after the above step B2, the above data transmission method further includes:

确定第三监听周期,以上述第三监听周期作为新的上述第一监听周期,并返回上述在上述第一WiFi设备通过SR功能发送数据帧之前,确定第一监听周期内上述第二WiFi设备与上述指定终端传输上述第一数量的数据帧的丢包率,得到第一丢包率的步骤以及后续步骤,其中,上述第三监听周期大于上述第一监听周期。Determine the third monitoring period, use the third monitoring period as the new first monitoring period, and return to the above-mentioned before the first WiFi device sends the data frame through the SR function, determine the connection between the second WiFi device and the first monitoring period in the first monitoring period The designated terminal transmits the packet loss rate of the first number of data frames to obtain the first packet loss rate and subsequent steps, wherein the third monitoring period is longer than the first monitoring period.

本申请实施例中,由于在第二WiFi设备的丢包率的上升比例不大于预设的第一丢包率阈值,但判断出第二WiFi设备的速率的下降比例大于预设的第一速率阈值时,表明第一WiFi设备在通过SR功能发送数据帧时虽然没有严重干扰到其他设备(如第二WiFi设备),但会导致其他设备在传输数据帧时的平均速率有较大的下降现象,此时,扩大用于确定第一丢包率的监听周期,能够回避当前会影响其他设备的平均速率的时段,即通过回避影响其他设备的平均速率的时段来更好地避免通过SR功能传输数据帧时干扰到其他设备的情况。In the embodiment of the present application, since the increase ratio of the packet loss rate of the second WiFi device is not greater than the preset first packet loss rate threshold, it is determined that the decrease ratio of the rate of the second WiFi device is greater than the preset first rate When the threshold is set, it indicates that although the first WiFi device does not seriously interfere with other devices (such as the second WiFi device) when sending data frames through the SR function, it will cause a large drop in the average rate of other devices when transmitting data frames , at this time, expanding the monitoring period used to determine the first packet loss rate can avoid the current period that will affect the average rate of other devices, that is, by avoiding the period that affects the average rate of other devices to better avoid transmission through the SR function Interference with other devices during data frames.

在一些实施例中,上述步骤S31包括:In some embodiments, the above step S31 includes:

在上述第一WiFi设备通过SR功能发送数据帧之前,确定第一监听周期内上述第二WiFi设备与上述指定终端传输上述第一数量的数据帧的丢包率,得到第一丢包率。Before the first WiFi device sends data frames through the SR function, determine the packet loss rate of the first number of data frames transmitted between the second WiFi device and the designated terminal within the first monitoring period, to obtain a first packet loss rate.

对应地,上述数据传输方法还包括:Correspondingly, the above data transmission method also includes:

在上述选择继续通过SR功能发送数据帧的过程中,确定上述第二WiFi设备与上述指定终端传输第五数量的数据帧的丢包率,得到第三丢包率,以及,确定上述第二WiFi设备与上述指定终端传输第六数量的数据帧的平均速率,得到第三速率。In the process of selecting to continue sending data frames through the SR function, determine the packet loss rate of the fifth number of data frames transmitted between the second WiFi device and the designated terminal to obtain a third packet loss rate, and determine the second WiFi device. The average rate of the sixth number of data frames transmitted between the device and the specified terminal to obtain the third rate.

若根据上述第一丢包率以及上述第三丢包率,判断出上述第二WiFi设备的丢包率的上升比例大于预设的第二丢包率阈值,或者,若根据上述第一速率和上述第三速率,判断出上述第二WiFi设备的速率的下降比例大于预设的第二速率阈值,则暂停通过SR功能发送数据帧,并将上述第一监听周期重置为默认值后,返回上述确定第一监听周期内上述第二WiFi设备与上述指定终端传输上述第一数量的数据帧的丢包率,得到第一丢包率的步骤以及后续步骤。If according to the above-mentioned first packet loss rate and the above-mentioned third packet loss rate, it is determined that the increase ratio of the packet loss rate of the second WiFi device is greater than the preset second packet loss rate threshold, or if according to the above-mentioned first rate and For the above-mentioned third rate, if it is judged that the drop ratio of the rate of the above-mentioned second WiFi device is greater than the preset second rate threshold, then suspend sending data frames through the SR function, reset the above-mentioned first monitoring period to the default value, and then return The step of determining the packet loss rate of the first number of data frames transmitted between the second WiFi device and the designated terminal within the first monitoring period, obtaining the first packet loss rate, and subsequent steps.

其中,上述的第五数量和第六数量可根据实际情况进行设定,如将第五数量设定为等于第一数量或等于第二数量的数值,将第六设立设置为等于第三数量或第四数量的数值等,此处不作限定。在一些实施例中,考虑到丢包率是短时间探测,而速率探测是长时间探测,必要有足够长的时间才能观察到速率是否存在下降,因此,可设置第六数量大于上述的第五数量。Wherein, the above-mentioned fifth quantity and sixth quantity can be set according to the actual situation, such as setting the fifth quantity equal to the first quantity or the value equal to the second quantity, setting the sixth establishment equal to the third quantity or The numerical value of the fourth quantity and the like are not limited here. In some embodiments, considering that the packet loss rate is a short-term detection, while the rate detection is a long-time detection, it is necessary to have a long enough time to observe whether there is a drop in the rate. Therefore, the sixth number can be set to be greater than the above-mentioned fifth quantity.

本申请实施例中,在第一WiFi设备通过SR功能发送数据帧的过程中,继续更新第二WiFi设备的丢包率和平均速率,以便后续能够及时判断第一WiFi设备通过SR功能发送数据帧的过程中是否对第二WiFi设备产生了较大的干扰。由于环境噪声的突发干扰和第一WiFi设备通过SR功能发送数据帧的干扰都会恶化第二WiFi设备的丢包率和平均速率,而用户很难区分当前是哪一种干扰恶化了第二WiFi设备的丢包率和平均速率,因此,在判断出第二WiFi设备的丢包率的上升比例大于预设的第二丢包率阈值,或者,判断出第二WiFi设备的速率的下降比例大于预设的速率阈值后,要先暂停使用SR,监听其他WiFi设备一段时间,再进行快速探测,以确定到底是噪声干扰还是第一WiFi设备通过SR功能发送数据帧的干扰。在本申请实施例中,将第一监听周期重置为默认值能够保证该第一监听周期的时长不会过大(比如,若第一监听周期曾被扩大,则重置后就能够恢复该第一监听周期的原有时长),从而在判断出第二WiFi设备的丢包率和平均速率的恶化不是由于第一WiFi设备通过SR功能发送数据帧的干扰导致后,能够让第一WiFi设备尽快重新恢复使用SR功能。In the embodiment of the present application, during the process of the first WiFi device sending data frames through the SR function, the packet loss rate and average rate of the second WiFi device are continuously updated, so that the follow-up can timely judge that the first WiFi device sends data frames through the SR function During the process, whether there is greater interference to the second WiFi device. Due to the sudden interference of environmental noise and the interference of the first WiFi device sending data frames through the SR function, the packet loss rate and average rate of the second WiFi device will be deteriorated, and it is difficult for the user to distinguish which kind of interference is currently deteriorating the second WiFi The packet loss rate and average rate of the device. Therefore, when it is judged that the increase ratio of the packet loss rate of the second WiFi device is greater than the preset second packet loss rate threshold, or it is judged that the decrease ratio of the rate of the second WiFi device is greater than After the preset rate threshold, you should suspend the use of SR first, monitor other WiFi devices for a period of time, and then conduct a quick detection to determine whether it is noise interference or the interference of the first WiFi device sending data frames through the SR function. In this embodiment of the application, resetting the first monitoring period to the default value can ensure that the duration of the first monitoring period will not be too long (for example, if the first monitoring period has been extended, the reset period can be restored. The original duration of the first monitoring period), so that after judging that the packet loss rate and average rate of the second WiFi device are not caused by the interference of the first WiFi device sending data frames through the SR function, the first WiFi device can Restore use of SR functionality as soon as possible.

在一些实施例中,在选择继续通过SR功能发送数据帧的过程中,若只判断出第二WiFi设备的丢包率和平均速率均发生了恶化,则扩大第一监听周期,即:In some embodiments, in the process of choosing to continue sending data frames through the SR function, if it is only judged that the packet loss rate and the average rate of the second WiFi device have deteriorated, then the first monitoring period is extended, that is:

若根据第一丢包率以及第三丢包率,判断出上述第二WiFi设备的丢包率的上升比例大于上述预设的第二丢包率阈值,以及,若根据上述第一速率和上述第三速率,判断出上述第二WiFi设备的速率的下降比例大于预设的第二速率阈值,则暂停通过SR功能发送数据帧,并确定第四监听周期,以上述第四监听周期作为新的上述第一监听周期,返回上述在上述第一WiFi设备通过SR功能发送数据帧之前,确定第一监听周期内上述第二WiFi设备与上述指定终端传输上述第一数量的数据帧的丢包率,得到第一丢包率的步骤以及后续步骤,其中,上述第四监听周期大于上述第一监听周期。If according to the first packet loss rate and the third packet loss rate, it is determined that the increase ratio of the packet loss rate of the second WiFi device is greater than the second preset packet loss rate threshold, and if according to the first rate and the above The third rate, if it is judged that the drop ratio of the rate of the second WiFi device is greater than the preset second rate threshold, the transmission of data frames through the SR function is suspended, and the fourth monitoring period is determined, and the fourth monitoring period is used as the new The above-mentioned first monitoring period returns to the above-mentioned before the above-mentioned first WiFi device sends data frames through the SR function, and determines the packet loss rate of the first number of data frames transmitted by the above-mentioned second WiFi device and the above-mentioned designated terminal within the first monitoring period, The step of obtaining the first packet loss rate and subsequent steps, wherein the fourth monitoring period is longer than the first monitoring period.

其中,第二丢包率阈值可与上述的第一丢包率阈值相等,也可与上述的第一丢包率阈值不等,具体根据实际情况进行设定,此处不作限定。同理上述的第二速率阈值可与上述的第一速率阈值相等,也可与上述的第一速率阈值不等,具体根据实际情况进行设定,此处不作限定。Wherein, the second packet loss rate threshold may be equal to or different from the above first packet loss rate threshold, which is specifically set according to actual conditions and is not limited here. Similarly, the above-mentioned second rate threshold may be equal to or different from the above-mentioned first rate threshold, which is specifically set according to actual conditions and is not limited here.

本申请实施例中,由于扩大用于确定第一丢包率的监听周期,因此,能够回避当前会影响其他设备的平均速率的时段,即通过回避影响其他设备的平均速率的时段来更好地避免通过SR功能传输数据帧时干扰到其他设备的情况。In the embodiment of the present application, since the monitoring period used to determine the first packet loss rate is expanded, it is possible to avoid the period that currently affects the average rate of other devices, that is, to avoid the period that affects the average rate of other devices to better Avoid interference with other devices when transmitting data frames through the SR function.

为了更清楚地描述本申请实施例提供的数据传输方法,下面结合图6进行描述。In order to more clearly describe the data transmission method provided by the embodiment of the present application, it will be described below in conjunction with FIG. 6 .

当第一WiFi设备在通过SR发送数据帧时,包括图6所示的4个状态:SR监听、PER探测、速率探测和SR运行。When the first WiFi device is sending data frames through SR, it includes four states shown in FIG. 6 : SR monitoring, PER detection, rate detection and SR operation.

SR监听:第一WiFi设备在本状态不通过SR功能发送数据帧。用于监听其他设备(如第二WiFi设备)发送的数据帧的平均速率和PER。等监听周期结束之后,再进入PER探测状态。SR monitoring: the first WiFi device does not send data frames through the SR function in this state. Used to monitor the average rate and PER of data frames sent by other devices (such as the second WiFi device). After the monitoring period is over, enter the PER detection state.

PER探测:本状态由第一WiFi设备发送若干个(如X1个)SR数据帧(该SR数据帧为通过SR功能发送的数据帧),在该过程中,统计第二WiFi设备的PER,如果相比SR监听周期的PER上升若干比例百分比,则认定探测失败,回到SR监听,同时扩大监听期时间。若认定探测成功,则进入速率探测状态。PER detection: In this state, several (such as X1) SR data frames are sent by the first WiFi device (the SR data frame is a data frame sent through the SR function), and in this process, the PER of the second WiFi device is counted, if If the PER of the SR monitoring period increases by a certain percentage, it is determined that the detection has failed, and the SR monitoring is returned, and the monitoring period is extended at the same time. If it is determined that the detection is successful, it enters the rate detection state.

速率探测:本状态发送一段时间的SR数据帧,如发送X2(该X2可以等于X1,也可以不等于X1)个数据帧,在这过程中,确定第二WiFi设备的平均速率,如果相比监听周期的平均速率下降若干比例,则认定探测失败,回到SR监听,同时扩大监听期时间。若认定探测成功,则进入SR运行状态。Rate detection: This state sends SR data frames for a period of time, such as sending X2 (the X2 can be equal to X1 or not equal to X1) data frames, in this process, determine the average rate of the second WiFi device, if compared If the average rate of the monitoring period drops by a certain percentage, it is determined that the detection fails, and the SR monitoring is returned, and the monitoring period is extended at the same time. If it is determined that the detection is successful, it enters the SR running state.

SR运行:本状态一直生效SR,即第一WiFi设备在本状态继续通过SR功能发送数据帧,同时更新平均速率和PER,如果平均速率或PER突然相对于监听期有若干比例的下降,则回到SR监听,且监听周期重置成默认值,为若干秒。SR operation: SR is always in effect in this state, that is, the first WiFi device continues to send data frames through the SR function in this state, and updates the average rate and PER at the same time. To SR monitoring, and the monitoring period is reset to the default value, which is several seconds.

应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the sequence numbers of the steps in the above embodiments do not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.

实施例二:Embodiment two:

对应于上文实施例的数据传输方法,图7示出了本申请实施例提供的数据传输装置的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。Corresponding to the data transmission method of the above embodiment, FIG. 7 shows a structural block diagram of the data transmission device provided by the embodiment of the present application. For the convenience of description, only the parts related to the embodiment of the present application are shown.

参照图7,该数据传输装置7应用于第一WiFi设备,该第一WiFi设备支持空间复用SR功能,该数据传输装置7包括:第一丢包率确定模块71、第二丢包率确定模块72、丢包率的上升比例计算模块73、SR功能选择模块74。其中:Referring to Fig. 7, the data transmission device 7 is applied to the first WiFi device, and the first WiFi device supports the spatial multiplexing SR function, and the data transmission device 7 includes: a first packet loss rate determination module 71, a second packet loss rate determination module Module 72 , calculation module 73 of increasing ratio of packet loss rate, module 74 of SR function selection. in:

第一丢包率确定模块71,用于在上述第一WiFi设备通过SR功能发送数据帧之前,确定第二WiFi设备与指定终端传输第一数量的数据帧的丢包率,得到第一丢包率。The first packet loss rate determination module 71 is used to determine the packet loss rate of the first number of data frames transmitted between the second WiFi device and the designated terminal before the first WiFi device sends the data frame through the SR function, so as to obtain the first packet loss rate Rate.

第二丢包率确定模块72,用于在上述第一WiFi设备通过SR功能发送数据帧的过程中,确定上述第二WiFi设备与上述指定终端传输第二数量的数据帧的丢包率,得到第二丢包率。The second packet loss rate determination module 72 is configured to determine the packet loss rate of the second number of data frames transmitted between the second WiFi device and the designated terminal during the process of the first WiFi device sending data frames through the SR function, to obtain The second packet loss rate.

丢包率的上升比例计算模块73,用于根据上述第一丢包率和上述第二丢包率计算上述第二WiFi设备的丢包率的上升比例。The increase ratio calculation module 73 of the packet loss rate is configured to calculate the increase ratio of the packet loss rate of the second WiFi device according to the first packet loss rate and the second packet loss rate.

SR功能选择模块74,用于根据上述第二WiFi设备的丢包率的上升比例,选择是否继续通过SR功能发送数据帧。The SR function selection module 74 is configured to select whether to continue sending data frames through the SR function according to the increase ratio of the packet loss rate of the second WiFi device.

本申请实施例中,由于第一丢包率是第一WiFi设备通过SR功能发送数据帧之前,第二WiFi设备与指定终端传输第一数量的数据帧的丢包率,第二丢包率是第一WiFi设备通过SR功能发送数据帧的过程中,第二WiFi设备与指定终端传输第二数量的数据帧的丢包率,因此,根据第一丢包率和第二丢包率所计算出的第二WiFi设备的丢包率的上升比例反映的是第一WiFi设备通过SR功能发送数据帧时对第二WiFi设备的丢包率的影响。即在本申请实施例中,第一WiFi设备在使用SR功能发包的时候,评估自己发包对第二WiFi设备通信的干扰程度,智能决定当前是否需要进行SR发包,从而有利于减少由于第一WiFi设备使用SR功能时所造成的第二WiFi设备的丢包率过大的现象,进而有利于保证整体网络性能。In the embodiment of this application, since the first packet loss rate is the packet loss rate of the first number of data frames transmitted between the second WiFi device and the designated terminal before the first WiFi device sends data frames through the SR function, the second packet loss rate is During the process of sending data frames by the first WiFi device through the SR function, the packet loss rate of the second number of data frames transmitted by the second WiFi device and the designated terminal, therefore, calculated according to the first packet loss rate and the second packet loss rate The increase ratio of the packet loss rate of the second WiFi device reflects the impact on the packet loss rate of the second WiFi device when the first WiFi device sends data frames through the SR function. That is to say, in the embodiment of this application, when the first WiFi device uses the SR function to send packets, it evaluates the interference degree of its own packet sending to the second WiFi device communication, and intelligently decides whether to send SR packets at present, which is beneficial to reduce the When the device uses the SR function, the packet loss rate of the second WiFi device is too large, which is conducive to ensuring the overall network performance.

在一些实施例中,上述SR功能选择模块74包括:In some embodiments, the above-mentioned SR function selection module 74 includes:

若判断出上述第二WiFi设备的丢包率的上升比例大于预设的第一丢包率阈值,则选择不继续通过SR功能发送数据帧。If it is determined that the increase ratio of the packet loss rate of the second WiFi device is greater than the preset first packet loss rate threshold, choose not to continue sending data frames through the SR function.

在一些实施例中,本申请实施例提供的数据传输装置7,还包括:In some embodiments, the data transmission device 7 provided in the embodiment of the present application further includes:

第一速率确定模块,用于在上述第一WiFi设备通过SR功能发送数据帧之前,确定上述第二WiFi设备与上述指定终端传输第三数量的数据帧的平均速率,得到第一速率。The first rate determination module is configured to determine an average rate at which the second WiFi device transmits a third number of data frames with the designated terminal before the first WiFi device sends data frames through the SR function to obtain a first rate.

第二速率确定模块,用于若上述第二WiFi设备的丢包率的上升比例不大于预设的第一丢包率阈值,则在上述第一WiFi设备通过SR功能发送数据帧的过程中,确定上述第二WiFi设备与上述指定终端传输第四数量的数据帧的平均速率,得到第二速率。The second rate determination module is configured to: if the increase ratio of the packet loss rate of the second WiFi device is not greater than the preset first packet loss rate threshold, during the process of sending data frames by the first WiFi device through the SR function, Determining an average rate at which the second WiFi device transmits the fourth number of data frames with the designated terminal to obtain a second rate.

速率的下降比例计算模块,用于根据上述第一速率和上述第二速率计算上述第二WiFi设备的速率的下降比例。The rate reduction ratio calculation module is configured to calculate the rate reduction ratio of the second WiFi device according to the first rate and the second rate.

对应地,上述SR功能选择模块74包括:Correspondingly, the above-mentioned SR function selection module 74 includes:

SR数据帧发送单元,用于若上述第二WiFi设备的丢包率的上升比例不大于上述预设的第一丢包率阈值,且判断出上述第二WiFi设备的速率的下降比例不大于预设的第一速率阈值,则选择继续通过SR功能发送数据帧。The SR data frame sending unit is used for if the increase ratio of the packet loss rate of the second WiFi device is not greater than the preset first packet loss rate threshold, and it is determined that the decrease ratio of the rate of the second WiFi device is not greater than the preset If the first rate threshold is set, choose to continue sending data frames through the SR function.

SR数据帧暂停发送单元,用于若上述第二WiFi设备的丢包率的上升比例不大于上述预设的第一丢包率阈值,但判断出上述第二WiFi设备的速率的下降比例大于上述预设的第一速率阈值,则暂停通过SR功能发送数据帧,并返回上述在上述第一WiFi设备通过SR功能发送数据帧之前,确定第二WiFi设备与指定终端传输第一数量的数据帧的丢包率的步骤以及后续步骤。The SR data frame pause sending unit is used for if the increase ratio of the packet loss rate of the second WiFi device is not greater than the first preset packet loss rate threshold, but it is judged that the decrease ratio of the rate of the second WiFi device is greater than the above-mentioned The preset first rate threshold, then suspend sending data frames through the SR function, and return to the above-mentioned before the above-mentioned first WiFi device sends data frames through the SR function, determine that the second WiFi device and the designated terminal transmit the first number of data frames The steps of the packet loss rate and the next steps.

在一些实施例中,通过以下方式确定目标丢包率,该目标丢包率为上述第一丢包率或上述第二丢包率,此时,上述第一丢包率确定模块71或第二丢包率确定模块72包括:In some embodiments, the target packet loss rate is determined in the following manner. The target packet loss rate is the above-mentioned first packet loss rate or the above-mentioned second packet loss rate. At this time, the above-mentioned first packet loss rate determination module 71 or the second packet loss rate Packet loss rate determination module 72 includes:

功率监听单元,用于监听第一功率和第二功率,其中,上述第一功率为上述第二WiFi设备与上述指定终端传输一个数据帧结束后的短帧间隔时间内的功率,上述第二功率为上述第二WiFi设备与上述指定终端传输一个数据帧结束,且在上述短帧间隔时间之后的预设的ACK帧持续时间内的功率。A power monitoring unit, configured to monitor the first power and the second power, wherein the first power is the power within a short frame interval after the second WiFi device transmits a data frame with the designated terminal, and the second power The power for the second WiFi device and the specified terminal to transmit a data frame ends and within a preset ACK frame duration after the short frame interval time.

数据帧是否成功传输判断单元,用于若根据上述第一功率和上述第二功率判断出上述第二WiFi设备的功率存在上升现象,则判定上述第二WiFi设备成功传输数据帧,否则,判定上述第二WiFi设备未成功传输数据帧。A data frame transmission success judging unit, configured to determine that the second WiFi device successfully transmits a data frame if it is determined based on the first power and the second power that the power of the second WiFi device has risen, otherwise, determine that the above-mentioned The second WiFi device did not successfully transmit the data frame.

丢包率计算单元,用于统计目标数量的数据帧中,上述第二WiFi设备成功传输的数据帧的数量以及上述第二WiFi设备未成功传输的数据帧的数量,根据上述成功传输的数据帧的数量以及上述未成功传输的数据帧的数量确定上述第二WiFi设备与上述指定终端传输上述目标数量的数据帧的丢包率,得到上述目标丢包率,其中,当所述目标丢包率为所述第一丢包率时,所述目标数量为所述第一数量,当所述目标丢包率为所述第二丢包率时,所述目标数量为所述第二数量。The packet loss rate calculation unit is used to count the number of data frames successfully transmitted by the second WiFi device and the number of data frames unsuccessfully transmitted by the second WiFi device among the data frames of the target number, according to the above-mentioned successfully transmitted data frames The quantity and the quantity of the above-mentioned unsuccessfully transmitted data frames determine the packet loss rate of the above-mentioned second WiFi device and the above-mentioned specified terminal transmitting the above-mentioned target number of data frames, and obtain the above-mentioned target packet loss rate, wherein, when the target packet loss rate When it is the first packet loss rate, the target number is the first number, and when the target packet loss rate is the second packet loss rate, the target number is the second number.

在一些实施例中,上述第一丢包率确定模块71具体用于:In some embodiments, the above-mentioned first packet loss rate determining module 71 is specifically used for:

在上述第一WiFi设备通过SR功能发送数据帧之前,确定第一监听周期内上述第二WiFi设备与上述指定终端传输上述第一数量的数据帧的丢包率,得到第一丢包率。Before the first WiFi device sends data frames through the SR function, determine the packet loss rate of the first number of data frames transmitted between the second WiFi device and the designated terminal within the first monitoring period, to obtain a first packet loss rate.

在上述若判断出上述第二WiFi设备的丢包率的上升比例大于预设的第一丢包率阈值之后,上述数据传输装置7还包括:After it is determined that the increase ratio of the packet loss rate of the second WiFi device is greater than the preset first packet loss rate threshold, the data transmission device 7 further includes:

第二监听周期确定模块,用于确定第二监听周期,以上述第二监听周期作为新的上述第一监听周期,并返回上述在上述第一WiFi设备通过SR功能发送数据帧之前,确定第一监听周期内上述第二WiFi设备与上述指定终端传输上述第一数量的数据帧的丢包率,得到第一丢包率的步骤以及后续步骤,其中,上述第二监听周期大于上述第一监听周期。The second monitoring period determination module is used to determine the second monitoring period, using the second monitoring period as the new first monitoring period, and returning to the above-mentioned first before the first WiFi device sends a data frame through the SR function to determine the first The step of obtaining the first packet loss rate and the subsequent steps of obtaining the packet loss rate of the first number of data frames transmitted by the second WiFi device and the designated terminal within the monitoring period, wherein the second monitoring period is greater than the first monitoring period .

在一些实施例中,上述第一丢包率确定模块71具体用于:In some embodiments, the above-mentioned first packet loss rate determining module 71 is specifically used for:

在上述第一WiFi设备通过SR功能发送数据帧之前,确定第一监听周期内上述第二WiFi设备与上述指定终端传输上述第一数量的数据帧的丢包率,得到第一丢包率。Before the first WiFi device sends data frames through the SR function, determine the packet loss rate of the first number of data frames transmitted between the second WiFi device and the designated terminal within the first monitoring period, to obtain a first packet loss rate.

在上述判断出上述第二WiFi设备的速率的下降比例大于上述预设的第一速率阈值之后,上述数据传输转置7还包括:After it is judged that the drop ratio of the rate of the second WiFi device is greater than the preset first rate threshold, the data transmission transposition 7 further includes:

第三监听周期确定模块,用于确定第三监听周期,以上述第三监听周期作为新的上述第一监听周期,并返回上述在上述第一WiFi设备通过SR功能发送数据帧之前,确定第一监听周期内上述第二WiFi设备与上述指定终端传输上述第一数量的数据帧的丢包率,得到第一丢包率的步骤以及后续步骤,其中,上述第三监听周期大于上述第一监听周期。The third monitoring period determination module is used to determine the third monitoring period, using the third monitoring period as the new first monitoring period, and returning to the above-mentioned first WiFi device before sending data frames through the SR function to determine the first The step of obtaining the first packet loss rate and subsequent steps of the packet loss rate of the first number of data frames transmitted by the second WiFi device and the designated terminal within the monitoring period, wherein the third monitoring period is greater than the first monitoring period .

上述在一些实施例中,上述第一丢包率确定模块71上述具体用于:In some embodiments above, the above-mentioned first packet loss rate determining module 71 is specifically used for:

在上述第一WiFi设备通过SR功能发送数据帧之前,确定第一监听周期内上述第二WiFi设备与上述指定终端传输上述第一数量的数据帧的丢包率,得到第一丢包率。Before the first WiFi device sends data frames through the SR function, determine the packet loss rate of the first number of data frames transmitted between the second WiFi device and the designated terminal within the first monitoring period, to obtain a first packet loss rate.

对应地,上述数据传输装置7还包括:Correspondingly, the above-mentioned data transmission device 7 also includes:

丢包率和速率继续监听模块,用于在上述选择继续通过SR功能发送数据帧的过程中,确定上述第二WiFi设备与上述指定终端传输第五数量的数据帧的丢包率,得到第三丢包率,以及,确定上述第二WiFi设备与上述指定终端传输第六数量的数据帧的平均速率,得到第三速率。The packet loss rate and rate continue monitoring module is used to determine the packet loss rate of the fifth number of data frames transmitted between the second WiFi device and the designated terminal in the process of selecting to continue sending data frames through the SR function, and obtain the third A packet loss rate, and determining an average rate at which the second WiFi device and the specified terminal transmit a sixth number of data frames to obtain a third rate.

监听周期重置模块,用于若根据上述第一丢包率以及上述第三丢包率,判断出上述第二WiFi设备的丢包率的上升比例大于预设的第二丢包率阈值,以及,若根据上述第一速率和上述第三速率,判断出上述第二WiFi设备的速率的下降比例大于上述预设的第二速率阈值,则暂停通过SR功能发送数据帧,并将上述第一监听周期重置为默认值后,返回上述确定第一监听周期内上述第二WiFi设备与上述指定终端传输上述第一数量的数据帧的丢包率,得到第一丢包率的步骤以及后续步骤。The monitoring cycle reset module is used to determine that the increase ratio of the packet loss rate of the second WiFi device is greater than the preset second packet loss rate threshold according to the first packet loss rate and the third packet loss rate, and , if it is judged according to the above-mentioned first rate and the above-mentioned third rate that the decrease ratio of the rate of the second WiFi device is greater than the above-mentioned preset second rate threshold, then suspend sending data frames through the SR function, and send the above-mentioned first monitoring After the period is reset to the default value, return to the steps of determining the packet loss rate of the first number of data frames transmitted between the second WiFi device and the designated terminal within the first monitoring period, and obtain the first packet loss rate and subsequent steps.

需要说明的是,上述装置/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其具体功能及带来的技术效果,具体可参见方法实施例部分,此处不再赘述。It should be noted that the information interaction and execution process between the above-mentioned devices/units are based on the same concept as the method embodiment of the present application, and its specific functions and technical effects can be found in the method embodiment section. I won't repeat them here.

实施例三:Embodiment three:

图8为本申请一实施例提供的电子设备的结构示意图。如图8所示,该实施例的电子设备8包括:至少一个处理器80(图8中仅示出一个处理器)、存储器81以及存储在所述存储器81中并可在所述至少一个处理器80上运行的计算机程序82,所述处理器80执行所述计算机程序82时实现上述任意各个方法实施例中的步骤。FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. As shown in Figure 8, the electronic device 8 of this embodiment includes: at least one processor 80 (only one processor is shown in Figure 8), a memory 81, and stored in the memory 81 and can be processed in the at least one processor. A computer program 82 running on the processor 80, when the processor 80 executes the computer program 82, implements the steps in any of the above method embodiments.

所述电子设备8可以是路由器、手机、桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。该电子设备可包括,但不仅限于,处理器80、存储器81。本领域技术人员可以理解,图8仅仅是电子设备8的举例,并不构成对电子设备8的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如还可以包括输入输出设备、网络接入设备等。The electronic device 8 may be computing devices such as routers, mobile phones, desktop computers, notebooks, palmtop computers, and cloud servers. The electronic device may include, but not limited to, a processor 80 and a memory 81 . Those skilled in the art can understand that FIG. 8 is only an example of the electronic device 8, and does not constitute a limitation to the electronic device 8. It may include more or less components than shown in the figure, or combine certain components, or different components. , for example, may also include input and output devices, network access devices, and so on.

所称处理器80可以是中央处理单元(Central Processing Unit,CPU),该处理器80还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 80 can be a central processing unit (Central Processing Unit, CPU), and the processor 80 can also be other general processors, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit , ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.

所述存储器81在一些实施例中可以是所述电子设备8的内部存储单元,例如电子设备8的硬盘或内存。所述存储器81在另一些实施例中也可以是所述电子设备8的外部存储设备,例如所述电子设备8上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器81还可以既包括所述电子设备8的内部存储单元也包括外部存储设备。所述存储器81用于存储操作系统、应用程序、引导装载程序(BootLoader)、数据以及其他程序等,例如所述计算机程序的程序代码等。所述存储器81还可以用于暂时地存储已经输出或者将要输出的数据。The storage 81 may be an internal storage unit of the electronic device 8 in some embodiments, such as a hard disk or memory of the electronic device 8 . The memory 81 may also be an external storage device of the electronic device 8 in other embodiments, such as a plug-in hard disk equipped on the electronic device 8, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, flash memory card (Flash Card), etc. Further, the memory 81 may also include both an internal storage unit of the electronic device 8 and an external storage device. The memory 81 is used to store operating system, application program, boot loader (BootLoader), data and other programs, such as the program code of the computer program. The memory 81 can also be used to temporarily store data that has been output or will be output.

所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used for illustration. In practical applications, the above-mentioned functions can be assigned to different functional units, Completion of modules means that the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit, and the above-mentioned integrated units may adopt hardware It can also be implemented in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present application. For the specific working processes of the units and modules in the above system, reference may be made to the corresponding processes in the aforementioned method embodiments, and details will not be repeated here.

本申请实施例还提供了一种网络设备,该网络设备包括:至少一个处理器、存储器以及存储在所述存储器中并可在所述至少一个处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述任意各个方法实施例中的步骤。The embodiment of the present application also provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and operable on the at least one processor, and the processor executes The computer program implements the steps in any of the above method embodiments.

本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现可实现上述各个方法实施例中的步骤。The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in each of the foregoing method embodiments can be realized.

本申请实施例提供了一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行时实现可实现上述各个方法实施例中的步骤。An embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the foregoing method embodiments when executed.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质至少可以包括:能够将计算机程序代码携带到拍照装置/电子设备的任何实体或装置、记录介质、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,RandomAccess Memory)、电载波信号、电信信号以及软件分发介质。例如U盘、移动硬盘、磁碟或者光盘等。在某些司法管辖区,根据立法和专利实践,计算机可读介质不可以是电载波信号和电信信号。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the procedures in the method of the above-mentioned embodiments in the present application can be completed by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium. The computer program When executed by a processor, the steps in the above-mentioned various method embodiments can be realized. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying computer program codes to the photographing device/electronic device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium. Such as U disk, mobile hard disk, magnetic disk or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunication signals under legislation and patent practice.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the descriptions of each embodiment have their own emphases, and for parts that are not detailed or recorded in a certain embodiment, refer to the relevant descriptions of other embodiments.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.

在本申请所提供的实施例中,应该理解到,所揭露的装置/网络设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/网络设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed device/network device and method may be implemented in other ways. For example, the device/network device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units Or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still implement the foregoing Modifications to the technical solutions described in the examples, or equivalent replacement of some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the application, and should be included in the Within the protection scope of this application.

Claims (10)

1.一种数据传输方法,其特征在于,应用于第一WiFi设备,所述第一WiFi设备支持空间复用SR功能,所述数据传输方法包括:1. A data transmission method, characterized in that it is applied to a first WiFi device, and the first WiFi device supports a spatial multiplexing SR function, and the data transmission method comprises: 在所述第一WiFi设备通过SR功能发送数据帧之前,确定第二WiFi设备与指定终端传输第一数量的数据帧的丢包率,得到第一丢包率;Before the first WiFi device sends data frames through the SR function, determine the packet loss rate of the first number of data frames transmitted between the second WiFi device and the designated terminal to obtain the first packet loss rate; 在所述第一WiFi设备通过SR功能发送数据帧的过程中,确定所述第二WiFi设备与所述指定终端传输第二数量的数据帧的丢包率,得到第二丢包率;In the process of sending data frames by the first WiFi device through the SR function, determine the packet loss rate of the second number of data frames transmitted between the second WiFi device and the designated terminal, to obtain a second packet loss rate; 根据所述第一丢包率和所述第二丢包率计算所述第二WiFi设备的丢包率的上升比例;calculating the increase ratio of the packet loss rate of the second WiFi device according to the first packet loss rate and the second packet loss rate; 根据所述第二WiFi设备的丢包率的上升比例,选择是否继续通过SR功能发送数据帧。According to the increase ratio of the packet loss rate of the second WiFi device, it is selected whether to continue sending data frames through the SR function. 2.如权利要求1所述的数据传输方法,其特征在于,所述根据所述第二WiFi设备的丢包率的上升比例,选择是否继续通过SR功能发送数据帧,包括:2. The data transmission method according to claim 1, wherein the selection of whether to continue sending data frames through the SR function according to the rising ratio of the packet loss rate of the second WiFi device includes: 若判断出所述第二WiFi设备的丢包率的上升比例大于预设的第一丢包率阈值,则选择不继续通过SR功能发送数据帧。If it is determined that the increase ratio of the packet loss rate of the second WiFi device is greater than the preset first packet loss rate threshold, choose not to continue sending data frames through the SR function. 3.如权利要求1所述的数据传输方法,其特征在于,还包括:3. The data transmission method according to claim 1, further comprising: 在所述第一WiFi设备通过SR功能发送数据帧之前,确定所述第二WiFi设备与所述指定终端传输第三数量的数据帧的平均速率,得到第一速率;Before the first WiFi device sends the data frame through the SR function, determine the average rate of the third number of data frames transmitted by the second WiFi device and the designated terminal to obtain the first rate; 若所述第二WiFi设备的丢包率的上升比例不大于预设的第一丢包率阈值,则在所述第一WiFi设备通过SR功能发送数据帧的过程中,确定所述第二WiFi设备与所述指定终端传输第四数量的数据帧的平均速率,得到第二速率;If the increase ratio of the packet loss rate of the second WiFi device is not greater than the preset first packet loss rate threshold, then during the process of sending data frames by the first WiFi device through the SR function, it is determined that the second WiFi The device and the designated terminal transmit the average rate of the fourth number of data frames to obtain the second rate; 根据所述第一速率和所述第二速率计算所述第二WiFi设备的速率的下降比例;calculating a drop ratio of the rate of the second WiFi device according to the first rate and the second rate; 所述根据所述第二WiFi设备的丢包率的上升比例,选择是否继续通过SR功能发送数据帧,包括:According to the increase ratio of the packet loss rate of the second WiFi device, selecting whether to continue sending data frames through the SR function includes: 若所述第二WiFi设备的丢包率的上升比例不大于所述预设的第一丢包率阈值,且判断出所述第二WiFi设备的速率的下降比例不大于预设的第一速率阈值,则选择继续通过SR功能发送数据帧;If the increase ratio of the packet loss rate of the second WiFi device is not greater than the preset first packet loss rate threshold, and it is determined that the decrease ratio of the rate of the second WiFi device is not greater than the preset first rate threshold, choose to continue sending data frames through the SR function; 若所述第二WiFi设备的丢包率的上升比例不大于所述预设的第一丢包率阈值,但判断出所述第二WiFi设备的速率的下降比例大于所述预设的第一速率阈值,则暂停通过SR功能发送数据帧,并返回所述在所述第一WiFi设备通过SR功能发送数据帧之前,确定第二WiFi设备与指定终端传输第一数量的数据帧的丢包率的步骤以及后续步骤。If the increase ratio of the packet loss rate of the second WiFi device is not greater than the preset first packet loss rate threshold, but it is determined that the decrease ratio of the rate of the second WiFi device is greater than the preset first threshold rate threshold, then suspend sending data frames through the SR function, and return to the packet loss rate of determining the first number of data frames transmitted between the second WiFi device and the specified terminal before the first WiFi device sends data frames through the SR function steps and subsequent steps. 4.如权利要求1所述的数据传输方法,其特征在于,通过以下方式确定目标丢包率,所述目标丢包率为所述第一丢包率或所述第二丢包率:4. The data transmission method according to claim 1, wherein the target packet loss rate is determined in the following manner, the target packet loss rate is the first packet loss rate or the second packet loss rate: 监听第一功率和第二功率,其中,所述第一功率为所述第二WiFi设备与所述指定终端传输一个数据帧结束后的短帧间隔时间内的功率,所述第二功率为所述第二WiFi设备与所述指定终端传输一个数据帧结束,且在所述短帧间隔时间之后的预设的ACK帧持续时间内的功率;Monitoring the first power and the second power, wherein the first power is the power within a short frame interval after the end of the second WiFi device transmitting a data frame with the specified terminal, and the second power is the power of the specified terminal The second WiFi device transmits a data frame with the designated terminal, and the power within the preset ACK frame duration after the short frame interval time; 若根据所述第一功率和所述第二功率判断出所述第二WiFi设备的功率存在上升现象,则判定所述第二WiFi设备成功传输数据帧,否则,判定所述第二WiFi设备未成功传输数据帧;If it is determined according to the first power and the second power that the power of the second WiFi device has risen, it is determined that the second WiFi device has successfully transmitted the data frame; otherwise, it is determined that the second WiFi device has not The data frame is successfully transmitted; 统计目标数量的数据帧中,所述第二WiFi设备成功传输的数据帧的数量以及所述第二WiFi设备未成功传输的数据帧的数量,根据所述成功传输的数据帧的数量以及所述未成功传输的数据帧的数量确定所述第二WiFi设备与所述指定终端传输所述目标数量的数据帧的丢包率,得到所述目标丢包率,其中,当所述目标丢包率为所述第一丢包率时,所述目标数量为所述第一数量,当所述目标丢包率为所述第二丢包率时,所述目标数量为所述第二数量。Counting the number of data frames successfully transmitted by the second WiFi device and the number of data frames unsuccessfully transmitted by the second WiFi device among the target number of data frames, according to the number of successfully transmitted data frames and the The number of unsuccessfully transmitted data frames determines the packet loss rate at which the second WiFi device transmits the target number of data frames with the specified terminal to obtain the target packet loss rate, wherein, when the target packet loss rate When it is the first packet loss rate, the target number is the first number, and when the target packet loss rate is the second packet loss rate, the target number is the second number. 5.如权利要求2所述的数据传输方法,其特征在于,所述在所述第一WiFi设备通过SR功能发送数据帧之前,确定第二WiFi设备与指定终端传输第一数量的数据帧的丢包率,得到第一丢包率,包括:5. The data transmission method according to claim 2, wherein before the first WiFi device transmits the data frame through the SR function, it is determined that the second WiFi device and the specified terminal transmit the first number of data frames Packet loss rate, get the first packet loss rate, including: 在所述第一WiFi设备通过SR功能发送数据帧之前,确定第一监听周期内所述第二WiFi设备与所述指定终端传输所述第一数量的数据帧的丢包率,得到第一丢包率;Before the first WiFi device sends data frames through the SR function, determine the packet loss rate of the first number of data frames transmitted by the second WiFi device and the designated terminal within the first listening period, to obtain the first loss rate packet rate; 在所述若判断出所述第二WiFi设备的丢包率的上升比例大于预设的第一丢包率阈值之后,所述数据传输方法还包括:After it is determined that the increase ratio of the packet loss rate of the second WiFi device is greater than the preset first packet loss rate threshold, the data transmission method further includes: 确定第二监听周期,以所述第二监听周期作为新的所述第一监听周期,并返回所述在所述第一WiFi设备通过SR功能发送数据帧之前,确定第一监听周期内所述第二WiFi设备与所述指定终端传输所述第一数量的数据帧的丢包率,得到第一丢包率的步骤以及后续步骤,其中,所述第二监听周期大于所述第一监听周期。Determine the second monitoring period, use the second monitoring period as the new first monitoring period, and return to the above-mentioned before the first WiFi device sends a data frame through the SR function, determine the first monitoring period. The second WiFi device transmits the packet loss rate of the first number of data frames with the designated terminal to obtain the first packet loss rate and subsequent steps, wherein the second monitoring period is greater than the first monitoring period . 6.如权利要求3所述的数据传输方法,其特征在于,所述在所述第一WiFi设备通过SR功能发送数据帧之前,确定第二WiFi设备与指定终端传输第一数量的数据帧的丢包率,得到第一丢包率,包括:6. The data transmission method according to claim 3, wherein before the first WiFi device sends data frames through the SR function, it is determined that the second WiFi device and the specified terminal transmit the first number of data frames Packet loss rate, get the first packet loss rate, including: 在所述第一WiFi设备通过SR功能发送数据帧之前,确定第一监听周期内所述第二WiFi设备与所述指定终端传输所述第一数量的数据帧的丢包率,得到第一丢包率;Before the first WiFi device sends data frames through the SR function, determine the packet loss rate of the first number of data frames transmitted by the second WiFi device and the designated terminal within the first listening period, to obtain the first loss rate package rate; 在所述判断出所述第二WiFi设备的速率的下降比例大于所述预设的第一速率阈值之后,所述数据传输方法还包括:After it is determined that the decrease ratio of the rate of the second WiFi device is greater than the preset first rate threshold, the data transmission method further includes: 确定第三监听周期,以所述第三监听周期作为新的所述第一监听周期,并返回所述在所述第一WiFi设备通过SR功能发送数据帧之前,确定第一监听周期内所述第二WiFi设备与所述指定终端传输所述第一数量的数据帧的丢包率,得到第一丢包率的步骤以及后续步骤,其中,所述第三监听周期大于所述第一监听周期。Determine a third listening period, use the third listening period as the new first listening period, and return to the determination of the first listening period in the first listening period before the first WiFi device sends a data frame through the SR function The second WiFi device transmits the packet loss rate of the first number of data frames with the specified terminal to obtain the first packet loss rate and subsequent steps, wherein the third monitoring period is greater than the first monitoring period . 7.如权利要求3或6所述的数据传输方法,其特征在于,所述在所述第一WiFi设备通过SR功能发送数据帧之前,确定第二WiFi设备与指定终端传输第一数量的数据帧的丢包率,得到第一丢包率,包括:7. The data transmission method according to claim 3 or 6, wherein before the first WiFi device sends a data frame through the SR function, it is determined that the second WiFi device and the designated terminal transmit the first amount of data The packet loss rate of the frame, the first packet loss rate is obtained, including: 在所述第一WiFi设备通过SR功能发送数据帧之前,确定第一监听周期内所述第二WiFi设备与所述指定终端传输所述第一数量的数据帧的丢包率,得到第一丢包率;Before the first WiFi device sends data frames through the SR function, determine the packet loss rate of the first number of data frames transmitted by the second WiFi device and the designated terminal within the first listening period, to obtain the first loss rate packet rate; 所述数据传输方法还包括:The data transmission method also includes: 在所述选择继续通过SR功能发送数据帧的过程中,确定所述第二WiFi设备与所述指定终端传输第五数量的数据帧的丢包率,得到第三丢包率,以及,确定所述第二WiFi设备与所述指定终端传输第六数量的数据帧的平均速率,得到第三速率;In the process of selecting to continue sending data frames through the SR function, determine the packet loss rate of the fifth number of data frames transmitted between the second WiFi device and the designated terminal to obtain a third packet loss rate, and determine the The average rate at which the second WiFi device transmits the sixth number of data frames with the specified terminal to obtain a third rate; 若根据所述第一丢包率以及所述第三丢包率,判断出所述第二WiFi设备的丢包率的上升比例大于预设的第二丢包率阈值,或者,若根据所述第一速率和所述第三速率,判断出所述第二WiFi设备的速率的下降比例大于预设的第二速率阈值,则暂停通过SR功能发送数据帧,并将所述第一监听周期重置为默认值后,返回所述确定第一监听周期内所述第二WiFi设备与所述指定终端传输所述第一数量的数据帧的丢包率,得到第一丢包率的步骤以及后续步骤。If according to the first packet loss rate and the third packet loss rate, it is determined that the increase ratio of the packet loss rate of the second WiFi device is greater than the preset second packet loss rate threshold, or if according to the The first rate and the third rate, if it is determined that the decrease ratio of the rate of the second WiFi device is greater than the preset second rate threshold, then suspend sending data frames through the SR function, and restart the first monitoring period After being set to the default value, return to the step of determining the packet loss rate of the first number of data frames transmitted by the second WiFi device and the designated terminal during the first listening period, and obtain the first packet loss rate and subsequent steps step. 8.一种数据传输装置,其特征在于,应用于第一WiFi设备,所述第一WiFi设备支持空间复用SR功能,所述数据传输装置包括:8. A data transmission device, characterized in that it is applied to a first WiFi device, and the first WiFi device supports a spatial multiplexing SR function, and the data transmission device includes: 第一丢包率确定模块,用于在所述第一WiFi设备通过SR功能发送数据帧之前,确定第二WiFi设备与指定终端传输第一数量的数据帧的丢包率,得到第一丢包率;The first packet loss rate determination module is used to determine the packet loss rate of the first number of data frames transmitted between the second WiFi device and the designated terminal before the first WiFi device sends the data frame through the SR function, so as to obtain the first packet loss rate Rate; 第二丢包率确定模块,用于在所述第一WiFi设备通过SR功能发送数据帧的过程中,确定所述第二WiFi设备与所述指定终端传输第二数量的数据帧的丢包率,得到第二丢包率;A second packet loss rate determining module, configured to determine the packet loss rate of the second number of data frames transmitted between the second WiFi device and the specified terminal during the process of the first WiFi device sending data frames through the SR function , get the second packet loss rate; 丢包率的上升比例计算模块,用于根据所述第一丢包率和所述第二丢包率计算所述第二WiFi设备的丢包率的上升比例;The increase ratio calculation module of the packet loss rate is used to calculate the increase ratio of the packet loss rate of the second WiFi device according to the first packet loss rate and the second packet loss rate; SR功能选择模块,用于根据所述第二WiFi设备的丢包率的上升比例,选择是否继续通过SR功能发送数据帧。The SR function selection module is configured to select whether to continue sending data frames through the SR function according to the increase ratio of the packet loss rate of the second WiFi device. 9.一种电子设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至7任一项所述的方法。9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and operable on the processor, characterized in that, when the processor executes the computer program, the computer program according to claim 1 is realized. The method described in any one of 1 to 7. 10.一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7任一项所述的方法。10. A computer-readable storage medium storing a computer program, wherein the computer program implements the method according to any one of claims 1 to 7 when executed by a processor.
CN202310458731.XA 2023-04-24 Data transmission methods, devices and electronic equipment Active CN116600351B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310458731.XA CN116600351B (en) 2023-04-24 Data transmission methods, devices and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310458731.XA CN116600351B (en) 2023-04-24 Data transmission methods, devices and electronic equipment

Publications (2)

Publication Number Publication Date
CN116600351A true CN116600351A (en) 2023-08-15
CN116600351B CN116600351B (en) 2025-12-26

Family

ID=

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102204182A (en) * 2010-12-29 2011-09-28 华为技术有限公司 Method and apparatus for controlling congestion of data transmission
US20180132278A1 (en) * 2015-04-28 2018-05-10 Interdigital Patent Holdings, Inc. Methods, apparatus and systems for procedures for carrier sense multiple access and spatial reuse in sub-channelized wireless local area networks (wlans)
US20210051664A1 (en) * 2019-08-13 2021-02-18 Qualcomm Incorporated Dynamic spatial reuse
US20210075566A1 (en) * 2018-05-23 2021-03-11 Huawei Technologies Co., Ltd. Method and apparatus for spatial reuse based on multi-access point ap coordination
CN113747503A (en) * 2021-08-05 2021-12-03 维沃移动通信有限公司 Data transmission method and device and sending end equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102204182A (en) * 2010-12-29 2011-09-28 华为技术有限公司 Method and apparatus for controlling congestion of data transmission
US20180132278A1 (en) * 2015-04-28 2018-05-10 Interdigital Patent Holdings, Inc. Methods, apparatus and systems for procedures for carrier sense multiple access and spatial reuse in sub-channelized wireless local area networks (wlans)
US20210075566A1 (en) * 2018-05-23 2021-03-11 Huawei Technologies Co., Ltd. Method and apparatus for spatial reuse based on multi-access point ap coordination
US20210051664A1 (en) * 2019-08-13 2021-02-18 Qualcomm Incorporated Dynamic spatial reuse
CN113747503A (en) * 2021-08-05 2021-12-03 维沃移动通信有限公司 Data transmission method and device and sending end equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
FRANCESC WILHELMI: ""On the Performance of the Spatial Reuse Operation in IEEE 802.11ax WLANs"", IEEE, 17 September 2019 (2019-09-17), pages 1 - 6 *
伍军钢;朱星龙;: "利用WIFI RSSI估计感知技术和丢包率分析策略实现智能网关动态转换码率的方法", 通讯世界, no. 04, 25 April 2018 (2018-04-25), pages 60 - 62 *

Similar Documents

Publication Publication Date Title
CN107770848B (en) Method and apparatus for transmitting wake-up packet in communication system
US10218483B2 (en) Systems and methods for signaling and generating variable length block acknowledgment fields in a wireless network
WO2012096441A2 (en) Method and apparatus for transmitting management information frame in wireless local area network system
EP3400666B1 (en) Systems and methods for variable length block acknowledgment
AU2011354847A1 (en) Method and apparatus for transmitting management information frame in wireless local area network system
CN112313893B (en) Communication method, communication device, electronic device, and computer-readable storage medium
WO2022143772A1 (en) Data transmission method and device, and storage medium
US9596614B2 (en) Method and apparatus for transmitting acknowledgement frame in wireless local area network
US20160043946A1 (en) Systems and methods for aggregating multi-user media access control protocol data unit frames in a wireless network
CN111416687A (en) Method and apparatus used in communication device for channel sensing
WO2016077609A1 (en) Enhancing modulation and coding scheme selection and medium access control protocol data unit aggregation based on under-utilization
WO2016077615A1 (en) Enhancing modulation and coding scheme selection and medium access control (mac) protocol data unit aggregation using mac efficiency information
JP5280458B2 (en) Method and apparatus for improving erase sequence detection performance
JP2004032467A (en) Packet communication device
CN116600351A (en) Data transmission method, device and electronic equipment
CN116600351B (en) Data transmission methods, devices and electronic equipment
CN116260537A (en) Data message sending method, device and communication equipment
CN112188550B (en) Data transmission method, wireless access point and computer readable storage medium
CN116567595B (en) Data processing method, device and electronic equipment
Fridayansah et al. Enhancement of adaptive auto rate fallback with collision detection for IEEE 802.11 n/AC WLANs
CN118900160A (en) Aggregate message sending method, device and network equipment
CN121175960A (en) Methods, apparatus, devices, and storage media for determining wireless link failure
EP4480150A1 (en) Determining packet loss in a fronthaul link
TW202541536A (en) Communication method and communication device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant