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

By using initialization status flags and dynamic MCS sequence number adjustment in wireless communication, the problems of transmission errors and channel capacity fluctuations caused by sudden interference are solved, enabling rapid recovery of the appropriate rate and improving the stability and efficiency of the communication system.

CN120583464BActive Publication Date: 2026-06-26ZHUHAI HUGE IC CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHUHAI HUGE IC CO LTD
Filing Date
2025-06-26
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In wireless communication, sudden interference can lead to increased transmission error rates, large fluctuations in channel capacity, and slow rate recovery after the interference disappears, thus affecting user experience.

Method used

Different stages are distinguished by initializing status flags, the modulation and coding strategy (MCS sequence number) is dynamically adjusted, and the data frame transmission process is optimized by combining the RTS frame reservation channel and time rules.

Benefits of technology

It effectively reduces transmission errors, stabilizes channel capacity, quickly restores appropriate transmission rates, and improves the performance and stability of wireless communication systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120583464B_ABST
    Figure CN120583464B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a WiFi data frame sending method and device, a storage medium and a WiFi device, and relates to the wireless communication field. Through a reasonable initialization process, an MCS serial number adjustment strategy based on different states and data frame types, and time rule judgment, the embodiment of the application effectively solves the problems of low transmission correctness, large channel capacity fluctuation and slow rate recovery after interference disappearance caused by burst interference in the background technology, and improves the performance and stability of the wireless communication system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of wireless communication, and in particular to a method, apparatus, storage medium, and WiFi device for transmitting WiFi data frames. Background Technology

[0002] Ideally, in an interference-free or stable environment, the goal of rate adjustment is usually to bring the communication system to its highest achievable rate in order to make full use of channel resources and achieve efficient data transmission.

[0003] However, real-world application environments are far more complex than ideal environments, and the most prominent challenge is handling sudden interference. In actual wireless communication scenarios, various electronic devices, physical obstacles, and constantly changing electromagnetic environments can all lead to sudden interference. These sudden interferences are random and unpredictable, and their intensity, duration, and frequency are difficult to control precisely.

[0004] From a communication principle perspective, high-speed transmission often implies more complex modulation and coding methods, resulting in relatively weaker signal resistance to interference. When encountering sudden interference, data frames transmitted at high speeds are more susceptible to interference, leading to a sharp increase in data transmission error rates. To address this issue, a common practice is to drastically reduce the transmission rate to a very low value after detecting sudden interference. While this approach can ensure data transmission accuracy to some extent because low-speed transmission typically employs simpler modulation and coding methods, resulting in stronger signal robustness and higher tolerance to interference, this approach is not universally applicable.

[0005] However, this approach also brings significant problems. When the transmission rate drops drastically, channel capacity can fluctuate suddenly and dramatically. Channel capacity is a crucial indicator of a channel's data transmission capability, and such large fluctuations can significantly impact applications that rely on stable data transmission. For example, for applications like real-time video calls and online games, which have extremely high requirements for data transmission latency and stability, sudden fluctuations in channel capacity can lead to video stuttering, increased game latency, or even disconnections, severely affecting the user experience.

[0006] Furthermore, how to quickly restore the transmission rate to an appropriate level after the sudden interference disappears, so as to make full use of channel resources again, is also an urgent problem to be solved. If the rate recovery is too slow, the channel resources will remain inefficiently utilized for a long time; while if the rate recovery is too fast, it may encounter sudden interference again, leading to data transmission errors and falling into a vicious cycle of repeated rate adjustments.

[0007] Therefore, how to effectively deal with sudden interference while ensuring the correctness of data transmission, avoid sudden large fluctuations in channel capacity, and restore a suitable transmission rate as soon as possible after the sudden interference disappears has become a technical problem that urgently needs to be solved in the field of wireless communication. Summary of the Invention

[0008] This application provides a method, apparatus, storage medium, and WiFi device for transmitting WiFi data frames, which can solve the problem in the prior art of not being able to effectively adjust the transmission rate when dealing with sudden interference. The technical solution is as follows:

[0009] In a first aspect, embodiments of this application provide a method for transmitting WiFi data frames, the method comprising:

[0010] After power-on, the initialization status flag is set to the first value, the latest preset number of transmitted data frames’ MCS sequence number and transmission status are obtained, the optimal MCS sequence number is determined based on the statistical results, and the initialization status flag is set to the second value after the optimal MCS sequence number is determined.

[0011] When a current data frame to be sent is detected, determine whether the initialization status flag is equal to the second value;

[0012] If the initialization status flag is equal to the second value, determine whether the current data frame is the first transmitted data frame; if not, send an RTS frame before sending the current data frame; if yes, determine whether the length of the current data frame is greater than the length threshold; if yes, send an RTS frame before sending the current data frame to reserve the channel; if not, do not send an RTS frame before sending the current data frame.

