Mac layer scheduling method, apparatus and device of wi-fi and storage medium

CN122602232APending Publication Date: 2026-08-18GUANGZHOU AVA ELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610858257.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-15
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

1.应用业务的差异化调度机制存在局限性:尽管现有Wi-Fi MAC层已定义了基于接入类别(AC)的优先等级队列(如VO、VI、BE、BK),但其映射粒度较粗,仅能区分语音、视频、尽力而为等少数类别,难以精细化应对同一类别内不同实时性要求的业务流

Benefits of technology

1.显著提升音视频传输体验:针对应用业务设计优先等级调度,确保高实时性音视频(如语音)优先传输,有效降低时延和抖动,优化播放流畅度;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122602232A_ABST
    Figure CN122602232A_ABST
Patent Text Reader

Abstract

This invention discloses a MAC layer scheduling method, apparatus, device, and storage medium for Wi-Fi. The method includes: sending and receiving application data frames between a transmitting end and a receiving end via the MAC layer; when the receiving end's MAC layer detects a lost application data frame, it generates a feedback NACK message for the lost application data frame, but stops sending NACK messages if the number of times exceeds a threshold; the transmitting end's MAC layer's Tx multi-queue retransmits the data based on the feedback NACK message, but stops retransmitting if the number of retransmissions exceeds a threshold; lost application data frames between MAC layers can be supplemented and transmitted via an upper-layer protocol stack. This invention can significantly reduce the transmission processing burden of the kernel protocol stack, effectively improve wireless transmission efficiency, and simultaneously ensure the real-time performance and transmission stability of application services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0002] This invention relates to the technical field of wireless networks, and more specifically, to a Wi-Fi MAC layer scheduling method, apparatus, device, and storage medium. Background Technology

[0003] In existing Wi-Fi communication systems, the reliability control and scheduling logic for data transmission mainly relies on the upper-layer TCP / UDP protocol stack. However, the Wi-Fi MAC layer only provides basic send and receive mechanisms and has not been specifically optimized for the differentiated transmission needs of application services. Specifically, it has the following core defects: 1. The differentiated scheduling mechanism for application services has limitations: Although the existing Wi-Fi MAC layer has defined priority queues based on access class (AC) (such as VO, VI, BE, BK), its mapping granularity is relatively coarse, only able to distinguish a few categories such as voice, video, and best-effort, making it difficult to finely handle service flows with different real-time requirements within the same category. In actual transmission, high real-time services (such as real-time voice and real-time video control signaling) and ordinary data are often still mapped to the same transmission queue, lacking a priority scheduling strategy that dynamically adjusts based on service real-time performance. This leads to excessive latency and jitter for high real-time services, severely affecting the transmission experience and even causing problems such as stuttering and disconnection.

[0004] 2. Low efficiency of cross-layer transmission coordination: Packet loss recovery of application data is mainly handled independently by the kernel TCP protocol stack, while the MAC layer only executes a fixed send acknowledgment mechanism. There is a lack of coordinated optimization between the two for the characteristics of application transmission. TCP congestion control and MAC layer retransmission, rate adjustment and other behaviors are not linked, resulting in low full-stack transmission efficiency from the application layer to the Wi-Fi physical layer (manifested as insufficient bandwidth utilization and increased end-to-end latency), which cannot meet the needs of high real-time services.

[0005] 3. Redundant retransmission is a particularly prominent issue: Even when the MAC layer has completed the application data retransmission through its own mechanism, the TCP protocol stack may still misjudge packet loss due to delayed ACK feedback, triggering unnecessary redundant retransmissions. This not only wastes wireless bandwidth resources but also interferes with the smoothness of real-time audio and video service transmission.

[0006] 4. Insufficient coordination between link status awareness and TCP congestion control: The TCP congestion control algorithm cannot directly obtain the real-time link quality status of the Wi-Fi MAC layer and PHY layer, and it does not adjust the transmission strategy according to the priority differences of application services, resulting in a lag in congestion control adjustment. It cannot match the actual carrying capacity of the current wireless link, nor can it adapt to the differentiated transmission needs of different application services.

[0007] In summary, there is an urgent need for a technical solution that focuses on the high-efficiency transmission requirements of application data. This solution should significantly reduce the transmission processing burden of the kernel protocol stack, effectively improve wireless transmission efficiency, and take into account both the real-time performance and transmission stability of application services, so as to fundamentally overcome the shortcomings of existing systems in the above four aspects. Summary of the Invention

[0008] To overcome at least one of the shortcomings of the prior art, this invention provides a layered collaborative transmission scheme that combines application service priority scheduling, MAC layer optimized transmission control, and TCP congestion control for collaborative optimization. This invention also includes apparatus, devices, and storage media for implementing the scheme.

[0009] In a first aspect, the present invention provides a Wi-Fi MAC layer scheduling method, comprising: The sending end MAC layer obtains the application data frame from the Tx multi-queue and sends the application data frame through the PHY layer; After receiving the application data frame, the receiving MAC layer inserts it into the corresponding position in the receiving queue according to the sequence number. The receiving MAC layer only maintains a receiving queue sorted by sequence number for the application data stream and does not process the control frames and management frames of the Wi-Fi protocol itself. When the receiving MAC layer detects a discontinuous sequence number, it identifies the lost application data frame based on the sequence number and generates a NACK message for the lost application data frame; wherein, the NACK message contains the start sequence number and end sequence number of the lost application data frame; When the sending end MAC layer receives a NACK message, it determines whether the lost application data frame in the NACK message is in the Tx multi-queue. If it exists, it retransmits it. When the sending end MAC layer finds that the cumulative number of transmissions of an application data frame has reached the preset retransmission threshold, it removes the application data frame from the Tx multi-queue. The receiving end MAC layer determines whether the number of times the same lost application data frame has been fed back exceeds the preset maximum number of times it has been fed back. If it does, it stops feeding back. The receiving MAC layer considers the received application data frames and lost application data frames that have stopped responding in the receiving queue as frames that can be pushed, and pushes all consecutively sequenced frames that can be pushed to the upper protocol stack; when the frame that can be pushed is a lost application data frame that has stopped responding, it skips the application data frame and continues to push to the upper protocol stack. The sending end signaling interception layer checks the application data frame sequence number range in the TCP ACK / SACK packet, finds the corresponding application data frame based on the sequence number range, and if the lost frame reported in the ACK / SACK packet is still in the Tx multi-queue of the MAC layer, the ACK / SACK packet is intercepted; if it is not in the Tx multi-queue, it is passed through to the kernel protocol layer. The signaling interception layer is located between the TCP protocol stack and the MAC layer.

