Anti-interference method and device for WiFi data transmission, storage medium and WiFi equipment
By introducing the target MAC address judgment and receiving signal power detection mechanism in WiFi devices, the data frame reception process of WiFi devices is intelligently controlled, which solves the problem of delay and bandwidth reduction caused by interference when WiFi devices send data, and improves communication efficiency and reliability.
Patent Information
- Application Number
- CN202411712534.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-27
AI Technical Summary
WiFi devices are easily interfered by other WiFi devices during the data transmission process, resulting in a large delay in data transmission and a decrease in bandwidth.
By introducing the determination of the target MAC address and the detection mechanism of the received signal power, intelligent control of the process of receiving data frames of WiFi devices is realized. The specific steps include: parsing the destination MAC address in the frame synchronization header, measuring the received signal power of the channel if the specific conditions are not met, and stop receiving the data frame if it is less than the preset threshold and continuing to perform channel competition.
It significantly reduces the delay in data transmission, improves the efficiency and reliability of WiFi communication, reduces unnecessary data reception and processing time, and avoids the waste of continuing to receive invalid data frames under weak signal conditions.
Smart Images

Figure CN119584196A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of wireless communications, and in particular to an anti-interference method, device, storage medium and WiFi device for WiFi data transmission. Background Art
[0002] In a wireless local area network (WLAN), stations (STAs) within a basic service set (BSS) need to follow specific communication protocols to ensure effective data transmission and reasonable use of channels. Among them, the network allocation vector (NAV) and the clear channel assessment (CCA) are two key mechanisms that jointly maintain channel access order and communication efficiency.
[0003] In the prior art, WiFi devices are easily interfered by other WiFi devices during data transmission, resulting in a large delay in data transmission. Figure 2 As shown, BSS1 includes: AP1 and STA1, and BSS2 includes: AP2, STA2 and STA3. The signal detection threshold CCA_SD of 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, the receiving mechanism of STA1 is triggered. This causes STA1 to be frequently interrupted during the CCA process and has to stop competing for the channel to receive these data frames. After receiving, STA1 also needs to update its NAV value according to the duration field in the received data frame. If other STAs apply for a longer channel occupancy time, STA1 needs to wait for an additional NAV=0 time before continuing CCA. This situation is particularly serious when interference frames are frequent. STA1's CCA process is constantly interrupted, resulting in a sharp increase in the delay of data transmission and a sharp decrease in bandwidth. Especially when the interference intensity exceeds the receiving threshold, the bandwidth may drop to 0, seriously affecting the communication efficiency and user experience of the network. Therefore, an effective method is needed to solve this problem so as to reduce the number of times that the STA is interrupted during the CCA process and improve the efficiency of data transmission and bandwidth utilization. Summary of the invention
[0004] The embodiments of the present application provide an anti-interference method, device, storage medium and WiFi device for WiFi data transmission, which can solve the problem of low efficiency and high delay of WiFi data transmission caused by interference in related technologies. The technical solution is as follows:
[0005] In a first aspect, an embodiment of the present application provides 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 obtains the data to be sent, and detects the current value of the NAV timer; the NAV timer is decremented in steps of 1, and is decremented once for one 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 competed, the first WiFi device packages the data to be sent into a first data frame, and sends the first data frame through the channel obtained through competition;
[0010] If a frame synchronization header of a second data frame is received from a second WiFi device before competing for a channel, 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, 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 perform channel competition.
[0011] In a second aspect, an embodiment of the present application provides a WiFi data transmission device, the WiFi data transmission device comprising:
[0012] An acquisition unit, used to acquire data to be sent and detect a current value of a NAV timer; the NAV timer is decremented in steps of 1 and is decremented once for one time unit;
[0013] a starting unit, configured to, when the current value of the NAV timer is equal to 0, cause the first WiFi device to perform channel contention;
[0014] A packing unit, configured to, if successfully competing for a channel, pack the data to be sent into a first data frame by the first WiFi device, and send the first data frame through the channel obtained through competition;
[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, 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, 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 competition.
[0016] In a fourth aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.
[0017] In a fifth aspect, an embodiment of the present application provides a WiFi device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.
[0018] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:
[0019] By introducing the destination MAC address judgment and the detection mechanism of the received signal power, the intelligent control of the WiFi device receiving data frames is realized. This control mechanism not only reduces the 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 is an architecture diagram of a WiFi wireless communication system provided in an embodiment of the present application;
[0022] Figure 2 It is an interactive schematic diagram of an anti-interference method for WiFi data transmission provided in an embodiment of the present application;
[0023] Figure 3 It is a schematic diagram of the data structure of the frame synchronization header provided in an embodiment of the present application;
[0024] Figure 4 , Figure 5 and Figure 6 It is a comparison diagram of traffic distribution under different interference intensities;
[0025] Figure 7 It is a structural schematic diagram of a WiFi data transmission device provided by the present application;
[0026] Figure 8 This is another structural schematic diagram of a WiFi device provided by this application. DETAILED DESCRIPTION
[0027] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0028] refer to Figure 1 , Figure 1 The network architecture diagram of the wireless fidelity communication system. The wireless fidelity communication system includes a basic service set BSS1 and a basic service set BSS2. BSS1 includes: AP1 and STA1, and BSS2 includes: AP2, STA2 and STA3. Data frames or management frames can be transmitted between STAs in BSS1 and BSS2, and between STAs and APs.
[0029] Among them, the site in the embodiment of the present application can be a smart phone, a tablet computer, a gaming device, an AR (Augmented Reality) device, a car, a data storage device, an audio playback device, a video playback device, a notebook, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, electronic clothing and other devices.
[0030] The following will be combined with the attached Figure 2 , the anti-interference method for WiFi data transmission provided in the embodiment of the present application is described in detail. Among them, the execution subject of the anti-interference method for WiFi data transmission in the embodiment of the present application is Figure 1 stations or access points in the network.
[0031] See also Figure 2 , is a flow chart of an anti-interference method for WiFi data transmission provided in an embodiment of the present application. The method of the present application may include the following steps:
[0032] S201: The first WiFi device obtains data to be sent, and detects the current value of the NAV timer.
[0033] The first WiFi device first obtains data packets to be sent from its internal data queue or application layer interface, which may include user data, control information or other WiFi protocol-related data.
[0034] The data acquisition process may involve the encapsulation of data packets, including adding necessary protocol headers (such as IP headers, TCP / UDP headers, 802.11 headers) and any necessary encryption and verification information. The NAV (Network Allocation Vector) timer is used to maintain fairness in channel access and prevent data conflicts. It is usually set based on the Duration / ID field in the received data frames sent by other WiFi devices. The first WiFi device periodically checks the current value of the NAV timer. The NAV timer decrements in steps of 1, and decrements once for each 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 the channel competition process can be started.
[0035] In some embodiments of the present application, the WiFi device defines a suitable data structure to store the data packets to be sent. This data structure usually contains metadata of the data packets (such as source address, destination address, data packet length, etc.) and 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 method of the queue.
[0036] When a WiFi device needs to send data, it adds the data packet to the end of the data queue. This process is usually called an "enqueue" operation. To ensure the orderliness and integrity of the 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 send data, it takes the data packet from the head of the data queue. This process is called a "dequeue" operation. The dequeue operation also needs to follow certain rules and algorithms to ensure the correctness and consistency of the 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. This information is critical for the scheduling and decision-making of the device.
[0037] Before preparing to send data, the device first checks the status of the data queue. If the queue is empty, the device may wait for new data packets to arrive or perform other operations. If the queue is not empty, it proceeds to the next step. Once it is determined that there are data packets to be sent in the queue, the device will perform 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 will decide how to send the data packet based on the metadata of the data packet (such as the destination address) and the current network status (such as channel occupancy, signal quality, etc.). This may involve operations such as encrypting the data packet, encapsulating it into frames, and calculating checksums. After sending the data packet, the device will update the status of the data queue to reflect the current queue length and the number of remaining data packets. This helps the device make more accurate scheduling and decisions in the future.
[0038] Through the internal data queue, the device can process the receiving and sending operations of data asynchronously. This means that the device can continue to process the previously queued data packets 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 periodically checks the value of the NAV timer. When the value of the NAV timer is equal to 0, the first WiFi device can start the channel competition process and try to obtain the right to use the current channel. The channel competition 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 are signals 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 usage 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, i.e., distributed inter-frame 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 packages the data to be sent into a first data frame, and sends the first data frame through the channel obtained through competition.
[0042] Once the first WiFi device successfully competes for a channel, it packages the data to be sent into a data frame that complies with the 802.11 standard. The data frame includes a frame header (including information such as the destination MAC address, source MAC address, and data length), a frame body, and a frame tail. After the packaging is completed, the first WiFi device sends the data frame through the channel it competes for. During the transmission process, the first WiFi device follows the physical layer and MAC layer specifications of the 802.11 protocol to ensure that the data can be correctly transmitted to the destination WiFi device.
[0043] S204, if a frame synchronization header of a second data frame is received from a second WiFi device before competing for a channel, 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, the received signal power of the 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 competition.
[0044] Before competing for the channel, if the first WiFi device receives a frame synchronization header of a data frame from another WiFi device (such as the second WiFi device), the frame synchronization header will be parsed.
[0045] The first WiFi device checks whether the parsed destination MAC address satisfies: such as a broadcast address, a multicast address, or is 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 lowest 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 measures the received signal power of the current channel. If not, it indicates that the first WiFi device is not the recipient of the second data frame.
[0046] If the received signal power is less than the preset energy detection threshold, it means that other WiFi devices in the channel have little interference with the first WiFi device. In this case, the first WiFi device believes that its data frame transmission process is less affected, so it will continue to perform channel competition and data transmission processes without delay or retry 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, the channel competition process will continue according to the CSMA / CA mechanism. Once the channel is successfully competed, the first WiFi device will send the data frame according to the steps in S203.
[0047] In some embodiments of the present application, see Figure 3As shown in the data structure diagram of the frame synchronization header, the synchronization header of the WiFi frame contains multiple fields, which together define the frame type, transmission direction, address information, etc. Among them, the key fields include Frame Control, Duration / ID, Address1, Address2, Address3, etc. FrameControl: used to define the frame type, subtype, protocol version, frame direction, etc. Duration / ID: indicates the transmission time or associated identifier of the frame. Address1: usually indicates the MAC address of the receiver of the frame. Address2: usually indicates the MAC address of the sender of the frame. Address3: can indicate different addresses depending on the frame type.
[0048] When a WiFi device receives a frame, it first parses the frame synchronization header. During this process, the device pays special attention to the Address1 field because this field contains information about the destination MAC address. 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 expressed as a combination of six hexadecimal numbers (for example: XX-XX-XX-XX-XX-XX). Verifying the address format: The device verifies whether the value of the Address1 field conforms to the format requirements of the MAC address. The format of the MAC address is fixed and consists of six hexadecimal numbers, each 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 stores 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 entries in the table to determine the source or destination of the frame.
[0049] The technical effects of this patent application are described below:
[0050] This patent application can improve WIFI traffic and reduce network delay in an interference environment, especially when there is strong interference, the TX improvement is particularly obvious, which will benefit the bandwidth capacity, stability and real-time performance of wireless device transmission.
[0051] Test scenario 1: UDP-TX (frequency 2412M, 20M bandwidth, Figure 1 STA1 in the example sends a data frame to AP1). Interference source: NON-HT format (g mode), MCS0, 20us interval, 64byte packet modulation signal. See Table 1 and Figure 4 As shown, it shows the traffic distribution of the prior art and the present application under different interference intensities.
[0052]
[0053]
[0054] Table 1
[0055] Test scenario 2: UDP-TX (frequency 2412M, 20M bandwidth, Figure 1 STA1 in the example sends a data frame to AP1). Interference source: HT MF format (n mode), MCS0, interval 20us, and 1024byte aggregate packet modulation signal. See Table 2 and Figure 5 As shown, it shows the traffic distribution of the prior art and the present application under different interference intensities.
[0056]
[0057]
[0058] Table 2
[0059] Test scenario three: UDP-RX (frequency 2412M, 20M bandwidth, Figure 1 AP1 in the example sends a data frame to STA1). Interference source: HT MF format (n mode), MCS7, 20us interval, 90byte length aggregate packet modulation signal. See Table 3 and Figure 6 As shown, it shows the traffic distribution of the prior art and the present application under different interference intensities.
[0060]
[0061] Table 3
[0062] It should be noted that in the above three tests, the interference source is the same signal source generator, and its relative position to the device under test remains unchanged. Figures 4 to 6 It can be seen from the traffic distribution comparison diagram in that the technical solution of the present patent application has a particularly obvious improvement in TX traffic when there is strong interference.
[0063] In some embodiments of the present application, the method of the present application further includes:
[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, continue to receive the second data frame, and after completing the reception of the second data frame, update the current value of the NAV timer according to the duration carried by the second data frame.
[0065] After receiving the frame synchronization header of the second data frame, the first WiFi device first parses the destination MAC address in the frame synchronization header. At this time, the following judgment is made:
[0066] If the destination MAC address is a 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., an address with the least significant bit of the first byte being 1), it indicates 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 so, 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 the data frame must be received.
[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 an 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 and is used to indicate the length of time that the current data frame and its subsequent possible confirmation frame (such as ACK frame) occupy the channel. Convert the parsed duration value into the time unit of the NAV timer (such as microseconds or milliseconds) and add it to the current NAV timer value. If the added value exceeds the maximum range of the NAV timer, it is set to the maximum range value or overflow processing is performed. The updated NAV timer value will be used in subsequent channel competition and data transmission processes to ensure fairness of channel access and avoid data conflicts.
[0070] Furthermore, when the first WiFi device receives the frame synchronization header of the second data frame from the second WiFi device before competing for the channel, and has determined that it may be the recipient of the data frame through the determination of the destination MAC address, it needs to decide whether to continue receiving the data frame according to the received signal power. The following is the detailed implementation process of this supplementary content:
[0071] After confirming that the first WiFi device may be the recipient of the second data frame (i.e., the destination MAC address satisfies the broadcast address, multicast address, or is the same as the MAC address of the first WiFi device), the first WiFi device will measure the received signal power of the current channel. This step is usually completed through the signal strength indicator (RSSI) or similar signal detection mechanism in the physical layer receiving circuit. Measuring the received signal power: The first WiFi device uses RSSI or other signal detection mechanisms to measure the signal power of the second data frame currently received. Compare with the energy detection threshold: Compare the measured received signal power with the preset energy detection threshold. This threshold value is usually set based on factors such as WiFi communication standards, network environment, and device performance, and is used 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 means 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 will continue to receive the remaining part of the second data frame through the physical layer receiving circuit, including the frame header and the data payload in the frame body. Error detection and correction: During the reception process, the first WiFi device may use a cyclic redundancy check (CRC) or other error detection mechanism to ensure the integrity of the received data. If an error is found, it may attempt to correct or request retransmission. Store the data frame: Store the received complete data frame 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 to avoid data conflicts and maintain channel access fairness in WiFi communication. Parse the duration field: Parse the duration field from the received second data frame. This field is usually located in the frame header part and is used to indicate the length of time that the current data frame and its subsequent possible confirmation frame (such as ACK frame) occupy the channel. Calculate the new NAV value: Convert the parsed duration value into the time unit of the NAV timer (such as microseconds or milliseconds) and add it to the current NAV timer value. Note that if the added value exceeds the maximum range of the NAV timer, overflow processing needs to be performed or it needs to be set to the maximum range value. Update NAV timer: Use the calculated new value to update the current value of the NAV timer. The updated NAV timer value will be used in subsequent channel competition and data transmission processes to ensure that there will be no data conflict with other WiFi devices within the specified time.
[0074] Furthermore, in an embodiment of the present application, the energy detection threshold CCA_ED=CCA_SD+20dB, and the signal detection threshold CCA_SD=channel noise floor power+4dB.
[0075] Among them, the energy detection threshold is an important parameter for determining whether a channel is occupied. When the received signal power exceeds this threshold, the WiFi device will consider the channel to be 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 more than 20dB, then the signal will be considered strong enough to interfere with the communication of other devices, so the channel is considered to be occupied.
[0076] The signal detection threshold is used to detect whether there is a preamble of an 802.11 signal in the channel. The preamble is a periodic time domain signal, and all 802.11 physical packets share this preamble, so it can be detected by a related algorithm. The signal detection threshold CCA_SD of the first WiFi device is set to the channel noise floor power plus 4dB. The channel noise floor 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 will think that there may be a valid 802.11 signal in the channel, and further signal detection and decoding will be performed.
[0077] In summary, the beneficial effects of implementing the embodiments of the present application include:
[0078] When receiving the frame synchronization header of a data frame from another WiFi device, the technical solution first parses the destination MAC address in the frame synchronization header. By determining whether the address is a broadcast address, a 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 judgment result is no, that is, the first WiFi device is not the recipient, then 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 overall communication delays.
[0079] After confirming that the first WiFi device is not the receiver of the data frame, the technical solution further determines 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 means 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 competition state to try to send its own data frame in the next available channel idle period. This mechanism avoids the waste of continuing to receive invalid data frames under weak signal conditions and further reduces the delay in data transmission.
[0080] In summary, the present application realizes intelligent control of the process of receiving data frames by WiFi devices by introducing the judgment of the destination MAC address and the detection mechanism of the received signal power. 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 embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0082] See also Figure 7 , which shows a schematic diagram of the structure of a WiFi data transmission device provided by an exemplary embodiment of the present application. The device can be implemented as all or part of a terminal through software, hardware, or a combination of both. The WiFi data transmission device 7 (hereinafter referred to as device 7) includes: a transceiver unit 701, a parsing 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 is decremented in steps of 1 and is decremented once for one time unit;
[0084] A starting unit 702, configured to, when the current value of the NAV timer is equal to 0, cause the first WiFi device to perform channel contention;
[0085] The packing unit 703 is configured to pack the to-be-sent data into a first data frame if the channel is successfully competed for, and send the first data frame through the channel obtained through competition;
[0086] The anti-interference unit 704 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, 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, 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 competition.
[0087] In a possible implementation, it 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 completing the reception of the second data frame, updates the current value of the NAV timer according to the duration carried by the second data frame.
[0089] In a possible implementation, it further includes:
[0090] An energy filtering unit is used to, if the received signal power is greater than or equal to the energy detection threshold, cause the first WiFi device to continue to receive the second data frame, and after completing the reception of the second data frame, update the current value of the NAV timer according to the duration carried by the second data frame.
[0091] In a possible implementation manner, the energy detection threshold CCA_ED=CCA_SD+20dB, and the signal detection threshold CCA_SD=channel noise floor power+4dB.
[0092] In a possible implementation manner, the first WiFi device performs channel contention, including:
[0093] 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;
[0094] If yes, it is determined that the current channel is in an idle state, and the first WiFi device successfully competes for the right to use the current channel;
[0095] If not, it is determined that the current channel is in an occupied state, and the first WiFi device has not successfully competed for the right to use the current channel.
[0096] In a possible implementation manner, parsing the destination MAC address carried in the frame synchronization header includes:
[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 data to be sent is obtained from an internal data queue.
[0099] It should be noted that, when the device 7 provided in the above embodiment performs the anti-interference method for WiFi data transmission, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, 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 device provided in the above embodiment and the touch operation response method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0100] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0101] The present application also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figure 2 The method steps of the embodiment shown in the figure can be found in the specific implementation process. Figure 2 The specific description of the illustrated embodiment will not be repeated here.
[0102] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the anti-interference method for WiFi data transmission as described in the above embodiments.
[0103] See also Figure 8 , which is a schematic diagram of the structure of a WiFi device provided in the embodiment of the present application. Figure 8 As shown, the WiFi device 800 may 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 these components.
[0105] The output interface 803 may include a display screen (Display) and a camera (Camera), and the optional output interface 803 may also 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 uses various interfaces and lines to connect various parts of the entire terminal 800, and executes 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 calling data stored in the memory 805.
[0108] Among them, the memory 805 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 805 includes a non-transitory computer-readable storage medium. The memory 805 can be used to store instructions, programs, codes, 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 a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 805 may optionally be at least one storage device located away from the aforementioned processor 801. As Figure 8 As shown, the memory 805 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program.
[0109] exist Figure 8 In the WiFi device 800 shown in FIG. 1 , the processor 801 can be used to call the application stored in the memory 805 and specifically execute the following steps: Figure 2 The specific process can be referred to Figure 2 As shown, no further description is given here.
[0110] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0111] What is disclosed above is only a preferred embodiment of the present application, and it certainly cannot be used to limit the scope of rights of the present application. Ordinary technicians in this field can understand that all or part of the processes of the above embodiment and equivalent changes made according to the claims of the present application are still within the scope of the invention.
Claims
1. An anti-interference method for WiFi data transmission, characterized in that: The method comprises: The first WiFi device obtains the data to be sent, and detects the current value of the NAV timer; the NAV timer is decremented in steps of 1, and is decremented once for one 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 competed, the first WiFi device packages the data to be sent into a first data frame, and sends the first data frame through the channel obtained through competition; If a frame synchronization header of a second data frame is received from a second WiFi device before competing for a channel, 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, 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 perform channel competition.
2. The method according to claim 1, characterized in that Also includes: 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 completing the reception of the second data frame, updates the current value of the NAV timer 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, and after completing the reception of the second data frame, updates the current value of the NAV timer 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 yes, it is determined that the current channel is in an idle state, and the first WiFi device successfully competes for the right to use the current channel; If not, it is determined that the current channel is in an occupied state, 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: 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.
7. The method according to claim 6, characterized in that Get the data to be sent from the internal data queue.
8. An anti-interference device for WiFi data transmission, characterized in that: include: An acquisition unit, used for acquiring data to be sent and detecting a current value of a NAV timer; The NAV timer is decremented in steps of 1, and is decremented once for one time unit; a starting unit, configured to, when the current value of the NAV timer is equal to 0, cause the first WiFi device to perform channel contention; A packing unit, configured to, if successfully competing for a channel, pack the data to be sent into a first data frame by the first WiFi device, and send the first data frame through the channel obtained through competition; an anti-interference unit, configured to, if a frame synchronization header of a second data frame from a second WiFi device is received before competing for a channel, 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, measuring 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, and the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 7.
10. A WiFi device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps 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