[0013] If the initialization status flag is equal to the first value, an RTS frame is sent before sending the current data frame;

[0014] When the transmission time of the current data frame is detected, it is determined whether the initialization status flag is equal to the second value;

[0015] If the initialization status flag is equal to the first value, determine whether the current data frame is a retransmitted data frame; if yes, reduce the preset step size based on the previously used MCS sequence number, and then send the current data frame according to the reduced MCS sequence number; if no, send the current data frame using the preset maximum MCS sequence number.

[0016] If the initialization status flag is equal to the second value, determine whether the current data frame is the first transmitted data frame; if yes, send the current data frame using the pre-stored optimal MCS sequence number; if no, determine whether the preset time rule is met based on the transmission time of the current data frame; if yes, increase the preset step size based on the optimal MCS sequence number, and send the current data frame using the increased MCS sequence number; if no, decrease the preset step size based on the MCS sequence number used in the last transmission, and send the current data frame using the decreased MCS sequence number.

[0017] Secondly, embodiments of this application provide a WiFi data frame transmission apparatus, the apparatus comprising:

[0018] The statistics unit is used to set the initialization status flag to a first value after power-on, obtain the latest preset number of MCS sequence numbers and transmission status of transmitted data frames, determine the optimal MCS sequence number based on the statistical results, and set the initialization status flag to a second value after determining the optimal MCS sequence number.

[0019] The RTS determination unit is used to determine whether the initialization status flag is equal to the second value when there is a current data frame to be sent.

[0020] If the initialization status flag is equal to the second value, determine whether the current data frame is the first transmitted data frame; if not, send an RTS frame before sending the current data frame; if yes, determine whether the length of the current data frame is greater than the length threshold; if yes, send an RTS frame before sending the current data frame to reserve the channel; if not, do not send an RTS frame before sending the current data frame.

[0021] If the initialization status flag is equal to the first value, an RTS frame is sent before sending the current data frame;

[0022] A rate control unit is used to determine whether the initialization status flag is equal to a second value when the transmission time of the current data frame is detected.

[0023] If the initialization status flag is equal to the first value, determine whether the current data frame is a retransmitted data frame; if yes, reduce the preset step size based on the previously used MCS sequence number, and then send the current data frame according to the reduced MCS sequence number; if no, send the current data frame using the preset maximum MCS sequence number.

[0024] If the initialization status flag is equal to the second value, determine whether the current data frame is the first transmitted data frame; if yes, send the current data frame using the pre-stored optimal MCS sequence number; if no, determine whether the preset time rule is met based on the transmission time of the current data frame; if yes, increase the preset step size based on the optimal MCS sequence number, and send the current data frame using the increased MCS sequence number; if no, decrease the preset step size based on the MCS sequence number used in the last transmission, and send the current data frame using the decreased MCS sequence number.

[0025] Thirdly, embodiments of this application provide a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the above-described method steps.

[0026] Fourthly, embodiments of this application provide a WiFi device, which may include: a processor and a memory; wherein the memory stores a computer program, the computer program being adapted to be loaded by the processor and to execute the above-described method steps.

[0027] The beneficial effects of the technical solutions provided in some embodiments of this application include at least the following:

[0028] By employing a reasonable initialization process, an MCS sequence number adjustment strategy based on different states and data frame types, and time rule judgment, the problems of low transmission accuracy, large channel capacity fluctuations, and slow rate recovery after interference disappearance caused by sudden interference in the background technology are effectively solved, thereby improving the performance and stability of the wireless communication system. Attached Figure Description

[0029] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0030] Figure 1 This is a schematic diagram of the network architecture provided in the embodiments of this application;

[0031] Figure 2 This is a flowchart illustrating the WiFi data frame transmission method provided in an embodiment of this application;

[0032] Figure 3 This is a schematic diagram of the structure of a WiFi data frame transmitting device provided in this application;

[0033] Figure 4 This is a schematic diagram of the computer storage medium provided in this application;

[0034] Figure 5 This is a schematic diagram of the structure of a WiFi device provided in this application. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0036] It should be noted that the WiFi data frame transmission method provided in this application is generally executed by a WiFi device, and correspondingly, the WiFi data frame transmission device is generally located in the WiFi device.

[0037] Figure 1 An exemplary network architecture is shown that can be applied to the WiFi data frame transmission method or WiFi data frame transmission apparatus of this application.

[0038] like Figure 1 As shown, the network architecture may include: a station 101 and an access point 102, with the access point 102 and the station 101 communicating via a wireless link based on the WiFi protocol. The WiFi device in this application may be either the access point 102 or the station 101, and the access point 102 and the station 101 transmit WiFi data frames to each other.