[0010] In one implementation, the Wi-Fi layer's Tx multi-queue, i.e., the Transmit multi-queue, is a transmit-side scheduling queue containing at least two sub-queues with different priority levels: The Wi-Fi MAC layer scheduling method further includes: When the link quality level changes, the sending and retransmission strategies are adjusted according to the changed link quality level. Among them, at least three link quality levels are preset, and the network quality levels from high to low are: good network quality, poor network quality, and bad network quality; each network quality level has its corresponding transmission strategy and retransmission strategy. When the network quality is good, the sending strategy includes: sending all application data frames in the sending sub-queues according to their priority; the retransmission strategy includes: retransmitting all lost application data frames in the sending sub-queues until the retransmission threshold is reached. When network quality is poor, the transmission strategy includes: pausing the transmission of application data frames in the lowest priority transmission sub-queue, and determining the transmission order of each queue according to the priority of the transmission sub-queue; the retransmission strategy includes: retransmitting all lost application data frames other than the lowest priority transmission sub-queue until the retransmission threshold is reached. When network quality is poor, the sending strategy includes: sending only application data frames in the highest priority sending sub-queue; the retransmission strategy includes: retransmitting only application data frames in the highest priority sending sub-queue until the retransmission threshold is reached.

[0011] In one embodiment, the Wi-Fi MAC layer scheduling method further includes: Determine the link quality level; The process of determining the link quality level includes: Obtain the current MCS value of the transmitter from the Wi-Fi driver at fixed intervals; Maintain a sliding window of a preset length and save the time series of the most recent MCS values ​​in this sliding window; By fitting the MCS values ​​in the sliding window, a trend result regarding the changing trend of the MCS values ​​is obtained; Based on the preset trend level model, the trend results are classified into the corresponding trend levels; wherein the preset trend levels include at least the first level, the second level, and the third level. If the trend result is classified as the first level, the link quality level is judged as good network quality. The trend of the first level is either stable or rising. If the trend result is classified as the second level, the link quality level is judged as poor network quality. The trend of the second level is downward, and the rate of decline falls within the preset first rate of decline range. If the trend result is classified into the third level, the link quality level is judged as poor network quality. The trend of the third level is downward, and the rate of decline falls within the preset second decline rate range. The decline rate of the second decline rate range is greater than the decline rate of the first decline rate range.

[0012] In one implementation, the process of fitting the MCS values ​​in the sliding window to obtain a trend result regarding the changing trend of the MCS values ​​includes: The MCS values ​​within the sliding window are linearly fitted using the least squares method, and the slope k is calculated. The slope k is the trend result. In the preset trend level model, k ≥ 0 is the first level, -0.5 < k < 0 is the second level, and k ≤ -0.5 is the third level.

[0013] In one embodiment, the Wi-Fi MAC layer scheduling method further includes: When the link quality level is good network quality, the sending end signaling interception layer filtering can cause the TCP protocol stack to determine the ACK packet information as a duplicate ACK, keeping the ECE flag bit at 0.

[0014] When the link quality level is poor or low, the sending end signaling interception layer will pass through the ACK to the TCP protocol stack.

[0015] In one embodiment, the Wi-Fi MAC layer scheduling method further includes: When the link quality level is improved, the sending end signaling interception layer injects an ACK packet into the TCP protocol stack. The ACK packet is used to encourage the TCP protocol stack to start sending or increase the sending rate. When the link quality level decreases, the sending end signaling interception layer actively constructs and injects an ACK packet with the TCP ECE flag into the local TCP protocol stack; the ACK packet simulates ECN congestion control by setting the ECE flag to 1, triggering the TCP protocol stack to perform congestion control and reduce the sending rate.

[0016] In one implementation, the sending end MAC layer receives a NACK packet, determines whether the lost application data frame in the NACK packet is in the Tx multi-queue, and if so, the retransmission process during the retransmission includes: When the link quality level is good, immediately move the application data frame to the head of the queue for retransmission; When the link quality level is poor or low, retransmission is performed according to the retransmission strategy based on queue priority.

[0017] Secondly, the present invention provides a Wi-Fi MAC layer scheduling device, comprising: The sending end MAC layer acquisition module is used to acquire application data frames in the Tx multi-queue and send the application data frames through the PHY layer. The receiving module of the receiving MAC layer is used to insert the application data frame into the corresponding position of the receiving queue according to the sequence number after the receiving MAC layer receives the application data frame. The receiving MAC layer only maintains a receiving queue sorted by sequence number for the application data stream and does not process the control frames and management frames of the Wi-Fi protocol itself. The receiving end MAC layer feedback module is used to find the lost application data frame based on the sequence number when a discontinuous sequence number is detected, and generate a feedback NACK message for the lost application data frame; wherein, the NACK message contains the start sequence number and end sequence number of the lost application data frame; and determines whether the number of feedbacks for the same lost application data frame exceeds the preset maximum number of feedbacks, and if it does, stops the feedback. The receiving end MAC layer upload module is used to treat the application data frames already received in the receiving queue and the lost application data frames that have stopped responding as frames that can be pushed, and push all consecutively sequenced frames that can be pushed to the upper layer protocol stack; when the frame that can be pushed is a lost application data frame that has stopped responding, skip that application data frame and continue to push to the upper layer protocol stack. The sending end MAC layer retransmission module is used to process NACK packets and determine whether the lost application data frame in the NACK packet is in the Tx multi-queue. If it exists, it is retransmitted. When the sending end MAC layer finds that the cumulative number of transmissions of an application data frame has reached the preset retransmission threshold, it removes the application data frame from the Tx multi-queue. The sending end signaling interception layer, located between the TCP protocol stack and the MAC layer, is used to check the application data frame sequence number range in the TCP ACK / SACK message, find the corresponding application data frame according to the sequence number range, and if the lost frame reported in the ACK / SACK message is still in the Tx multi-queue of the MAC layer, the ACK / SACK message is intercepted; if it does not exist in the Tx multi-queue, it is passed through to the kernel protocol layer.

[0018] Thirdly, the present invention provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method of any of the above embodiments.

[0019] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the method of any of the above embodiments.

[0020] This invention implements differentiated transmission and retransmission strategies at the MAC layer and maintains complete transmission status information of application data frames and a frame loss feedback mechanism at the receiver layer, achieving a "Best-Effort" transmission strategy. By intercepting and processing TCP ACK / SACK signaling, redundancy between MAC layer transmission control and TCP protocol stack control is eliminated, while real-time link quality information from the MAC layer is directly fed back to the TCP protocol stack. This invention significantly reduces the transmission processing burden on the kernel protocol stack, effectively improves wireless transmission efficiency, and simultaneously considers the real-time performance and transmission stability of application services. Attached Figure Description

