Internet of Things hotspot scheduling method and device

By dynamically calculating the time slice length of terminal devices and implementing an emergency scheduling mechanism, the problem of low communication efficiency and high data collision rate of WiFi4 hotspots in multi-terminal device scenarios is solved, realizing efficient and low-latency IoT hotspot scheduling and improving channel utilization and emergency data transmission success rate.

CN121842841APending Publication Date: 2026-04-10SHANGHAI LIANGNIU SEMICON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-14
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing WiFi 4 hotspots suffer from low communication efficiency, high data collision rate, and uneven channel resource allocation in scenarios with multiple concurrent devices, failing to meet the efficient scheduling needs of IoT devices.

Method used

An IoT hotspot scheduling method is adopted, which obtains terminal device status information through the STA status management module, dynamically calculates the time slice length, generates transmission frames and sends them in sequence, establishes an emergency scheduling mechanism to ensure that emergency data is transmitted first, and simplifies the transmission frame structure to 16 bytes to reduce channel overhead.

Benefits of technology

It significantly reduces scheduling latency by more than 80%, increases scheduling capacity by 4 times, reduces channel overhead by 60%, improves the success rate of emergency data transmission to 99.5%, has strong compatibility, and low deployment cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121842841A_ABST
    Figure CN121842841A_ABST
Patent Text Reader

Abstract

The invention provides an Internet of Things hotspot scheduling method and device, and the method comprises the following steps: a scheduling instruction generation module dynamically calculates the time slice length of each terminal device according to an STA state matrix, and generates an STA time slice mapping table; the scheduling instruction generation module generates transmission frames according to the STA time slice mapping table, and the WiFi hardware unit sequentially sends the corresponding transmission frames according to a preset communication priority; and the terminal equipment identifies and analyzes the transmission frame, and the terminal equipment matched with the transmission frame sends cache data to the WiFi hardware unit according to the transmission frame. By adopting the method, the scheduling delay can be reduced, and the problem of transmission failure caused by collision of emergency data can be thoroughly solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to an Internet of Things hotspot, in particular to an Internet of Things hotspot scheduling method and device. BACKGROUND

[0002] With the popularization of the Internet of Things, WiFi4 hotspots have been widely used in smart home, industrial monitoring and other scenarios, and the number of connected terminal devices has increased from several to dozens, such as factory workshop sensor networks and shopping mall intelligent shopping guide devices. These terminal devices often need to upload data periodically (such as temperature and humidity sensors) or transmit control instructions in real time (such as intelligent switches), which have high requirements for communication timeliness and reliability. The core of WiFi communication efficiency depends on the MAC layer channel access mechanism. Currently, WiFi4 hotspots generally use the CSMA / CA mechanism, which has inherent defects in the multi-terminal device concurrent scenario: 1. Blind area leads to collision: "hidden terminal" (two terminal devices cannot see each other but can connect to the hotspot) may detect the channel idle at the same time and send data, causing collision; multiple terminal devices may also initiate transmission at the same time at the moment the data reception ends, causing collision.

[0003] 2. Backoff mechanism reduces efficiency: after collision, CSMA / CA starts a binary exponential backoff algorithm, and the terminal device needs to wait for a random time to retransmit. The more terminal devices, the higher the collision probability, and the exponential growth of the backoff time, the effective communication time ratio decreases significantly.

[0004] 3. Channel resource waste: CSMA / CA is a "preemptive" access, and the transmission time of a single terminal device is determined by the amount of its own data, which may cause small data devices to occupy the channel for too long, and devices that urgently need to transmit data cannot access, resulting in unbalanced allocation of time resources. For example, a smart home WiFi hotspot connected to 10 temperature and humidity sensors transmits 10 bytes of data every 10 seconds. When using CSMA / CA, the collision probability of multiple sensors uploading data at the same time is more than 30%, and some data needs to be retransmitted 2-3 times to be successful, the data upload delay is prolonged from 100ms to 500ms or more, which seriously affects the response speed of intelligent control.

