WiFi data sending method and device, storage medium and WiFi equipment

By detecting the channel status in the WiFi device, sending test frames and dynamically adjusting the MCS serial number, the transmission reliability and efficiency problems of WiFi technology in channel quality change scenarios are solved, and the success rate of data frames is improved.

CN120583541AActive Publication Date: 2025-09-02ZHUHAI HUGE IC CO LTD

Patent Information

Application Number
CN202510717158.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-09-02
Estimated Expiration
2045-05-30

AI Technical Summary

Technical Problem

In the scenario where channel quality changes frequently, the data frame transmission reliability and efficiency are not high, resulting in transmission failure.

Method used

By detecting the channel status, sending test frames and monitoring ACK frames, dynamically adjusting the MCS serial number to adapt to channel quality changes, ensuring that the data frames are sent according to the appropriate modulation and coding scheme after the channel reservation is successful.

Benefits of technology

The transmission failure rate caused by channel quality mismatch is significantly reduced, and the transmission reliability and efficiency of data frames are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120583541A_ABST
    Figure CN120583541A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a WiFi data sending method and device, a storage medium and WiFi equipment, and relates to the field of wireless communication. The method provided by the invention comprises the following steps: when a data frame to be sent exists, the equipment firstly executes CCA to judge that a channel is idle, and obtains an initial MCS serial number; a test frame is sent based on the MCS, and if an ACK frame is received within a preset duration, channel reservation succeeds; if the MCS sequence number is not received, reducing the MCS sequence number according to a preset rule and rebooking until success or reducing the MCS sequence number to the minimum value; and finally, calculating the total time length of the data frame according to the successfully reserved MCS serial number, and completing the transmission of the data frame in the total time length by using a corresponding modulation coding scheme. By dynamically adapting the MCS serial number, the channel utilization rate and the transmission reliability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of wireless communications, and in particular to a method, apparatus, storage medium, and WiFi device for transmitting WiFi data. Background Art

[0002] Before sending data frames, WiFi devices usually use the Carrier Sense Multiple Access / Collision Avoidance (CSMA / CA) mechanism to access the wireless channel. Figure 1 The process of sending data frames shown in the figure is as follows: When a WiFi device has a data frame to send, it first performs a Clear Channel Assessment (CCA) to determine whether the current channel is idle. If the channel is idle, the device enters the channel reservation process and reserves the channel by sending a Request to Send (RTS) frame. If the receiving device correctly receives the RTS frame and confirms that the channel is available, it responds with a Clear to Send (CTS) frame. After receiving the CTS frame, the sending device considers the channel reservation successful and sends the data frame within the reserved time, while waiting for the receiving device's response frame. After all pending data frames have been sent, the sending device sends a Channel Release frame (CF-END) to release the channel, completing the entire data frame transmission process.

[0003] However, existing WiFi technology has significant deficiencies when dealing with scenarios where channel quality frequently changes. In a wireless environment, channel quality may be affected by a variety of factors, such as multipath effects, interference sources, device movement, etc., causing the channel quality to change significantly in a short period of time. When a WiFi device is sending a reservation frame (such as an RTS frame), the channel quality may be in a good state, allowing it to successfully reserve a channel. However, during the subsequent data frame transmission process, due to the rapid deterioration of channel quality, the data frame may not be successfully transmitted to the receiving device, resulting in data transmission failure.

[0004] Therefore, in view of the shortcomings of existing WiFi technology in scenarios where channel quality frequently changes, a new technical solution is urgently needed to optimize the data frame sending process of WiFi devices and improve the reliability and efficiency of data transmission. Summary of the Invention

[0005] The present invention provides a method, apparatus, storage medium, and WiFi device for transmitting WiFi data, which can solve the problem of low reliability and efficiency of data frame transmission in WiFi devices in the prior art. The technical solution is as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for transmitting WiFi data, the method comprising:

[0007] When detecting that there is a data frame to be sent, performing CCA on the current channel, and if the current channel is assessed to be idle according to the CCA result, obtaining the initial MCS sequence number of the data frame;

[0008] Sending a test frame based on the modulation and coding scheme indicated by the initial MCS sequence number, and determining that the current channel reservation is successful if an ACK frame corresponding to the test frame is received within a preset time length;

[0009] If an ACK frame corresponding to the test frame is not received within a preset time, the initial MCS number is reduced according to a preset rule, and the current channel is re-reserved according to the reduced MCS number until the reservation is successful; wherein, the MCS number is not further reduced when the current MCS number is equal to the preset minimum MCS signal;

