A channel resource allocation method and device, a gateway and a storage medium
By obtaining historical communication information of smart home devices and rationally allocating channel resources, the frequency band congestion and interference problems during multi-device communication are solved, communication quality is improved and energy consumption is reduced.
Patent Information
- Application Number
- CN202210957994.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-09
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2042-08-09
AI Technical Summary
In a smart home environment, when multiple devices communicate with the gateway, communication frequency band congestion and channel interference are likely to occur, resulting in poor communication quality and even data loss.
By obtaining historical communication information between the gateway and the device, the communication priority and target channel of the device are determined according to the communication attributes, and communication resources are reasonably allocated to avoid too many devices communicating at the same time.
It reduces the congestion of communication frequency bands and channels, improves the communication quality between devices and gateways, and reduces the working energy consumption of devices.
Smart Images

Figure CN115134930B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of communication technology, and in particular to a channel resource allocation method, device, gateway, and storage medium. Background Art
[0002] With the updating and iteration of communication technology, the Internet of Things concept of connecting everything has entered all aspects of home life. In the field of smart home, wireless gateways have become relay devices for most wireless smart devices in the home to access the Internet.
[0003] In current smart home environments, a single gateway manages multiple devices. Because each device actively communicates with the gateway at its own desired time, with varying durations and frequencies, communication confusion is inevitable. Multiple devices may be communicating with the gateway simultaneously, leading to frequency congestion and interference between different channels. This can cause poor communication quality between devices and the gateway, and even data loss, impacting the user experience. Summary of the Invention
[0004] In view of this, in order to solve the technical problem of poor communication quality between the above-mentioned device and the gateway, embodiments of the present invention provide a channel resource allocation method, apparatus, gateway and storage medium.
[0005] In a first aspect, an embodiment of the present invention provides a channel resource allocation method, including:
[0006] Obtain historical communication information between the gateway and the device;
[0007] determining a communication attribute of the device according to the historical communication information;
[0008] A target channel corresponding to the device is determined according to the communication attribute, so that the device communicates with the gateway using the target channel.
[0009] In one possible implementation, the method further includes:
[0010] determining a communication priority of the device according to the communication attribute;
[0011] A target channel corresponding to the device is determined according to the communication priority.
[0012] In one possible implementation, the method further includes:
[0013] determining a target wake-up time of the device according to the historical communication information;
[0014] When the target wake-up time arrives, a wake-up message is sent to the device using the target channel, so that the device communicates with the gateway using the target channel.
[0015] In one possible implementation, obtaining historical communication information between the gateway and the device includes:
[0016] Obtaining historical communication times and durations between the device and the gateway;
[0017] determining a historical communication frequency between the device and the gateway according to the historical communication moments;
[0018] The historical communication time, the historical communication duration and the historical communication frequency are used as the historical communication information.
[0019] In one possible implementation, determining the communication priority of the device according to the communication attribute includes:
[0020] When the communication attribute is a first attribute, determining that the communication priority of the device is the first priority, the first attribute being that a historical communication moment or a historical communication duration of the device meets a first preset condition;
[0021] Alternatively, when the communication attribute is a second attribute, determining the communication priority of the device to be the second priority, the second attribute being that the historical communication frequency of the device is greater than a first threshold, the historical communication time and the historical communication duration both meet a second preset condition, and the historical communication duration is greater than the second threshold;
[0022] Alternatively, when the communication attribute is a third attribute, determining the communication priority of the device to be the third priority, the third attribute being that the historical communication frequency of the device is less than or equal to a first threshold, the historical communication time and the historical communication duration both meet a second preset condition, and the historical communication duration is greater than a second threshold;
[0023] Alternatively, when the communication attribute is a fourth attribute, determining that the communication priority of the device is the fourth priority, the fourth attribute is that the historical communication frequency of the device is greater than a first threshold, the historical communication time and the historical communication duration both meet a second preset condition, and the historical communication duration is less than or equal to the second threshold;
[0024] Or, when the communication attribute is the fifth attribute, the communication priority of the device is determined to be the fifth priority, the fifth attribute is that the historical communication frequency of the device is less than or equal to the first threshold, the historical communication time and the historical communication duration both meet the second preset condition, and the historical communication duration is less than or equal to the second threshold.
[0025] In one possible implementation, determining the target channel corresponding to the device according to the communication priority includes:
[0026] When the communication attribute is the first attribute, determining any unoccupied channel as the target channel of the device according to the first priority;
[0027] or, when the communication attribute is the second attribute, determining any unoccupied channel as the target channel of the device according to the second priority;
[0028] or, when the communication attribute is the third attribute, determining any unoccupied channel as the target channel of the device according to the third priority;
[0029] or, when the communication attribute is the fourth attribute, determining any unoccupied channel as the target channel of the device according to the fourth priority;
[0030] Alternatively, when the communication attribute is the fifth attribute, any channel is determined as the target channel of the device according to the fifth priority.
[0031] In one possible implementation, determining the target wake-up time of the device according to the historical communication information includes:
[0032] When the communication attribute is the first attribute, determining the time when the gateway receives the communication request as the target wake-up time of the device;
[0033] or, when the communication attribute is the second attribute, determining a historical communication time of the device as a target wake-up time of the device;
[0034] or, when the communication attribute is the third attribute, determining the historical communication time of the device as the target wake-up time of the device;
[0035] or, when the communication attribute is the fourth attribute, determining the historical communication time of the device as the target wake-up time of the device;
[0036] or, when the communication attribute is the fifth attribute and the target channel of the device is an unoccupied channel, determining a historical communication time of the device as the target wake-up time of the device;
[0037] Alternatively, when the communication attribute is the fifth attribute and the target channel of the device is an occupied channel, any moment of the communication interval of the occupied channel is determined as the target wake-up moment of the device.
[0038] In a possible implementation, after enabling the device to communicate with the gateway using the target channel, the method further includes:
[0039] When the communication ends, a sleep message is sent to the device using the target channel, so that the device enters a sleep state based on the sleep message.
[0040] In a second aspect, an embodiment of the present invention provides a channel resource allocation device, including:
[0041] An acquisition module is used to obtain historical communication information between the gateway and the device;
[0042] a processing module, configured to determine a communication attribute of the device based on the historical communication information;
[0043] The processing module is further configured to determine a target channel corresponding to the device according to the communication attribute, so that the device communicates with the gateway using the target channel.
[0044] In a third aspect, an embodiment of the present invention provides a gateway, comprising: a processor and a memory, wherein the processor is configured to execute a channel resource allocation program stored in the memory to implement the channel resource allocation method described in any one of the first aspects above.
[0045] In a fourth aspect, an embodiment of the present invention provides a storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the channel resource allocation method described in any one of the first aspects above.
[0046] The channel resource allocation scheme provided by the embodiments of the present invention obtains historical communication information between a gateway and a device; determines the device's communication attributes based on this historical communication information; and then determines a target channel corresponding to the device based on this communication attribute, so that the device communicates with the gateway using the target channel. This allows for the rational allocation of communication channels based on the device's communication attributes, preventing too many devices from communicating simultaneously at the same time, thereby reducing congestion in communication frequency bands and channels and effectively lowering device operating energy consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A schematic diagram of a flow chart of a channel resource allocation method provided in an embodiment of the present invention;
[0048] Figure 2 A schematic diagram of a flow chart of another channel resource allocation method provided by an embodiment of the present invention;
[0049] Figure 3 A schematic diagram of a flow chart of another channel resource allocation method provided in an embodiment of the present invention;
[0050] Figure 4A schematic structural diagram of a channel resource allocation device provided in an embodiment of the present invention;
[0051] Figure 5 A schematic diagram of the structure of a gateway provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0053] To facilitate understanding of the embodiments of the present invention, specific embodiments will be further explained below with reference to the accompanying drawings. The embodiments do not limit the embodiments of the present invention.
[0054] Figure 1 A schematic diagram of a flow chart of a channel resource allocation method provided by an embodiment of the present invention is shown as follows: Figure 1 As shown, the method specifically includes:
[0055] S11. Obtain historical communication information between the gateway and the device.
[0056] The channel resource allocation method provided in an embodiment of the present invention is applied to a gateway, which may be a Wi-Fi 6 gateway. The gateway can connect and communicate with multiple devices, such as air conditioners, humidity control devices, and lighting devices. Specifically, the channel resource allocation method determines a target channel based on the communication properties of the device, allowing the device to communicate with the gateway through the target channel. This enables staggered communication between multiple devices and the gateway, avoiding frequency band congestion.
[0057] In this embodiment, during the historical communication process between the device and the gateway, the gateway will obtain and record information such as the device identification, communication start time, communication duration, and communication channel used as historical communication information.
[0058] S12: Determine the communication attribute of the device according to the historical communication information.
[0059] In this embodiment, the communication attribute may represent the frequency, duration, and regularity of device communication. The communication attribute of the device is determined based on the communication duration and time in historical communication information.
[0060] Specifically, the device's daily communication frequency can be determined based on the communication time, and whether the communication is regular can be determined based on the communication frequency, communication duration, and communication time. Multiple thresholds for categorizing communication duration and communication frequency can be pre-set. Based on the thresholds for the device's communication frequency and communication duration, the device's communication attributes are categorized into the following types: Category A attributes: frequent and regular communication frequency, with long communication duration; Category B attributes: low and regular communication frequency, with long communication duration; Category C attributes: frequent and regular communication frequency, with short communication duration; Category D attributes: low and regular communication frequency, with short communication duration; and Category E attributes: uncertain communication frequency and duration.
[0061] S13. Determine a target channel corresponding to the device according to the communication attribute, so that the device communicates with the gateway using the target channel.
[0062] In this embodiment, since the communication duration, communication frequency and communication time of devices with different communication attributes are different, it is necessary to set a corresponding target channel for each device with each communication attribute so that devices with the same communication attributes use the same target channel to communicate with the gateway. The method for determining the target channel may include but is not limited to using the channel that is most frequently used by devices with the same communication attributes in historical communications as the target channel of the device.
[0063] In one possible implementation, after determining the target channel of the device, the gateway may send a communication instruction or a channel identifier of the target channel to the device via the target channel, so that the device communicates with the gateway via the target channel after receiving the communication instruction or channel identifier.
[0064] The channel resource allocation method provided in this embodiment uses a gateway to obtain historical communication information between the gateway and a device; determines the device's communication attributes based on this historical communication information; and then determines a target channel corresponding to the device based on the communication attributes, allowing the device to communicate with the gateway using the target channel. This allows for the rational allocation of communication channels based on the communication attributes of the device, preventing too many devices from communicating with the gateway through the same channel, thereby reducing communication frequency band and channel congestion and effectively lowering device operating energy consumption.
[0065] Figure 2 A flow chart of another channel resource allocation method provided by an embodiment of the present invention is shown as follows: Figure 2 As shown, the method specifically includes:
[0066] S21. Obtain historical communication moments and historical communication durations between the device and the gateway; determine historical communication frequencies between the device and the gateway based on the historical communication moments; and use the historical communication moments, the historical communication duration, and the historical communication frequency as the historical communication information.
[0067] In this embodiment, it is applied to the WIFI6 gateway, and the target wake-up time and communication channels of multiple devices are arranged and allocated through the TWT scheduling plan of the WIFI6 gateway, so as to realize staggered communication between multiple devices and the gateway.
[0068] Specifically, the daily communication time between the device and the gateway within a preset time period is obtained as the historical communication time, the duration of each communication is used as the historical communication duration, the daily communication frequency is determined based on the historical communication time as the historical communication frequency, and the historical communication time, historical communication duration and historical communication frequency are used as historical communication information.
[0069] S22. Determine a communication attribute of a device according to the historical communication information; determine a communication priority of the device according to the communication attribute; and determine a target channel corresponding to the device according to the communication priority.
[0070] In this embodiment, the communication frequency, communication regularity, and communication duration of a device are determined as communication attributes based on historical communication information. The communication priority corresponding to each device with each communication attribute is then determined. If the communication times of multiple devices overlap and the number of unoccupied channels is less than the number of devices, a target channel corresponding to each device can be assigned based on the communication priority. Specifically, target channels are assigned preferentially to devices with higher priorities. The specific priority determination method is described in detail in S24-S213 and is not further elaborated here.
[0071] In one possible embodiment, the method for determining the target channel includes obtaining a historical occupancy time period of the channel. For devices that communicate regularly every day, the historical communication time period is determined based on the device's historical communication time and duration. A determination is made as to whether the historical communication time period overlaps with the channel's historical occupancy time period. If no overlap is found and the channel is currently unoccupied, the channel is determined as the target channel. For devices that communicate irregularly, any unoccupied channel is randomly selected as the target channel.
[0072] S23: Determine a target wake-up time for the device according to the historical communication information.
[0073] In this embodiment, the gateway actively wakes up the corresponding device at the target wake-up time, enabling communication between the device and the gateway. Based on historical communication information, the device's daily communication pattern is determined. For devices with regular communication patterns, the historical communication time is used as the target wake-up time. For devices with irregular communication patterns, the target wake-up time is the time the gateway receives the device's communication request.
[0074] In one possible implementation, if the target wake-up time of multiple devices is the same and the number of unoccupied channels is less than the number of devices, after allocating target channels to the multiple devices according to communication priority, the target wake-up time of the devices that are not allocated to the target channels is delayed to the time when unoccupied channels appear. This ensures that channels are allocated according to communication priority, and that the target wake-up time is determined based on historical communication information and priority.
[0075] For devices that communicate irregularly every day, it indicates that the device's communication time is urgent and random. The time when the device needs to communicate is used as the target wake-up time, and an unoccupied channel is randomly assigned as the target channel. When there is no unoccupied channel, the device with low communication priority can be controlled to enter sleep mode, and the channel where the device with low communication priority is located is used as the target channel. The device with low communication priority can be woken up after the irregular communication device completes communication or when an unoccupied channel appears.
[0076] Specifically, the communication attributes of the device include: a first attribute in steps S24-S25; a second attribute in steps S26-S27; a third attribute in steps S28-S29; a fourth attribute in steps S210-S211; and a fifth attribute in steps S212-S213. Methods for determining the communication priority, target wake-up time, and target channel of the device of the above five types of communication attributes include:
[0077] S24: When the communication attribute is a first attribute, determine that the communication priority of the device is a first priority, and the first attribute is that the historical communication time or historical communication duration of the device meets a first preset condition.
[0078] In this embodiment, a first preset condition is set, which may be: the historical communication time or historical communication duration of the device does not conform to any pattern (for example, the historical communication time of the device is 10:00 a.m., 9:20 a.m., and 7:35 p.m., or the historical communication duration of the device is six minutes, five minutes, and twenty-two minutes, indicating that the historical communication time or historical communication duration of the device conforms to the first preset condition). When the historical communication time of the device does not conform to any pattern every day, it is determined that the historical communication time conforms to the first preset condition, or when the historical communication duration of the device does not conform to any pattern, it is determined that the historical communication duration conforms to the first preset condition.
[0079] Furthermore, the communication priority of the device is determined by a first preset condition. When the historical communication time or the historical communication duration meets the first preset condition, it means that the communication attribute of the device is that the communication time and duration are irregular, and it is necessary to communicate with the gateway in a timely manner. The communication attribute of the device is determined to be the first attribute and the communication priority of the device is determined to be the first priority. The device characterized by the first attribute needs to communicate first.
[0080] S25. When the communication attribute is the first attribute, determine the moment when the gateway receives the communication request as the target wake-up moment of the device; and determine any unoccupied channel as the target channel of the device according to the first priority.
[0081] In this embodiment, when the first attribute device needs to communicate, the gateway will receive a communication request for requesting communication with the first attribute device. The communication request can be a communication request sent to the gateway by the user using other devices or the first attribute device. The time when the communication request is received is determined as the target wake-up time, and any unoccupied channel at the current time is determined as the target channel.
[0082] In one possible implementation, the usage of channels adjacent to each unoccupied channel (e.g., channel occupancy, communication rate, etc.) is obtained, and whether the unoccupied channel is interfered with by the adjacent channel is determined based on the usage. Unoccupied channels that are not interfered with by the adjacent channel communication are preferentially selected as target channels.
[0083] In one possible implementation, when there are no unoccupied channels, the remaining communication time of each channel is calculated, and the channel with the least remaining communication time is selected as the target channel, or the device with the lowest communication priority is suspended from communicating, so that the first attribute device communicates through the channel of the device with the lowest communication priority.
[0084] S26. When the communication attribute is the second attribute, determine that the communication priority of the device is the second priority, and the second attribute is that the historical communication frequency of the device is greater than the first threshold, the historical communication time and the historical communication duration both meet the second preset condition, and the historical communication duration is greater than the second threshold.
[0085] In this embodiment, a second preset condition is set in advance, and the second preset condition can be: the historical communication time and historical communication duration of the device conform to a certain pattern (for example, the historical communication time of the device is ten o'clock every morning, and each historical communication duration is ten minutes, indicating that the historical communication time and historical communication duration of the device both conform to the second preset condition). When the historical communication time of the device is the same every day or conforms to a certain pattern, it is determined that the historical communication time conforms to the second preset condition. When the historical communication duration of the device each time is the same or conforms to a certain pattern, it is determined that the historical communication duration conforms to the second preset condition.
[0086] A first threshold corresponding to the historical communication frequency and a second threshold corresponding to the historical communication duration are set. If the historical communication frequency is greater than the first threshold, it indicates that the device communicates frequently. If the historical communication duration is greater than the second threshold, it indicates that the device communicates for a long time. If both the historical communication time and the historical communication duration meet the second preset condition, it indicates that the communication regularity of the device, that is, the communication attribute of the device is that the communication frequency is frequent and regular, and the communication time is long. The device is determined to be a second-attribute device and the communication priority of the second-attribute device is determined to be the second priority, which is lower than the first priority.
[0087] S27. When the communication attribute is the second attribute, determine the historical communication time of the device as the target wake-up time of the device; and determine any unoccupied channel as the target channel of the device according to the second priority.
[0088] In this embodiment, due to the communication regularity of the second attribute device, the historical communication time of the second attribute device is first used as the target wake-up time. When the target wake-up time is reached, any unoccupied channel is selected as the target channel according to the second priority.
[0089] In one possible implementation, an unoccupied channel that is not interfered with by communications in adjacent channels is preferentially selected as the target channel.
[0090] In one possible implementation, when the target wake-up time of the second attribute device is the same as that of the first attribute device, and there are multiple unoccupied channels, target channels are allocated to the two devices respectively. When there is an unoccupied channel, the channel is determined as the target channel of the first attribute device according to the first priority. When an unoccupied channel appears again, the channel is determined as the target channel of the second attribute device, and the moment when the unoccupied channel appears is determined as the target wake-up time of the second attribute device.
[0091] S28. When the communication attribute is the third attribute, determine that the communication priority of the device is the third priority, and the third attribute is that the historical communication frequency of the device is less than or equal to the first threshold, the historical communication time and the historical communication duration both meet the second preset condition, and the historical communication duration is greater than the second threshold.
[0092] In this embodiment, the historical communication frequency is less than or equal to the first threshold, indicating that the device communicates infrequently; the historical communication duration is greater than the second threshold, indicating that the device communicates for a long time; the historical communication moments and historical communication durations both meet the second preset condition, indicating that the device communicates regularly, that is, the communication attributes of the device are low and regular communication frequency and long communication time, and the device is determined to be a third-attribute device and the communication priority of the third-attribute device is determined to be the third priority, which is lower than the second priority.
[0093] S29. When the communication attribute is the third attribute, determine the historical communication time of the device as the target wake-up time of the device; and determine any unoccupied channel as the target channel of the device according to the third priority.
[0094] In this embodiment, due to the communication regularity of the third attribute device, the historical communication time of the third attribute device is first used as the target wake-up time. When the target wake-up time is reached, any unoccupied channel is selected as the target channel according to the third priority.
[0095] In one possible implementation, an unoccupied channel that is not interfered with by communications in adjacent channels is preferentially selected as the target channel.
[0096] In one possible implementation, when the target wake-up time of the third attribute device is the same as that of the first attribute device or the second attribute device, and there are multiple unoccupied channels, target channels are allocated to the above devices respectively. When there is an unoccupied channel, the channel is determined as the target channel of the first attribute device or the second attribute device based on the first priority or the second priority. When an unoccupied channel appears again, the channel is determined as the target channel of the third attribute device, and the moment when the unoccupied channel appears is determined as the target wake-up time of the third attribute device.
[0097] S210. When the communication attribute is the fourth attribute, determine that the communication priority of the device is the fourth priority, and the fourth attribute is that the historical communication frequency of the device is greater than the first threshold, the historical communication time and the historical communication duration both meet the second preset condition, and the historical communication duration is less than or equal to the second threshold.
[0098] In this embodiment, a historical communication frequency greater than a first threshold indicates that the device communicates frequently, a historical communication duration less than or equal to a second threshold indicates that the device communicates short, and both the historical communication moments and the historical communication duration meet the second preset condition to indicate a communication regularity of the device, that is, the communication attribute of the device is frequent and regular communication frequency and short communication time, and the device is determined to be a fourth attribute device and the communication priority of the fourth attribute device is determined to be the fourth priority, which is lower than the third priority.
[0099] S211. When the communication attribute is the fourth attribute, determine a historical communication time of the device as a target wake-up time of the device; and determine any unoccupied channel as a target channel of the device according to the fourth priority.
[0100] In this embodiment, due to the fourth attribute device communication rule, the historical communication time is first used as the target wake-up time. When the target wake-up time is reached, any unoccupied channel is selected as the target channel according to the fourth priority.
[0101] In one possible implementation, an unoccupied channel that is not interfered with by communications in adjacent channels is preferentially selected as the target channel.
[0102] In one possible implementation, when the target wake-up time of the fourth attribute device is the same as that of the first attribute device, the second attribute device, or the third attribute device, and there are multiple unoccupied channels, target channels are allocated to the above devices respectively. When there is an unoccupied channel, the channel is determined as the target channel of the first attribute device, the second attribute device, or the third attribute device based on the first priority, the second priority, or the third priority. When an unoccupied channel appears again, the channel is determined as the target channel of the fourth attribute device, and the moment when the unoccupied channel appears is determined as the target wake-up time of the fourth attribute device.
[0103] S212. When the communication attribute is the fifth attribute, determine that the communication priority of the device is the fifth priority, and the fifth attribute is that the historical communication frequency of the device is less than or equal to the first threshold, the historical communication time and the historical communication duration both meet the second preset condition, and the historical communication duration is less than or equal to the second threshold.
[0104] In this embodiment, the historical communication frequency is less than or equal to the first threshold, indicating that the device communicates infrequently; the historical communication duration is less than or equal to the second threshold, indicating that the device communication time is short; the historical communication time and the historical communication duration both meet the second preset condition, indicating that the device communication regularity, that is, the communication attributes of the device are low and regular communication frequency and short communication time, and the device is determined to be a fifth attribute device and the communication priority of the fifth attribute device is determined to be the fifth priority, which is lower than the fourth priority.
[0105] S213. When the communication attribute is the fifth attribute, determine any channel as the target channel of the device according to the fifth priority; when the target channel of the device is an unoccupied channel, determine the historical communication moment of the device as the target wake-up moment; or, when the target channel of the device is an occupied channel, determine any moment of the communication interval of the occupied channel as the target wake-up moment.
[0106] In this embodiment, since the communication time of the fifth attribute device is relatively short, any channel can be selected as the target channel according to the fifth priority. When the selected channel is an unoccupied channel, the historical communication time of the fifth attribute device is determined as the target wake-up time. When the target wake-up time is reached, communication can be directly carried out on the channel; when the selected channel is an occupied channel, any time in the communication time interval of the occupied channel is determined as the target wake-up time, so that the fifth attribute device can communicate with the gateway in the communication interval of any occupied channel.
[0107] S214: When the target wake-up time is reached, control the gateway to send a wake-up message to the device using the target channel, so that the device communicates with the gateway using the target channel.
[0108] In this embodiment, the device is in a dormant state during non-target wake-up time periods. For devices that communicate regularly every day, when the target wake-up time of the device is reached, the gateway generates a wake-up message (wake-up instruction) and channel identification information. The wake-up message is used to perform TWT wake-up on the device. The wake-up message and the target channel identification are sent to the device to change the device from a dormant state to a wake-up state. After the device is awakened, the target channel is determined according to the target channel identification, and the device communicates with the gateway through the target channel. For devices that communicate irregularly every day, the user controls the device or other devices to generate a communication request for the device to communicate with the gateway. When the gateway receives the communication request, it sends a wake-up message and a target channel identification to the irregularly communicating device at the current moment, so that the device determines the target channel using the target channel identification and communicates with the gateway through the target channel.
[0109] In one possible implementation, the user can directly wake up the device that communicates irregularly. The device or other devices sends a communication request of the device to the gateway through any channel at the current moment. The gateway selects a target channel according to the communication request and sends the target channel identifier to the device.
[0110] In a possible implementation, when the communication between the device and the gateway ends, the gateway sends a sleep message to the device using a target channel, so that the device enters a sleep state based on the sleep message.
[0111] The channel resource allocation method provided by the embodiment of the present invention uses the historical communication time, historical communication duration and historical communication frequency as historical communication information. The communication attributes of the device and the communication priority of the device are determined based on the historical communication information, and the target channel and target wake-up time of each communication attribute device are determined based on the communication priority; so that the device communicates with the gateway using the target channel at the target wake-up time. In this way, the communication channel and wake-up time of the device can be managed by TWT technology based on the WIFI6 gateway, and the device can be awakened to communicate with the gateway at the target wake-up time. There is no need for the device to actively communicate with the gateway, which avoids too many devices communicating at the same time during the same period, thereby reducing the congestion of communication frequency bands and channels, and effectively reducing the working energy consumption of the device.
[0112] Figure 3 A flow chart of another channel resource allocation method provided in an embodiment of the present invention is shown as follows: Figure 3 As shown, the method specifically includes:
[0113] S01: When the WIFI6 gateway communicates with a device, it will record the device's communication time and frequency. The device will be divided into the following five types of devices based on their communication time and frequency:
[0114] S02:
[0115] 1. Class A attribute equipment: The communication frequency is frequent and regular, and the communication time is long;
[0116] 2. Class B attribute equipment: the communication frequency is low and regular, and the communication time is long;
[0117] 3. Class C attribute equipment: the communication frequency is frequent and regular, and the communication time is short;
[0118] 4. Class D attribute equipment: the communication frequency is low and regular, and the communication time is short;
[0119] 5. Class E attribute equipment: Communication frequency and communication time are irregular.
[0120] S03: The gateway performs a TWT arrangement plan for the above five devices based on the communication attributes of different devices, so that the above devices with different attributes follow the following plan when communicating data with the gateway:
[0121] S04:
[0122] 1. Class A devices: These devices are activated by TWT according to the TWT schedule, ensuring normal operation. These devices are assigned to communicate with the gateway on a channel that is free of interference. This channel is considered unoccupied and free from interference from adjacent channels.
[0123] 2. Class B devices: These devices can be awakened by TWT according to the communication rules. The gateway assigns appropriate channels for these devices to communicate. However, when the B device is communicating, other devices are only allowed to communicate with the gateway on channels that are not interfered with.
[0124] 3. Class C devices: These devices are awakened by TWT according to the communication rules in the TWT plan. However, due to the short communication time, they can be arranged to communicate on a non-interference channel after awakening.
[0125] 4. Class D devices: These devices can be awakened by TWT according to the communication rules. Since the device communication time is short, they can be arranged to communicate with the gateway on any channel after awakening.
[0126] 5. Class E devices: These devices are considered special devices that require a timely response. They must remain operational and be assigned to a non-interference channel to communicate with the gateway.
[0127] Figure 4 A schematic diagram of the structure of a channel resource allocation device provided in an embodiment of the present invention is shown in FIG. Figure 4 As shown, the device specifically includes:
[0128] An acquisition module 41 is used to acquire historical communication information between the gateway and the device;
[0129] A processing module 42 is configured to determine a communication attribute of the device based on the historical communication information;
[0130] The processing module 42 is further configured to determine a target channel corresponding to the device according to the communication attribute, so that the device communicates with the gateway using the target channel.
[0131] In a possible implementation, the processing module 42 is further configured to determine a communication priority of the device according to the communication attribute;
[0132] A target channel corresponding to the device is determined according to the communication priority.
[0133] In a possible implementation, the processing module 42 is further configured to determine a target wake-up time of the device based on the historical communication information;
[0134] The apparatus further includes: a communication module 43, configured to send a wake-up message to the device using the target channel when the target wake-up time is reached, so that the device communicates with the gateway using the target channel.
[0135] In a possible implementation, the acquisition module 41 is specifically configured to acquire historical communication moments and historical communication durations between the device and the gateway;
[0136] The processing module 42 is specifically configured to determine a historical communication frequency between the device and the gateway based on the historical communication moments;
[0137] The historical communication time, the historical communication duration and the historical communication frequency are used as the historical communication information.
[0138] In one possible implementation, the processing module 42 is specifically configured to determine that the communication priority of the device is the first priority when the communication attribute is the first attribute, and the first attribute is that the historical communication time or the historical communication duration of the device meets the first preset condition;
[0139] Alternatively, when the communication attribute is a second attribute, determining the communication priority of the device to be the second priority, the second attribute being that the historical communication frequency of the device is greater than a first threshold, the historical communication time and the historical communication duration both meet a second preset condition, and the historical communication duration is greater than the second threshold;
[0140] Alternatively, when the communication attribute is a third attribute, determining the communication priority of the device to be the third priority, the third attribute being that the historical communication frequency of the device is less than or equal to a first threshold, the historical communication time and the historical communication duration both meet a second preset condition, and the historical communication duration is greater than a second threshold;
[0141] Alternatively, when the communication attribute is a fourth attribute, determining that the communication priority of the device is the fourth priority, the fourth attribute is that the historical communication frequency of the device is greater than a first threshold, the historical communication time and the historical communication duration both meet a second preset condition, and the historical communication duration is less than or equal to the second threshold;
[0142] Or, when the communication attribute is the fifth attribute, the communication priority of the device is determined to be the fifth priority, the fifth attribute is that the historical communication frequency of the device is less than or equal to the first threshold, the historical communication time and the historical communication duration both meet the second preset condition, and the historical communication duration is less than or equal to the second threshold.
[0143] In a possible implementation, the processing module 42 is specifically configured to, when the communication attribute is the first attribute, determine any unoccupied channel as the target channel of the device according to the first priority;
[0144] or, when the communication attribute is the second attribute, determining any unoccupied channel as the target channel of the device according to the second priority;
[0145] or, when the communication attribute is the third attribute, determining any unoccupied channel as the target channel of the device according to the third priority;
[0146] or, when the communication attribute is the fourth attribute, determining any unoccupied channel as the target channel of the device according to the fourth priority;
[0147] Alternatively, when the communication attribute is the fifth attribute, any channel is determined as the target channel of the device according to the fifth priority.
[0148] In a possible implementation, the processing module 42 is specifically configured to, when the communication attribute is the first attribute, determine the time when the gateway receives the communication request as the target wake-up time of the device;
[0149] or, when the communication attribute is the second attribute, determining a historical communication time of the device as a target wake-up time of the device;
[0150] or, when the communication attribute is the third attribute, determining the historical communication time of the device as the target wake-up time of the device;
[0151] or, when the communication attribute is the fourth attribute, determining the historical communication time of the device as the target wake-up time of the device;
[0152] or, when the communication attribute is the fifth attribute and the target channel of the device is an unoccupied channel, determining a historical communication time of the device as the target wake-up time of the device;
[0153] Alternatively, when the communication attribute is the fifth attribute and the target channel of the device is an occupied channel, any moment of the communication interval of the occupied channel is determined as the target wake-up moment of the device.
[0154] In a possible implementation, the communication module 43 is further configured to send a sleep message to the device using the target channel when the communication ends, so that the device enters a sleep state based on the sleep message.
[0155] The channel resource allocation device provided in this embodiment may be as follows Figure 4 The device shown in , can perform the following Figure 1-3 All steps of the channel resource allocation method are implemented Figure 1-3 For details on the technical effects of the channel resource allocation method shown, please refer to Figure 1-3 For the sake of brevity, the relevant description will not be repeated here.
[0156] Figure 5 A schematic diagram of the structure of a gateway provided by an embodiment of the present invention. Figure 5 The gateway 500 shown includes: at least one processor 501, a memory 502, at least one network interface 504 and other user interfaces 503. The various components in the gateway 500 are coupled together via a bus system 505. It is understood that the bus system 505 is used to achieve connection and communication between these components. In addition to including a data bus, the bus system 505 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 505 is not shown in FIG. Figure 5 Various buses are labeled as bus system 505.
[0157] The user interface 503 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touchpad, or a touch screen).
[0158] It is understood that the memory 502 in the embodiment of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0159] In some embodiments, the memory 502 stores the following elements, executable units, or data structures, or a subset thereof, or an extended set thereof: an operating system 5021 and application programs 5022 .
[0160] The operating system 5021 includes various system programs, such as a framework layer, a core library layer, and a driver layer, for implementing various basic services and handling hardware-based tasks. Application programs 5022 include various application programs, such as a media player and a browser, for implementing various application services. Programs implementing the methods of the embodiments of the present invention may be included in application programs 5022.
[0161] In an embodiment of the present invention, by calling a program or instruction stored in the memory 502, specifically, a program or instruction stored in the application 5022, the processor 501 is configured to execute the method steps provided in each method embodiment, for example, including:
[0162] Obtain historical communication information between the gateway and the device;
[0163] determining a communication attribute of the device according to the historical communication information;
[0164] A target channel corresponding to the device is determined according to the communication attribute, so that the device communicates with the gateway using the target channel.
[0165] The methods disclosed in the above embodiments of the present invention can be applied to or implemented by processor 501. Processor 501 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in processor 501 or by software instructions. The above processor 501 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in conjunction with the embodiments of the present invention can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software units in the decoding processor. The software units can be located in storage media well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory 502 , and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.
[0166] It is understood that the embodiments described herein may be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or a combination thereof.
[0167] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0168] The gateway provided in this embodiment can be Figure 5 The gateway shown in , can be executed as Figure 1-3 All steps of the channel resource allocation method are implemented Figure 1-3 For details on the technical effects of the channel resource allocation method shown, please refer to Figure 1-3 For the sake of brevity, the relevant description will not be repeated here.
[0169] An embodiment of the present invention further provides a storage medium (computer-readable storage medium). The storage medium stores one or more programs. The storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; and the memory may also include a combination of the aforementioned types of memory.
[0170] When one or more programs in the storage medium can be executed by one or more processors, the channel resource allocation method executed on the device side can be implemented.
[0171] The processor is configured to execute a channel resource allocation program stored in the memory to implement the following steps of a channel resource allocation method executed on the device side:
[0172] Obtain historical communication information between the gateway and the device;
[0173] determining a communication attribute of the device according to the historical communication information;
[0174] A target channel corresponding to the device is determined according to the communication attribute, so that the device communicates with the gateway using the target channel.
[0175] Professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0176] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0177] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A channel resource allocation method, characterized in that: include: Obtain historical communication information between the gateway and the device; determining a communication attribute of the device according to the historical communication information; Determining a target channel corresponding to the device according to the communication attribute, so that the device communicates with the gateway using the target channel, includes: When the communication attribute is a first attribute, determining that the communication priority of the device is the first priority, the first attribute is that the historical communication time or the historical communication duration of the device meets a first preset condition, and the first preset condition indicates that the historical communication time or the historical communication duration of the device does not conform to any pattern; determining, according to the first priority, any unoccupied channel as a target channel for the device, the target channel being a channel that is not interfered with by communications from adjacent channels; Determining a time when the gateway receives the communication request as a target wake-up time of the device; When the target wake-up time arrives, a wake-up message is sent to the device using the target channel, so that the device communicates with the gateway using the target channel.
2. The method according to claim 1, characterized in that The method further comprises: determining a communication priority of the device according to the communication attribute; A target channel corresponding to the device is determined according to the communication priority.
3. The method according to claim 2, characterized in that The method further comprises: A target wake-up time of the device is determined according to the historical communication information.
4. The method according to claim 1, wherein The acquiring of historical communication information between the gateway and the device includes: Obtaining historical communication times and durations between the device and the gateway; determining a historical communication frequency between the device and the gateway according to the historical communication moments; The historical communication time, the historical communication duration and the historical communication frequency are used as the historical communication information.
5. The method according to claim 2, characterized in that Determining the communication priority of the device according to the communication attribute includes: When the communication attribute is a second attribute, determining the communication priority of the device to be the second priority, the second attribute being that a historical communication frequency of the device is greater than a first threshold, both historical communication moments and historical communication durations meet a second preset condition, and the historical communication duration is greater than the second threshold; Alternatively, when the communication attribute is a third attribute, determining the communication priority of the device to be the third priority, the third attribute being that the historical communication frequency of the device is less than or equal to a first threshold, the historical communication time and the historical communication duration both meet a second preset condition, and the historical communication duration is greater than a second threshold; Alternatively, when the communication attribute is a fourth attribute, determining that the communication priority of the device is the fourth priority, the fourth attribute is that the historical communication frequency of the device is greater than a first threshold, the historical communication time and the historical communication duration both meet a second preset condition, and the historical communication duration is less than or equal to the second threshold; Or, when the communication attribute is the fifth attribute, the communication priority of the device is determined to be the fifth priority, the fifth attribute is that the historical communication frequency of the device is less than or equal to the first threshold, the historical communication time and the historical communication duration both meet the second preset condition, and the historical communication duration is less than or equal to the second threshold.
6. The method according to claim 5, characterized in that The determining a target channel corresponding to the device according to the communication priority includes: When the communication attribute is the second attribute, determining any unoccupied channel as the target channel of the device according to the second priority; or, when the communication attribute is the third attribute, determining any unoccupied channel as the target channel of the device according to the third priority; or, when the communication attribute is the fourth attribute, determining any unoccupied channel as the target channel of the device according to the fourth priority; Alternatively, when the communication attribute is the fifth attribute, any channel is determined as the target channel of the device according to the fifth priority.
7. The method according to claim 5, characterized in that The determining the target wake-up time of the device according to the historical communication information includes: When the communication attribute is the second attribute, determining a historical communication time of the device as a target wake-up time of the device; or, when the communication attribute is the third attribute, determining the historical communication time of the device as the target wake-up time of the device; or, when the communication attribute is the fourth attribute, determining the historical communication time of the device as the target wake-up time of the device; or, when the communication attribute is the fifth attribute and the target channel of the device is an unoccupied channel, determining a historical communication time of the device as the target wake-up time of the device; Alternatively, when the communication attribute is the fifth attribute and the target channel of the device is an occupied channel, any moment of the communication interval of the occupied channel is determined as the target wake-up moment of the device.
8. The method according to any one of claims 1 to 7, characterized in that: After enabling the device to communicate with the gateway using the target channel, the method further includes: When the communication ends, a sleep message is sent to the device using the target channel, so that the device enters a sleep state based on the sleep message.
9. A channel resource allocation device, characterized in that: include: An acquisition module is used to obtain historical communication information between the gateway and the device; a processing module, configured to determine a communication attribute of the device based on the historical communication information; The processing module is further configured to determine a target channel corresponding to the device according to the communication attribute, so that the device communicates with the gateway using the target channel; The processing module is specifically configured to determine that the communication priority of the device is the first priority when the communication attribute is a first attribute, the first attribute is that the historical communication time or the historical communication duration of the device meets a first preset condition, and the first preset condition indicates that the historical communication time or the historical communication duration of the device does not conform to any pattern; determining, according to the first priority, any unoccupied channel as a target channel for the device, the target channel being a channel that is not interfered with by communications from adjacent channels; Determining a time when the gateway receives the communication request as a target wake-up time of the device; When the target wake-up time arrives, a wake-up message is sent to the device using the target channel, so that the device communicates with the gateway using the target channel.
10. A gateway, characterized in that: include: A processor and a memory, wherein the processor is configured to execute a channel resource allocation program stored in the memory to implement the channel resource allocation method according to any one of claims 1 to 8.
11. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the channel resource allocation method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method and device for processing network congestion
CN114257547A
Home-network and method for allocating channel thereof
US20060182116A1