[0005] Therefore, in the multi-terminal device concurrent scenario of the Internet of Things, how to optimize the MAC layer scheduling mechanism of the WiFi4 hotspot, reduce the data collision rate, and improve the channel utilization rate has become a technical problem that needs to be solved.

[0006] At present, for the WiFi4 hotspot multi-terminal device scheduling problem, the existing technology proposes a periodic scheduling scheme based on Beacon frame, which is applied to part of industrial-grade WiFi devices, the core is to use the broadcast characteristics of Beacon frame (beacon frame) in WiFi protocol to carry scheduling instructions, realize terminal device communication time allocation, the specific scheme is as follows: 1. Frame structure design: add scheduling information unit in the Beacon frame "optional information field". 2. Scheduling period setting: the hotspot sends Beacon frame once every 100ms, before sending, according to the data amount to be transmitted of each terminal device, the time slice is allocated through the "polling priority algorithm" - the terminal device with more than 100 bytes of data to be transmitted is allocated 20ms, the terminal device with less than 100 bytes of data is allocated 10ms, and the terminal device without data is not allocated. 3. Terminal device execution logic: the terminal device receives Beacon frame periodically, parses the scheduling information unit, matches the MAC address itself, and then sends data at the allocated start time, and releases the channel after sending; If it is not matched, it only tries to send emergency data in the "free competition period" (20% of the total period) between Beacon frames.

[0007] Although the periodic scheduling scheme based on Beacon frame can reduce the collision rate, through technical principle analysis and actual scene test, the scheme has the following core shortcomings, which cannot meet the efficient scheduling demand of Internet of Things multi-terminal device: 1. Large scheduling delay and poor real-time performance: the scheme relies on the fixed period (100ms) of Beacon frame to send scheduling instructions, and shortening the period will increase the channel overhead. 2. Emergency data transmission mechanism failure risk: the scheme sets 20% of the Beacon frame interval as the "free competition period" for terminal devices to transmit emergency data, but this period still uses the CSMA / CA mechanism. When multiple terminal devices generate emergency data at the same time, collision will occur, and the retransmission opportunity is small, resulting in high emergency data loss rate.

[0008] Therefore, there is an urgent need for an Internet of Things hotspot scheduling method and device that can effectively improve the scheduling real-time performance and reduce the collision rate. SUMMARY

[0009] In order to overcome the existing technical problems, the present application provides an Internet of Things hotspot scheduling method and device which can effectively improve the scheduling real-time performance and reduce the collision rate.

[0010] The application adopts the following technical solutions.

[0011] An Internet of Things hotspot scheduling method, comprising the following steps: S1, the STA state management module obtains the state information of each terminal device through the WiFi hardware unit, integrates to obtain the STA state matrix, and sends the STA state matrix to the scheduling instruction generation module; S2, the scheduling instruction generation module dynamically calculates the time slice length of each terminal device according to the STA state matrix, and generates an STA time slice mapping table; S3, the scheduling instruction generation module generates a transmission frame according to the STA time slice mapping table, and transmits it to the WiFi hardware unit; the WiFi hardware unit sends the corresponding transmission frame in sequence according to the preset communication priority; S4, the terminal device identifies and parses the transmission frame, and the terminal device matched with the transmission frame sends the buffered data to the WiFi hardware unit according to the transmission frame; S5, the WiFi hardware unit confirms whether the buffered data is sent, if yes, the STA state management module updates the state information of the corresponding terminal device, if not, the communication priority of the terminal device is increased and the time slice length is updated, and the transmission frame is regenerated.

[0012] As a further improvement of the application, the state information includes the length of the to-be-sent data queue, the communication priority and the retransmission rate; The specific steps of dynamically calculating the time slice length of each terminal device include: calculating a data amount factor according to the length of the to-be-sent data queue, calculating a communication quality factor according to the retransmission rate, and weighted sum of the data amount factor, the communication priority and the communication quality factor to obtain the time slice length.

[0013] As a further improvement of the application, the calculation expression of the weighted sum to obtain the time slice length is: , Wherein, The data amount factor is 1ms per 100 bytes, The length of the to-be-sent data queue, The communication priority, The communication quality factor, The retransmission rate in the last ten seconds, 、 、 The weight factor.