[0010] The total duration of the data frame is calculated according to the MCS sequence number when the reservation is successful, and the data frame is sent within the total duration according to the modulation and coding scheme indicated by the MCS.

[0011] In a second aspect, an embodiment of the present application provides a device for transmitting WiFi data, the device comprising:

[0012] a detection unit, configured to perform CCA on the current channel when detecting the presence of a data frame to be sent, and if the current channel is assessed to be idle according to the CCA result, obtain an initial MCS sequence number of the data frame;

[0013] A reservation unit, configured to send a test frame based on the modulation and coding scheme indicated by the initial MCS sequence number, and determine that the current channel reservation is successful if an ACK frame corresponding to the test frame is received within a preset time length;

[0014] The reservation unit is further configured to, if an ACK frame corresponding to the test frame is not received within a preset time, reduce the initial MCS sequence number according to a preset rule, and re-reserve the current channel according to the reduced MCS sequence number until the reservation is successful; wherein, the MCS sequence number is not further reduced when the current MCS sequence number is equal to a preset minimum MCS signal;

[0015] The sending unit is used to calculate the total duration of the data frame according to the MCS sequence number when the reservation is successful, and send the data frame within the total duration according to the modulation and coding scheme indicated by the MCS.

[0016] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.

[0017] In a fourth aspect, an embodiment of the present application provides a WiFi device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.

[0018] The beneficial effects of the technical solutions provided by some embodiments of the present application include at least:

[0019] By sending test frames and monitoring the reception of ACK frames, the device can detect changes in channel quality in real time. If the initial MCS number is too high, causing test frame transmission failure, the device will gradually lower the MCS number until it finds a modulation and coding scheme that suits the current channel conditions. Wi-Fi devices only send data frames when they confirm that the channel can support the transmission rate corresponding to the current MCS number, significantly reducing the rate of transmission failures caused by channel quality mismatches. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1 It is a timing diagram of sending data frames provided by the prior art;

[0022] Figure 2 1 is a flow chart of a method for transmitting WiFi data provided in an embodiment of the present application;

[0023] Figure 3A This is a timing diagram of a reservation channel provided in an embodiment of the present application;

[0024] Figure 3B This is another timing diagram of the reservation channel provided in the embodiment of the present application

[0025] Figure 4 This is a schematic diagram of the structure of a WiFi data sending device provided by this application;

[0026] Figure 5 This is a structural diagram of a WiFi device provided by this application. DETAILED DESCRIPTION

[0027] In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.

[0028] See Figure 2, is a flow chart of a method for sending WiFi data according to an embodiment of the present application. Figure 2 As shown, the method of the embodiment of the present application may include the following steps:

[0029] S201. When detecting that there is a data frame to be sent, perform CCA on the current channel. If the current channel is evaluated to be idle according to the CCA result, obtain the initial MCS sequence number of the data frame.

[0030] When a WiFi device detects a data frame to transmit, it first performs a Clear Channel Assessment (CCA) on the current channel. This CCA is performed by the RF front-end circuitry of the physical layer (PHY). The device monitors the energy level and signal characteristics on the channel to determine whether other devices are transmitting. CCA typically combines energy detection (ED) and carrier sense (CS) mechanisms: energy detection quickly identifies the total energy in the channel, while carrier sense analyzes the signal type (e.g., whether it is a legitimate Wi-Fi signal). If, within the preset CCA detection time, the channel energy falls below the set ED threshold and no valid Wi-Fi signal is detected, the device determines that the channel is idle. At this point, the device selects an initial MCS number based on its transmission capabilities (e.g., the supported MCS range) and channel conditions (e.g., signal-to-noise ratio (SNR)). This initial MCS number is typically selected based on the device's historical transmission experience or a preset default value, aiming to balance transmission rate and reliability.

[0031] For example, suppose a Wi-Fi device needs to send a video stream data frame. The device first performs CCA and detects that the current channel energy is below -82dBm for 10 consecutive microseconds. It also detects that no other Wi-Fi signal preambles are detected, thus determining that the channel is idle. Based on its supported MCS range (e.g., MCS 0 to MCS 11) and the current signal-to-noise ratio (e.g., 20dB), the device selects MCS 7 (corresponding to 64-QAM modulation and a 3 / 4 coding rate) as the initial MCS to achieve a higher transmission rate.