[0021] Figure 1 This is a schematic diagram of the overall process of one embodiment of the present invention.

[0022] Figure 2 This is a preferred overall architecture diagram of Embodiment 1 of the present invention.

[0023] Figure 3 This is a schematic diagram of the overall structure of one embodiment of the second embodiment of the present invention. Detailed Implementation

[0024] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0025] It should be noted that the terms "first, second, ..." used in the embodiments of the present invention are merely used to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, ..." can be interchanged in a specific order or sequence where permissible. It should be understood that the objects distinguished by "first, second, ..." can be interchanged where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein.

[0026] Example 1

[0027] Please see Figure 1 , Figure 1 This is a flowchart illustrating a Wi-Fi MAC layer scheduling method according to Embodiment 1 of the present invention. The method includes steps S110, S120, S130, S140, S150, S160, and S170. It should be noted that steps S110, S120, S130, S140, S150, S160, and S170 are merely reference numerals used to clearly explain the embodiment and the accompanying drawings. Figure 1 The correspondence is not intended to limit the order of steps in this embodiment.

[0028] In this method, data between the sending end and the receiving end is transmitted via Wi-Fi; Step S110: The sending end MAC layer obtains the application data frame in the Tx multi-queue and sends the application data frame through the PHY layer; In step S120, after the receiving MAC layer receives the application data frame, it inserts it into the corresponding position of the receiving queue according to the sequence number. The receiving MAC layer only maintains a receiving queue sorted by sequence number for the application data stream and does not process the control frames and management frames of the Wi-Fi protocol itself. In step S130, when the receiving MAC layer detects that the sequence number is not continuous, it finds the lost application data frame according to the sequence number and generates a feedback NACK message for the lost application data frame; wherein, the NACK message contains the start sequence number and end sequence number of the lost application data frame. Step S140: The sending end MAC layer receives the NACK message and determines whether the lost application data frame in the NACK message is in the Tx multi-queue. If it exists, it is retransmitted. When the sending end MAC layer finds that the cumulative number of transmissions of an application data frame reaches the preset retransmission threshold, it removes the application data frame from the Tx multi-queue. Step S150: The receiving end MAC layer determines whether the number of feedbacks for the same lost application data frame exceeds the preset maximum number of feedbacks. If it does, the feedback is stopped. In step S160, the receiving MAC layer considers the received application data frames and lost application data frames that have stopped feedback in the receiving queue as frames that can be pushed, and pushes all consecutively sequenced frames that can be pushed to the upper-layer protocol stack; wherein, when the frame that can be pushed is a lost application data frame that has stopped feedback, the application data frame is skipped and the push continues to the upper-layer protocol stack. In step S170, the sending end signaling interception layer checks the application data frame sequence number range in the TCP ACK / SACK packet, finds the corresponding application data frame according to the sequence number range, and if the lost frame reported in the ACK / SACK packet is still in the Tx multi-queue of the MAC layer, the ACK / SACK packet is intercepted; if it does not exist in the Tx multi-queue, it is passed through to the kernel protocol layer. The signaling interception layer is located between the TCP protocol stack and the MAC layer.

[0029] like Figure 2 As shown, Figure 2 This is a preferred overall architecture diagram of Embodiment 1 of the present invention. The upper-layer application sends application data, the TCP / UDP protocol stack processes the application data, and the application data enters the Wi-Fi MAC layer application priority scheduling and optimized sending control module.

[0030] It is important to note here that... Figure 2 The TCP timing control coordination module is responsible for working in conjunction with the kernel TCP protocol stack to resolve redundancy and mismatch issues between the TCP protocol stack and the MAC layer application send control. Its detailed description is provided later.

[0031] The Wi-Fi MAC layer application priority scheduling and optimized transmission control module is the core basic module of this invention. It only targets application data and is responsible for implementing application service differentiation scheduling and MAC layer optimized transmission control (Best-Effort). It does not involve any scheduling or control of the control frames or management frames of the Wi-Fi protocol itself, and is divided into two parts: the sending end and the receiving end.

[0032] Specifically, the control module executes step S110, whereby the sending end MAC layer obtains the application data frame from the Tx multi-queue and sends the application data frame to the receiving end through the PHY layer.

[0033] In one implementation, the Tx multi-queue in step S110, namely the Transmit multi-queue, is a sending-side scheduling queue that includes at least two sub-queues with different priority levels.

[0034] When the system starts, based on the real-time requirements of application services, a mapping relationship between service types and priority levels is preset, and N priority level transmission sub-queues (N≥2) are initialized. These are only used to carry application data and do not include control frames, management frames, etc. of the Wi-Fi protocol itself.

[0035] The typical mapping relationship among these sending sub-queues is as follows: Priority Level 0 (Highest): Real-time audio streams, VoIP data (highest real-time requirement); Priority Level 1: Real-time video stream (real-time requirements are secondary); Priority level 2 and below (optional): Non-real-time audio and video data, ordinary file transfer data.

[0036] Each sending sub-queue independently maintains an application data sending buffer and a sending status information table, recording only information related to application data frames.

[0037] At this point, the application service type is assigned to the corresponding priority sub-queue for sending.

[0038] In one implementation, the method further includes: generating a transmission status information record table to record application frame transmission status information.

[0039] For each application data frame entering the Tx multi-queue, the transmission status management submodule records the following information: 1. A unique frame identifier (generated by combining the source IP, destination IP, source port, destination port, and TCP / UDP sequence number); 2. The timestamp of the first entry into the Tx multi-queue; 3. Total number of sends; 4. The timestamp of the last sending; 5. The priority queue number to which it belongs; 6. Frame length (adapting to the characteristics of video frame size).

[0040] In step S110, the sending end MAC layer scans all non-empty application queues from high to low priority, retrieves the application data frame at the head of the highest priority non-empty queue, records the timestamp of the last transmission, increments the cumulative transmission count by 1, submits the application data frame to the PHY layer for transmission, and then waits for a reply from the receiving end.

[0041] In step S120, the receiving MAC layer only maintains a receive queue ordered by sequence number for the application data stream, and does not process the control frames and management frames of the Wi-Fi protocol itself. After receiving the application data frame, the receiving MAC layer inserts it into the corresponding position in the receive queue according to the sequence number to ensure the order of the application frames.