[0014] As a further improvement of the application, while sending the corresponding transmission frame in sequence according to the preset communication priority, if the length of the to-be-sent data queue of the terminal device increases by more than the preset emergency scheduling bytes within the preset emergency time, the transmission frame of the terminal device is preferentially sent.

[0015] As a further improvement of the application, the transmission frame includes a two-byte frame control, a two-byte scheduling field, a six-byte destination address, a two-byte scheduling identifier, and a four-byte frame check sequence; The scheduling field stores the time slice length of the corresponding terminal device; The specific steps of generating the transmission frame include filling the corresponding time slice length into the scheduling field, filling the MAC address of the corresponding terminal device into the destination address, and assigning a unique scheduling ID to the scheduling identifier.

[0016] As a further improvement of the application, the frame control includes frame type, sub-type, and a self-sending identifier bit. The specific steps of the terminal device identifying and parsing the transmission frame, and the terminal device matching the transmission frame sending the buffered data to the WiFi hardware unit according to the transmission frame include: each terminal device identifying whether the self-sending identifier bit of the transmission frame is 1, if yes, parsing whether the destination address of the transmission frame matches the MAC address of itself, if not, remaining silent, if yes, the corresponding terminal device extracting the scheduling field and the scheduling ID, and starting a local timer, when the local timer reaches the start time, the terminal device sends the buffered data to the WiFi hardware unit in combination with the scheduling ID.

[0017] As a further improvement of the application, the specific steps of the WiFi hardware unit confirming whether the buffered data is sent include: the WiFi hardware unit matching whether the scheduling ID sent by the terminal device is the same as the scheduling ID of the transmission frame, if yes, considering that the buffered data is sent, if not, waiting for a time length corresponding to the time slice length, if no same scheduling ID is received after the waiting, considering that the buffered data is not sent.

[0018] As a further improvement of the application, the specific steps of the STA state management module updating the state information of the terminal device include: the STA state management module updating the to-be-sent data queue length of the terminal device to 0.

[0019] An Internet of Things hotspot scheduling device adopts an Internet of Things hotspot scheduling method as described above, and includes: The WiFi hardware unit includes a radio frequency transceiver module, a MAC layer protocol module, and a data buffer module, the MAC layer protocol module identifies that the channel is idle, and sequentially sends the corresponding transmission frame to the terminal device through the radio frequency transceiver module according to the preset communication priority. The STA state management module is connected with the MAC layer protocol module through a bus, is used for acquiring and updating the state information of each terminal device in real time through the MAC layer protocol module, integrating to obtain a STA state matrix, and sending the STA state matrix to the scheduling instruction generation module. The scheduling instruction generation module is connected with the STA state management module and the MAC layer protocol module, and comprises a time slice calculation submodule and a frame encapsulation submodule; the time slice calculation submodule dynamically calculates the time slice length of each terminal device according to the STA state matrix, and generates an STA time slice mapping table; and the frame encapsulation submodule generates a transmission frame according to the STA time slice mapping table, and transmits the transmission frame to the WiFi hardware unit. The plurality of terminal devices identify and analyze the transmission frame, and send the buffered data to the WiFi hardware unit.

[0020] The present application has the following advantages: 1. Scheduling delay is reduced by more than 80%, and real-time performance is significantly improved: the present application adopts an "immediate trigger" transmission frame sending mechanism, and does not need to rely on the fixed period of the Beacon frame. After the terminal device generates buffered data, the STA state management module collects state information within 1ms, the scheduling instruction generation module responds within 500us, the transmission frame sending time is 128us, and the total delay is less than or equal to 1.628ms, which is much lower than the 10-100ms delay of the prior art. In actual tests, the average scheduling delay of 10 terminal devices is 1.2ms, which is reduced by 82%, and meets the needs of low-delay scenes such as industrial control and intelligent security.