[0039] Site 101 has a display for various WiFi devices, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0040] It should be understood that Figure 1 The number of access points, networks, and sites shown is for illustrative purposes only. The number can be any number, depending on implementation needs.

[0041] Please see Figure 2 This is a flowchart illustrating a method for sending WiFi data frames, as provided in this application embodiment. Figure 2 As shown, the method described in this application embodiment may include the following steps:

[0042] S201. After power-on, set the initialization status flag to the first value, obtain the MCS sequence number and transmission status of the latest preset number of transmitted data frames, determine the optimal MCS sequence number based on the statistical results, and set the initialization status flag to the second value after determining the optimal MCS sequence number.

[0043] When the WiFi device acting as the transmitter powers on, it first sets the initialization status flag to the first value, indicating that the device is in the initialization phase and has not yet completed the determination of the Optimal Modulation and Coding Scheme (MCS) sequence number. Subsequently, the device retrieves the latest preset number (e.g., the most recent 100) of transmitted data frames' MCS sequence numbers and corresponding transmission status information from its storage area. This transmission status includes both successful and failed transmissions. After obtaining this statistical data, the device performs comprehensive analysis based on a specific algorithm. For example, it counts the number of successfully transmitted data frames under each MCS sequence number and calculates the average transmission success rate for each MCS sequence number. Through these statistical results, the device can select the MCS sequence number that performs best in the current network environment. After successfully determining the optimal MCS sequence number, the device sets the initialization status flag to the second value, marking the end of the initialization phase and the device entering normal operation. Subsequent data transmission will be adjusted accordingly based on this optimal MCS sequence number.

[0044] Optionally, the first value is 0 and the second value is 1. The initialization status flag is 0 to indicate that initialization is not complete, and the initialization status flag is 1 to indicate that initialization is complete.

[0045] For example: Assume a preset quantity of 100 transmitted data frames. After the WiFi device powers on, the initialization status flag is set to the first value. The device reads the MCS sequence number and transmission status of these 100 data frames from storage and finds that the data frame with MCS sequence number 5 was successfully transmitted in 80 out of the 100 data frames, exhibiting the highest success rate. Therefore, the device determines MCS sequence number 5 as the optimal MCS sequence number and sets the initialization status flag to the second value; subsequent data transmissions will use this optimal MCS sequence number.

[0046] In some possible embodiments of this application, the method for determining the optimal MCS number includes:

[0047] When a WiFi device sends a data frame, it records the MCS (Multi-Segmentation Code) number used by the frame and starts a timer to track the entire process from the start of transmission to successful transmission or acknowledgment timeout. For each MCS number, the device maintains a cumulative transmission duration counter. Whenever a data frame using a specific MCS number is successfully transmitted (regardless of success), the device adds the transmission duration of that data frame to the cumulative transmission duration counter for the corresponding MCS number. If a data frame is discarded during transmission due to timeout, retransmission failure, or other reasons, its transmission duration is still included in the cumulative transmission duration to reflect the performance of that MCS number in the actual communication environment. The device also counts the cumulative data volume of successfully transmitted data frames corresponding to that MCS number. Additionally, the WiFi device maintains a cumulative successful data transmission volume counter for each MCS number. Whenever a data frame with a specific MCS sequence number is successfully received and acknowledged, the device will add the data volume of the data frame (usually in bytes) to the cumulative successful data transmission counter for the corresponding MCS sequence number. This helps to evaluate the data carrying capacity of different MCS sequence numbers under successful transmission conditions.

[0048] The actual transmission rate of each MCS sequence number is calculated based on the cumulative number of transmissions and the cumulative transmission duration: After obtaining the cumulative transmission duration and the cumulative amount of successfully transmitted data for each MCS sequence number, the WiFi device calculates the actual transmission rate for each MCS sequence number. The actual transmission rate is obtained by dividing the cumulative amount of successfully transmitted data by the cumulative transmission duration, and the unit is usually bits per second (bps) or megabits per second (Mbps). This process takes into account both the success rate of data frame transmission and the transmission duration, and can more accurately reflect the transmission performance of different MCS sequence numbers in a real communication environment.

[0049] The optimal MCS number is selected based on its actual transmission rate: After calculating the actual transmission rates of all MCS numbers, the WiFi device compares them and identifies the MCS number with the highest actual transmission rate. This MCS number is considered the optimal MCS number under the current communication environment because it provides the highest data transmission rate while ensuring a certain transmission success rate. The WiFi device then adjusts its modulation and coding strategy to prioritize the use of this optimal MCS number for data transmission, thereby optimizing communication performance.