[0032] In some embodiments of the present application, a buffer is a key component in a WiFi device that temporarily stores data frames to be transmitted. The device uses a hardware register flag (e.g., Buffer_Not_Empty) or a software-maintained variable (e.g., a counter) to track the number of data frames in the buffer in real time. The device can periodically poll the buffer status (e.g., every 10ms) or detect buffer status changes in real time through a hardware interrupt mechanism (e.g., triggering an interrupt when a data frame arrives in the buffer).

[0033] When the device detects that the buffer is not empty, it executes the following logic to determine whether there are data frames to be sent in the buffer:

[0034] The device maintains a pointer (such as the Head pointer) pointing to the first data frame to be sent in the buffer, or a counter (such as Frame_Count) that records the number of data frames in the buffer. If the Head pointer does not point to an empty position in the buffer (or Frame_Count > 0), it indicates that there are data frames to be sent in the buffer. The device may further verify the validity of the data frames (such as the checksum and frame length) to ensure that the data frames in the buffer can be correctly transmitted. In multi-tasking concurrent scenarios (such as processing data streams from multiple applications simultaneously), the device can achieve fair scheduling and efficient transmission of data frames by monitoring the buffer status.

[0035] S202: Send a test frame based on the modulation and coding scheme indicated by the initial MCS sequence number. If an ACK frame corresponding to the test frame is received within a preset time period, determine that the current channel reservation is successful.

[0036] Among them, after determining the initial MCS sequence number, the WiFi device will construct a test frame according to the modulation and coding scheme corresponding to the sequence number (such as modulation mode, coding rate, etc.). The test frame is usually a short data packet containing necessary header information and pseudo data, which is used to quickly verify the transmission reliability of the channel under the current MCS. The device sends the test frame to the channel through the physical layer and starts a preset ACK timeout timer. If the receiving device (such as an access point AP) correctly receives the test frame, it will reply with an ACK frame as confirmation after a short interframe space (SIFS). If the sending device receives the ACK frame before the ACK timeout timer expires, it indicates that the channel transmission is reliable under the current MCS and the channel reservation is successful. At this time, the device will use the MCS sequence number to transmit subsequent data frames.

[0037] For example, see Figure 3A In the schematic diagram shown, a WiFi device performs CCA and, upon detecting that the current channel is idle, transmits a test frame (TX NULL-DATA) based on the initial MCS number (MCS_i). The receiving AP responds with an ACK frame after a SIFS (16 microseconds). If the device receives the ACK frame within the ACK timeout (e.g., 50 microseconds), it confirms the successful channel reservation and records the current MCS number as MCS_i.

[0038] In some embodiments of the present application, in a WiFi device, a test frame is designed as a lightweight empty data frame to quickly verify the transmission reliability of the channel under the current modulation and coding scheme (MCS). Its core feature is the simplification of the frame structure.

[0039] 1. Set the field values ​​of the frame type and subtype identifier.

[0040] The PV_TYPE field value is 10: This indicates that the frame is a control frame, not a data frame or management frame. Control frames are typically used for channel management, power saving, and other mechanisms and have a higher transmission priority.

[0041] The PV_SUBTYPE field value equal to 0100 further identifies this control frame as a variant of the Null Data Frame (NDF), namely, a test frame. Null Data Frames are used in standard 802.11 protocols to maintain association status or trigger power-saving mode. However, the Subtype field value (0100) redefines this control frame as a test frame to support channel reservation verification.

[0042] 2. Simplified frame structure:

[0043] Omit the Address4 field: In traditional 802.11 frames, the Address4 field is used to support multi-hop transmission in a distributed system (DS). Because test frames are only used for single-hop channel verification and do not require support for multi-hop routing, this field is omitted to reduce frame length.

[0044] Omit the QoS Control field: The QoS Control field is used to identify service priorities (such as AC_VO, AC_VI, etc.). However, test frames do not carry actual data and do not require QoS marking, so it is omitted to reduce overhead.

[0045] Omitting the HT Control field: The HT Control field is used for extended control in high throughput (HT) mode (such as block acknowledgement, MIMO feedback, etc.). Test frames do not involve complex control functions, so this field is omitted.

[0046] Omit Frame Body: The test frame does not need to carry data content, so the frame body is completely omitted and only the necessary frame header and frame check sequence (FCS) are retained.

[0047] The following describes the process of generating and sending a test frame:

[0048] Fill in the Frame Control field, setting PV_TYPE to 10 (control frame) and PV_SUBTYPE to 0100 (test frame). Fill in the Duration field, specifying the Network Allocation Vector (NAV) value to reserve channel time. Fill in the Receiver Address (RA) and Transmitter Address (TA) to identify the communicating parties. Skip filling in the Frame Body and directly append the FCS field for integrity checking. Map the test frame to physical layer symbols based on the modulation and coding scheme corresponding to the current MCS sequence number and transmit it.

[0049] S203. If the ACK frame corresponding to the test frame is not received within the preset time, the initial MCS number is reduced according to the preset rule, and the current channel is re-reserved according to the reduced MCS number until the reservation is successful; wherein, when the current MCS number is equal to the preset minimum MCS signal, it will no longer be reduced.

[0050] Among them, if the ACK frame is not received after the ACK timeout timer expires, the WiFi device will determine that the transmission under the current MCS number is unreliable. At this time, the device will lower the MCS number according to the preset rules to select a more robust modulation and coding scheme. The reduction rule can be a step-by-step decrease (such as reducing 1 number each time) or a dynamic adjustment based on channel quality feedback. The device will reconstruct the test frame using the lowered MCS number and repeat the channel reservation process. This process will continue until the device receives an ACK frame (reservation successful) or the MCS number is reduced to a preset minimum value (such as MCS 0, corresponding to BPSK modulation and 1 / 2 coding rate). If the MCS number has been reduced to the minimum value and the ACK frame is still not received, the device will abandon the current channel and execute the backoff algorithm to compete for the channel again.

[0051] For example, see Figure 3B In the schematic diagram shown, the WiFi device first sends a test frame using MCS number MCS_i and fails to receive an ACK frame. It then lowers the MCS number to MCS_i-1. After sending another test frame and still failing to receive an ACK frame, it lowers the MCS number to MCS_i-2. Finally, the device successfully receives an ACK frame at MCS_i-2, confirming the successful channel reservation.

[0052] In some embodiments of the present application, during the process of performing channel reservation on a WiFi device, if the current channel reservation fails (i.e., an ACK frame corresponding to a test frame is not received within a preset time period), the device will dynamically adjust the MCS sequence number according to supplementary rules.

[0053] The specific rules are:

[0054] A WiFi device maintains a failure counter that records the number of consecutive reservation failures for the current channel. For every n reservation failures (n is an integer greater than or equal to 1), the device decrements the current MCS number by 1. For example, if n = 2, the MCS number decreases by one level after every two reservation failures. When the MCS number drops to a preset minimum (e.g., MCS 0), the device will no longer decrease the MCS number and may implement other strategies (such as backoff or abandoning the current channel).

[0055] When a WiFi device dynamically adjusts the MCS number, it follows these steps:

[0056] Upon the first reservation failure, the device initializes the failure counter to 1 and records the current MCS number. After each failed reservation, the device checks whether the failure counter has reached n times. If not, the counter is incremented; if so, the MCS number is decremented. When the failure counter reaches n times, the device decrements the current MCS number by 1 and resets the failure counter to 0 (or retains the counter status as needed to support more complex strategies). The device reconstructs the test frame using the decremented MCS number and repeats the channel reservation process.

[0057] It should be noted that dynamic adjustment is only triggered when channel reservation fails, and the number of failures must meet the threshold condition n.

[0058] When the MCS number reaches the minimum value (such as MCS 0), the device stops decrementing and may implement other strategies (such as switching to an alternative channel or extending the backoff time). To prevent the counter from overflowing, the device can set a maximum failure limit (such as 10). If the limit is exceeded, the device will enforce the lowest MCS number or abandon the channel.

[0059] This embodiment reduces the MCS number after every n failures, allowing the device to dynamically adjust its transmission strategy as channel quality fluctuates. For example, when channel quality is poor, the device may frequently experience reservation failures. However, by reducing the MCS number (e.g., from MCS 7 to MCS 6) and adopting a more robust modulation and coding scheme (e.g., from 64-QAM to 16-QAM), transmission reliability can be improved.

[0060] Introducing a failure threshold, n, prevents devices from prematurely lowering their MCS numbers in the face of minor channel fluctuations, thus avoiding unnecessary drops in transmission rates. For example, if n = 3, a device will only lower its MCS number after three consecutive reservation failures, reducing frequent MCS fluctuations caused by brief interference.

[0061] The dynamic adjustment strategy can flexibly adjust the value of n based on the actual channel environment (such as interference intensity and multipath effects). In environments with strong interference, a smaller value of n (such as n=1) can be set to more quickly reduce the MCS number; in environments with weak interference, a larger value of n (such as n=5) can be set to maintain a higher transmission rate.