[0042] In step S130, the receiving end MAC layer scans all application receive queues every preset frame loss check threshold (e.g., 20ms). When a discontinuous sequence number is detected, it is determined that the application data frame is lost, and a NACK feedback message is generated. The NACK message contains the start sequence number and end sequence number of the lost application data frame, and the NACK message only provides feedback for application data frames.

[0043] In step S140, after the sending end MAC layer receives the NACK message, it can confirm which application data frames have been successfully sent and which application data frames have been lost. For application data frames that have been successfully sent, the sending status information is updated and the frame is removed from the queue. For application data frames that have been lost, retransmission is started.

[0044] This method does not retransmit all application data frames, but rather selectively. When the cumulative number of transmissions of an application data frame reaches a preset retransmission threshold (e.g., 8 times), the frame is permanently removed from the Tx multi-queue. When a NACK (Not Accepted Acknowledgement) is received from the receiver, it first checks whether the application data frame still exists in the Tx multi-queue. If it does, it is retransmitted; if it does not exist (i.e., it has been successfully acknowledged or removed due to reaching the retransmission threshold), the NACK is ignored, and no further retransmission is performed. The packet loss recovery is then handled by the kernel TCP protocol stack or the application layer. This method does not implement end-to-end reliable transmission; it employs a best-effort transmission strategy to reduce the burden on the kernel layer.

[0045] Since this method does not achieve end-to-end reliable transmission, but instead uses the Best-Effort transmission strategy to reduce the burden on the kernel layer, in step S150, the receiving MAC layer also performs operations similar to those performed on the sending end: it determines whether the number of feedback attempts for the same lost application data frame exceeds the preset maximum number of feedback attempts; if so, feedback is stopped. In other words, for the same lost application frame, a maximum of the preset maximum number of feedback attempts (e.g., 3 times) is made. When the maximum number of feedback attempts is reached and the lost application data frame is still not received, feedback is stopped, and the consecutive application frames already received in the receiving queue are pushed to the upper-layer protocol stack. Frames that are not received are no longer requested for retransmission (the Best-Effort strategy is executed).

[0046] Step S160 is the specific data submission rule of the receiving end MAC layer: the application data frames that have been received in the receiving queue or the lost application data frames that have stopped responding are regarded as frames that can be pushed, and all frames with consecutive sequence numbers that can be pushed are pushed to the upper layer protocol stack; when the frame that can be pushed is a lost application data frame, the application data frame is skipped.

[0047] This rule has two meanings: 1. When there are consecutive received application data frames in the receive queue, immediately push these data frames to the upper layer protocol stack to ensure the smooth real-time transmission of audio and video.

[0048] For example, if application data frames with sequence numbers ①②③④⑤ are received, and there are no missing application data frames that need to be reported yet, then all of them are pushed to the upper-layer protocol stack.

[0049] 2. When the number of frame loss feedbacks for an application data frame reaches the maximum value, all consecutive application frames following that frame are pushed to the upper-layer protocol stack, and frames that have not been received are no longer waited for.

[0050] For example, if application data frames with sequence numbers ①②③⑤⑥⑦ are received, it's clear that application data frame ④ is a lost application data frame. If application data frame ④ is a lost application data frame that hasn't stopped feedback, then wait and temporarily refrain from sending application data frames ⑤⑥⑦. After waiting, there are only two possible outcomes: either application data frame ④ is received, or application data frame ④ is determined to be a lost application data frame that has stopped feedback. If it is received, then ④⑤⑥⑦ are pushed to the upper-layer protocol stack in sequence; if it is determined to be lost, then application data frame ④ is skipped, and ⑤⑥⑦ are pushed to the upper-layer protocol stack in sequence.

[0051] After submitting the data, clear the application frame at the corresponding position in the receive queue and release the buffer resources.

[0052] Step S170 is Figure 2 This describes the specific functions of the TCP congestion control coordination module. This module is located between the TCP protocol stack and the MAC layer and includes a signaling interception layer.

[0053] The signaling interception layer processes all incoming and outgoing TCP ACK / SACK packets, focusing on application-related TCP data streams. For each received TCP ACK / SACK packet, it identifies the corresponding application data stream and its associated Tx queue based on the source IP, destination IP, source port, and destination port.

[0054] Then, the sequence number range of the application data frame confirmed in the ACK / SACK message is checked. The corresponding application data frame is found according to the sequence number range. If the reported lost frame still exists in the MAC layer Tx multi-queue (the MAC layer is processing retransmission and has not reached the threshold) under the condition of 'good network quality', the ACK / SACK message is intercepted until the data is cleared from the MAC layer Tx multi-queue. This can avoid the kernel from retransmitting at the same time. Conversely, if the corresponding application data frame has been cleared from the MAC layer Tx multi-queue (it has been confirmed to be received or cleared after reaching the retransmission threshold), the ACK / SACK message is retained and forwarded to the TCP protocol stack, allowing the kernel to be responsible for the subsequent retransmission work.

[0055] In one embodiment, the Wi-Fi MAC layer scheduling method further includes step S220.

[0056] Step S220: When the link quality level changes, adjust the sending strategy and retransmission strategy according to the changed link quality level. Among them, at least three link quality levels are preset, with the network quality levels from high to low as follows: good network quality, poor network quality, and bad network quality; each network quality level corresponds to a different sending strategy and retransmission strategy. When the network quality is good, the sending strategy includes: sending in descending order of priority of each sub-queue in the Tx multi-queue; the retransmission strategy includes: retransmitting in descending order of priority of each sub-queue in the Tx multi-queue until the retransmission threshold is reached. When network quality is poor, the transmission strategy includes: pausing the transmission of application data frames in the lowest priority transmission subqueue, and transmitting application data frames in the transmission subqueue according to the priority of the transmission subqueue; the retransmission strategy includes: retransmitting all lost application data frames other than the lowest priority transmission subqueue until the retransmission threshold is reached. When network quality is poor, the sending strategy includes: sending only application data frames in the highest priority sending sub-queue; the retransmission strategy includes: retransmitting only application data frames in the highest priority sending sub-queue until the retransmission threshold is reached.

[0057] Based on the real-time assessed link quality level, the "MAC layer application priority scheduling module" adopts differentiated transmission and retransmission strategies in this implementation.

[0058] It should be noted that if there are only two sending sub-queues, the methods used for poor network quality and poor network quality are the same.

[0059] In one embodiment, the Wi-Fi MAC layer scheduling method further includes step S210.