[0050] In this embodiment, the WiFi device can dynamically select the optimal MCS sequence number based on the actual communication environment, thereby significantly improving the efficiency and reliability of data transmission. This adaptive modulation and coding strategy helps reduce transmission errors, lower the retransmission rate, and fully utilize the capacity of the wireless channel, providing users with a smoother and faster wireless communication experience.

[0051] S202. When a current data frame to be sent is detected, determine whether the initialization status flag is equal to the second value.

[0052] S203. If the initialization status flag is equal to the second value, determine whether the current data frame is the first transmitted data frame; if not, send an RTS frame before sending the current data frame; if yes, determine whether the length of the current data frame is greater than the length threshold; if yes, send an RTS frame before sending the current data frame to reserve the channel; if not, do not send an RTS frame before sending the current data frame.

[0053] It should be noted that in some other embodiments of this application, the RTS frame can be replaced with other types of frames, such as NULL frames, etc. The frame header has a duration field, which can play the same role as the RTS frame in reserving a channel.

[0054] S204. If the initialization status flag is equal to the first value, send an RTS frame before sending the current data frame.

[0055] During WiFi communication, the device continuously monitors for pending data frames. Upon detection, it first checks the initialization status flag. If the flag equals the second value, it indicates the device has determined the optimal MCS sequence number and entered normal operation. Next, it checks if the current data frame is the first transmitted frame. If not, meaning it was previously transmitted but failed (i.e., retransmitted), the device sends a Request to Send (RTS) frame before transmitting the current frame. The RTS frame signals other WiFi devices that it is about to use the channel to transmit data, requesting silence to avoid channel conflicts. If the frame is the first transmitted frame, the device checks if its length exceeds a pre-set threshold. If it does, the frame is large and will occupy the channel for a longer time. To ensure successful transmission and reduce transmission failures due to channel conflicts, an RTS frame is sent before the current frame to reserve the channel. If the data frame length is no greater than the length threshold, the risk of transmission failure is relatively low because the data frame is small and occupies the channel for a short time. Therefore, no RTS frame is sent before sending the current data frame. If the initialization status flag is equal to the first value, it means that the device is still in the initialization phase and the optimal MCS sequence number has not yet been determined. In this case, in order to ensure that the data frame can be successfully sent, an RTS frame will be sent before sending the current data frame, regardless of whether the current data frame is the first transmission or a retransmission, in order to avoid channel collisions as much as possible.

[0056] For example: Assume the initialization status flag is 1, the current data frame is the first transmitted data frame, the length threshold is 1000 bytes, and the current data frame length is 1200 bytes. Because the data frame length exceeds the length threshold, the WiFi device will send an RTS frame to reserve the channel before sending this data frame. If the initialization status flag is 0, the device will send an RTS frame before sending the data frame, regardless of whether it is the first transmission or a retransmission.

[0057] In some possible embodiments of this application, a frame buffer is provided in the WiFi device. The frame buffer is a key data storage area used to temporarily store data frames to be sent. When the WiFi device starts up and enters normal operating mode, it continuously monitors the frame buffer in real time. The device detects the status of the frame buffer through specific hardware circuits and software algorithms; specifically, it checks whether there are valid data frames stored in the frame buffer. Once it detects that the frame buffer is not empty, meaning that at least one data frame in the frame buffer is waiting to be processed and sent, the WiFi device can determine that there is a current data frame to be sent.

[0058] This embodiment determines the existence of a current data frame to be sent by real-time detection of whether the frame buffer is empty. This mechanism ensures that WiFi devices can promptly detect data that needs to be sent, avoiding network latency caused by excessive data waiting time. Furthermore, this frame buffer-based judgment method is simple and efficient, requiring no complex calculations or additional communication overhead, and can quickly respond to data transmission requests.

[0059] S205. When the transmission time of the current data frame is detected, determine whether the initialization status flag is equal to the second value.

[0060] S206. If the initialization status flag is equal to the first value, determine whether the current data frame is a retransmitted data frame. If yes, reduce the preset step size based on the MCS sequence number used last time, and then send the current data frame according to the reduced MCS sequence number. If no, send the current data frame using the preset maximum MCS sequence number.

[0061] It should be noted that in some other embodiments of this application, in addition to adjusting the MCS mentioned in the above embodiments, the bandwidth, guard interval (i.e., GI), number of spatial streams and other rate parameter values ​​can also be adjusted. The adjustment method is the same as the adjustment process of MCS, and will not be repeated here.

[0062] S207. If the initialization status flag is equal to the second value, determine whether the current data frame is the first transmitted data frame. If yes, send the current data frame using the pre-stored optimal MCS sequence number. If no, determine whether the preset time rule is met based on the transmission time of the current data frame. If yes, increase the preset step size based on the optimal MCS sequence number and send the current data frame using the increased MCS sequence number. If no, decrease the preset step size based on the MCS sequence number used in the last transmission and send the current data frame using the decreased MCS sequence number.