[0062] By dynamically adjusting the MCS number, the device can more quickly find transmission parameters suitable for the current channel conditions, thereby reducing reservation failures and improving channel reservation efficiency. For example, in a scenario where channel quality gradually deteriorates, the device gradually lowers the MCS number until it finds an MCS number that ensures transmission reliability while maintaining a certain rate.

[0063] For example, assume that the WiFi device sets n = 2 during the channel reservation phase, and the initial MCS number is MCS 7. The first reservation fails, and the failure counter is set to 1. The second reservation fails, and the failure counter is set to 2, triggering a decrement of the MCS number (MCS 7 → MCS 6). A new reservation is attempted using MCS 6. If successful, the current MCS number is retained. If the reservation fails and the failure counter reaches 2 again (i.e., total failures = 4), the MCS number is further decremented (MCS 6 → MCS 5).

[0064] Through the above dynamic adjustment strategy, WiFi devices can quickly adapt to changes in channel quality, balance transmission rate and reliability, and improve overall transmission efficiency.

[0065] S204: Calculate the total duration of the data frame according to the MCS sequence number when the reservation is successful, and send the data frame within the total duration according to the modulation and coding scheme indicated by the MCS.

[0066] Among them, after the channel reservation is successful, the WiFi device will calculate the total transmission time of the data frame based on the final MCS sequence number. The calculation principle is based on the size of the data frame (in bytes), the physical layer rate corresponding to the MCS sequence number (such as Mbps), and the necessary protocol overhead (such as MAC header, interframe interval, etc.). The device will allocate a continuous transmission period (total duration) to ensure that the data frame can be sent in full. During the transmission process, the device will perform physical layer processing according to the modulation and coding scheme indicated by the MCS sequence number, including: modulation constellation mapping, channel coding, interleaving and other operations. If the data frame is large, the device may divide it into multiple fragments (MPDU) and send them sequentially within the total duration. After the transmission is completed, the device will wait for the ACK frame from the receiving device to confirm that the transmission is successful.

[0067] For example, a WiFi device successfully reserves a data frame at MCS 4, which corresponds to a physical layer rate of 13.5 Mbps. The device needs to send a 1500-byte data frame, and the total duration is calculated as (1500 × 8) / 13.5 ≈ 889 microseconds (including protocol overhead). The device completes the data frame transmission within 889 microseconds and receives an ACK frame confirming the successful transmission.

[0068] In some embodiments of the present application, the WiFi device determines the initial MCS sequence number and the maximum MCS sequence number of the data frame. The specific process includes:

[0069] Before sending a data frame, a WiFi device evaluates the bandwidth requirements of the current transmission task. For example, a live video stream requires high bandwidth (e.g., tens of Mbps) to maintain smooth playback, while text messages or sensor data require only low bandwidth (e.g., hundreds of Kbps). The device determines the baseline value for the initial MCS sequence number based on bandwidth requirements: high bandwidth requirements tend to select high MCS sequence numbers (e.g., MCS 9-11, corresponding to 256-QAM or higher-order modulation), while low bandwidth requirements tend to select low MCS sequence numbers (e.g., MCS 0-3, corresponding to BPSK or QPSK).

[0070] To avoid transmission failures caused by blindly pursuing high bandwidth, the device sets a maximum MCS number threshold based on mission requirements. For example, for critical control commands (such as drone flight instructions), even if bandwidth requirements are high, the device may limit the maximum MCS number to MCS 7 (64-QAM) to balance speed and reliability.

[0071] WiFi devices continuously monitor channel quality indicators through the physical layer (PHY), including signal-to-noise ratio (SNR), bit error rate (BER), and received signal strength indicator (RSSI). For example, if the current SNR is 25dB and the BER is less than 10 -5 , the device may select the initial MCS number as MCS 8 (64-QAM, 5 / 6 coding rate); if the SNR drops to 15dB, the initial MCS number may be reduced to MCS4 (16-QAM, 1 / 2 coding rate).

[0072] The device dynamically adjusts the maximum MCS number based on real-time signal quality. For example, when channel quality is good (e.g., SNR > 30dB), the maximum allowed MCS number is MCS11 (1024-QAM). When channel quality deteriorates (e.g., SNR < 10dB), the maximum MCS number is limited to MCS 3 (QPSK, 1 / 2 coding rate) to avoid a surge in bit error rates caused by higher-order modulation.