[0021] 2. Scheduling capacity is improved by 4 times, and the scalability is excellent: the transmission frame is only 16 bytes, and the scheduling capacity is only limited by the number of associated terminal devices of the WiFi hardware unit (up to 32), which is 4 times higher than the 8 scheduling capacity of the prior art. In a 32-terminal device scenario, through "communication priority sequential transmission", the scheduling period of all terminal devices is less than or equal to 32ms (32 terminal devices x 1ms sending interval), which is much lower than the 200ms+ period of the prior art, and there is no scheduling information overflow problem.

[0022] 3. Channel overhead is reduced by 60%, and effective bandwidth is improved: the transmission frame sending time is 128us, and in a 32-terminal device scenario, the total channel overhead of each round of scheduling is 32x128us=4.096ms, accounting for 12.8% of the scheduling period (32ms). In actual tests, the channel overhead of the present application is reduced by 60% compared with the prior art, and the effective bandwidth is increased from 8.5Mbps to 9.4Mbps when 10 terminal devices are concurrent, which is increased by 10.6%.

[0023] 4. Emergency data transmission success rate is increased to 99.5%: the application sets an "emergency scheduling" mechanism, if the length of the terminal device's to-be-sent data queue increases by more than the preset emergency scheduling bytes within the preset emergency time, the transmission frame of the terminal device is preferentially sent without waiting for the free competition period; and the "directivity" of the transmission frame ensures that other terminal devices remain silent within the time slice to avoid collision. In actual tests, 10 terminal devices send emergency data at the same time, the success rate of the application is 99.5%, the collision rate of the prior art free competition period is 35%, and the success rate is only 65%, which completely solves the problem of emergency data transmission failure.

[0024] 5. Strong compatibility and low deployment cost: the scheduling logic is completely implemented on the WiFi hardware unit side, only the chip firmware of the WiFi hardware unit MAC layer needs to be modified (two module logic codes are added), the terminal device does not need to be modified, and only the standard CTS frame extension field needs to be parsed to execute the scheduling instruction, which is compatible with WiFi4 standard. Compared with the scheme that needs to be modified on the terminal device side, the deployment cost is reduced by more than 90%, and it can be directly used for upgrading the existing Internet of Things WiFi network. BRIEF DESCRIPTION OF DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, a brief introduction will be given below to the drawings needed to be used in the embodiment or prior art description, and obviously, other drawings can also be obtained by those skilled in the art without creative effort on the premise of not paying creative effort.

[0026] Figure 1 is a flowchart of the application. DETAILED DESCRIPTION

[0027] The drawings are only used for illustrative description and cannot be understood as a limitation on the patent; in order to better illustrate the embodiments, some components in the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product.

[0028] For those skilled in the art, it is understandable that some known structures and their descriptions in the drawings may be omitted. The technical solutions of the application will be further described below in combination with the drawings and embodiments.

[0029] REFERENCE Figure 1 A method for scheduling hotspots in Internet of Things, comprising the following steps: S1, the STA state management module obtains the state information of each terminal device through the WiFi hardware unit, integrates to obtain the STA state matrix, and sends the STA state matrix to the scheduling instruction generation module; S2, the scheduling instruction generation module dynamically calculates the time slice length of each terminal device according to the STA state matrix, and generates an STA time slice mapping table; S3, the scheduling instruction generation module generates a transmission frame according to the STA time slice mapping table and transmits it to the WiFi hardware unit, and the WiFi hardware unit sends the corresponding transmission frame in order according to the preset communication priority; S4, the terminal device identifies and parses the transmission frame, and the terminal device matched with the transmission frame sends the buffered data to the WiFi hardware unit according to the transmission frame; S5, the WiFi hardware unit confirms whether the buffered data is sent, if yes, the STA state management module updates the state information of the terminal device, if not, the communication priority of the terminal device is increased and the time slice length is updated, and the transmission frame is regenerated.

[0030] The prior art relies on the Beacon frame to send the scheduling instruction with a fixed period (100ms), and shortening the period will increase the channel overhead. The transmission frame sending mechanism of the present application is triggered in real time, and does not need to rely on the Beacon frame with a fixed period. In actual test, the average scheduling delay is 1.2ms when 10 terminal devices are concurrent, which is reduced by 82%, meeting the needs of low delay scenes such as industrial control and intelligent security.

