Error correction method and device for response frame, storage medium and wi-fi device
By introducing the statistical analysis and error correction processing of the FCS check counter and bit 1 counter, the frequent retransmission problem caused by response frame errors in WiFi communication is solved, the communication efficiency and reliability are improved, and resource utilization is optimized.
Patent Information
- Application Number
- CN202411712482.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-11-27
AI Technical Summary
In WiFi communications, errors in response frames lead to frequent retransmissions, which affects communication efficiency and may cause network congestion.
The FCS check counter and bit 1 counter are used to correct bit errors in response frames through statistical analysis and error correction processing mechanisms, reducing unnecessary data frame retransmissions.
It improves communication efficiency and reliability, optimizes communication resource utilization, and enhances the system's anti-interference capability.
Smart Images

Figure CN119583014B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of wireless communications, and in particular to a response frame error correction method, apparatus, storage medium, and WiFi device. Background Art
[0002] In the field of wireless communications, especially Wi-Fi, reliable data transmission is crucial. Typically, data transmission follows a strict set of protocols to ensure data integrity and accuracy. The sending and receiving of non-aggregated data frames is a fundamental and critical step in this process.
[0003] Specifically, when a first Wi-Fi device needs to send data to a second Wi-Fi device, it encapsulates the data to be transmitted into a non-aggregated data frame and sends it over the wireless channel. To ensure successful reception of the data frame, the receiver (i.e., the second Wi-Fi device) sends an acknowledgment frame to the sender (i.e., the first Wi-Fi device) after receiving the data frame, indicating successful receipt of the data frame. This mechanism helps the sender confirm the data transmission status and take retransmission measures if necessary.
[0004] However, in actual communication, due to the complexity and instability of wireless channels, the transmission of both data and response frames may be subject to interference. In particular, during the transmission of response frames, due to their relatively short length (typically 14 bytes), even if the data frame is successfully transmitted, the response frame may contain a small number of bit errors due to factors such as over-the-air interference. When these errors cause the response frame's FCS (Frame Check Sequence) check to fail, the sender cannot confirm the successful receipt of the data frame, triggering a retransmission mechanism that requires the relatively long data frame to be resent.
[0005] While this retransmission mechanism ensures data reliability to a certain extent, it can also significantly impact throughput. Especially in high-load or low-bandwidth communication environments, frequent data frame retransmissions can consume more communication resources, reduce communication efficiency, and even cause network congestion. Therefore, optimizing the transmission and verification mechanisms for response frames to reduce data frame retransmissions caused by response frame errors has become a pressing issue in the field of WiFi communications. Summary of the Invention
[0006] The embodiments of the present application provide a response frame error correction method, apparatus, storage medium, and WiFi device, which can solve the problem of low communication efficiency caused by the high number of response frame retransmissions in related technologies. The technical solution is as follows:
[0007] In a first aspect, an embodiment of the present application provides a method for correcting an error in a response frame, the method comprising:
[0008] The first WiFi device sends a non-aggregated frame to the second WiFi device;
[0009] The first WiFi device receives a response frame returned by the second service device based on the non-aggregated frame;
[0010] If the receiving address of the response frame is the MAC address of the first WiFi device and the frame type is the specified type, continue to perform FCS check on the response frame; the length of the response frame is fixed to M bits, where M is an integer greater than 1, and a bit 1 counter is set for each bit;
[0011] If the FCS check of the response frame fails, the first WiFi device increases the count value of the FCS check counter by 1, and parses the bit value of each bit in the response frame. When the bit value is equal to 1, the count value of the bit 1 counter associated with the bit is increased by 1; when the bit value is equal to 0, the count value of the bit 1 counter associated with the bit remains unchanged;
[0012] When the count value of the FCS check counter is less than N, the first WiFi device retransmits the non-aggregated frame to the second WiFi device;
[0013] When the count value in the FCS check counter is equal to N, the first WiFi device queries the accumulated count value of each bit 1 counter, and when the accumulated count value is greater than or equal to (N+1) / 2, the bit value of the corresponding bit is replaced by 1; when the accumulated count value is less than (N+1) / 2, the bit value of the corresponding bit is replaced by 0, where N is an odd number greater than 1;
[0014] After completing the bit value replacement operation for each bit, a response frame after error correction is obtained;
[0015] If the FCS check of the error-corrected response frame passes, it is determined that the non-aggregated frame is sent successfully, the non-aggregated frame is cleared, the count value of the FCS check counter is reset to 0, and the count value of each bit 1 counter is reset to 0.
[0016] In a second aspect, an embodiment of the present application provides an error correction device for a response frame, the error correction device for the response frame comprising:
[0017] a transceiver unit, configured to send a non-aggregated frame to a second WiFi device;
[0018] The transceiver unit is further configured to receive a response frame returned by the second service device based on the non-aggregated frame;
[0019] The check unit is configured to continue to perform FCS check on the response frame if the receiving address of the response frame is the MAC address of the first WiFi device and the frame type is a specified type; the length of the response frame is fixed as M bits, M is an integer greater than 1, and each bit is provided with a bit 1 counter;
[0020] The statistical unit is configured to, if the FCS check on the response frame fails, increase the count value of the FCS check counter by 1, and parse the bit value of each bit in the response frame; when the bit value is equal to 1, the count value of the bit 1 counter associated with the bit is increased by 1; and when the bit value is equal to 0, the count value of the bit 1 counter associated with the bit is kept unchanged;
[0021] The transceiving unit is further configured to, when the count value of the FCS check counter is less than N, resend the non-aggregated frame to the second WiFi device by the first WiFi device;
[0022] The replacement unit is configured to, when the count value of the FCS check counter is equal to N, query the accumulated count value of each bit 1 counter, replace the bit value of the corresponding bit with 1 when the accumulated count value is greater than or equal to (N+1) / 2, and replace the bit value of the corresponding bit with 0 when the accumulated count value is less than (N+1) / 2, N being an odd number greater than 1.
[0023] The generation unit is configured to obtain a corrected response frame after completing the replacement operation on the bit value of each bit.
[0024] The reset unit is configured to, if the FCS check on the corrected response frame passes, determine that the non-aggregated frame is successfully sent, clear the non-aggregated frame, reset the count value of the FCS check counter to 0, and reset the count value of each bit 1 counter to 0.
[0025] 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.
[0026] 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.
[0027] The technical solutions provided by some embodiments of the present application have at least the following beneficial effects:
[0028] By introducing the FCS check counter and bit 1 counter, combined with statistical analysis and error correction processing mechanisms, the problem of data frame retransmission caused by response frame errors in WiFi communication is effectively solved, which improves communication efficiency and reliability, optimizes communication resource utilization, and enhances system adaptability. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0030] Figure 1 This is an architectural diagram of a WiFi wireless communication system provided by an embodiment of the present application;
[0031] Figure 2 This is an interactive schematic diagram of a response frame error correction method provided by an embodiment of the present application;
[0032] Figure 3 This is a schematic diagram of the data structure of the frame synchronization header provided in an embodiment of the present application;
[0033] Figure 4 This is a structural diagram of an error correction device for a response frame provided by the present application;
[0034] Figure 5 This is a structural diagram of a WiFi device provided by this application. DETAILED DESCRIPTION
[0035] In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
[0036] refer to Figure 1 , Figure 1 Figure 1 is a network architecture diagram of a Wi-Fi communication system. The Wi-Fi communication system includes at least one station (stations 11 to 13), an access point 21, and a server 31. Stations can transmit data frames to each other, and to each access point, and receive response frames to the data frames.
[0037] Among them, the sites in the embodiments of the present application can be smart phones, tablet computers, gaming devices, AR (Augmented Reality) devices, cars, data storage devices, audio playback devices, video playback devices, notebooks, desktop computing devices, wearable devices such as electronic watches, electronic glasses, electronic helmets, electronic bracelets, electronic necklaces, electronic clothing and other devices.
[0038] The following will be combined with the Figure 2 , the error correction method of the response frame provided in the embodiment of the present application is described in detail. Among them, the execution subject of the error correction method of the response frame in the embodiment of the present application is Figure 1 stations or access points in the network.
[0039] See Figure 2 , is a flow chart of a response frame error correction method provided in an embodiment of the present application. The method of the present application may include the following steps:
[0040] S201: A first WiFi device sends a non-aggregated frame to a second WiFi device.
[0041] In the first Wi-Fi device, the data link layer is responsible for constructing a non-aggregate frame (i.e., a single frame that does not contain multiple data packets). The non-aggregate frame includes a frame control field, a duration / ID field, an address field (such as the source MAC address and the destination MAC address), a sequence number control field, a data field, and a frame check sequence (FCS) field. This frame is modulated by the physical layer and sent to the second Wi-Fi device via a wireless channel.
[0042] S202: The first WiFi device receives a response frame returned by the second service device based on the non-aggregated frame.
[0043] After receiving the non-aggregated frame, the second WiFi device performs corresponding operations (such as confirming receipt, requesting to send, etc.) according to the frame type and content, and then constructs a response frame (such as an ACK frame or a CTS frame). The response frame also contains a frame control field, an address field, and an FCS field. The second WiFi device sends the response frame back to the first WiFi device via the wireless channel. The data link layer of the first WiFi device is responsible for receiving and parsing the response frame. For example: when the response frame is an ACK frame, the value of Frame Control is fixed (the retry bit is fixed to 0), the value of Duration is fixed (generally fixed to 0x0000), and the value of RA is fixed (that is, the MAC address of the sender). Therefore, the value of FCS is also fixed, so that the content of the response frame of the same non-aggregated frame remains unchanged.
[0044] S203: If the receiving address of the response frame is the MAC address of the first WiFi device and the frame type is the specified type, continue to perform FCS check on the response frame; the length of the response frame is fixed to M bits, where M is an integer greater than 1, and a bit 1 counter is set for each bit; the frame type of the response frame is an ACK frame or a CTS frame.
[0045] After receiving a response frame, the first WiFi device first checks whether the response frame's receiving address is its own MAC address and whether the frame type is the designated ACK or CTS frame. If these conditions are met, an FCS check is performed. FCS check is performed by calculating the FCS field of the received frame and comparing it with a recalculated FCS value to detect any errors during frame transmission. The response frame is fixed at M bits, where M is an integer greater than 1, and each bit is provided with a bit-1 counter for subsequent error correction.
[0046] In some embodiments of the present application, if the receiving address of the response frame is not the MAC address of the first WiFi device, or the frame type is not a specified ACK frame or CTS frame, the first WiFi device performs the following operations:
[0047] Because the response frame does not meet expectations, the first WiFi device will not process it further but will directly discard it. Although FCS check is not performed at this time, because the response frame does not meet expectations, the first WiFi device still believes that there may be a problem with the current non-aggregate frame transmission. Therefore, the first WiFi device will update its internal retransmission logic and prepare to retransmit the non-aggregate frame. For subsequent analysis and debugging, the first WiFi device can choose to record the error information, including the specific circumstances of the receiving address mismatch or frame type mismatch. After confirming that the response frame does not meet expectations, the first WiFi device will reconstruct and send the non-aggregate frame to the second WiFi device according to the original retransmission logic. At this time, the first WiFi device may add some additional control information, such as a retransmission count flag, to facilitate identification and processing in subsequent response frames.
[0048] To avoid wasting resources due to infinite retransmissions, the first WiFi device typically sets an upper limit on the number of retransmissions. If the upper limit is reached and a correct response frame is still not received, the first WiFi device will stop retransmitting and may take other error handling measures. After retransmitting the non-aggregated frame, the first WiFi device will re-execute steps S202 through S208 to check whether the new response frame meets expectations.
[0049] S204. If the FCS check of the response frame fails, the first WiFi device increases the count value of the FCS check counter by 1, and parses the bit value of each bit in the response frame. When the bit value is equal to 1, the count value of the bit 1 counter associated with the bit is increased by 1; when the bit value is equal to 0, the count value of the bit 1 counter associated with the bit remains unchanged.
[0050] If the FCS check fails, it means that the response frame has an error during transmission. At this time, the first WiFi device adds 1 to the count value of the FCS check counter and records the bit value of the error frame. For each bit, if the bit value is equal to 1, the count value of the bit 1 counter associated with the bit is added by 1; if the bit value is equal to 0, the count value of the bit 1 counter associated with the bit is kept unchanged. In this way, the error condition of each bit is recorded.
[0051] S205, when the count value of the FCS check counter is less than N, the first WiFi device retransmits the non-aggregated frame to the second WiFi device.
[0052] If the count value of the FCS check counter is less than N (N is an odd number greater than 1, representing the maximum number of allowed retransmissions), the first WiFi device retransmits the non-aggregated frame and re-executes the steps of S202 to S204. This is to try to correct possible transmission errors and increase the chance of successfully receiving the correct response frame.
[0053] S206, when the count value in the FCS check counter is equal to N, the first WiFi device queries the accumulated count value of each bit 1 counter, and when the accumulated count value is greater than or equal to (N+1) / 2, the bit value of the corresponding bit is replaced by 1; when the accumulated count value is less than (N+1) / 2, the bit value of the corresponding bit is replaced by 0, N is an odd number greater than 1.
[0054] When the count value of the FCS check counter reaches N, it means that the maximum number of retransmissions has been tried, but the correct response frame has still not been successfully received. At this time, the first WiFi device will execute an error correction algorithm. This algorithm is based on the accumulated count value of the bit 1 counter of each bit to determine the correct value of each bit. If the accumulated count value of a certain bit is greater than or equal to (N+1) / 2, the bit value of the bit is replaced by 1; otherwise, it is replaced by 0. In this way, the possible error bits can be corrected based on the principle of majority voting.
[0055] S207, after completing the replacement operation of the bit value of each bit, the error-corrected response frame is obtained.
[0056] After completing the replacement operation of the bit value of each bit, the first WiFi device obtains the error-corrected response frame. This response frame may contain some corrected error bits, but it is still a valid frame format.
[0057] S208, if the FCS check of the error-corrected response frame passes, it is determined that the non-aggregated frame is successfully sent, the non-aggregated frame is cleared, the count value of the FCS check counter is reset to 0, and the count value of each bit 1 counter is reset to 0.
[0058] The first WiFi device performs an FCS check on the error-corrected response frame. If the check passes, the error-corrected response frame is correct, confirming that the non-aggregated frame was successfully transmitted. The first WiFi device then clears all information related to the non-aggregated frame (including the non-aggregated frame itself, the count value of the FCS check counter, and the count values of each bit 1 counter) and prepares for the next communication. If the check still fails, further error handling measures may be required, such as abandoning the communication or notifying the upper-layer protocol to retry.
[0059] For example, see Figure 3 As shown in the error correction principle diagram, the first WiFi device receives FCS check failure response frames three times in a row (only the first 8 bits, i.e., FrameControl[7:0], are listed, and the remaining bits are treated the same way). The three received FrameControl[7:0] are incorrectly 0xD5 (the first bit is wrong), 0xD0 (the third bit is wrong), and 0xC4 (the fifth bit is wrong), respectively. The bit 1 counters set for each bit are CNT_1 to CNT_7.
[0060] After three statistical operations, N = 3, that is, (N + 1) / 2 = 2. CNT_1 = 1, less than 2, resulting in the first bit being 0 after replacement; CNT_2 = 0, less than 2, resulting in the second bit being 0 after replacement; CNT_3 = 2, equal to 2, resulting in the third bit being 1 after replacement; CNT_4 = 0, less than 2, resulting in the fourth bit being 0 after replacement; CNT_5 = 2, equal to 2, resulting in the fifth bit being 1 after replacement; CNT_6 = 0, less than 2, resulting in the sixth bit being 0 after replacement; CNT_7 = 3, greater than 2, resulting in the seventh bit being 1 after replacement; CNT_8 = 3, greater than 2, resulting in the eighth bit being 1 after replacement. The resulting value of the error-corrected response frame is 0xD4 (1101_0100).
[0061] In some embodiments of the present application, after receiving an error-corrected response frame, the first WiFi device performs an FCS check on the frame. FCS check is performed by comparing the FCS value at the end of the frame with a frame content checksum calculated using a specific algorithm. If the two do not match, the FCS check fails, triggering a retransmission mechanism. Once the FCS check failure is confirmed, the first WiFi device immediately initiates the retransmission mechanism. This mechanism is typically controlled by the device's communication protocol stack or hardware layer. Before retransmitting, the device reprepares the non-aggregated frame for transmission, including recalculating the FCS value and appending it to the end of the frame. The process for retransmitting a non-aggregated frame is similar to the initial transmission, but the device ensures that the frame format and content are correct. The device then sends the retransmitted non-aggregated frame to the peer device via a wireless channel. If retransmission fails within a certain number of retransmissions (e.g., the maximum number of retransmissions specified by the protocol) (e.g., the peer device does not respond or the response frame's FCS check fails again), the first WiFi device may take further error handling measures, such as logging the error, attempting to switch to another communication channel, or reporting to a higher-layer application.
[0062] In summary, the beneficial effects of implementing the embodiments of this application include:
[0063] By introducing an FCS check counter and a bit-one counter, this application can perform statistical analysis of bit errors in response frames when the response frame fails FCS check. If the number of FCS check failures does not reach the preset threshold N, the traditional data frame retransmission strategy is adopted. If the number of failures reaches or exceeds N, error correction is performed on the response frame based on the statistical results of the bit-one counter, rather than directly retransmitting the data frame. This mechanism effectively reduces unnecessary data frame retransmissions caused by brief or minor interference, thereby improving communication efficiency.
[0064] By counting and analyzing bit errors in response frames, this application can identify and correct those bits that frequently experience errors due to air interference. If the error-corrected response frame passes the FCS check, it is considered validly received, ensuring successful data frame transmission. This mechanism enhances WiFi communication's anti-interference capabilities and improves communication reliability.
[0065] Reducing unnecessary data frame retransmissions means reducing wireless channel occupancy time, thereby optimizing communication resource utilization. This optimization is particularly important in high-load or low-bandwidth communication environments, as it can improve the communication performance and user experience of the entire WiFi network.
[0066] The error correction mechanism in this application's technical solution is based on the statistical results of the response frame bit errors, so it has a certain degree of adaptability to different types of bit errors and interference. This adaptability enables the present invention to maintain good performance in different communication environments and conditions.
[0067] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0068] See Figure 4 , which shows a schematic diagram of the structure of a response frame error correction device provided by an exemplary embodiment of the present application. This device can be implemented as all or part of a terminal through software, hardware, or a combination of both. Response frame error correction device 4 (hereinafter referred to as device 4) includes: a transceiver unit 401, a check unit 402, a statistics unit 403, a replacement unit 404, a generation unit 405, and a reset unit 406.
[0069] The transceiver unit 401 is configured to send a non-aggregated frame to a second WiFi device;
[0070] The transceiver unit 401 is further configured to receive a response frame returned by the second service device based on the non-aggregated frame;
[0071] a check unit 402 configured to continue performing an FCS check on the response frame if the receiving address of the response frame is the MAC address of the first WiFi device and the frame type is a specified type; the length of the response frame is fixed to M bits, where M is an integer greater than 1, and a bit 1 counter is set for each bit;
[0072] The statistical unit 403 is configured to, if the FCS check of the response frame fails, increase the count value of the FCS check counter by 1 by the first WiFi device, and parse the bit value of each bit in the response frame. When the bit value is equal to 1, increase the count value of the bit 1 counter associated with the bit by 1; when the bit value is equal to 0, control the count value of the bit 1 counter associated with the bit to remain unchanged;
[0073] The transceiver unit 401 is further configured to, when the count value of the FCS check counter is less than N, retransmit the non-aggregated frame by the first WiFi device to the second WiFi device;
[0074] a replacing unit 404, configured to, when the count value in the FCS check counter is equal to N, query, by the first WiFi device, the accumulated count value of each bit 1 counter; and when the accumulated count value is greater than or equal to (N+1) / 2, replace the bit value of the corresponding bit with 1; and when the accumulated count value is less than (N+1) / 2, replace the bit value of the corresponding bit with 0, where N is an odd number greater than 1;
[0075] A generating unit 405 is configured to replace the bit value of each bit to obtain an error-corrected response frame;
[0076] The reset unit 406 is configured to, if the FCS check of the error-corrected response frame passes, determine that the non-aggregate frame is sent successfully, clear the non-aggregate frame, reset the count value of the FCS check counter to 0, and reset the count value of each bit 1 counter to 0.
[0077] In one possible implementation, N=3.
[0078] In a possible implementation, the transceiver unit 401 is further configured to:
[0079] When the receiving address of the response frame is not the MAC address of the first WiFi device, and / or the frame type is not a specified type, the response frame is discarded, and the non-aggregated frame is retransmitted.
[0080] In a possible implementation manner, the frame type of the response frame is an ACK frame or a CTS frame.
[0081] In a possible implementation, the transceiver unit 401 is further configured to:
[0082] If the FCS check of the error-corrected response frame fails, the first WiFi device retransmits the non-aggregated frame.
[0083] It should be noted that the device 4 provided in the above embodiment, when executing the error correction method for the response frame, is only illustrated by the division of the above-mentioned functional modules. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the touch operation response device provided in the above embodiment and the touch operation response method embodiment are based on the same concept. The implementation process is detailed in the method embodiment and will not be repeated here.
[0084] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0085] The present application also provides a computer storage medium that can store multiple instructions, which are suitable for being loaded and executed by a processor as described above. Figure 2 The method steps of the embodiment shown, the specific execution process can be found in Figure 2 The detailed description of the illustrated embodiment will not be repeated here.
[0086] 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 error correction method of the response frame as described in the above embodiments.
[0087] See Figure 5 , provides a schematic diagram of the structure of a WiFi device according to an embodiment of the present application. Figure 5 As shown, the WiFi device 500 may include: at least one processor 501 , at least one input interface 504 , an output interface 503 , a memory 505 , and at least one communication bus 502 .
[0088] The communication bus 502 is used to implement the connection and communication between these components.
[0089] The output interface 503 may include a display screen (Display) and a camera (Camera). The optional output interface 503 may also include a standard wired interface and a wireless interface.
[0090] The input interface 504 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0091] The processor 501 may include one or more processing cores. The processor 501 connects various components within the terminal 500 using various interfaces and circuits, and executes various functions of the terminal 500 and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 505, and calling data stored in the memory 505.
[0092] Among them, the memory 505 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 505 includes a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 505 may also be optionally at least one storage device located away from the aforementioned processor 501. As Figure 5 As shown, the memory 505 as a computer storage medium may include an operating system, a network communication module, a user interface module and an application program.
[0093] exist Figure 5 In the WiFi device 500 shown, the processor 501 can be used to call the application stored in the memory 505 and specifically execute the following Figure 2 The specific process can be referred to the method shown in Figure 2 As shown, no further details are given here.
[0094] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory, or a random access memory.
[0095] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Ordinary technicians in this field can understand that implementing all or part of the processes of the above embodiment and making equivalent changes in accordance with the claims of this application still fall within the scope of the invention.
Claims
1. A response frame error correction method, characterized in that: The method comprises: The first WiFi device sends a non-aggregated frame to the second WiFi device; receiving, by the first WiFi device, a response frame returned by the second WiFi device based on the non-aggregated frame; If the receiving address of the response frame is the MAC address of the first WiFi device and the frame type is the specified type, continue to perform FCS check on the response frame; the length of the response frame is fixed to M bits, where M is an integer greater than 1, and a bit 1 counter is set for each bit; If the FCS check of the response frame fails, the first WiFi device increases the count value of the FCS check counter by 1, and parses the bit value of each bit in the response frame. When the bit value is equal to 1, the count value of the bit 1 counter associated with the bit is increased by 1; when the bit value is equal to 0, the count value of the bit 1 counter associated with the bit remains unchanged; When the count value of the FCS check counter is less than N, the first WiFi device retransmits the non-aggregated frame to the second WiFi device; When the count value in the FCS check counter is equal to N, the first WiFi device queries the accumulated count value of each bit 1 counter, and when the accumulated count value is greater than or equal to (N+1) / 2, the bit value of the corresponding bit is replaced by 1; when the accumulated count value is less than (N+1) / 2, the bit value of the corresponding bit is replaced by 0, where N is an odd number greater than 1; After completing the bit value replacement operation for each bit, a response frame after error correction is obtained; If the FCS check of the error-corrected response frame passes, it is determined that the non-aggregated frame is sent successfully, the non-aggregated frame is cleared, the count value of the FCS check counter is reset to 0, and the count value of each bit 1 counter is reset to 0.
2. The method according to claim 1, characterized in that N=3。 3. The method according to claim 1, characterized in that Also includes: When the receiving address of the response frame is not the MAC address of the first WiFi device, and / or the frame type is not a specified type, the response frame is discarded, and the non-aggregated frame is retransmitted.
4. The method according to claim 1, wherein The frame type of the response frame is an ACK frame or a CTS frame.
5. The method according to claim 1, wherein Also includes: If the FCS check of the error-corrected response frame fails, the first WiFi device retransmits the non-aggregated frame.
6. A response frame error correction device, characterized in that: include: a transceiver unit, configured to send a non-aggregated frame to a second WiFi device; The transceiver unit is further configured to receive a response frame returned by the second WiFi device based on the non-aggregated frame; a checking unit, configured to continue to perform an FCS check on the response frame if the receiving address of the response frame is the MAC address of the first WiFi device and the frame type is a specified type; the length of the response frame is fixed to M bits, where M is an integer greater than 1, and a bit 1 counter is set for each bit; a statistical unit, configured to, if the FCS check of the response frame fails, increase the count value of the FCS check counter by 1 by the first WiFi device, and parse the bit value of each bit in the response frame; when the bit value is equal to 1, increase the count value of the bit 1 counter associated with the bit by 1; and when the bit value is equal to 0, control the count value of the bit 1 counter associated with the bit to remain unchanged; The transceiver unit is further configured to, when the count value of the FCS check counter is less than N, retransmit the non-aggregated frame by the first WiFi device to the second WiFi device; a replacing unit, configured to, when the count value in the FCS check counter is equal to N, query, by the first WiFi device, the accumulated count value of each bit 1 counter; and when the accumulated count value is greater than or equal to (N+1) / 2, replace the bit value of the corresponding bit with 1; and when the accumulated count value is less than (N+1) / 2, replace the bit value of the corresponding bit with 0, where N is an odd number greater than 1; A generating unit, configured to obtain an error-corrected response frame after completing a bit value replacement operation on each bit; A reset unit is configured to, if the FCS check of the error-corrected response frame passes, determine that the non-aggregate frame is sent successfully, clear the non-aggregate frame, and reset the count value of the FCS check counter to 0, as well as the count value of each bit 1 counter to 0.
7. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, which are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 5.
8. A WiFi device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for controlling aggregation frame length in wireless network
CN105306167A
A fast circulating CRC verification method used for correcting error bits in data frame
CN1571284A