[0073] WiFi devices maintain a retransmission counter to record the number of recent data frame retransmissions or the retransmission rate (such as the percentage of retransmitted frames in the past 100 frames). If the retransmission rate exceeds a preset threshold (such as 10%), the device may consider the current MCS number to be too high and need to lower the initial MCS number or the maximum MCS number. If three consecutive transmissions are retransmitted due to the MCS number being too high, the device may lower the initial MCS number by 1-2 levels. For example, from MCS 7 to MCS 5. If the retransmission rate continues to be higher than the threshold, the device may gradually tighten the maximum MCS number. For example, the maximum MCS number may be gradually reduced from MCS 9 to MCS 7 until the retransmission rate returns to normal.

[0074] WiFi devices use a weighted algorithm to determine the initial and maximum MCS numbers based on bandwidth requirements, signal quality, and retransmission rate. For example, the weights are: bandwidth requirement 40%, signal quality 40%, and retransmission rate 20%. If bandwidth requirements are high (weight score 0.8), signal quality is medium (score 0.6), and retransmission rate is low (score 0.9), the combined score = 0.8 × 0.4 + 0.6 × 0.4 + 0.9 × 0.2 = 0.74, corresponding to an initial MCS of MCS 6 (16-QAM, 3 / 4 coding rate) and a maximum MCS of MCS 8.

[0075] To prevent frequent MCS number changes due to parameter fluctuations, the device may set a safety margin. For example, the initial MCS number is always at least two levels lower than the maximum MCS number, and the maximum MCS number does not exceed the maximum value supported by the device (such as MCS11).

[0076] By dynamically setting the initial and maximum MCS numbers based on comprehensive bandwidth requirements, signal quality, and retransmission conditions, WiFi devices can achieve precise adaptive adjustment of transmission parameters.

[0077] In some embodiments of the present application, during the data frame transmission process of the WiFi device, the device will pre-configure a total duration parameter, which represents the maximum duration allowed for the current transmission cycle (such as the channel occupancy time reserved by the NAV). The total duration is generally set based on the following factors:

[0078] Upper layer protocol requirements: For example, the application layer may require that data transmission must be completed within a certain time window (such as the frame interval of a real-time video stream).

[0079] Channel contention strategy: In the distributed coordination function (DCF) or point coordination function (PCF) mode, the total duration may be determined by the network allocation vector (NAV) or the contention window (CW).

[0080] QoS guarantee: For high-priority traffic (such as AC_VO), the total duration may be shorter to reduce blocking of other traffic.

[0081] During the data frame transmission process, the device will use the internal timer to monitor the cumulative transmission time in real time, that is, the time consumed from the transmission of the first data frame to the completion of the current frame transmission.

[0082] When the data frame is sent, the WiFi device will perform the following judgment process:

[0083] Read the elapsed time of the current transmission cycle from the internal timer. If the accumulated transmission time is equal to the total time, the transmission cycle is considered to have ended and no further action is required. If the accumulated transmission time is less than the total time, the transmission cycle is considered to have not ended and a CF-END frame must be sent to release the channel early.

[0084] The CF-END frame (Clear-to-Send End Frame) is used to notify other WiFi devices that the current transmission cycle has ended early, allowing them to compete for the channel immediately without waiting for the original NAV to time out. The device will only send a CF-END frame when the cumulative transmission duration is less than the total duration. The CF-END frame is a control frame (Control Frame). The PV_TYPE field in its frame header is 10, and the PV_SUBTYPE field may be a specific value (such as 0x0C, depending on the protocol implementation). When sending, the device will fill the Duration field with 0, indicating that the channel is released immediately and broadcast it to all associated devices. If the CF-END frame fails to be sent due to a conflict or interference, the device may rely on the NAV timeout mechanism to release the channel, or use a retransmission mechanism to ensure that other devices receive the CF-END frame. In this embodiment, when the transmission cycle ends early, the channel is immediately released by sending a CF-END frame, allowing other devices to compete for channel resources, reducing the channel idle time, and thus improving the overall network throughput.

[0085] This application specifically includes the following beneficial effects:

[0086] By sending test frames and monitoring the reception of ACK frames, the device can detect changes in channel quality in real time. If the initial MCS number is too high, causing test frame transmission failure, the device will gradually lower the MCS number until it finds a modulation and coding scheme that suits the current channel conditions. Wi-Fi devices only send data frames when they confirm that the channel can support the transmission rate corresponding to the current MCS number, significantly reducing the rate of transmission failures caused by channel quality mismatches.

