Anti-interference method and device for WiFi data transmission, storage medium and WiFi equipment
By introducing a destination MAC address determination and received signal power detection mechanism into WiFi devices, the problem of frequent interruptions caused by channel contention due to interference during data transmission is solved, achieving more efficient data transmission and reception control and improving communication efficiency and reliability.
Patent Information
- Application Number
- CN202411712534.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-11-27
AI Technical Summary
WiFi devices are susceptible to interference from other devices during data transmission, leading to frequent interruptions due to channel contention, resulting in high data transmission latency and reduced bandwidth, which affects network communication efficiency and user experience.
By determining the destination MAC address and the received signal power, the WiFi device is controlled to avoid unnecessary data reception and processing during the data frame reception process. A NAV timer decrement mechanism is used to compete for channel data and improve data transmission efficiency.
It significantly reduces data transmission latency and improves the efficiency and reliability of WiFi communication, especially in environments with strong interference.
Smart Images

Figure CN119584196B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication, and in particular to an anti-interference method, apparatus, storage medium, and WiFi device for WiFi data transmission. Background Technology
[0002] In a wireless local area network (WLAN), stations (STAs) within a basic service set (BSS) need to follow specific communication protocols to ensure efficient data transmission and proper channel utilization. Among these, Network Allocation Vector (NAV) and Clear Channel Assessment (CCA) are two key mechanisms that jointly maintain channel access order and communication efficiency.
[0003] In existing technologies, WiFi devices are susceptible to interference from other WiFi devices during data transmission, resulting in significant data transmission delays. For example: see... Figure 2 As shown, BSS1 includes AP1 and STA1, and BSS2 includes AP2, STA2, and STA3. The signal detection threshold (CCA_SD) for CCA is generally low. When STA2 and STA3 in BSS2 send data frames to AP2, these data frames may also be received by STA1 in the adjacent BSS1. Since the signal strength of these data frames is much greater than CCA_SD, it triggers STA1's receiving mechanism. This causes STA1 to be frequently interrupted during the CCA process, forcing it to stop competing for the channel to receive these data frames. After receiving, STA1 also needs to update its NAV value based on the duration field in the received data frame. If other STAs request a longer channel occupancy time, STA1 needs to wait for an additional time of NAV=0 before continuing CCA. This situation is particularly severe when interference frames are frequent. The continuous interruption of STA1's CCA process leads to a sharp increase in data transmission delay and a sharp decrease in bandwidth. Especially when the interference strength exceeds the receiving threshold, the bandwidth may drop to 0, severely impacting network communication efficiency and user experience. Therefore, an effective method is needed to solve this problem, in order to reduce the number of times STA is interrupted during CCA, and improve the efficiency of data transmission and bandwidth utilization. Summary of the Invention
[0004] This application provides an anti-interference method, apparatus, storage medium, and WiFi device for WiFi data transmission, which can solve the problems of low efficiency and high latency caused by interference in WiFi data transmission in related technologies. The technical solution is as follows:
[0005] In a first aspect, embodiments of this application provide an anti-interference method for WiFi data transmission, the method comprising:
[0006] The first WiFi device sends a current data frame to the second WiFi device;
[0007] The first WiFi device acquires data to be sent and detects a current value of a NAV timer; the NAV timer is decremented by 1 at a time unit;
[0008] When the current value of the NAV timer is equal to 0, the first WiFi device performs channel contention;
[0009] If the channel is successfully contended, the first WiFi device packs the data to be sent into a first data frame and sends the first data frame through the contended channel;
[0010] If a frame synchronization header of a second data frame from the second WiFi device is received before the channel is contended, the first WiFi device parses a destination MAC address carried in the frame synchronization header; if the MAC address does not satisfy: the destination MAC address is a broadcast address or the destination MAC address is a multicast address or the destination MAC address is the same as the MAC address of the first WiFi device, a received signal power of the current channel is measured; if the received signal power is less than a preset energy detection threshold, the first WiFi device stops receiving the second data frame and then continues to perform channel contention.
[0011] In a second aspect, an embodiment of the present application provides a WiFi data transmission device, which comprises:
[0012] An acquisition unit is configured to acquire data to be sent and detect a current value of a NAV timer; the NAV timer is decremented by 1 at a time unit;
[0013] A starting unit is configured to, when the current value of the NAV timer is equal to 0, the first WiFi device performs channel contention;
[0014] A packing unit is configured to, if the channel is successfully contended, the first WiFi device packs the data to be sent into a first data frame and sends the first data frame through the contended channel;
[0015] The anti-interference unit is configured to, if a frame synchronization header of a second data frame from a second WiFi device is received before competing for a channel, parse a destination MAC address carried in the frame synchronization header; if the MAC address does not satisfy: the destination MAC address is a broadcast address, or the destination MAC address is a multicast address, or the destination MAC address is the same as a MAC address of the first WiFi device, measure a received signal power of the current channel; if the received signal power is less than a preset energy detection threshold, the first WiFi device stops continuing to receive the second data frame, and then continues to perform channel competition.
[0016] In a fourth aspect, an embodiment of the present application provides a computer storage medium, which stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and performing the method steps described above.
[0017] In a fifth aspect, an embodiment of the present application provides a WiFi device, which can 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 performing the method steps described above.
[0018] The technical solutions provided by some embodiments of the present application have at least the following beneficial effects:
[0019] By introducing the judgment of the destination MAC address and the detection mechanism of the received signal power, intelligent control of the process of receiving data frames by the WiFi device is realized. This control mechanism not only reduces unnecessary data receiving and processing time, but also avoids the waste of continuing to receive invalid data frames under weak signal conditions, thereby significantly reducing the delay of data transmission and improving the efficiency and reliability of WiFi communication. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiment or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0021] Figure 1 is an architecture diagram of a WiFi wireless communication system provided by an embodiment of the present application;
[0022] Figure 2 is an interaction schematic diagram of an anti-interference method for WiFi data transmission provided by an embodiment of the present application;
[0023] Figure 3 is a data structure schematic diagram of a frame synchronization header provided by an embodiment of the present application;
[0024] Figure 4 、 Figure 5 and Figure 6 are flow distribution comparison diagrams under different interference intensities;
[0025] Figure 7 is a structural schematic diagram of a WiFi data transmission device provided by the present application;
[0026] Figure 8 is another structural schematic diagram of a WiFi device provided by the present application. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical scheme and advantages of the present application more clear, the following will further describe the embodiments of the present application in combination with the drawings.
[0028] Reference Figure 1 , Figure 1 is a network architecture diagram of a wireless fidelity communication system. The wireless fidelity communication system includes a basic service set BSS1 and a basic service set BSS2, the BSS1 includes an AP1 and a STA1, and the BSS2 includes an AP2, a STA2 and a STA3. The STAs in the BSS1 and the BSS2 and the STAs and the APs can transmit data frames or management frames to each other.
[0029] Among them, the station in the embodiments of the present application can be a smart phone, a tablet computer, a game device, an AR (Augmented Reality) device, a car, a data storage device, an audio playing device, a video playing device, a notebook, a desktop computing device, a wearable device such as an electronic watch, electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, an electronic clothing, and the like.
[0030] The following will be combined with the drawings Figure 2 , a WiFi data transmission anti-interference method provided by the embodiments of the present application will be described in detail. Among them, the execution subject of the WiFi data transmission anti-interference method in the embodiments of the present application is a station or an access point in the Figure 1 .
[0031] Please refer to Figure 2 , a flowchart of a WiFi data transmission anti-interference method provided by the embodiments of the present application, the method of the present application can include the following steps:
[0032] S201, a first WiFi device acquires to-be-sent data, and detects a current value of a NAV timer.
[0033] The first WiFi device first obtains data packets to be transmitted from its internal data queue or application layer interface. These data packets can include user data, control information, or other WiFi protocol related data.
[0034] The data obtaining process can involve packet encapsulation, including adding necessary protocol headers (such as IP header, TCP / UDP header, 802.11 header), and any necessary encryption and check information. The NAV (Network Allocation Vector) timer is used to maintain the fairness of channel access and prevent data collisions. It is usually set according to the Duration / ID field in the data frame sent by other WiFi devices. The first WiFi device regularly checks the current value of the NAV timer. The NAV timer decreases by 1 step per time unit (usually microseconds or milliseconds). This decrement process is automatically managed by the hardware or firmware of the WiFi device. In step S201, the first WiFi device reads the value of the current NAV timer to determine whether it can start the channel contention process.
[0035] In some embodiments of the present application, the WiFi device defines a suitable data structure to store the data packets to be transmitted. This data structure usually contains the metadata of the data packets (such as source address, destination address, packet length, etc.) and the actual data content. In order to store these data packets, the WiFi device allocates one or more memory areas as data queues. These memory areas can be continuous or scattered, depending on the memory management strategy of the device and the implementation of the queue.
[0036] When the WiFi device needs to transmit data, it adds data packets to the end of the data queue. This process is usually called "enqueue" operation. In order to ensure the order and integrity of data, the enqueue operation usually needs to follow certain rules and algorithms, such as the First-In-First-Out (FIFO) principle. When the device is ready to transmit data, it takes out data packets from the head of the data queue. This process is called "dequeue" operation. Dequeue operation also needs to follow certain rules and algorithms to ensure the correctness and consistency of data. The device also monitors the status of the data queue, such as the length of the queue, whether it is full or empty, etc. These information is crucial for the scheduling and decision-making of the device.
[0037] Before sending data, the device first checks the status of the data queue. If the queue is empty, the device can wait for new data packets to arrive or perform other operations. If the queue is not empty, proceed to the next step. Once it is determined that there are data packets to be sent in the queue, the device performs a dequeue operation to take the data packet from the head of the queue. This process usually involves modifying the queue data structure and adjusting the memory pointer. After taking out the data packet, the device decides how to send the data packet based on the metadata of the data packet (such as the destination address) and the current network state (such as channel occupancy, signal quality, etc.). This may involve operations such as encrypting the data packet, encapsulating it into a frame, calculating the checksum, etc. After sending the data packet, the device updates the status of the data queue to reflect the current length of the queue and the number of remaining data packets. This helps the device make more accurate scheduling and decision-making in the future.
[0038] Through the internal data queue, the device can asynchronously process the reception and transmission of data. This means that the device can continue to process data packets that have been queued in the past while receiving new data packets, thereby improving the efficiency of data processing.
[0039] S202, when the current value of the NAV timer is equal to 0, the first WiFi device performs channel contention.
[0040] Among them, the first WiFi device regularly checks the value of the NAV timer. When the value of the NAV timer is equal to 0, the first WiFi device can start to perform the channel contention process to try to obtain the use right of the current channel. The channel contention process follows the CSMA / CA (Carrier Sense Multiple Access / Collision Avoidance) mechanism of the 802.11 protocol. The first WiFi device first performs physical carrier sensing to detect whether there is a signal of other devices in the channel. If the physical carrier sensing result indicates that the channel is idle, the first WiFi device will further perform virtual carrier sensing to check whether other devices have reserved future channel use time through the Duration / ID field in the data frame. If both physical and virtual carrier sensing indicate that the channel is idle, the first WiFi device will wait for a random time (called DIFS, Distributed Interframe Space), and then try to send a short control frame (such as RTS, Request To Send) to compete for the channel.
[0041] S203, if the channel is successfully competed for, the first WiFi device packs the data to be sent into a first data frame, and sends the first data frame through the competed channel.
[0042] If the first WiFi device successfully competes for the channel, it will package the data to be sent into a data frame in compliance with the 802.11 standard. The data frame includes a frame header (containing information such as destination MAC address, source MAC address, data length, etc.), frame body, and frame tail. After the data frame is packaged, the first WiFi device sends the data frame through the channel it has competed for. During the sending process, the first WiFi device complies with the physical layer and MAC layer specifications of the 802.11 protocol to ensure that the data is correctly transmitted to the destination WiFi device.
[0043] S204, if the frame synchronization header of the second data frame from the second WiFi device is received before the channel is competed for, the first WiFi device parses the destination MAC address carried in the frame synchronization header; if the MAC address does not satisfy: the destination MAC address is a broadcast address or the destination MAC address is a multicast address or the destination MAC address is the same as the MAC address of the first WiFi device, the first WiFi device measures the received signal power of the channel; if the received signal power is less than a preset energy detection threshold, the first WiFi device stops receiving the second data frame and then continues to perform channel competition.
[0044] In some embodiments of the present application, if the first WiFi device receives a data frame frame synchronization header from another WiFi device (such as the second WiFi device) before competing for the channel, the first WiFi device will parse the frame synchronization header.
[0045] The first WiFi device checks whether the parsed destination MAC address satisfies: such as a broadcast address, a multicast address, or the same as the MAC address of the first WiFi device. For example, the broadcast address is FF: FF: FF: FF: FF: FF, and the multicast address indicates that the least significant bit of the first byte of the address is set to 1. If the destination MAC address satisfies the address matching condition, the first WiFi device will measure the received signal power of the current channel. If not, it means that the first WiFi device is not the receiver of the second data frame.
[0046] If the received signal power is less than the preset energy detection threshold, it means that the interference of other WiFi devices in the channel to the first WiFi device is weak. In this case, the first WiFi device considers that the data frame sending process is less affected, and therefore will continue to perform channel competition and data sending process without delaying or reattempting due to interference. If the received signal power is not less than the energy detection threshold, or if the first WiFi device does not receive any data frame frame synchronization header, it will continue to perform the channel competition process according to the CSMA / CA mechanism. Once the channel is successfully competed for, the first WiFi device will send the data frame according to the steps in S203.
[0047] In some embodiments of the present application, referring to Figure 3The data structure diagram of the illustrated frame synchronization header, the synchronization header of the WiFi frame contains multiple fields, which collectively define the type of frame, transmission direction, address information, etc. Among them, the key fields include Frame Control, Duration / ID, Address1, Address2, Address3, etc. Frame Control: used to define the type, subtype, protocol version, frame direction, etc. of the frame. Duration / ID: indicates the transmission time or association identifier of the frame. Address1: usually indicates the MAC address of the recipient of the frame. Address2: usually indicates the MAC address of the sender of the frame. Address3: according to the different types of frames, it can represent different addresses.
[0048] When a WiFi device receives a frame, it will first parse the frame synchronization header. In this process, the device will pay special attention to the Address1 field, because this field contains the destination MAC address information. Reading the Address1 field: the device reads the value of the Address1 field from the frame synchronization header. This value is a 48-bit binary number, usually represented as a combination of six hexadecimal numbers (for example: XX-XX-XX-XX-XX-XX). Verify the address format: the device will verify whether the value of the Address1 field meets the format requirements of the MAC address. The format of the MAC address is fixed, consisting of six hexadecimal numbers, each number separated by a colon or hyphen. Once the device successfully parses and verifies the value of the Address1 field, it can use this value as the destination MAC address. The device will store the destination MAC address in the appropriate memory location for use in subsequent communication processes. If the device maintains a local MAC address table (for example, for access control or network monitoring), it may match the destination MAC address with the entries in the table to determine the source or destination of the frame.
[0049] The technical effects of the present patent application are described as follows:
[0050] The present patent application can improve WIFI traffic and reduce network latency in an interference environment, especially when the TX is significantly improved under strong interference. This has gains in bandwidth capability, stability and real-time performance of wireless device transmission.
[0051] Test scenario one: UDP-TX (frequency point 2412M, 20M bandwidth, Figure 1 STA1 to AP1 sends data frames). The interference source is a NON-HT format (g mode), MCS0, 20us interval, 64 byte length packet modulation signal. Referring to Tables 1 and Figure 4 indicates the traffic distribution of the prior art and the present application under different interference intensities.
[0052]
[0053]
[0054] Table 1
[0055] Test scenario two: UDP-TX (frequency point 2412M, 20M bandwidth, AP1 to STA1 data frame sending in 802.11n). Interference source: HT MF format (n mode), MCS0, 20us interval, 1024 byte length aggregate packet modulation signal. See Table 2 and Figure 2, which show the traffic distribution of the prior art and the present application under different interference intensities. Figure 1 Figure 5
[0056]
[0057]
[0058] Table 2
[0059] Test scenario three: UDP-RX (frequency point 2412M, 20M bandwidth, AP1 to STA1 data frame sending in 802.11n). Interference source: HT MF format (n mode), MCS7, 20us interval, 90 byte length aggregate packet modulation signal. See Table 3 and Figure 3, which show the traffic distribution of the prior art and the present application under different interference intensities. Figure 1 Figure 6
[0060]
[0061] It should be noted that the above three tests, the interference source is the same signal source generator, and the relative position of the tested device is unchanged. According to the traffic distribution comparison diagram in Table 1, Table 2 and Table 3, it can be seen that the traffic of the present application is improved particularly obviously under strong interference.
[0062] It should be noted that the above three tests, the interference source is the same signal source generator, and the relative position of the tested device is unchanged. According to the traffic distribution comparison diagram in Table 1, Table 2 and Table 3, it can be seen that the traffic of the present application is improved particularly obviously under strong interference. Figures 4-6
[0063] In some embodiments of the present application, the method of the present application further comprises:
[0064] If the destination MAC address satisfies: the destination MAC address is a broadcast address or the destination MAC address is a multicast address or the destination MAC address is the same as the MAC address of the first WiFi device, the second data frame is continuously received, and after the reception of the second data frame is completed, the current value of the NAV timer is updated according to the duration carried by the second data frame.
[0065] Wherein, after receiving the frame synchronization head of the second data frame, the first WiFi device first parses the destination MAC address in the frame synchronization head. At this time, the following judgments are made:
[0066] If the destination MAC address is the broadcast address (i.e. FF: FF: FF: FF: FF: FF), it means that the data frame is sent to all WiFi devices, and the first WiFi device as a member of the network needs to receive the data frame.
[0067] If the destination MAC address is a multicast address (i.e. the first byte has the lowest bit of 1), it means that the data frame is sent to a specific group of WiFi devices. The first WiFi device needs to determine whether it belongs to the group, and if it does, it needs to receive the data frame.
[0068] If the destination MAC address is the same as the MAC address of the first WiFi device, it means that the data frame is specifically sent to the first WiFi device, so it must receive the data frame.
[0069] When the destination MAC address meets any of the above conditions, the first WiFi device decides to continue receiving the second data frame. The receiving process includes receiving the remaining part of the data frame, including the frame header and the data payload in the frame body, through the physical layer receiving circuit. During the receiving process, error detection and correction may be required to ensure the integrity and accuracy of the data. The received data frame is stored in the internal buffer for subsequent processing. After completing the reception of the second data frame, the first WiFi device needs to update the current value of the NAV timer according to the duration field carried in the data frame. The implementation process of this step is as follows: parse the duration field in the second data frame, which is usually located in the frame header part, to indicate the time length of the current data frame and the subsequent possible ACK frame (such as ACK frame) occupying the channel. Convert the parsed duration value to the time unit of the NAV timer (such as microseconds or milliseconds), and add it to the current value of the NAV timer. If the added value exceeds the maximum range of the NAV timer, set it to the maximum range value or perform overflow processing. The updated NAV timer value will be used in subsequent channel competition and data transmission processes to ensure the fairness of channel access and avoid data conflicts.
[0070] Further, when the first WiFi device receives the frame synchronization head of the second data frame from the second WiFi device before competing for the channel, and has determined through the destination MAC address judgment that it may be the recipient of the data frame, the next step is to determine whether to continue receiving the data frame according to the received signal power. The detailed implementation process of this supplement is as follows:
[0071] Upon confirming that the first WiFi device is likely the recipient of the second data frame (i.e., the destination MAC address satisfies being a broadcast address, a multicast address, or the same as the first WiFi device's MAC address), the first WiFi device measures the received signal power of the current channel. This step is typically accomplished through a signal strength indicator (RSSI) or similar signal detection mechanism in the physical layer reception circuit. Measure received signal power: The first WiFi device uses the RSSI or other signal detection mechanism to measure the signal power of the currently received second data frame. Compare with energy detection threshold: The measured received signal power is compared with a pre-set energy detection threshold. This threshold value is usually set according to WiFi communication standards, network environment, and device performance, etc., to distinguish between valid signals and noise or interference signals.
[0072] If the received signal power is greater than or equal to the energy detection threshold, it indicates that the signal strength on the current channel is strong enough to support the transmission of valid data. Therefore, the first WiFi device decides to continue receiving the second data frame.
[0073] Receive the remaining part of the data frame: After confirming that the signal strength is sufficient, the first WiFi device continues to receive the remaining part of the second data frame, including the frame header and the data payload in the frame body, through the physical layer reception circuit. Error detection and correction: During the reception process, the first WiFi device may use cyclic redundancy check (CRC) or other error detection mechanisms to ensure the integrity of the received data. If errors are found, attempts may be made to correct or request retransmission. Store the data frame: The complete data frame received is stored in an internal buffer for subsequent processing or forwarding. After completing the reception of the second data frame, the first WiFi device needs to update the current value of the NAV timer according to the duration field carried in the data frame. This step is an important mechanism in WiFi communication to avoid data collisions and maintain fairness in channel access. Analyze the duration field: Analyze the duration field from the received second data frame. This field is usually located in the frame header and indicates the length of time that the current data frame and its subsequent possible acknowledgment frames (such as ACK frames) occupy the channel. Calculate the new NAV value: Convert the analyzed duration value into the time unit of the NAV timer (such as microseconds or milliseconds) and add it to the current value of the NAV timer. Note that if the added value exceeds the maximum range of the NAV timer, overflow processing or setting it to the maximum range value is required. Update the NAV timer: Update the current value of the NAV timer with the calculated new value. The updated NAV timer value will be used in subsequent channel contention and data transmission processes to ensure that data collisions with other WiFi devices do not occur within the specified time.
[0074] Further, in the embodiments of the present application, the energy detection threshold CCA_ED = CCA_SD + 20dB, and the signal detection threshold CCA_SD = channel noise power + 4dB.
[0075] The energy detection threshold is an important parameter for determining whether the channel is occupied. When the received signal power exceeds this threshold, the WiFi device considers that the channel is occupied. The energy detection threshold CCA_ED of the first WiFi device is set to the signal detection threshold CCA_SD plus 20dB. This means that if the signal strength on the channel exceeds CCA_SD by 20dB or more, the signal will be considered strong enough to interfere with the communication of other devices, and thus the channel is considered to be occupied.
[0076] The signal detection threshold is used to detect the presence of the preamble of the 802.11 signal in the channel. The preamble is a periodic time-domain signal that is shared by all 802.11 physical packets, and thus can be detected by correlation algorithms. The signal detection threshold CCA_SD of the first WiFi device is set to the channel noise power plus 4dB. The channel noise power refers to the noise power of the channel when there is no signal transmission. When the signal strength on the channel exceeds this threshold, the WiFi device considers that there may be a valid 802.11 signal in the channel, and thus performs further signal detection and decoding.
[0077] In summary, the beneficial effects of implementing the embodiments of the present application include:
[0078] Upon receiving the frame synchronization header of the data frame from other WiFi devices, the present technical solution first parses the destination MAC address in the frame synchronization header. By determining whether the address is the broadcast address, the multicast address, or the same as the MAC address of the first WiFi device, it can be quickly determined whether the first WiFi device is the intended recipient of the data frame. If the result is no, i.e. the first WiFi device is not the recipient, there is no need to continue receiving the entire data frame. This judgment mechanism effectively avoids unnecessary data reception, thereby reducing the time for receiving and processing useless data and reducing the overall communication delay.
[0079] After confirming that the first WiFi device is not the recipient of the data frame, the technical solution further judges whether to continue receiving the data frame by measuring the received signal power of the channel. If the received signal power is less than the preset energy detection threshold, it indicates that the signal strength on the channel is weak and may not be sufficient to support the transmission of valid data. In this case, the first WiFi device will end the reception of the data frame in advance and immediately return to the channel contention state to attempt to send its own data frame when the next available channel idle period is available. This mechanism avoids the waste of continuing to receive invalid data frames under weak signal conditions, further reducing the delay of data transmission.
[0080] In summary, by introducing the judgment of the destination MAC address and the detection mechanism of the received signal power, the present application realizes intelligent control of the WiFi device's reception of data frames. This control mechanism not only reduces unnecessary data reception and processing time, but also avoids the waste of continuing to receive invalid data frames under weak signal conditions, thereby significantly reducing the delay of data transmission and improving the efficiency and reliability of WiFi communication.
[0081] The following is an embodiment of the device of the present application, which can be used to execute 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.
[0082] Please refer to Figure 7 which shows the structure of the WiFi data transmission device provided by an exemplary embodiment of the present application. The device can be realized by software, hardware or a combination of the two to become all or part of the terminal. The WiFi data transmission device 7 (referred to as device 7) includes a transceiver unit 701, an analysis unit 702, a calculation unit 703 and a judgment unit 704.
[0083] The acquisition unit 701 is used to acquire the data to be sent and detect the current value of the NAV timer; the NAV timer decrements by 1 as a step, once per time unit;
[0084] The starting unit 702 is used to execute channel contention by the first WiFi device when the current value of the NAV timer is equal to 0;
[0085] The packing unit 703 is used to pack the data to be sent into a first data frame by the first WiFi device if the channel is successfully contended, and send the first data frame through the contended channel;
[0086] The anti-interference unit 704 is configured to, if a frame synchronization header of a second data frame from the second WiFi device is received before the channel competition, parse a destination MAC address carried in the frame synchronization header; if the destination MAC address does not satisfy: the destination MAC address is a broadcast address, or the destination MAC address is a multicast address, or the destination MAC address is the same as a MAC address of the first WiFi device, measure a received signal power of the current channel; if the received signal power is less than a preset energy detection threshold, the first WiFi device stops receiving the second data frame, and then continues to perform channel competition.
[0087] In a possible implementation, the method further includes:
[0088] The address filtering unit is configured to, if the destination MAC address satisfies: the destination MAC address is a broadcast address, or the destination MAC address is a multicast address, or the destination MAC address is the same as the MAC address of the first WiFi device, the first WiFi device continues to receive the second data frame, and after the receiving of the second data frame is completed, updates a current value of the NAV timer according to a duration carried in the second data frame.
[0089] In a possible implementation, the method further includes:
[0090] The energy filtering unit is configured to, if the received signal power is greater than or equal to the energy detection threshold, the first WiFi device continues to receive the second data frame, and after the receiving of the second data frame is completed, updates a current value of the NAV timer according to a duration carried in the second data frame.
[0091] In a possible implementation, the energy detection threshold CCA_ED=CCA_SD+20 dB, and the signal detection threshold CCA_SD=channel noise power+4 dB.
[0092] In a possible implementation, the channel competition performed by the first WiFi device includes:
[0093] determining whether a duration, in which the received signal power of the current channel is less than the energy detection threshold, exceeds a duration threshold;
[0094] if yes, determining that the current channel is in an idle state, and the first WiFi device successfully competes for a use right of the current channel;
[0095] if no, determining that the current channel is in an occupied state, and the first WiFi device does not successfully compete for the use right of the current channel.
[0096] In a possible implementation, the parsing of the destination MAC address carried in the frame synchronization header comprises:
[0097] The field value of the Address1 field in the frame synchronization header is parsed, and the destination MAC address is obtained according to the field value.
[0098] In a possible implementation, the to-be-sent data is obtained from an internal data queue.
[0099] It should be noted that the apparatus 7 provided in the above embodiment is used only for the anti-interference method of WiFi data transmission, and the division of the above functional modules is used only for example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the touch operation response apparatus and the touch operation response method provided in the above embodiment belong to the same concept, and the implementation process is described in the method embodiment, which will not be described here.
[0100] The serial numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0101] The embodiment of the present application further provides a computer storage medium, which can store a plurality of instructions, the instructions being suitable for being loaded and executed by a processor to implement the method steps of the method of the embodiment shown in the above Figure 2 The specific implementation process can be referred to the specific description of the embodiment shown in the above Figure 2 The specific implementation process can be referred to the specific description of the embodiment shown in the above
[0102] The present application further provides a computer program product, which stores at least one instruction, the at least one instruction being loaded and executed by the processor to implement the anti-interference method of WiFi data transmission as described in each of the above embodiments.
[0103] Please refer to Figure 8 , the embodiment of the present application provides a structural schematic diagram of a WiFi device. As shown in the Figure 8 , the WiFi device 800 can include at least one processor 801, at least one input interface 804, an output interface 803, a memory 805, and at least one communication bus 802.
[0104] The communication bus 802 is used to realize the connection and communication between the components.
[0105] The output interface 803 can include a display screen (Display), a camera (Camera), and an optional output interface 803, which can further include a standard wired interface and a wireless interface.
[0106] The input interface 804 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0107] The processor 801 may include one or more processing cores. The processor 801 connects to various parts of the terminal 800 using various interfaces and lines, and performs various functions of the terminal 800 and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 805, and by calling data stored in the memory 805.
[0108] The memory 805 may include random access memory (RAM) or read-only memory. Optionally, the memory 805 may include a non-transitory computer-readable storage medium. The memory 805 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 805 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 805 may also be at least one storage device located remotely from the aforementioned processor 801. Figure 8 As shown, the memory 805, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and application programs.
[0109] exist Figure 8 In the WiFi device 800 shown, the processor 801 can be used to call the application stored in the memory 805 and specifically execute, such as Figure 2 The method shown can be referred to for details. Figure 2 As shown, it will not be elaborated further here.
[0110] 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.
[0111] The above disclosure is only a preferred embodiment of the present application, and of course cannot limit the scope of the present application, and those skilled in the art can understand that all or part of the processes described above can be implemented, and equivalent changes made in accordance with the claims of the present application, still belong to the scope covered by the present application.
Claims
1. A method for resisting interference in WiFi data transmission, characterized in that, The method includes: The first WiFi device acquires the data to be sent and detects the current value of the NAV timer; the NAV timer decreases in steps of 1, decreasing once per time unit. When the current value of the NAV timer is equal to 0, the first WiFi device performs channel contention; If the channel is successfully acquired, the first WiFi device will package the data to be sent into a first data frame and then send the first data frame through the acquired channel. If the first WiFi device receives the frame synchronization header of the second data frame from the second WiFi device before competing for the channel, the first WiFi device parses the destination MAC address carried in the frame synchronization header. If the MAC address does not meet the following conditions: the destination MAC address is a broadcast address, the destination MAC address is a multicast address, or the destination MAC address is the same as the MAC address of the first WiFi device, the received signal power of the current channel is measured. If the received signal power is less than a preset energy detection threshold, the first WiFi device stops receiving the second data frame and then continues to compete for the channel.
2. The method according to claim 1, characterized in that, Also includes: If the destination MAC address satisfies the following conditions: the destination MAC address is a broadcast address, the destination MAC address is a multicast address, or the destination MAC address is the same as the MAC address of the first WiFi device, the first WiFi device continues to receive the second data frame. After completing the reception of the second data frame, the current value of the NAV timer is updated according to the duration carried by the second data frame.
3. The method according to claim 1, characterized in that, Also includes: If the received signal power is greater than or equal to the energy detection threshold, the first WiFi device continues to receive the second data frame. After completing the reception of the second data frame, the current value of the NAV timer is updated according to the duration carried by the second data frame.
4. The method according to claim 1, characterized in that, The energy detection threshold CCA_ED = CCA_SD + 20dB, and the signal detection threshold CCA_SD = channel noise floor power + 4dB.
5. The method according to claim 1 or 2, characterized in that, The first WiFi device performs channel contention, including: Determine whether the duration for which the received signal power of the current channel is less than the energy detection threshold exceeds a duration threshold; If so, the current channel is determined to be idle, and the first WiFi device has successfully competed for the right to use the current channel. If not, it is determined that the current channel is occupied, and the first WiFi device has not successfully competed for the right to use the current channel.
6. The method according to claim 5, characterized in that, The parsing of the destination MAC address carried in the frame synchronization header includes: Parse the value of the Address1 field in the frame synchronization header and obtain the destination MAC address based on the value of the field.
7. The method according to claim 6, characterized in that, Retrieve data to be sent from the internal data queue.
8. An anti-interference device for WiFi data transmission, characterized in that, include: The acquisition unit is used to acquire the data to be sent and to detect the current value of the NAV timer; The NAV timer decreases in steps of 1, decreasing once per time unit; A startup unit is used to initiate channel contention for the first WiFi device when the current value of the NAV timer is equal to 0. The packetizing unit is used to, if the first WiFi device successfully acquires a channel, package the data to be sent into a first data frame and then send the first data frame through the acquired channel. An anti-interference unit is configured to, if the first WiFi device receives a frame synchronization header of a second data frame from a second WiFi device before it has competed for a channel, parse the destination MAC address carried in the frame synchronization header; If the MAC address does not meet the following conditions: the destination MAC address is a broadcast address, the destination MAC address is a multicast address, or the destination MAC address is the same as the MAC address of the first WiFi device, measure the received signal power of the current channel; If the received signal power is less than a preset energy detection threshold, the first WiFi device stops receiving the second data frame and then continues to perform channel contention.
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.
Citation Information
Patent Citations
Data transmission method and device, storage medium and wireless node
CN112996050A
Time division duplex (TDD) repeater configured to communicate with a spectrum access system (SAS)
US20200212994A1