[0031] The prior art scheme sets 20% of the Beacon frame interval as a "free competition period" for terminal devices to transmit emergency data, but this period still uses the CSMA / CA mechanism. When multiple terminal devices simultaneously generate emergency data, collision will be caused, and the period is only 10-20ms, the retransmission opportunity is small, resulting in high loss rate of emergency data. For example, if the alarm signal sent by the intelligent smoke detector collides in this period, there is no retransmission time after entering the terminal device scheduling time slice, which will cause the alarm signal to be unable to upload in time. The transmission frame is sent in order in the present application, which completely solves the problem of transmission failure of emergency data.

[0032] Specifically, the sending interval of the transmission frame is 1ms. After regenerating the transmission frame, the corresponding transmission frame is still sent in order according to the preset communication priority. Specifically, the communication priority has three levels, when the low-level terminal device fails to transmit, the communication priority is upgraded to the middle level, at this time, if there are still high-level terminal devices that have not been transmitted, the high-level terminal devices are preferentially transmitted.

[0033] As a further improvement of the present application, the state information includes the length of the to-be-sent data queue, the communication priority and the retransmission rate; The specific steps of dynamically calculating the time slice length of each terminal device include: calculating the data amount factor according to the length of the to-be-sent data queue, calculating the communication quality factor according to the retransmission rate, and weighting and summing the data amount factor, the communication priority and the communication quality factor to obtain the time slice length.

[0034] As a further improvement of the present application, the calculation expression of weighting and summing to obtain the time slice length is: , wherein, is a data volume factor, representing 1 ms per one hundred bytes of base allocation, is a length of a data queue to be transmitted, is a communication priority, is a communication quality factor, is a retransmission rate in the last ten seconds, , , is a weight factor.

[0035] Specifically, the weight factors , , are respectively 0.6, 0.3 and 0.1. The data volume and reliability are ensured; the value of T is limited to 1000-20000 μs, so as to avoid that a single terminal device occupies the channel for too long.

[0036] As another specific embodiment of the present application, the weighted summation can also be replaced by a deep learning prediction algorithm, and the time slice is predicted and allocated by collecting historical terminal device state data (data volume, priority, retransmission rate) and time slice usage efficiency (effective data transmission volume / time slice length) and training an LSTM model. Advantages: in the periodic data transmission scene (such as temperature and humidity sensor), the efficiency is improved by more than 15%; Disadvantages: the hotspot device needs to have certain computing power, and is suitable for medium and high-end WiFi hotspots.

[0037] As a further improvement of the present application, while the transmission frames corresponding to the preset communication priorities are transmitted in sequence, if the number of bytes of the length of the data queue to be transmitted of a terminal device increases in the preset emergency time is greater than the preset emergency scheduling bytes, the transmission frame of the terminal device is transmitted preferentially.

[0038] The prior art relies on the Beacon frame fixed period (100 ms) to send scheduling instructions, and when the terminal device generates burst data (such as smart door lock unlocking state feedback), it needs to wait for the next Beacon frame to obtain the time slice, with the shortest waiting time of 1 ms and the longest waiting time of 100 ms. For scenes with a delay requirement of less than 50 ms (such as industrial equipment control), it will cause the response of the control instruction to lag. For example, the temperature sensor of the factory motor needs to upload data within 30 ms after detecting over-temperature, and if the current Beacon frame is missed, the delay is up to 60 ms, which may cause motor overload failure. The prior art scheme sets 20% of the Beacon frame interval as a "free competition period" for terminal devices to transmit emergency data, but this period still uses the CSMA / CA mechanism. When multiple terminal devices simultaneously generate emergency data, collisions will occur, and the time period is only 10-20 ms, with few retransmission opportunities, resulting in a high loss rate of emergency data. For example, if the alarm signal sent by the intelligent smoke detector collides in this period, there is no retransmission time after entering the terminal device scheduling time slice, which will cause the alarm signal to be unable to upload in time.