[0087] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0088] See Figure 4 , which shows a schematic diagram of the structure of a device for transmitting WiFi data according to an exemplary embodiment of the present application, hereinafter referred to as device 4. Device 4 can be implemented as all or part of a WiFi device through software, hardware, or a combination of both. Device 4 includes a detection unit 401, a reservation unit 402, and a transmission unit 403.

[0089] The detection unit 401 is configured to perform CCA on the current channel when detecting the presence of a data frame to be sent, and if the current channel is assessed to be idle based on the CCA result, obtain an initial MCS sequence number of the data frame;

[0090] The reservation unit 402 is configured to send a test frame based on the modulation and coding scheme indicated by the initial MCS sequence number, and determine that the current channel reservation is successful if an ACK frame corresponding to the test frame is received within a preset time period;

[0091] The reservation unit 402 is further configured to, if an ACK frame corresponding to the test frame is not received within a preset time, reduce the initial MCS sequence number according to a preset rule, and re-reserve the current channel according to the reduced MCS sequence number until the reservation is successful; wherein, the MCS sequence number is not further reduced when the current MCS sequence number is equal to a preset minimum MCS signal;

[0092] The sending unit 403 is configured to calculate the total duration of the data frame according to the MCS sequence number when the reservation is successful, and send the data frame within the total duration according to the modulation and coding scheme indicated by the MCS.

[0093] In one or more possible embodiments, the test frame is an empty data frame, the PV_TYPE field value of the reservation frame is equal to 10, the PV_SUBTYPE field value is equal to 0100, and the test frame does not include Address4, QoS Control, HTControl, and FrameBody.

[0094] In one or more possible embodiments, lowering the initial MCS number according to a preset rule includes:

[0095] If the current channel fails to reserve n times, the current MCS number is reduced by 1, where n is an integer greater than or equal to 1.

[0096] In one or more possible embodiments, it further includes:

[0097] The setting unit is used to set the initial MCS sequence number and the maximum MCS sequence number of the data frame according to bandwidth requirements, signal quality and retransmission conditions.

[0098] In one or more possible embodiments, sending the data frame within the total duration according to the modulation and coding scheme indicated by the MCS includes:

[0099] When the data frame is sent, it is detected whether the total duration has ended. If so, that is, the transmission duration of the data frame is equal to the total duration, no CF-END frame is sent;

[0100] If not, send a CF-END frame.

[0101] In one or more possible embodiments, if the buffer is not empty, it is determined that there is a data frame to be sent in the buffer.

[0102] In one or more possible embodiments, it further includes:

[0103] The contention unit is used to abandon the current channel and execute the backoff algorithm to compete for the channel again if the current MCS sequence number has dropped to the minimum value and the ACK frame has not been received.

[0104] It should be noted that the device 4 provided in the above embodiment, when performing the method for transmitting WiFi data, is illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the above functions. In addition, the WiFi data transmission device and the WiFi data transmission method provided in the above embodiment are based on the same concept. The implementation process is detailed in the method embodiment and will not be repeated here.

[0105] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0106] The present application also provides a computer storage medium that can store multiple instructions, which are suitable for being loaded and executed by a processor as described above. Figure 2 The method steps of the embodiment shown, the specific execution process can be found in Figure 2 The detailed description of the illustrated embodiment will not be repeated here.

[0107] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the WiFi data sending method described in the above embodiments.

[0108] See Figure 5 , provides a schematic diagram of the structure of a WiFi device according to an embodiment of the present application. Figure 5 As shown, the WiFi device 500 may include: at least one processor 501 , at least one network interface 504 , a user interface 503 , a memory 505 , and at least one communication bus 502 .

[0109] The communication bus 502 is used to implement the connection and communication between these components.

[0110] The user interface 503 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 503 may also include a standard wired interface and a wireless interface.

[0111] The network interface 504 may optionally include a WI-FI interface.

[0112] The processor 501 may include one or more processing cores. The processor 501 utilizes various interfaces and circuits to connect various components within the WiFi device 500. It executes instructions, programs, code sets, or instruction sets stored in the memory 505, and accesses data stored in the memory 505 to perform various functions and process data within the WiFi device 500. Optionally, the processor 501 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 501 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing content displayed on the display; and the modem handles wireless communications. It is understood that the modem may not be integrated into the processor 501 and may be implemented as a separate chip.