[0060] Step S210: Determine the link quality level; The process of determining the link quality level includes: Step S211: Obtain the current MCS value of the transmitter from the Wi-Fi driver at fixed intervals; Step S212: Maintain a sliding window of a preset length and save the latest MCS value time series in this sliding window; Step S213: Fit the MCS values ​​in the sliding window to obtain trend results regarding the changing trend of the MCS values; Step S214: According to the preset trend level model, the trend results are classified into the corresponding trend levels; wherein, the preset trend levels include at least the first level, the second level and the third level. Step S215: If the trend result is classified into the first level, the link quality level is judged to be good network quality. The trend of the first level is either stable or rising. Step S216: If the trend result is classified into the second level, the link quality level is determined to be poor network quality, wherein the trend of the second level is downward, and the rate of decline falls within the preset first rate of decline range. Step S217: If the trend result is classified into the third level, the link quality level is determined to be poor network quality. The trend of the third level is downward, and the rate of decline falls within the preset second rate of decline range. The rate of decline in the second rate of decline range is greater than the rate of decline in the first rate of decline range.

[0061] In one implementation, step S213, which involves fitting the MCS values ​​in the sliding window to obtain a trend result regarding the changing trend of the MCS values, includes: The least squares method is used to linearly fit the MCS values ​​within the sliding window, and the slope k is calculated. The slope k is the trend result. In the preset trend level model, k ≥ 0 is the first level, -0.5 < k < 0 is the second level, and k ≤ -0.5 is the third level.

[0062] Both of the above implementation methods involve determining the link quality level. In this method, the provided real-time MCS value is used as the core indicator for link quality assessment, providing a basis for application priority scheduling, transmission control, and TCP congestion control optimization. The specific implementation is as follows: 1. Data Collection a. Obtain the current MCS value of the sender from the Wi-Fi driver at fixed intervals (e.g., 100ms) to evaluate the quality of the application transmission link; b. Maintain a sliding window of a preset length (e.g., 10) and save the time series of MCS values ​​within the most recent second (length is 10, fixed period is 100ms, so it is 1 second) to ensure the real-time performance and accuracy of the evaluation.

[0063] 2. Trend Fitting and Quality Grading a. Use the least squares method to linearly fit the MCS values ​​within the sliding window and calculate the slope k; b. Based on the slope k, the link quality is divided into three levels to adapt to application transmission requirements: Level 1: Good network quality: k ≥ 0 (MCS value remains stable or increases), suitable for high bit rate application transmission; Level 2: Poor network quality: -0.5 < k < 0 (MCS value decreases slowly), application sending strategy needs to be adjusted; Level 3: Poor network quality: k ≤ -0.5 (MCS value drops rapidly), priority should be given to ensuring the transmission of high-priority applications.

[0064] 3. Link quality update a. Recalculate the link quality level every fixed period to ensure real-time adaptation to link changes and move the sliding window forward; b. When the link quality level changes, immediately notify the "MAC layer application priority scheduling module" and the "TCP congestion control collaborative optimization module" to trigger the corresponding policy adjustment, i.e., step S220.

[0065] In one implementation, the Wi-Fi MAC layer scheduling method, in step S140, the transmitting end MAC layer receives a NACK packet, determines whether the lost application data frame in the NACK packet is in the Tx multi-queue, and if it exists, the retransmission process during the retransmission process includes: When the link quality level is good, immediately move the application data frame to the head of the queue for retransmission; When the link quality level is poor or low, retransmission is performed according to the corresponding retransmission policy.

[0066] In this implementation, when the link quality is "good network quality", the frame is immediately moved to the head of the queue for retransmission, and the timestamp of the last transmission and the cumulative number of transmissions are updated.

[0067] When the link quality is "poor network quality" or "bad network quality", the retransmission policy of the corresponding level shall be executed (only retransmission requests with allowed priority level shall be responded to).

[0068] In one embodiment, the Wi-Fi MAC layer scheduling method further includes steps S310 and S320.

[0069] Step S310: When the link quality level is good network quality, the sending end signaling interception layer filters out all ACK packet information that may cause the TCP protocol stack to judge it as duplicate ACK, and sets the ECE flag in the TCP header to 0. In step S320, when the link quality level is poor or bad network quality, the sending end signaling interception layer transparently transmits the ACK message to the TCP protocol stack.

[0070] This implementation method uses an ACK / SACK filtering mechanism based on link quality.

[0071] In step S310, when the link quality is good: discard ACK packet information in the ACK / SACK packet that may cause the TCP protocol stack to determine it as a duplicate ACK, and set the ECE flag in the TCP header to 0.

[0072] This prevents the TCP protocol stack from reducing the sending rate due to misjudging congestion, ensuring high bit rate transmission for applications.

[0073] In step S320, when the link quality is poor or bad: all DUP ACK and ECE flags are transparently transmitted to the TCP protocol stack. This can trigger the TCP congestion control mechanism to reduce the sending rate. Together with the application queue scheduling strategy of the MAC layer, it can alleviate link congestion and ensure the transmission of high-priority applications.

[0074] In one embodiment, the Wi-Fi MAC layer scheduling method further includes steps S330 and S340.

[0075] Step S330: When the link quality level is improved, the sending end signaling interception layer injects a local ACK packet into the TCP protocol stack, wherein the local ACK packet is used to notify the TCP protocol stack to increase the sending rate; In step S340, when the link quality level decreases, the sending end signaling interception layer actively constructs an ACK packet that conforms to the specification and sets the ECE flag in the TCP header to 1. Then, the driver layer injects the ACK packet into the local TCP protocol stack, triggering the congestion control mechanism and reducing the sending rate of the current TCP stream.

[0076] This implementation method involves coordinated adjustment of the TCP sending rate. When the link quality improves from "poor" to "unsatisfactory" or from "unsatisfactory" to "good", an ACK packet is injected into the TCP protocol stack, notifying it to appropriately increase the sending rate, fully utilize the link bandwidth, and improve application transmission quality. When the link quality deteriorates from "good" to "unsatisfactory" or from "unsatisfactory" to "poor", an ACK packet with the ECE flag is injected into the TCP protocol stack, notifying it to reduce the sending rate to avoid exacerbating link congestion.

[0077] The TCP congestion control collaborative optimization module invented by this invention is responsible for working in conjunction with the kernel TCP protocol stack to solve the redundancy and mismatch problem between the TCP protocol stack and the MAC layer application sending control. By intercepting and processing TCP ACK / SACK signaling, it achieves coordination between the two layers of control, significantly reducing the workload of kernel TCP retransmission. The TCP kernel protocol stack's processing of ACK feedback "lags" behind the MAC layer, causing the sending end TCP kernel protocol stack to trigger unnecessary retransmissions. The module also optimizes the TCP congestion control algorithm, improving the audio and video TCP transmission effect.