[0063] When the WiFi device (sender) detects that the transmission time of the current data frame has arrived, it will again check the value of the initialization status flag. The preset step size can be one or more increments, for example, increasing by two MCS numbers or decreasing by two MCS numbers.

[0064] If the initialization status flag is equal to the first value, it means the device is still in the initialization phase. At this time, the device will determine whether the current data frame is a retransmission frame. If the current data frame is a retransmission frame, it means that the previous transmission of this data frame using a certain MCS sequence number failed. To increase the probability of successful transmission this time, the device will reduce the preset step size (e.g., reduce it by 1 level) based on the previously used MCS sequence number, and then send the current data frame according to the reduced MCS sequence number. If the current data frame is not a retransmission frame, that is, it is the first transmission frame. Since the device is in the initialization phase and the optimal MCS sequence number has not yet been determined, in order to maximize the data transmission rate, the device will use the preset maximum MCS sequence number to send the current data frame.

[0065] If the initialization status flag is equal to the second value, it indicates that the device has completed the determination of the optimal MCS sequence number. At this time, the device will also determine whether the current data frame is a retransmission frame. If the current data frame is the first transmitted data frame, the device will use the pre-stored optimal MCS sequence number to send the current data frame, because the optimal MCS sequence number performed best in previous statistics, and using it can improve the probability of successful transmission of the retransmission frame.

[0066] If the current data frame is not the first transmitted data frame, the device will determine whether the preset timing rule is met based on the transmission time of the current data frame. The purpose of determining whether the timing rule is met is that, in situations where the channel environment changes frequently and randomly, the channel environment may improve when the transmission time of the current data frame arrives. The preset timing rule is to attempt transmission at regular intervals (e.g., every 10 seconds). When this time interval condition is met, the device will first attempt to transmit the current data frame using a higher MCS sequence number. Specifically, if the preset timing rule is met, the device will increase the preset step size (e.g., increase by one level) based on the optimal MCS sequence number and use the increased MCS sequence number to transmit the current data frame, hoping to further improve the data transmission rate when the channel environment is better. If the preset timing rule is not met, it means that it is not yet time to try using a higher MCS sequence number. To reduce the risk of transmission failure, the device will decrease the preset step size (e.g., decrease by one level) based on the MCS sequence number used in the last transmission and use the decreased MCS sequence number to transmit the current data frame, ensuring relatively reliable data transmission in the current relatively stable channel environment.

[0067] Regardless of whether the initialization status flag is 0 or 1, if the current data frame fails to be transmitted, the device will retransmit it according to the preset number of retransmissions. For example, if the preset number of retransmissions is 3, after the first transmission fails, the device will reselect the MCS sequence number according to the above rules for a second transmission; if the second transmission also fails, the device will select the MCS sequence number again according to the rules for a third transmission; if the third transmission still fails, the device may abandon the transmission of the data frame or take other error handling mechanisms, such as reporting the transmission failure information to the upper layer protocol.

[0068] For example: Assume the initialization status flag is 0, the current data frame is a retransmission frame, the last used MCS sequence number was 7, and the preset step size is 1. The device will lower the MCS sequence number by one level from 7, that is, use MCS sequence number 6 to send the current data frame. If this transmission fails, and the preset retransmission count is 3, the device will adjust the MCS sequence number again according to the rules (for example, further lower it from MCS sequence number 6) for a second retransmission.

[0069] If the initialization status flag is 1, the current data frame is not the first transmitted data frame, and the preset time rule is to attempt to increase the MCS sequence number every 10 seconds, and 12 seconds have passed since the last attempt to increase the MCS sequence number, the time rule is met, the optimal MCS sequence number is 5, and the preset step size is 1. The device will increase the MCS sequence number by one level from 5, using MCS sequence number 6 to send the current data frame. If this transmission fails, the device will perform subsequent retransmission operations according to the preset retransmission count (e.g., 3 times), and reselect the MCS sequence number according to the rule for each retransmission. If the time rule is not met, and the previous transmission used MCS sequence number 4, with a preset step size of 1, the device will decrease the MCS sequence number by one level from 4, using MCS sequence number 3 to send the current data frame. If the transmission fails, retransmission will also be performed according to the retransmission count.

[0070] In one possible embodiment of this application, the sending time of the current data frame is hashed, and the result of the hash operation is compared with a preset value and a remainder operation is performed. If the remainder is equal to 0, it is determined that the preset time rule is met; if the remainder is not equal to 0, the preset time rule is not met.

