CN-121985404-A - Communication system, method, computer equipment and medium of Wi-Fi soft scheduling system based on TSF synchronization token bucket
Abstract
The invention discloses a Wi-Fi soft scheduling system based on a TSF synchronization token bucket, a communication method, computer equipment and a medium. The system comprises a high-precision TSF synchronization module, a TSF synchronization token bucket gating module, a driving layer scheduling injection and collision protection module and a time slot collision isolation mechanism, wherein the high-precision TSF synchronization module is used for providing a uniform time reference with microsecond precision and processing system-level errors, the TSF synchronization token bucket gating module is used for realizing time slot scheduling of pseudo TDMA through double constraint of time and capacity and controlling authority of a data packet entering an MAC layer, and the driving layer scheduling injection and collision protection module is used for realizing low-delay transmission injection of an authorized data packet and processing damage of MAC layer competition collision to scheduling certainty through the time slot collision isolation mechanism. The invention can realize accurate soft control of the data packet transmission time sequence in the kernel driving layer of the operating system, thereby simulating deterministic time division multiple access effect on a channel.
Inventors
- XIA YAN
Assignees
- 深圳开鸿数字产业发展有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251225
Claims (18)
- 1. A Wi-Fi soft scheduling system based on a TSF synchronization token bucket, the system comprising: the high-precision TSF synchronization module is used for providing a unified time reference with microsecond precision and processing system-level errors in Wi-Fi equipment time synchronization; The TSF synchronization token bucket gating module is used for realizing time slot scheduling of the pseudo TDMA through double constraint of time and capacity and controlling authority of a data packet to enter the MAC layer; The drive layer scheduling injection and conflict protection module is used for realizing low-delay transmission injection of the authorized data packet and processing the destruction of MAC layer competition conflict on scheduling certainty through a time slot conflict isolation mechanism.
- 2. The TSF synchronization token bucket based Wi-Fi soft scheduling system of claim 1, wherein the high precision TSF synchronization module comprises: the TSF reading unit is used for reading the hardware timer through a low-jitter interface of the driving layer and performing preliminary calibration according to TSF time in a beacon frame periodically broadcasted by the AP; and the delay calibration unit is used for processing the system-level error in the Wi-Fi equipment time synchronization.
- 3. The TSF synchronization token bucket based Wi-Fi soft scheduling system of claim 2, wherein the delay calibration unit comprises: the fixed delay compensation unit is used for measuring and storing the fixed offset of the current WNIC hardware and calculating the accurate physical time when the system is started off-line or in order to eliminate the nondeterminacy error introduced by the interaction of the protocol stack and the hardware; and the clock drift management unit is used for continuously monitoring TSF time in beacon frames periodically broadcast by the AP and dynamically compensating accumulated errors caused by local crystal oscillator drift.
- 4. The Wi-Fi soft scheduling system of the TSF-based synchronization token bucket of claim 3, wherein the formula for calculating the exact physical time in the fixed delay compensation unit is: T TSF,true =T HOST,read T offset,fixed T jitter,residual ; Where T HOST,read is the TSF hardware reading, T offset,fixed is the systematic delay, and T jitter,residual is the residual jitter.
- 5. The TSF synchronization token bucket based Wi-Fi soft scheduling system of claim 1, wherein the TSF synchronization token bucket gating module comprises: a time slot allocation table analyzing unit, configured to receive the time slot allocation table broadcasted by the AP as a central scheduler, and analyze a scheduling period and a predetermined transmission time slot of a current STA therein; The token generation unit is used for binding the state of the token bucket counter with the accurate physical time provided by the high-precision TSF synchronization module so as to realize the authorization of a time window; And the scheduling gating logic unit is used for authorizing the data packet to enter the transmission queue of the MAC layer according to the double judgment condition.
- 6. The Wi-Fi soft scheduling system of the TSF-based synchronized token bucket of claim 5, wherein the dual judgment conditions comprise a time judgment condition for determining whether the current calibrated time satisfies a predetermined transmission time slot allocated to the STA by the AP, and a capacity judgment condition for determining whether the number of tokens in the token bucket counter is greater than or equal to the size of the data packet to be transmitted.
- 7. The TSF synchronization token bucket based Wi-Fi soft scheduling system of claim 1, wherein the driver layer schedule injection and collision protection module comprises: The MAC queue injector is used for pushing the data packet authorized by the TSF synchronization token bucket gating module into an MAC layer transmission queue driven by WNIC hardware with low delay; The time slot protection unit is used for customizing retransmission logic of the data packet, wherein the retransmission logic comprises retransmission time constraint, a overtime forced pull-back mechanism and cache retry.
- 8. The TSF synchronization token bucket based Wi-Fi soft scheduling system of claim 7, wherein the retransmission occasion constraint is configured to limit the number of retransmission attempts and the back-off time when a packet is in conflict at the MAC layer and needs to be retransmitted, ensuring that all retransmission operations are completed within the duration of the current slot.
- 9. The TSF synchronization token bucket based Wi-Fi soft scheduling system of claim 7, wherein the time-out forced pull-back mechanism is configured to force a packet to be removed from a MAC layer transmit queue when a current time slot ends and the packet has not yet been successfully transmitted.
- 10. The TSF synchronization token bucket based Wi-Fi soft scheduling system of claim 7, wherein the buffer retry is to buffer the forced pulled data packet and wait for the next transmission slot belonging to the STA to resubmit the transmission application.
- 11. A communication method of a Wi-Fi soft scheduling system based on a TSF synchronization token bucket according to any of the preceding claims 1-10, the method comprising: When a real-time data packet arrives at a driving layer, a high-precision TSF synchronization module is called to acquire calibrated high-precision current TSF time; Checking a time slot allocation table and a relation between a token bucket counter and a data packet based on a TSF synchronous token bucket gating module to obtain a checking result, and processing the data packet based on the checking result; After the data packet is authorized, the driving layer scheduling injection and conflict protection module pushes the data packet into the MAC layer transmission queue, and when conflict occurs and retransmission is needed, the data packet is processed based on preset retransmission logic.
- 12. The communication method of the Wi-Fi soft scheduling system based on the TSF synchronization token bucket of claim 11, wherein the checking of the slot allocation table based on the TSF synchronization token bucket gating module and the checking of the relation between the token bucket counter and the data packet, results in a check result, comprises: based on a TSF synchronization token bucket gate control module, checking a time slot allocation table, determining whether the current TSF time is in a preset transmission time slot allocated to the STA, and obtaining a first check result; and checking whether the token bucket counter can accommodate the data packet or not based on the TSF synchronous token bucket gate control module to obtain a second checking result.
- 13. The communication method of the Wi-Fi soft scheduling system based on the TSF synchronization token bucket of claim 12, wherein the TSF synchronization token bucket gating module checks whether the token bucket counter can accommodate the data packet, to obtain a second check result, comprising: And comparing the token number of the token bucket counter with the size of the data packet to obtain the second checking result.
- 14. The communication method of the Wi-Fi soft scheduling system based on the TSF synchronization token bucket of claim 12, wherein processing the data packet based on the inspection result comprises: if the first check result is that the current TSF time is not in the preset transmission time slot, discarding the data packet; And if the first check result is that the current TSF time is within the preset transmission time slot, continuing to transmit the data packet.
- 15. The communication method of the Wi-Fi soft scheduling system based on the TSF synchronization token bucket of claim 13, wherein processing the data packet based on the inspection result comprises: If the second checking result is that the number of tokens of the token bucket counter is smaller than the size of the data packet, the data packet is regarded as non-compliance; And if the second checking result is that the number of tokens of the token bucket counter is larger than or equal to the size of the data packet, continuing to transmit the data packet.
- 16. The communication method of the Wi-Fi soft scheduling system based on the TSF synchronization token bucket of claim 11, wherein when a collision occurs and retransmission is required, processing the data packet based on preset retransmission logic comprises: when the conflict occurs and retransmission is needed, judging whether the current retransmission time is within the duration of a preset transmission time slot or not based on a time slot protection unit; And if the current time slot is finished and the data packet is not successfully transmitted, forcibly pulling back the data packet and waiting for retry of the next time slot.
- 17. A computer device comprising a memory, a processor and a communication program of a Wi-Fi soft scheduling system based on a TSF synchronization token bucket stored in the memory and executable on the processor, the processor implementing the steps of the communication method of the Wi-Fi soft scheduling system based on a TSF synchronization token bucket according to any one of claims 11-16 when executing the communication program of the Wi-Fi soft scheduling system based on a TSF synchronization token bucket.
- 18. A computer readable storage medium, wherein a communication program of a Wi-Fi soft scheduling system based on a TSF synchronization token bucket is stored on the computer readable storage medium, and the communication program of the Wi-Fi soft scheduling system based on the TSF synchronization token bucket implements the steps of the communication method of the Wi-Fi soft scheduling system based on the TSF synchronization token bucket according to any one of claims 11 to 16 on the computer readable storage medium.
Description
Communication system, method, computer equipment and medium of Wi-Fi soft scheduling system based on TSF synchronization token bucket Technical Field The present invention relates to the field of wireless communication protocol optimization technologies, and in particular, to a communication system, a method, a computer device, and a medium of a Wi-Fi soft scheduling system based on a TSF synchronization token bucket. Background Current Wi-Fi networks rely on carrier sense multiple access/collision avoidance (CSMA/CA) protocols for media access. The protocol avoids collisions by means of a random back-off and Distributed Coordination Function (DCF). To improve quality of service (QoS), the IEEE 802.11e standard introduced a wireless multimedia (WMM/EDCA) mechanism to provide traffic priority by adjusting contention window parameters. In the prior art, wi-Fi networks rely on carrier sense multiple access/collision avoidance (CSMA/CA) protocols for media access. CSMA/CA is a contention mechanism that avoids collisions and ensures fair access through random back-off (Random Backoff) and Distributed Coordination Function (DCF). However, this distributed, stochastic design results in its inherent, insurmountable limitations in terms of time certainty. Time Division Multiple Access (TDMA) protocols fundamentally eliminate contention by pre-allocating time slices, providing extremely high certainty and predictably low latency. Studies have shown that TDMA is superior to CSMA/CA in terms of energy efficiency, bandwidth utilization, and guaranteed traffic levels. But pure TDMA requires all nodes to share a high precision (typically on the order of microseconds or more) time coordinate and requires that the MAC layer (medium access control sublayer) be able to start transmission accurately within the allocated time slot. This requires extensive modifications to the MAC layer of the 802.11 protocol, which is impractical to deploy on commercial COTS Wi-Fi hardware. Furthermore, TDMA has the inherent disadvantage of lacking adaptability to bursty traffic and network dynamics. Accordingly, there is a need in the art for improvement. Disclosure of Invention Aiming at the defects in the prior art, the invention provides a communication system, a method, computer equipment and a medium of a Wi-Fi soft scheduling system based on a TSF synchronization token bucket, and the technical scheme adopted by the invention is as follows: in a first aspect, the present invention provides a communication system of a Wi-Fi soft scheduling system based on a TSF synchronization token bucket, the system comprising: the high-precision TSF synchronization module is used for providing a unified time reference with microsecond precision and processing system-level errors in Wi-Fi equipment time synchronization; The TSF synchronization token bucket gating module is used for realizing time slot scheduling of the pseudo TDMA through double constraint of time and capacity and controlling authority of a data packet to enter the MAC layer; The drive layer scheduling injection and conflict protection module is used for realizing low-delay transmission injection of the authorized data packet and processing the destruction of MAC layer competition conflict on scheduling certainty through a time slot conflict isolation mechanism. In one implementation, the high precision TSF synchronization module includes: the TSF reading unit is used for reading the hardware timer through a low-jitter interface of the driving layer and performing preliminary calibration according to TSF time in a beacon frame periodically broadcasted by the AP; and the delay calibration unit is used for processing the system-level error in the Wi-Fi equipment time synchronization. In one implementation, the delay calibration unit includes: the fixed delay compensation unit is used for measuring and storing the fixed offset of the current WNIC hardware and calculating the accurate physical time when the system is started off-line or in order to eliminate the nondeterminacy error introduced by the interaction of the protocol stack and the hardware; and the clock drift management unit is used for continuously monitoring TSF time in beacon frames periodically broadcast by the AP and dynamically compensating accumulated errors caused by local crystal oscillator drift. In one implementation, the formula for calculating the accurate physical time in the fixed delay compensation unit is: TTSF,true=THOST,readToffset,fixedTjitter,residual; Where T HOST,read is the TSF hardware reading, T offset,fixed is the systematic delay, and T jitter,residual is the residual jitter. In one implementation, the TSF synchronization token bucket gating module includes: a time slot allocation table analyzing unit, configured to receive the time slot allocation table broadcasted by the AP as a central scheduler, and analyze a scheduling period and a predetermined transmission time slot of a current STA therein; Th