[0039] The present application sets an "emergency scheduling" mechanism. If the length of the terminal device's data queue to be sent increases by more than a preset emergency scheduling byte (specifically, as a specific example of the present application, the MAC layer protocol module detects that the emergency scheduling byte suddenly increases by ≥ 50 bytes) within a preset emergency time, the transmission frame of the terminal device is transmitted preferentially, without waiting for the free competition period, and without judging according to the communication priority. The "directivity" of the transmission frame ensures that other terminal devices remain silent within this time slice, avoiding collisions. In actual tests, 10 terminal devices simultaneously send emergency data, with a success rate of 99.5% for the present application, a collision rate of 35% and a success rate of only 65% for the prior art free competition period, completely solving the problem of emergency data transmission failure.

[0040] As a further improvement of the present application, the transmission frame includes two bytes of frame control, two bytes of scheduling field, six bytes of destination address, two bytes of scheduling identifier, and four bytes of frame check sequence; The scheduling field stores the time slice length corresponding to the terminal device; The specific steps of generating the transmission frame include filling the corresponding time slice length into the scheduling field, filling the MAC address of the corresponding terminal device into the destination address, and assigning a unique scheduling ID to the scheduling identifier.

[0041] In addition, when generating the transmission frame, the self-sending identifier in the frame control is set to 1 for subsequent terminal devices to quickly identify.

[0042] The transmission frame adopted by the application is a customized CTS Self frame, so the scheduling logic is completely implemented on the WiFi hardware unit side, only the chip firmware of the WiFi hardware unit MAC layer needs to be modified (two module logic codes are added), and the terminal device does not need to be modified. Hardware or driver, only parsing the standard CTS frame extension field can execute the scheduling instruction, which is compatible with WiFi4 standard. Compared with the scheme that needs to be modified on the terminal device side, the deployment cost is reduced by more than 90%, which can be directly used for upgrading the existing Internet of Things WiFi network.

[0043] In addition, in addition to using the customized CTSSelf frame, a customized RTSSelf frame can also be used instead. The frame structure is similar, and the process is consistent, but the disadvantage is that the standard length of the RTS frame is 2 bytes more than that of the CTS frame, and the channel occupation time increases slightly. The advantage is that the RTS frame has better compatibility in some old terminal devices.

[0044] In the prior art scheme, the Beacon frame "optional information field" is only 64 bytes, and each terminal device scheduling information unit occupies 8 bytes (4 bytes of MAC identification + 4 bytes of time slice information). A single Beacon frame can schedule up to 8 terminal devices. When the WiFi hardware unit connects more than 8 terminal devices (such as 20 shopping guide robots in a smart mall), multiple rounds of Beacon frames need to be scheduled, and some terminal devices have a waiting period of more than 200ms. It is also prone to "scheduling information overflow", which causes some terminal devices to be unable to allocate time slices; if the number of scheduling information units is increased, it will compress the necessary field space of the Beacon frame, such as network identification and encryption information, affecting basic communication. The transmission frame of the present application is only 16 bytes, and the scheduling capacity is only limited by the number of terminal devices associated with the WiFi hardware unit (up to 32), which is 4 times the scheduling capacity of the prior art of 8. In a 32-terminal device scenario, through "communication priority in order", the scheduling period of all terminal devices is ≤32ms (32 terminal devices x 1ms sending interval), which is much lower than the prior art 200ms+ period, and there is no scheduling information overflow problem.

[0045] In the prior art, in order to improve the scheduling accuracy, the Beacon frame sending interval is shortened from 100 ms to 50 ms, and the Beacon frame length is 128 bytes, and according to the transmission rate of 1 Mbps of WiFi4, the sending time of a single Beacon frame is 1.024 ms, and the channel occupation time ratio is increased from 1.024% to 2.048%. In the case of 10 terminal devices, the channel overhead is increased by 15% compared with the standard CSMA / CA, and the effective data transmission bandwidth is compressed from 10 Mbps to less than 8.5 Mbps. The transmission frame sending time of the present application is 128 mu s, and the total channel overhead of each round of scheduling in the case of 32 terminal devices is 32 x 128 mu s = 4.096 ms, accounting for 12.8% of the scheduling period (32 ms). In actual tests, the channel overhead of the present application is reduced by 60% compared with the prior art, and the effective bandwidth is increased from 8.5 Mbps to 9.4 Mbps when 10 terminal devices are concurrent, which is increased by 10.6%.