[0071] When a WiFi device prepares to send a data frame, it first obtains the transmission time of the frame, which is typically recorded using the device's internal high-precision clock. The device then uses this transmission time as input to perform a hash operation. A hash operation is an algorithm that maps input data of arbitrary length to a fixed-length output (hash value), and its output is unique and irreversible. Through the hash operation, the device converts the transmission time into a unique hash value, providing a basis for subsequent time rule verification.

[0072] The hash calculation result is compared with a preset value using a modulo operation: The device internally sets a preset value, which serves as the benchmark for time rule verification. The device performs a modulo operation between the hash value obtained in the previous step and this preset value. The result of the modulo operation is an integer between 0 and the preset value minus 1, reflecting the relative relationship between the hash value and the preset value.

[0073] The device checks if the result of the remainder operation is equal to 0. If the remainder is equal to 0, it indicates that the transmission time of the current data frame meets the preset time rule, that is, the time meets a certain periodicity or specific interval requirement. If the remainder is not equal to 0, it indicates that the transmission time of the current data frame does not meet the preset time rule, and it needs to wait for the next time that meets the conditions before transmitting.

[0074] This embodiment, by executing the aforementioned time rule verification process, ensures that WiFi devices send data frames within specific time intervals or periods, thereby meeting the needs of certain time-sensitive applications. This time rule verification method based on hash and modulo operations guarantees both the accuracy and efficiency of the verification.

[0075] This application includes the following beneficial effects:

[0076] During the initialization phase (when the initialization status flag is set to the first value), the first transmitted data frame is sent using the preset maximum MCS sequence number. If it is a retransmitted data frame, it is sent with a preset step size reduced from the previous MCS sequence number. This strategy enhances anti-interference capability by gradually reducing the MCS sequence number in the initial phase, ensuring that retransmission can be performed with a more robust MCS sequence number when sudden interference causes transmission failure. This improves data transmission accuracy and effectively addresses the impact of sudden interference on high-speed transmission.

[0077] After initialization is complete (initialization status flag is set to the second value), retransmitted data frames are sent using the pre-stored optimal MCS sequence number. This optimal MCS sequence number is determined based on historical statistical results, taking into account channel conditions and transmission performance. While ensuring a certain transmission rate, it also has good anti-interference capabilities, further guaranteeing the correctness of data transmission.

[0078] During the initialization phase, different MCS sequence number adjustment strategies are selected based on whether the data frame is a retransmission data frame. This avoids frequent retransmissions caused by blindly using high MCS sequence numbers, thereby reducing the invalid occupation of channel resources and fluctuations in channel capacity.

[0079] After initialization, for non-initial data frames, the MCS sequence number is adjusted based on whether a preset time rule is met. When the time rule is met, the transmission is performed with a preset step size increased based on the optimal MCS sequence number to fully utilize channel capacity. When the time rule is not met, the transmission is performed with a preset step size decreased based on the MCS sequence number used in the previous transmission to avoid sudden drops in channel capacity caused by data transmission errors due to sudden interference or changes in channel conditions. This dynamic adjustment of the MCS sequence number allows channel capacity to smoothly transition according to actual channel conditions, reducing large fluctuations.

[0080] After initialization, the system transmits data based on the optimal MCS sequence number. When a preset time rule is detected, the system increases the preset step size based on the optimal MCS sequence number and attempts to send data frames at a higher rate. This indicates that when the channel conditions are confirmed to be good, the system can quickly increase the transmission rate, recover to a near-optimal transmission state as soon as possible, make full use of channel resources, and improve data transmission efficiency.

[0081] The entire technical solution distinguishes different stages by initialization status flags. After initialization, it makes flexible adjustments based on the optimal MCS sequence number and preset rules. This allows the system to quickly and reasonably adjust the transmission rate according to changes in channel conditions after dealing with sudden interference, avoiding prolonged periods of inefficient transmission and achieving a rapid recovery of a suitable transmission rate while ensuring transmission accuracy.

[0082] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.

[0083] Please see Figure 3 This diagram illustrates the structure of a WiFi data frame transmitting apparatus provided in an exemplary embodiment of this application, hereinafter referred to as apparatus 3. Apparatus 3 can be implemented as all or part of a WiFi device through software, hardware, or a combination of both. Apparatus 3 includes: a statistics unit 301, an RTS determination unit 302, and a rate control unit 303.

[0084] The statistics unit 301 is used to set the initialization status flag to a first value after power-on, obtain the latest preset number of MCS sequence numbers and transmission status of transmitted data frames, determine the optimal MCS sequence number based on the statistical results, and set the initialization status flag to a second value after determining the optimal MCS sequence number.

[0085] RTS determination unit 302 is used to determine whether the initialization status flag bit is equal to the second value when a current data frame to be sent is detected.