[0113] Among them, the memory 505 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 505 includes a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 505 may also be optionally at least one storage device located away from the aforementioned processor 501. As Figure 5 As shown, the memory 505 as a computer storage medium may include an operating system, a network communication module, a user interface module and an application program.

[0114] exist Figure 5 In the WiFi device 500 shown, the user interface 503 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 501 can be used to call the application stored in the memory 505 and specifically execute the following Figure 2 The specific process can be referred to the method shown in Figure 2 As shown, no further details are given here.

[0115] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory, or a random access memory.

[0116] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A method for transmitting WiFi data, characterized in that: include: When detecting that there is a data frame to be sent, performing CCA on the current channel, and if the current channel is assessed to be idle according to the CCA result, obtaining the initial MCS sequence number of the data frame; Sending a test frame based on the modulation and coding scheme indicated by the initial MCS sequence number, and determining that the current channel reservation is successful if an ACK frame corresponding to the test frame is received within a preset time length; If an ACK frame corresponding to the test frame is not received within a preset time, the initial MCS number is reduced according to a preset rule, and the current channel is re-reserved according to the reduced MCS number until the reservation is successful; wherein, the MCS number is not further reduced when the current MCS number is equal to the preset minimum MCS signal; The total duration of the data frame is calculated according to the MCS sequence number when the reservation is successful, and the data frame is sent within the total duration according to the modulation and coding scheme indicated by the MCS.

2. The method according to claim 1, characterized in that The test frame is an empty data frame, the PV_TYPE field value of the reservation frame is equal to 10, the PV_SUBTYPE field value is equal to 0100, and the test frame does not include Address4, QoSControl, HTControl and FrameBody.

3. The method according to claim 1 or 2, characterized in that The step of reducing the initial MCS number according to a preset rule includes: If the current channel fails to reserve n times, the current MCS number is reduced by 1, where n is an integer greater than or equal to 1.

4. The method according to claim 3, characterized in that When detecting that there is a data frame to be sent, performing CCA on the current channel, and if the current channel is evaluated to be idle according to the CCA result, before obtaining the initial MCS sequence number of the data frame, the method further includes: The initial MCS sequence number and the maximum MCS sequence number of the data frame are set according to bandwidth requirements, signal quality and retransmission conditions.

5. The method according to claim 1, 2 or 4, characterized in that: The sending of the data frame within the total duration according to the modulation and coding scheme indicated by the MCS includes: When the data frame is sent, it is detected whether the total duration has ended. If so, that is, the transmission duration of the data frame is equal to the total duration, no CF-END frame is sent; If not, send a CF-END frame.

6. The method according to claim 5, characterized in that If the buffer is not empty, it is determined that there are data frames to be sent in the buffer.

7. The method according to claim 6, characterized in that Also includes: If the current MCS sequence number has dropped to the minimum value and the ACK frame has not been received, the current channel is abandoned and the backoff algorithm is executed to compete for the channel again.

8. A device for transmitting WiFi data, characterized in that: include: a detection unit, configured to perform CCA on the current channel when detecting the presence of a data frame to be sent, and if the current channel is assessed to be idle according to the CCA result, obtain an initial MCS sequence number of the data frame; A reservation unit, configured to send a test frame based on the modulation and coding scheme indicated by the initial MCS sequence number, and determine that the current channel reservation is successful if an ACK frame corresponding to the test frame is received within a preset time length; The reservation unit is further configured to, if an ACK frame corresponding to the test frame is not received within a preset time, reduce the initial MCS sequence number according to a preset rule, and re-reserve the current channel according to the reduced MCS sequence number until the reservation is successful; wherein, the MCS sequence number is not further reduced when the current MCS sequence number is equal to a preset minimum MCS signal; The sending unit is used to calculate the total duration of the data frame according to the MCS sequence number when the reservation is successful, and send the data frame within the total duration according to the modulation and coding scheme indicated by the MCS.

9. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, which are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 7.

10. A WiFi device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Modulation coding mode and repetition number selection method and device

    CN109687937A

  • MCS adjustment method and device, storage medium and wireless node

    CN112994848A

  • Method and apparatus for avoiding network precoding adjustments during band sharing MSIM scenarios

    CN117837110A

  • Method for clear channel assessment optimization in a wireless local area network

    US20050152313A1

Cited By

  • WiFi data frame sending method and device, storage medium and WiFi equipment

    CN120583464A

  • Method, device, storage medium and WiFi device for transmitting WiFi data frame

    CN120583464B