[0078] For example, according to RFC 5681, when the sending TCP kernel protocol stack receives three duplicate ACKs (DUP ACKs), it immediately sets ssthresh to cwnd / 2, retransmits the missing packet, and cwnd = ssthresh + 3 × SMSS. At this time, the Wi-Fi link quality may still be relatively good, and the congestion window (rate) should not be reduced. Therefore, the collaborative optimization module can optimize the TCP congestion control algorithm by deeply processing ACK packet information based on network quality.

[0079] In this method, the sending end and the receiving end exchange application data frames through the MAC layer. When the receiving end's MAC layer detects a lost application data frame, it generates a feedback NACK message for the lost application data frame, but no further feedback is given if the number of feedback NACK messages exceeds a threshold. The receiving end's MAC layer retransmits the data based on the feedback NACK message, but no further retransmission is given if the number of retransmissions exceeds a threshold. Application data frames lost between MAC layers are supplemented and transmitted through the upper-layer protocol stack.

[0080] This method implements differentiated transmission and retransmission strategies at the MAC layer, maintains complete transmission status information of application data frames and a frame loss feedback mechanism at the receiving end at the driver layer, and implements a "Best-Effort" transmission strategy. By intercepting and processing TCP ACK / SACK signaling, it eliminates redundancy between MAC layer transmission control and TCP protocol stack control, and at the same time, it directly delivers real-time link quality information from the MAC layer to the TCP protocol stack.

[0081] The beneficial effects of this invention are: 1. Significantly improve audio and video transmission experience: Priority scheduling is designed for application services to ensure that high real-time audio and video (such as voice) are transmitted first, effectively reducing latency and jitter and optimizing playback smoothness; 2. Significantly reduces kernel transmission burden: Through driver-level Best Effort transmission optimization, for TCP transmission, it reduces kernel-level retransmission workload by more than 80%; for UDP transmission, it significantly improves transmission efficiency. 3. Completely eliminate TCP redundant retransmissions: Relying on the TCP congestion control collaborative optimization mechanism, it avoids duplicate and invalid retransmissions between the MAC layer and the kernel TCP protocol stack, improves wireless bandwidth utilization, and reduces the interference of abnormal transmissions on normal services; 5. Achieve precise optimization of TCP congestion control: Synchronously feed back the real-time link quality status of the MAC layer to the kernel TCP protocol stack to help TCP quickly and accurately adjust the sending rate and precisely match the current link capacity with the transmission needs of upper-layer applications; 6. Lightweight design with consideration for underlying protocol stability: It only optimizes the scheduling of upper-layer business application data and does not intervene in the transmission process of native Wi-Fi protocol control frames and management frames. In scenarios with poor network quality, it actively reduces the application data transmission quota and actively relinquishes wireless channel resources to prioritize the transmission of Wi-Fi protocol control frames and management frames, effectively ensuring the normal operation of the underlying Wi-Fi protocol, reducing abnormal phenomena such as wireless terminal disconnection, disconnection, and frequent reconnection, and comprehensively enhancing the overall stability of the wireless communication system.

[0082] Example 2

[0083] Corresponding to the method in Example 1, such as Figure 3 As shown, Figure 3 This is a schematic diagram of the overall structure of one embodiment of the present invention. The present invention also provides a Wi-Fi MAC layer scheduling device 4, including: a transmitting end MAC layer acquisition module 410, a receiving end MAC layer receiving module 420, a receiving end MAC layer feedback module 430, a receiving end MAC layer uploading module 440, a transmitting end MAC layer retransmission module 450, and a transmitting end signaling interception layer 460.

[0084] The sending end MAC layer acquisition module 410 is used to acquire application data frames in the Tx multi-queue and send the application data frames through the PHY layer. The receiving module 420 of the receiving end MAC layer is used to insert the application data frame into the corresponding position of the receiving queue according to the sequence number after the receiving end MAC layer receives the application data frame. The receiving end MAC layer only maintains a receiving queue sorted by sequence number for the application data stream and does not process the control frames and management frames of the Wi-Fi protocol itself. The receiving end MAC layer feedback module 430 is used to find the lost application data frame according to the sequence number when the sequence number is detected to be discontinuous, and generate a feedback NACK message for the lost application data frame; wherein, the NACK message contains the start sequence number and end sequence number of the lost application data frame; and to determine whether the number of feedbacks for the same lost application data frame exceeds the preset maximum number of feedbacks, and if it exceeds the maximum number of feedbacks, to stop the feedback. The receiving end MAC layer upload module 440 is used to regard the application data frames already received in the receiving queue and the lost application data frames that have stopped feedback as frames that can be pushed, and push all the frames with consecutive sequence numbers that can be pushed to the upper layer protocol stack; wherein, when the frame that can be pushed is a lost application data frame that has stopped feedback, the application data frame is skipped and the push continues to the upper layer protocol stack. The sending end MAC layer retransmission module 450 is used to process NACK messages and determine whether the lost application data frame in the NACK message is in the Tx multi-queue. If it exists, it is retransmitted. When the sending end MAC layer finds that the cumulative number of transmissions of an application data frame reaches the preset retransmission threshold, it removes the application data frame from the Tx multi-queue. The sending end signaling interception layer 460 is located between the TCP protocol stack and the MAC layer. It is used to check the application data frame sequence number range in the TCP ACK / SACK message, find the corresponding application data frame according to the sequence number range, and if the lost frame reported in the ACK / SACK message is still in the Tx multi-queue of the MAC layer, the ACK / SACK message is intercepted. If it does not exist in the Tx multi-queue, it is passed through to the kernel protocol layer.

[0085] In one implementation, the Tx multi-queue includes at least two sending sub-queues with different priority levels; The Wi-Fi MAC layer scheduling device further includes: The adjustment module is used to adjust the transmission and retransmission strategies according to the changed link quality level when the link quality level changes. Among them, at least three link quality levels are preset, and the network quality levels from high to low are: good network quality, poor network quality, and bad network quality; each network quality level has its corresponding transmission strategy and retransmission strategy. When the network quality is good, the sending strategy includes: sending all application data frames in the sending sub-queues according to their priority; the retransmission strategy includes: retransmitting all lost application data frames in the sending sub-queues until the retransmission threshold is reached. When network quality is poor, the transmission strategy includes: pausing the transmission of application data frames in the lowest priority transmission subqueue, and transmitting application data frames in the transmission subqueue according to the priority of the transmission subqueue; the retransmission strategy includes: retransmitting all lost application data frames other than the lowest priority transmission subqueue until the retransmission threshold is reached. When network quality is poor, the sending strategy includes: sending only application data frames in the highest priority sending sub-queue; the retransmission strategy includes: retransmitting only application data frames in the highest priority sending sub-queue until the retransmission threshold is reached.