[0086] If the initialization status flag is equal to the second value, determine whether the current data frame is the first transmitted data frame; if not, send an RTS frame before sending the current data frame; if yes, determine whether the length of the current data frame is greater than the length threshold; if yes, send an RTS frame before sending the current data frame to reserve the channel; if not, do not send an RTS frame before sending the current data frame.

[0087] If the initialization status flag is equal to the first value, an RTS frame is sent before sending the current data frame;

[0088] The rate control unit 303 is used to determine whether the initialization status flag is equal to the second value when the transmission time of the current data frame is detected.

[0089] If the initialization status flag is equal to the first value, determine whether the current data frame is a retransmitted data frame; if yes, reduce the preset step size based on the previously used MCS sequence number, and then send the current data frame according to the reduced MCS sequence number; if no, send the current data frame using the preset maximum MCS sequence number.

[0090] If the initialization status flag is equal to the second value, determine whether the current data frame is the first transmitted data frame; if yes, send the current data frame using the pre-stored optimal MCS sequence number; if no, determine whether the preset time rule is met based on the transmission time of the current data frame; if yes, increase the preset step size based on the optimal MCS sequence number, and send the current data frame using the increased MCS sequence number; if no, decrease the preset step size based on the MCS sequence number used in the last transmission, and send the current data frame using the decreased MCS sequence number.

[0091] In one or more possible embodiments, determining the optimal MCS number based on statistical results includes:

[0092] Calculate the cumulative transmission time of the data frames corresponding to each MCS sequence number, and calculate the cumulative data volume of the successfully transmitted data frames corresponding to that MCS sequence number.

[0093] The actual transmission rate of each MCS sequence number is calculated based on the cumulative quantity and cumulative transmission duration.

[0094] The MCS number with the highest actual transmission rate is selected as the optimal MCS number.

[0095] In one or more possible embodiments, the sending time of the current data frame is hashed, and the hash result is compared with a preset value and a remainder operation is performed. If the remainder is equal to 0, it is determined that the preset time rule is met; if the remainder is not equal to 0, the preset time rule is not met.

[0096] In one or more possible embodiments, the preset step size is equal to 1.

[0097] In one or more possible embodiments, when the frame buffer is detected to be non-empty, it is determined that there is a current data frame to be sent.

[0098] In one or more possible embodiments, it is determined whether the data frame is a retransmitted data frame based on the value of the frame type flag bit in the current data frame.

[0099] In one or more possible embodiments, the first value is equal to 0 and the second value is equal to 1.

[0100] It should be noted that the device 3 provided in the above embodiments, when executing the WiFi data frame transmission method, is only illustrated by the division of the above functional modules. In practical 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 frame transmission device and the WiFi data frame transmission method embodiments provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments, which will not be repeated here.

[0101] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0102] See Figure 4 This application provides a computer storage medium, which can be a disk, optical disk, magnetic tape, or USB flash drive, etc. The computer storage medium can store multiple instructions (i.e., computer programs), which are adapted to be loaded and executed by a processor as described above. Figure 1 The method steps of the illustrated embodiment can be found in the following documentation for detailed execution. Figure 1 The specific details of the illustrated embodiments will not be elaborated here.

[0103] This application also provides a computer program product that stores at least one instruction, which is loaded and executed by the processor to implement the WiFi data frame transmission method described in the above embodiments.

[0104] Please see Figure 5 This is a schematic diagram of the structure of a WiFi device provided in an embodiment of this application. Figure 5 As shown, the WiFi device 500 may include: at least one processor 501, at least one network interface 504, user interface 503, memory 505, and at least one communication bus 502.

[0105] The communication bus 502 is used to enable communication between these components.

[0106] The user interface 503 may include a display screen and a camera. Optionally, the user interface 503 may also include a standard wired interface and a wireless interface.

[0107] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0108] The processor 501 may include one or more processing cores. The processor 501 connects to various parts within the terminal 500 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 505, and by calling data stored in the memory 505. Optionally, the processor 501 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 501 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor 501.

[0109] The memory 505 may include random access memory (RAM) or read-only memory. Optionally, the memory 505 may include a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, code, 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 touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 505 may also be at least one storage device located remotely from the aforementioned processor 501. Figure 5 As shown, the memory 505, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and application programs.

[0110] exist Figure 5In the WiFi device 500 shown, the user interface 503 is mainly used to provide an input interface for the user and to obtain user input data. The processor 501 can be used to call the application program stored in the memory 505 and specifically execute... Figure 2 The method shown can be referred to for details. Figure 2 As shown, it will not be elaborated further here.

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

[0112] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.

Claims