[0046] As a further improvement of the present application, the frame control includes frame type, sub-type and self-sending identification bit; The specific steps that the terminal device identifies and analyzes the transmission frame, and the terminal device matched with the transmission frame sends the buffered data to the WiFi hardware unit according to the transmission frame include: each terminal device identifies whether the self-sending identification bit of the transmission frame is 1, if yes, analyzes whether the destination address of the transmission frame matches the MAC address of itself, if not, remains silent, if yes, the corresponding terminal device extracts the scheduling field and scheduling ID, and starts a local timer, when the local timer reaches the start time, the terminal device sends the buffered data to the WiFi hardware unit in combination with the scheduling ID.

[0047] As a further improvement of the present application, the specific steps that the WiFi hardware unit confirms whether the buffered data is sent include: the WiFi hardware unit matches whether the scheduling ID sent by the terminal device is the same as the scheduling ID of the transmission frame, if yes, it is considered that the buffered data is sent, if not, it waits for a time length corresponding to the time slice length, if no same scheduling ID is received after waiting, it is considered that the buffered data is not sent.

[0048] As a further improvement of the present application, the specific steps that the STA state management module updates the state information corresponding to the terminal device include: the STA state management module updates the to-be-sent data queue length corresponding to the terminal device to 0.

[0049] An Internet of Things hotspot scheduling device adopts an Internet of Things hotspot scheduling method as described above, comprising: The WiFi hardware unit comprises a radio frequency transceiver module, a MAC layer protocol module and a data buffer module, the MAC layer protocol module identifies that the channel is idle, and sends corresponding transmission frames to terminal devices in sequence according to preset communication priorities through the radio frequency transceiver module; The STA state management module is connected with the MAC layer protocol module through a bus, is used for acquiring and updating state information of each terminal device in real time through the MAC layer protocol module, integrates to obtain a STA state matrix, and sends the STA state matrix to the scheduling instruction generation module; The scheduling instruction generation module is connected with the STA state management module and the MAC layer protocol module, comprises a time slice calculation submodule and a frame encapsulation submodule, the time slice calculation submodule dynamically calculates time slice lengths of each terminal device according to the STA state matrix, and generates a STA time slice mapping table; the frame encapsulation submodule generates transmission frames according to the STA time slice mapping table, and transmits the transmission frames to the WiFi hardware unit; The plurality of terminal devices identify and analyze the transmission frames, and send buffer data to the WiFi hardware unit.

[0050] Obviously, the above embodiments of the present application are only examples for clearly illustrating the present application, and are not intended to limit the implementation modes of the present application. For ordinary skilled in the art, other different forms of changes or variations can be made on the basis of the above description. Here, all the implementation modes are not required or can not be exhausted. Any modification, equivalent replacement and improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the claims of the present application.

Claims

1. A method for scheduling Internet of Things hotspots, the method comprising: The method comprises the following steps: S1, the STA state management module obtains the state information of each terminal device through the WiFi hardware unit, integrates the STA state matrix, and sends the STA state matrix to the scheduling instruction generation module; S2, the scheduling instruction generation module dynamically calculates the time slice length of each terminal device according to the STA state matrix, and generates the STA time slice mapping table; S3, the scheduling instruction generation module generates a transmission frame according to the STA time slice mapping table, and transmits the transmission frame to the WiFi hardware unit; the WiFi hardware unit sends the corresponding transmission frame in sequence according to the preset communication priority; S4, the terminal device identifies and analyzes the transmission frame, and the terminal device matched with the transmission frame sends the buffered data to the WiFi hardware unit according to the transmission frame; S5, the WiFi hardware unit confirms whether the buffered data is sent, if yes, the STA state management module updates the state information of the terminal device, if not, the communication priority of the terminal device is increased and the time slice length is updated, and the transmission frame is regenerated.