[0086] In one implementation, the adjustment module is further configured to determine the link quality level; The process of determining the link quality level includes: Obtain the current MCS value of the transmitter from the Wi-Fi driver at fixed intervals; Maintain a sliding window of a preset length and save the time series of the most recent MCS values ​​in this sliding window; By fitting the MCS values ​​in the sliding window, a trend result regarding the changing trend of the MCS values ​​is obtained; Based on the preset trend level model, the trend results are classified into the corresponding trend levels; wherein the preset trend levels include at least the first level, the second level, and the third level. If the trend result is classified as the first level, the link quality level is judged as good network quality. The trend of the first level is either stable or rising. If the trend result is classified as the second level, the link quality level is judged as poor network quality. The trend of the second level is downward, and the rate of decline falls within the preset first rate of decline range. If the trend result is classified into the third level, the link quality level is judged as poor network quality. The trend of the third level is downward, and the rate of decline falls within the preset second decline rate range. The decline rate of the second decline rate range is greater than the decline rate of the first decline rate range.

[0087] In one implementation, the process of fitting the MCS values ​​in the sliding window to obtain a trend result regarding the changing trend of the MCS values ​​includes: The least squares method is used to linearly fit the MCS values ​​within the sliding window, and the slope k is calculated. The slope k is the trend result. In the preset trend level model, k ≥ 0 is the first level, -0.5 < k < 0 is the second level, and k ≤ -0.5 is the third level.

[0088] In one implementation, the sending-end signaling interception layer is further configured to filter out ACK packet information that may cause the TCP protocol stack to determine as duplicate ACK when the link quality level is good network quality, and set the ECE flag to 0; when the link quality level is poor network quality or poor network quality, the sending-end signaling interception layer will forward all ACK packets to the TCP protocol stack.

[0089] In one implementation, the sending-end signaling interception layer is further configured to send an ACK packet to the TCP protocol stack when the link quality level is improved, wherein the ACK packet is used to notify the TCP protocol stack to start sending or increase the sending rate; and when the link quality level is decreased, the sending-end signaling interception layer injects an ACK packet with the ECE flag set to 1 into the TCP protocol stack, wherein the ACK packet with the ECE flag set is used to notify the TCP protocol stack to reduce the sending rate.

[0090] In one implementation, the sending end MAC layer receives a NACK packet, determines whether the lost application data frame in the NACK packet is in the Tx multi-queue, and if so, the retransmission process during the retransmission includes: When the link quality level is good, immediately move the application data frame to the head of the queue for retransmission; When the link quality level is poor or low, retransmission is performed according to the corresponding retransmission policy.

[0091] This device implements differentiated transmission and retransmission strategies at the MAC layer and maintains complete transmission status information of application data frames and a frame loss feedback mechanism at the receiver layer, achieving a "Best-Effort" transmission strategy. By intercepting and processing TCP ACK / SACK signaling, it eliminates redundancy between MAC layer transmission control and TCP protocol stack control, while directly feeding back real-time link quality information from the MAC layer to the TCP protocol stack. This device significantly reduces the transmission processing burden on the kernel protocol stack, effectively improves wireless transmission efficiency, and simultaneously ensures the real-time performance and transmission stability of application services. Example 3

[0092] This invention also provides a storage medium storing computer instructions that, when executed by a processor, implement the Wi-Fi MAC layer scheduling method of any of the above embodiments.

[0093] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, random access memory (RAM), read-only memory (ROM), magnetic disks, or optical disks.

[0094] Alternatively, if the integrated units of the present invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present invention, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, terminal, or network device, etc.) to execute all or part of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, RAM, ROM, magnetic disks, or optical disks.

[0095] Corresponding to the computer storage medium described above, one embodiment also provides a computer device, which includes a memory, an encoder, and a computer program stored in the memory and executable on the encoder, wherein the encoder executes the program to implement any of the Wi-Fi MAC layer scheduling methods described in the above embodiments.

[0096] The aforementioned computer equipment implements differentiated transmission and retransmission strategies at the MAC layer and maintains complete transmission status information of application data frames and a frame loss feedback mechanism at the receiver layer, thus achieving a "Best-Effort" transmission strategy. By intercepting and processing TCP ACK / SACK signaling, it eliminates redundancy between MAC layer transmission control and TCP protocol stack control, while directly feeding back real-time link quality information from the MAC layer to the TCP protocol stack. This computer equipment significantly reduces the transmission processing burden on the kernel protocol stack, effectively improves wireless transmission efficiency, and simultaneously ensures both the real-time performance and transmission stability of application services.

[0097] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0098] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A MAC layer scheduling method for Wi-Fi, characterized in that, include: The sending end MAC layer obtains the application data frame from the Tx multi-queue and sends the application data frame through the PHY layer; After receiving the application data frame, the receiving MAC layer inserts it into the corresponding position in the receiving queue according to the sequence number. The receiving MAC layer only maintains a receiving queue sorted by sequence number for the application data stream and does not process the control frames and management frames of the Wi-Fi protocol itself. When the receiving MAC layer detects a discontinuous sequence number, it identifies the lost application data frame based on the sequence number and generates a NACK message for the lost application data frame; wherein, the NACK message contains the start sequence number and end sequence number of the lost application data frame; When the sending end MAC layer receives a NACK message, it determines whether the lost application data frame in the NACK message is in the Tx multi-queue. If it exists, it retransmits it. When the sending end MAC layer finds that the cumulative number of transmissions of an application data frame has reached the preset retransmission threshold, it removes the application data frame from the Tx multi-queue. The receiving end MAC layer determines whether the number of times the same lost application data frame has been fed back exceeds the preset maximum number of times it has been fed back. If it does, it stops feeding back. The receiving MAC layer considers the received application data frames and lost application data frames that have stopped responding in the receiving queue as frames that can be pushed, and pushes all consecutively sequenced frames that can be pushed to the upper protocol stack; when the frame that can be pushed is a lost application data frame that has stopped responding, it skips the application data frame and continues to push to the upper protocol stack. The sending end signaling interception layer checks the application data frame sequence number range in the TCP ACK / SACK packet, finds the corresponding application data frame based on the sequence number range, and if the lost frame reported in the ACK / SACK packet is still in the Tx multi-queue of the MAC layer, the ACK / SACK packet is intercepted; if it is not in the Tx multi-queue, it is passed through to the kernel protocol layer. The signaling interception layer is located between the TCP protocol stack and the MAC layer.