1. A method for transmitting WiFi data frames, characterized in that, include: After power-on, the initialization status flag is set to the first value, the latest preset number of transmitted data frames’ MCS sequence numbers and transmission status are obtained, the optimal MCS sequence number is determined based on the statistical results, and the initialization status flag is set to the second value after the optimal MCS sequence number is determined. When a current data frame to be sent is detected, determine whether the initialization status flag is equal to the second value; If the initialization status flag is equal to the second value, determine whether the current data frame is the first transmitted data frame. If not, send an RTS frame before sending the current data frame; If so, determine whether the length of the current data frame is greater than the length threshold; If yes, an RTS frame is sent to reserve the channel before sending the current data frame; if no, an RTS frame is not sent before sending the current data frame. If the initialization status flag is equal to the first value, an RTS frame is sent before sending the current data frame; When the transmission time of the current data frame is detected, it is determined whether the initialization status flag is equal to the second value; If the initialization status flag is equal to the first value, determine whether the current data frame is a retransmitted data frame. If so, reduce the preset step size based on the MCS sequence number used last time, and then send the current data frame according to the reduced MCS sequence number; If not, send the current data frame using the preset maximum MCS sequence number; If the initialization status flag is equal to the second value, determine whether the current data frame is a retransmitted data frame. If so, send the current data frame using the pre-stored optimal MCS sequence number; If not, determine whether the preset time rule is met based on the transmission time of the current data frame. If yes, increase the preset step size based on the optimal MCS sequence number and send the current data frame using the increased MCS sequence number. If not, decrease the preset step size based on the MCS sequence number used in the last transmission and send the current data frame using the decreased MCS sequence number.

2. The method according to claim 1, characterized in that, The process of determining the optimal MCS sequence number based on statistical results includes: Calculate the cumulative transmission time of the data frames corresponding to each MCS sequence number, and calculate the cumulative data volume of the successfully transmitted data frames corresponding to that MCS sequence number. The actual transmission rate of each MCS sequence number is calculated based on the cumulative quantity and cumulative transmission duration. The MCS number with the highest actual transmission rate is selected as the optimal MCS number.

3. The method according to claim 1 or 2, characterized in that, The sending time of the current data frame is hashed, and the hash result is compared with a preset value and then a remainder operation is performed. If the remainder is equal to 0, the preset time rule is satisfied; if the remainder is not equal to 0, the preset time rule is not satisfied.

4. The method according to claim 3, characterized in that, The preset step size is equal to 1.

5. The method according to claim 1, 2, or 4, characterized in that, When the frame buffer is detected to be non-empty, it is determined that there is a current data frame to be sent.

6. The method according to claim 5, characterized in that, Determine whether it is a retransmitted data frame based on the value of the frame type flag in the current data frame.

7. The method according to claim 1, 2, 4, or 6, characterized in that, The first value is equal to 0, and the second value is equal to 1.

8. A WiFi data frame transmitting device, characterized in that, include: The statistics unit is used to set the initialization status flag to a first value after power-on, obtain the latest preset number of MCS sequence numbers and transmission status of transmitted data frames, determine the optimal MCS sequence number based on the statistical results, and set the initialization status flag to a second value after determining the optimal MCS sequence number. The RTS determination unit is used to determine whether the initialization status flag is equal to the second value when there is a current data frame to be sent. If the initialization status flag is equal to the second value, determine whether the current data frame is the first transmitted data frame. If not, send an RTS frame before sending the current data frame; If so, determine whether the length of the current data frame is greater than the length threshold; If yes, an RTS frame is sent to reserve the channel before sending the current data frame; if no, an RTS frame is not sent before sending the current data frame. If the initialization status flag is equal to the first value, an RTS frame is sent before sending the current data frame; A rate control unit is used to determine whether the initialization status flag is equal to a second value when the transmission time of the current data frame is detected. If the initialization status flag is equal to the first value, determine whether the current data frame is a retransmitted data frame. If so, reduce the preset step size based on the MCS sequence number used last time, and then send the current data frame according to the reduced MCS sequence number; If not, send the current data frame using the preset maximum MCS sequence number; If the initialization status flag is equal to the second value, determine whether the current data frame is the first transmitted data frame. If so, send the current data frame using the pre-stored optimal MCS sequence number; If not, determine whether the preset time rule is met based on the transmission time of the current data frame. If yes, increase the preset step size based on the optimal MCS sequence number and send the current data frame using the increased MCS sequence number. If not, decrease the preset step size based on the MCS sequence number used in the last transmission and send the current data frame using the decreased MCS sequence number.

9. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, which are adapted to be loaded by a processor and executed as method steps as claimed in 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 adapted to be loaded by the processor and executed the method steps as claimed in any one of claims 1 to 7.