2. The method of claim 1, wherein, The state information includes the length of the to-be-sent data queue, the communication priority and the retransmission rate; The specific steps of dynamically calculating the time slice length of each terminal device include: calculating the data amount factor according to the length of the to-be-sent data queue, calculating the communication quality factor according to the retransmission rate, and weighting and summing the data amount factor, the communication priority and the communication quality factor to obtain the time slice length.

3. The method of claim 2, wherein, The calculation expression of weighting and summing to obtain the time slice length is: , wherein, is a data volume factor, representing 1 ms per one hundred bytes of base allocation, is a queue length of data to be transmitted, is a communication priority, is a communication quality factor, is a retransmission rate for the last ten seconds, , , is a weight factor.

4. The method of claim 2, wherein, According to the preset communication priority, the corresponding transmission frame is sent in sequence, and if the length of the to-be-sent data queue of the terminal device increases by more than the preset emergency scheduling byte within the preset emergency time length, the transmission frame of the terminal device is preferentially sent.

5. The method of claim 1, wherein, The transmission frame includes two bytes of frame control, two bytes of scheduling field, six bytes of destination address, two bytes of scheduling identifier, and four bytes of frame check sequence; The scheduling field stores the time slice length corresponding to the terminal device; The specific steps of generating the transmission frame include: filling the corresponding time slice length into the scheduling field, filling the MAC address of the corresponding terminal device into the destination address, and assigning a unique scheduling ID to the scheduling identifier.

6. The method of claim 5, wherein, The frame control includes frame type, sub-type and self-sending identifier bit; The specific steps of the terminal device identifying and analyzing the transmission frame, and the terminal device matched with the transmission frame sending the buffered data to the WiFi hardware unit according to the transmission frame include: each terminal device identifies whether the self-sending identifier bit of the transmission frame is 1, if yes, it analyzes whether the destination address of the transmission frame matches the MAC address of itself, if not, it remains silent, if matches, the corresponding terminal device extracts the scheduling field and the scheduling ID, and starts a local timer; when the local timer reaches the start time, the terminal device sends the buffered data to the WiFi hardware unit in combination with the scheduling ID.

7. The method of claim 5, wherein, The specific steps for the WiFi hardware unit to confirm whether the buffered data is sent include: the WiFi hardware unit matching the scheduling ID sent by the terminal device with the scheduling ID of the transmission frame, if the same, considering that the buffered data is sent, if not, waiting for a time length corresponding to the time slice length, if after waiting, the same scheduling ID of the terminal device is not received, considering that the buffered data is not sent.

8. The method of claim 2, wherein, The specific steps for the STA state management module to update the state information of the terminal device include: the STA state management module updating the to-be-sent data queue length of the terminal device to 0.

9. An Internet of Things hotspot scheduling apparatus, characterized by, It adopts the Internet of Things hotspot scheduling method as claimed in claims 1-8, comprising: The WiFi hardware unit comprises a radio frequency transceiver module, a MAC layer protocol module and a data buffer module, the MAC layer protocol module identifies that the channel is idle, and sends the corresponding transmission frame to the terminal device through the radio frequency transceiver module according to the preset communication priority in sequence; The STA state management module is connected with the MAC layer protocol module through a bus, used for acquiring and updating the state information of each terminal device in real time through the MAC layer protocol module, integrating to obtain a STA state matrix, and sending the STA state matrix to the scheduling instruction generation module; The scheduling instruction generation module is connected with the STA state management module and the MAC layer protocol module, comprising a time slice calculation submodule and a frame encapsulation submodule, the time slice calculation submodule dynamically calculates the time slice length of each terminal device according to the STA state matrix, and generates a STA time slice mapping table; the frame encapsulation submodule generates a transmission frame according to the STA time slice mapping table, and transmits the transmission frame to the WiFi hardware unit; The plurality of terminal devices identify and analyze the transmission frame, and send the buffered data to the WiFi hardware unit.