2. The Wi-Fi MAC layer scheduling method according to claim 1, characterized in that, The Wi-Fi layer's Tx multi-queue, or Transmit multi-queue, is a send-side scheduling queue containing at least two sub-queues with different priority levels. The Wi-Fi MAC layer scheduling method further includes: When the link quality level changes, the sending and retransmission strategies are adjusted according to the changed link quality level. Among them, at least three link quality levels are preset, and the network quality levels from high to low are: good network quality, poor network quality, and bad network quality; each network quality level has its corresponding transmission strategy and retransmission strategy. When the network quality is good, the sending strategy includes: sending all application data frames in the sending sub-queues according to their priority; the retransmission strategy includes: retransmitting all lost application data frames in the sending sub-queues until the retransmission threshold is reached. When network quality is poor, the transmission strategy includes: pausing the transmission of application data frames in the lowest priority transmission sub-queue, and determining the transmission order of each queue according to the priority of the transmission sub-queue; the retransmission strategy includes: retransmitting all lost application data frames other than the lowest priority transmission sub-queue until the retransmission threshold is reached. When network quality is poor, the sending strategy includes: sending only application data frames in the highest priority sending sub-queue; the retransmission strategy includes: retransmitting only application data frames in the highest priority sending sub-queue until the retransmission threshold is reached.

3. The Wi-Fi MAC layer scheduling method according to claim 2, characterized in that, Also includes: Determine the link quality level; The process of determining the link quality level includes: Obtain the current MCS value of the transmitter from the Wi-Fi driver at fixed intervals; Maintain a sliding window of a preset length and save the time series of the most recent MCS values ​​in this sliding window; By fitting the MCS values ​​in the sliding window, a trend result regarding the changing trend of the MCS values ​​is obtained; Based on the preset trend level model, the trend results are classified into the corresponding trend levels; wherein the preset trend levels include at least the first level, the second level, and the third level. If the trend result is classified as the first level, the link quality level is judged as good network quality. The trend of the first level is either stable or rising. If the trend result is classified as the second level, the link quality level is judged as poor network quality. The trend of the second level is downward, and the rate of decline falls within the preset first rate of decline range. If the trend result is classified into the third level, the link quality level is judged as poor network quality. The trend of the third level is downward, and the rate of decline falls within the preset second decline rate range. The decline rate of the second decline rate range is greater than the decline rate of the first decline rate range.

4. The Wi-Fi MAC layer scheduling method according to claim 3, characterized in that, The process of fitting the MCS values ​​in the sliding window to obtain a trend result regarding the changing trend of the MCS values ​​includes: The MCS values ​​within the sliding window are linearly fitted using the least squares method, and the slope k is calculated. The slope k is the trend result. In the preset trend level model, k ≥ 0 is the first level, -0.5 < k < 0 is the second level, and k ≤ -0.5 is the third level.

5. The Wi-Fi MAC layer scheduling method according to any one of claims 2-4, characterized in that, Also includes: When the link quality level is good network quality, the sending end signaling interception layer filtering can cause the TCP protocol stack to determine the ACK packet information as a duplicate ACK, keeping the ECE flag bit at 0. When the link quality level is poor or low, the sending end signaling interception layer will pass through the ACK to the TCP protocol stack.

6. The Wi-Fi MAC layer scheduling method according to claim 5, characterized in that, Also includes: When the link quality level is improved, the sending end signaling interception layer injects an ACK packet into the TCP protocol stack. The ACK packet is used to encourage the TCP protocol stack to start sending or increase the sending rate. When the link quality level decreases, the sending end signaling interception layer actively constructs and injects an ACK packet with the TCP ECE flag into the local TCP protocol stack; the ACK packet simulates ECN congestion control by setting the ECE flag to 1, triggering the TCP protocol stack to perform congestion control and reduce the sending rate.

7. The Wi-Fi MAC layer scheduling method according to any one of claims 2-4, characterized in that, The sending end MAC layer receives the NACK packet, determines whether the lost application data frame in the NACK packet is in the Tx multi-queue, and if so, the retransmission process includes: When the link quality level is good, immediately move the application data frame to the head of the queue for retransmission; When the link quality level is poor or low, retransmission is performed according to the retransmission strategy based on queue priority.

8. A Wi-Fi MAC layer scheduling device, characterized in that, include: The sending end MAC layer acquisition module is used to acquire application data frames in the Tx multi-queue and send the application data frames through the PHY layer. The receiving module of the receiving MAC layer is used to insert the application data frame into the corresponding position of the receiving queue according to the sequence number after the receiving MAC layer receives the application data frame. The receiving MAC layer only maintains a receiving queue sorted by sequence number for the application data stream and does not process the control frames and management frames of the Wi-Fi protocol itself. The receiving end MAC layer feedback module is used to find the lost application data frame based on the sequence number when a discontinuous sequence number is detected, and generate a feedback NACK message for the lost application data frame; wherein, the NACK message contains the start sequence number and end sequence number of the lost application data frame; and determines whether the number of feedbacks for the same lost application data frame exceeds the preset maximum number of feedbacks, and if it does, stops the feedback. The receiving end MAC layer upload module is used to treat the application data frames already received in the receiving queue and the lost application data frames that have stopped responding as frames that can be pushed, and push all consecutively sequenced frames that can be pushed to the upper layer protocol stack; when the frame that can be pushed is a lost application data frame that has stopped responding, skip that application data frame and continue to push to the upper layer protocol stack. The sending end MAC layer retransmission module is used to process NACK packets and determine whether the lost application data frame in the NACK packet is in the Tx multi-queue. If it exists, it is retransmitted. When the sending end MAC layer finds that the cumulative number of transmissions of an application data frame has reached the preset retransmission threshold, it removes the application data frame from the Tx multi-queue. The sending end signaling interception layer, located between the TCP protocol stack and the MAC layer, is used to check the application data frame sequence number range in the TCP ACK / SACK message, find the corresponding application data frame according to the sequence number range, and if the lost frame reported in the ACK / SACK message is still in the Tx multi-queue of the MAC layer, the ACK / SACK message is intercepted; if it does not exist in the Tx multi-queue, it is passed through to the kernel protocol layer.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.