Gateway channel allocation method of Internet of Things system and related equipment
By automatically allocating channels to gateways in the Internet of Things system, the problem of unreasonable channel allocation in the prior art is solved, communication efficiency and management efficiency are improved, and effective communication between the gateway and the terminal is ensured.
Patent Information
- Application Number
- CN202310532604.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-11
- Publication Date
- 2024-11-12
Smart Images

Figure CN118944833A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Internet of Things, and in particular to a gateway channel allocation method and related equipment of an Internet of Things system. Background Art
[0002] The Internet of Things (IOT) refers to the use of various sensors, inductors, scanners and other devices, combined with positioning systems and identification technologies, to obtain any objects or processes that need to be monitored, connected, and interacted with in real time, collect all kinds of information needed, and combine various access networks to achieve ubiquitous connections between things and things, and between things and people, and realize intelligent perception, identification and management of objects and processes.
[0003] In the related art, the Internet of Things system includes at least one gateway. In order to enable the gateway in the system to effectively manage each terminal and realize the effective transmission of information, the corresponding working channel is introduced as the transmission medium to transmit the command information and data information between the gateway and the terminal. Among them, the existing gateway allocation method is usually that network planners actively allocate channels to the gateway according to the gateway deployment location, quantity and work experience. However, it is difficult to allocate suitable working channels to each gateway using the aforementioned allocation method, which easily causes the allocated devices to have problems such as poor communication effect and slow transmission speed, which is not conducive to the effective management of the Internet of Things system. Summary of the invention
[0004] In view of this, the main purpose of this application is to propose a gateway channel allocation method and related equipment for an Internet of Things system to solve the technical problems mentioned above.
[0005] Based on the above purpose, the present application provides a gateway channel allocation method for an Internet of Things system, comprising:
[0006] Determine a target gateway in a pre-built list of gateways to be configured, and allocate a channel to the target gateway;
[0007] In response to determining that the channel allocation of the target gateway is completed, acquiring identification code information of the target gateway and identification information of the occupied channel;
[0008] According to the identification code information and the identification information of the occupied channel, the target gateway is removed from the list of gateways to be configured.
[0009] Optionally, allocating a channel to the target gateway includes:
[0010] At least one channel is selected from a preset channel list as a target channel of the target gateway, and the target channel is marked as an occupied channel based on identification information of the target channel.
[0011] Optionally, in response to determining that the channel allocation of the target gateway is completed, acquiring the identification code information of the target gateway and the identification information of the occupied channel includes:
[0012] Sending a broadcast instruction to the target gateway;
[0013] In response to determining that the target gateway receives the broadcast instruction, the target gateway is controlled to broadcast the identification code information and the identification information of the occupied channel.
[0014] Optionally, in response to determining that the channel allocation of the target gateway is completed, acquiring the identification code information of the target gateway and the identification information of the occupied channel further includes:
[0015] Sending a listening instruction to other gateways in the Internet of Things system;
[0016] In response to determining that the remaining gateways have received the listening instruction, the remaining gateways are controlled to listen to the identification code information of the target gateway and the identification information of the occupied channel.
[0017] Optionally, in response to determining that the channel allocation of the target gateway is completed, acquiring the identification code information of the target gateway and the identification information of the occupied channel further includes:
[0018] In response to determining that there is a neighboring gateway among the remaining gateways that can detect the identification code information of the target gateway and the identification information of the occupied channel, receiving the identification code information of the target gateway and the identification information of the occupied channel sent by the neighboring gateway;
[0019] In response to determining that there is no neighboring gateway among the remaining gateways that can detect the identification code information of the target gateway and the identification information of the occupied channel, the identification code information and the identification information of the occupied channel sent by the target gateway are received.
[0020] Optionally, the controlling the remaining gateways to listen to the identification code information of the target gateway and the identification information of the occupied channel further includes:
[0021] The identification code information corresponding to the neighboring gateway and the identification information of the corresponding channel are obtained, and based on the identification code information of the neighboring gateway and the identification information of the corresponding channel, and the identification code information of the target gateway, a channel identification list of the neighboring gateway is constructed.
[0022] Optionally, constructing the channel identification list of the neighboring gateway based on the identification code information of the neighboring gateway and the identification information of the corresponding channel, and the identification code information of the target gateway includes:
[0023] Determining whether there is an intersection area between the target gateway and the neighboring gateway according to the channel identification list of the neighboring gateway;
[0024] In response to determining that there is an intersection area between the target gateway and the neighboring gateway, a channel different from that of the neighboring gateway is allocated to the target gateway.
[0025] Optionally, the gateway channel allocation method of the Internet of Things system further includes:
[0026] In response to determining that the target gateway has a channel that fails to be allocated, sending a prompt message to the user terminal;
[0027] Based on the feedback information of the user terminal, an unoccupied channel is reselected in the preset channel list for the channel that fails to be allocated in the target gateway.
[0028] Optionally, determining a target gateway in a pre-built list of gateways to be configured, and allocating a channel to the target gateway includes:
[0029] The identification code information of the gateways in the Internet of Things system is obtained, and a list of gateways to be configured is constructed based on the identification code information of the gateways, wherein any gateway has correspondingly unique identification code information.
[0030] Based on the same inventive concept, the present application provides a gateway channel allocation device for an Internet of Things system, comprising:
[0031] An allocation module, configured to determine a target gateway in a pre-built list of gateways to be configured, and allocate a channel to the target gateway;
[0032] an acquisition module, configured to acquire identification code information of the target gateway and identification information of the occupied channel in response to determining that the channel allocation of the target gateway is completed;
[0033] The control module is used to remove the target gateway from the list of gateways to be configured according to the identification code information and the identification information of the occupied channel.
[0034] Based on the same inventive concept, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method as described above when executing the computer program.
[0035] Based on the same inventive concept, the present application also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the method as described above.
[0036] From the above, it can be seen that the gateway channel allocation method and related equipment of the Internet of Things system provided by the present application can automatically allocate channels to all gateways in the Internet of Things system, improve the efficiency of channel allocation, shorten the deployment time of the gateway, and based on the identification code information of the gateway in the Internet of Things system and the identification information of the occupied channel, it can repeatedly allocate channels to prevent information collision problems between gateways, ensure the communication effect between the gateway and the terminal, and improve the rationality of channel allocation between gateways. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 This is a schematic diagram of the structure of the Internet of Things system in the embodiment of the present application;
[0039] Figure 2 A flowchart of a method for allocating gateway channels in an embodiment of the present application;
[0040] Figure 3 A flowchart of a method for a target gateway to broadcast identification code information and identification information of an occupied channel in an embodiment of the present application;
[0041] Figure 4 A flowchart of a method in which other gateways monitor identification code information of a target gateway and identification information of an occupied channel in an embodiment of the present application;
[0042] Figure 5 A flowchart of a method for receiving identification code information of a target gateway and identification information of an occupied channel in an embodiment of the present application;
[0043] Figure 6 A flowchart of a method for allocating channels to neighboring gateways in an embodiment of the present application;
[0044] Figure 7 A schematic diagram of the distribution of neighboring gateways in an embodiment of the present application;
[0045] Figure 8 A flowchart of a method for reallocating a channel that has failed to be allocated in an embodiment of the present application;
[0046] Fig. 9 This is a schematic diagram of the structure of a gateway channel allocation device of an Internet of Things system in an embodiment of the present application;
[0047] Fig.10 Schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0049] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0050] In the related art, the Internet of Things system includes at least one gateway. In order to enable the gateways in the system to effectively manage each terminal and realize the effective transmission of information, the corresponding working channel is introduced as a transmission medium to transmit the command information and data information of the gateway and the terminal. When configuring the channel for the gateway, it is necessary to make different gateways occupy different channels as much as possible. Once the same channel is occupied, it is easy to cause signal collision between channels, thereby reducing the communication effect and transmission effect of the channel; among them, the existing gateway allocation method is usually that network planners actively allocate channels to gateways according to the deployment location, number and work experience of the gateways. However, on the one hand, the aforementioned allocation method has high requirements on the staff and low efficiency in channel allocation; on the other hand, it is difficult to allocate suitable working channels to each gateway through manual planning, which is easy to cause the allocated channel to have poor communication effect and slow transmission speed, which is not conducive to the effective management of the Internet of Things system.
[0051] In view of this, the present application provides a gateway channel allocation method for an Internet of Things system, comprising:
[0052] Step S100: determining a target gateway in a pre-built list of gateways to be configured, and allocating a channel to the target gateway;
[0053] In this step, when allocating channels for gateways in the IoT system, the server can be used as the executor to select any gateway from the pre-built list of gateways to be configured as the target gateway, and the cloud server can automatically allocate channels to the selected target gateway so that the target gateway is bound to the corresponding terminal to realize information transmission between the gateway and the terminal.
[0054] Step S200: in response to determining that the channel allocation of the target gateway is completed, obtaining the identification code information of the target gateway and the identification information of the occupied channel;
[0055] In this step, the server automatically allocates a channel to the target gateway, wherein the target gateway can be bound to at least one terminal, and each terminal is connected to the target gateway through at least one channel, so the server allocates at least one channel to the target gateway; when all channels of the target gateway are configured, the identification code information of the target gateway and the occupied channel identification information are obtained through the server to avoid collision with the occupied channel of the target gateway when allocating channels to other gateways in the Internet of Things system, thereby ensuring the communication effect between the target gateway and the corresponding terminal.
[0056] Step S300: remove the target gateway from the list of gateways to be configured according to the identification code information and the identification information of the occupied channel.
[0057] In this step, after obtaining the identification code information of the target gateway and the identification information of the occupied channel, the target gateway is confirmed to be a configured gateway based on the identification code information of the target gateway, and the configured gateway is removed from the list of gateways to be configured to avoid the server from repeatedly allocating channels to the gateway.
[0058] Specifically, see Figure 1 and Figure 2 The Internet of Things system may include a server, at least one gateway and at least one terminal. The server may be connected to the gateway for communication, and the gateway may be connected to the terminal for communication. The server may be used as an execution subject to allocate channels to the gateways in the Internet of Things system so that the gateways are connected to the corresponding terminals. The server may be a physical server, a VPS (Virtual Private Server) and a cloud server. In order to adapt to the intricately distributed gateways and terminals in the Internet of Things system, the server may preferably use a cloud server, such as a public cloud server, a private cloud server and a hybrid cloud server, to achieve signal coverage of the Internet of Things system, and automatically allocate channels to all gateways in the space.
[0059] When allocating channels to gateways in an Internet of Things system, the information of the gateways to be allocated in the Internet of Things system can be determined based on a list of gateways to be configured that is pre-constructed based on the channel identification codes of all gateways in the Internet of Things system; wherein, for any gateway, the gateway has unique identification code information, such as the authentication code of the gateway, i.e., the SN code (Serial Number), which is used to identify the identity of the gateway; a gateway is randomly selected from the pre-constructed list of gateways to be allocated, and the selected gateway is used as the target gateway, and a channel is allocated to the channel of the target gateway through a server; and for any gateway, the gateway can be bound to at least one terminal, and each terminal is connected to the gateway through at least one channel, so the server allocates at least one channel to the target gateway, and when the server has allocated all channels of the target gateway, the server actively obtains the identification code information of the target gateway and the identification information of the channel occupied by it, and at this time, based on the obtained identification code information of the target gateway, the server removes the target gateway from the list of gateways to be configured, i.e., the target gateway is a configured gateway, so as to avoid signal collision with the channel occupied by the target gateway when allocating channels to other unconfigured gateways.
[0060] It should be noted that when the Internet of Things system includes at least two gateways, the server selects a gateway in the Internet of Things system as the target gateway and allocates a channel to the target gateway. When the channel of the target gateway is allocated, it is removed from the list of gateways to be configured, and the channel is not allocated to the next gateway in the next Internet of Things system. That is, the steps of determining the target gateway in the pre-built list of gateways to be configured to removing the target gateway from the list of gateways to be configured are repeated until all gateways in the list to be allocated are configured.
[0061] When allocating channels for gateways in an Internet of Things system, a target gateway is determined in a pre-constructed list of gateways to be configured, and a channel is allocated to the target gateway; in response to determining that the channel allocation of the target gateway is completed, the identification code information of the target gateway and the identification information of the occupied channel are obtained; according to the identification code information and the identification information of the occupied channel, the target gateway is removed from the list of gateways to be configured; reasonable allocation of channels for all gateways in the Internet of Things system is achieved, manual participation is reduced, and the efficiency of channel allocation is improved; according to the identification information of the identification code information of the obtained target gateway and the identification information of the occupied channel, the configured target gateway can be removed from the list of gateways to be configured, so as to avoid signal collision with the channel occupied by the target gateway when allocating channels to other unconfigured gateways, thereby ensuring the communication quality between the gateway and the corresponding terminal.
[0062] In some embodiments, allocating a channel to a target gateway includes:
[0063] At least one channel is selected from the preset channel list as a target channel of the target gateway, and the target channel is marked as an occupied channel based on identification information of the target channel.
[0064] Specifically, when allocating channels to a gateway in an Internet of Things system, a server allocates channels to a selected target gateway, wherein, since the target gateway can be bound to at least one terminal, and each terminal is connected to the target gateway through at least one channel, when the server allocates channels to the target gateway, it can select a channel from a preset channel list as a target channel, and allocate the target channel to the gateway and any terminal corresponding to the gateway, and use it as a working channel for the gateway and the terminal; and when the server allocates channels to the gateway, it can also select multiple channels from a preset channel list as target channels, and allocate the multiple channels to the target gateway, so that the target gateway is connected to at least one terminal through the target channel; at this time, the server marks the target channel allocated to the target gateway, and marks the allocated channel as an occupied channel, so as to avoid repeated selection of occupied channels and reduce the occurrence of signal collision.
[0065] In some embodiments, in response to determining that the channel allocation of the target gateway is completed, obtaining the identification code information of the target gateway and the identification information of the occupied channel includes:
[0066] Step S210: Send a broadcast instruction to the target gateway;
[0067] In this step, in addition to allocating a channel to the target gateway, the server also sends a broadcast instruction to the target gateway to control the target gateway to broadcast the identification code information of the target gateway and the identification information of the occupied channel through the broadcast channel.
[0068] Step S220: In response to determining that the target gateway receives the broadcast instruction, control the target gateway to broadcast identification code information and identification information of the occupied channel.
[0069] In this step, if the target gateway receives a broadcast instruction sent by the server, the target gateway broadcasts the identification code information of the target gateway and the identification information of the occupied channel after receiving the broadcast instruction, so that the server can obtain the identification code information of the target gateway and the identification information of the occupied channel in time, so as to obtain the channel configuration of the target gateway.
[0070] Specifically, see Figure 3After the server completes the channel allocation for the target gateway, it will also obtain the identification code information of the target gateway and the identification information of the occupied channel, so as to determine the channel allocation status of the target gateway based on the identification code information of the target gateway and the identification information of the occupied channel; wherein, in order to obtain the identification code information of the target gateway and the identification information of the occupied channel, the server sends a broadcast instruction to the target gateway, and if the target gateway receives the broadcast instruction, it will broadcast the identification code information of the target gateway and the identification information of the occupied channel through the broadcast channel, so that the server can obtain the channel configuration status of the target gateway in time; if the broadcast instruction sent by the server does not obtain the identification code information of the target gateway and the identification information of the occupied channel, the server can periodically send the broadcast instruction within the first preset time period, so that the target gateway receives the broadcast instruction and broadcasts its identification code information and the identification information of the occupied channel; if the identification code information of the target gateway and the identification information of the occupied channel are still not received after the first preset time period, a prompt message can be sent to the user through the user terminal to remind the user to handle it in time.
[0071] In some embodiments, in response to determining that the channel allocation of the target gateway is completed, obtaining the identification code information of the target gateway and the identification information of the occupied channel also includes:
[0072] Step S230: Send a listening instruction to other gateways in the IoT system;
[0073] In this step, when the channel allocation of the target gateway is completed, the server obtains the identification code information of the target gateway and the identification information of the occupied channel. At this time, the server can send a listening instruction to the remaining gateways in the Internet of Things system except the target gateway, and the remaining gateways listen to the identification code information of the target gateway and the identification information of the occupied channel, and feed back the intercepted identification code information of the target gateway and the identification information of the occupied channel to the server.
[0074] Step S240: In response to determining that the remaining gateways have received the listening instruction, control the remaining gateways to listen to the identification code information of the target gateway and the identification information of the occupied channel.
[0075] In this step, if the remaining gateways in the IoT system receive the listening instruction sent by the service, the server controls the remaining gateways except the target gateway to listen to the identification code information of the target gateway and the identification information of the occupied channel, and sends the intercepted identification code information and the identification information of the occupied channel to the server.
[0076] Specifically, see Figure 4After the channel allocation of the target gateway is completed, the server obtains the identification code information of the target gateway and the identification information of the occupied channel, so that the server determines the channel allocation of the target gateway according to the identification code information of the target gateway and the identification information of the occupied channel; wherein, the server sends a listening instruction to the remaining gateways, and when the remaining gateways receive the listening instruction of the server, the remaining gateways will listen to the identification code information of the target gateway and the identification information of the occupied channel, and send the relevant information obtained by the listening to the server, so that the server obtains the identification code information of the target gateway and the identification information of the occupied channel; if the remaining gateways cannot receive the listening instruction sent by the server, the listening instruction can be periodically sent to the remaining gateways within a second preset time period, so that the remaining gateways receive the listening instruction and listen to the identification code information of the target gateway and the identification information of the occupied channel; if the server still does not receive the identification code information of the target gateway and the identification information of the occupied channel after the second preset time period, then the remaining gateways are all within the signal range of the target gateway.
[0077] In some embodiments, in response to determining that the channel allocation of the target gateway is completed, obtaining the identification code information of the target gateway and the identification information of the occupied channel also includes:
[0078] Step S250, in response to determining that there is a neighboring gateway among the remaining gateways that can detect the identification code information of the target gateway and the identification information of the occupied channel, receiving the identification code information of the target gateway and the identification information of the occupied channel sent by the neighboring gateway;
[0079] In this step, the remaining gateways in the Internet of Things system except the target gateway receive the listening instruction, and receive the identification code information of the target gateway and the identification information of the occupied channel. Among them, if there is a neighboring gateway among the remaining gateways that can listen to the identification code information of the target gateway and the identification information of the occupied channel, at this time, the identification code information of the target gateway and the identification information of the occupied channel are received by the neighboring gateway, and the identification code information of the target gateway and the identification information of the occupied channel are sent by the neighboring gateway to the server, so that the server can obtain the channel allocation status of the target gateway in time.
[0080] Step S260: In response to determining that there is no neighboring gateway among the remaining gateways that can detect the identification code information of the target gateway and the identification information of the occupied channel, receive the identification code information and the identification information of the occupied channel sent by the target gateway.
[0081] In this step, if there is no identification code information of the target gateway and the identification information of its occupied channel that can be received in the Internet of Things system, there is no neighboring gateway near the target gateway, or there is no channel overlap with other gateways. Therefore, when the occupied channel of the target gateway is any channel, it will not collide with the channels of other gateways in the Internet of Things system; in this case, the server can actively obtain the identification code information of the target gateway and the identification information of its occupied channel.
[0082] Specifically, see Figure 5 When allocating channels for the target gateway in the IoT system, in order to avoid signal collision between the target gateway and the remaining gateways, the remaining gateways will actively listen to the identification code information of the target gateway and the identification information of the occupied channels broadcast by the target gateway after receiving the listening instruction sent by the server. Among them, if there is at least one neighboring gateway that can listen to the identification code information of the target gateway and the identification information of the occupied channels among the remaining gateways, at this time, after the neighboring gateway listens to the identification code information of the target gateway and the identification information of the occupied channels, it will send the identification code information of the target gateway and the identification information of the occupied channels to the server, so that the server can obtain the channel allocation status of the target gateway in time; if there is no other gateway that can receive the listening instruction, To the identification code information of the target gateway and the identification information of its occupied channel, there is no neighboring gateway nearby at this time, or there is no channel overlap with other gateways. In order for the server to obtain the allocation of the target gateway, the service can actively listen to the occupied channel of the target gateway broadcast by the target gateway; in this case, in order to obtain the identification code information and identification code information in the target gateway, the server can actively listen to the identification code information and identification information of the occupied channel broadcast by the target gateway, or control the target gateway to actively send its identification code information and identification information of the occupied channel to the server, so that the server can obtain the channel allocation of the target gateway in time to avoid repeated allocation of channels.
[0083] In some embodiments, controlling the remaining gateways to listen to the identification code information of the target gateway and the identification information of the occupied channels also includes: obtaining the identification code information and the identification information of the corresponding channels of the neighboring gateways, and constructing a channel identification list of the neighboring gateways based on the identification code information and the identification information of the corresponding channels of the neighboring gateways, as well as the identification code information of the target gateway.
[0084] Specifically, after the server obtains the identification code information of the target gateway and the identification information of the occupied channel, in order to avoid channel collision between the occupied channel of the target gateway and the neighboring gateway, the server actively obtains the identification code information of the neighboring gateway that can detect the identification code information of the target gateway, and constructs a channel identification list of the neighboring gateway based on the identification code information of the neighboring gateway and the identification of the corresponding channel, as well as the identification code information of the target gateway; when allocating a channel to the target gateway, the target gateway can be recorded in the channel list of the neighboring gateway, and the channel can be allocated to the target gateway according to the corresponding channel of the neighboring gateway, so as to avoid collision with the neighboring gateway with the existing channel when allocating the channel to the target gateway, and also avoid repeated allocation of channels when the server allocates channels to the neighboring gateway later, so as to ensure the communication effect and transmission capacity of each gateway in the Internet of Things system.
[0085] In addition, it should be noted that when obtaining the identification code information of any neighboring gateway, the identification information of the corresponding channel of the gateway is also obtained, so as to allocate channels to the target gateway according to the channel occupancy of the neighboring gateway; wherein, for any neighboring gateway, the neighboring gateway can be connected to the terminal through at least one piece of information, if the obtained identification information of the corresponding channel of the neighboring gateway is empty, then the corresponding channel of the neighboring gateway is not allocated, that is, whether the neighboring gateway is configured can be determined by the identification information of the corresponding channel of the neighboring gateway, if the identification information of all channels of the neighboring gateway is empty, then the neighboring gateway is a gateway to be configured, at this time, a server can search the neighboring gateway in the list of gateways to be configured based on the identification code information of the neighboring gateway, further determine the configuration of the target gateway, and ensure that the gateways in the Internet of Things system can be reasonably deployed; if the identification information of at least some channels of the neighboring gateway is not empty, then for the neighboring gateway, the neighboring gateway has not performed channel allocation or channel allocation is not completed, at this time, when the server allocates channels to the target gateway, it should avoid the channels occupied by the neighboring gateway to avoid signal problems between the target fish and the neighboring gateway.
[0086] In some embodiments, based on the identification code information of the neighboring gateways and the identification information of the corresponding channels, as well as the identification code information of the target gateway, a channel identification list of the neighboring gateways is constructed, including:
[0087] Step S251: determine whether there is an intersection area between the target gateway and the neighboring gateway according to the channel identification list of the neighboring gateway;
[0088] In this step, in order to avoid signal collision between the target gateway and the neighboring gateway, it is necessary to determine whether there is an intersection area between the target gateway and the neighboring gateway based on the channel identification list of the neighboring gateway. At this time, signal collision will occur when the same channel is allocated between the target gateway and the neighboring gateway. Therefore, the channel of the target gateway is reasonably allocated according to the identification information of the corresponding channel of the neighboring gateway.
[0089] Step S252: In response to determining that there is an intersection area between the target gateway and the neighboring gateways, a channel different from that of the neighboring gateways is allocated to the target gateway.
[0090] In this step, if there is an intersection area between the target gateway and the neighboring gateway, that is, when the target gateway and the neighboring gateway are assigned the same channel, signal collision will occur. At this time, the server needs to assign at least one channel different from the neighboring gateway to the target gateway in the intersection area.
[0091] Specifically, see Figure 6 and Figure 7 When the server obtains the identification code information of the target gateway, it also obtains the identification code information and channel identification information of the neighboring gateway that can detect the target gateway. According to the identification code information of the target gateway and the identification code information of the neighboring gateway, at this time, it is determined whether there is an intersection area between the target gateway and the neighboring gateway according to the channel identification list of the neighboring gateway, so as to avoid the target gateway and the neighboring gateway from being assigned the same channel and causing signal collision, and ensure the rationality of the channel allocation of the target gateway; if there is an intersection area between the target gateway and the neighboring gateway, in order to prevent signal collision between the two, the server will assign at least one channel different from the neighboring gateway to the target gateway, if the identification information of the corresponding channel of the neighboring gateway is empty, then a suitable channel can be selected for the target gateway and will not conflict with the channel of the neighboring gateway; if there is no intersection area between the target gateway and the neighboring gateway, there will be no signal conflict problem even if the neighboring gateway and the target gateway are assigned the same channel.
[0092] In some embodiments, the gateway channel allocation method of the Internet of Things system further includes:
[0093] Step S400: in response to determining that the target gateway has a channel that fails to be allocated, sending a prompt message to the user terminal;
[0094] In this step, channels are allocated to the gateways in the IoT system through the server. When allocating channels to the target gateway, if there are channels in the target gateway that have failed to be allocated, in order to allocate all the channels corresponding to the target gateway, the server may send a prompt message to the user terminal to prompt the user to reallocate the channels in the target gateway that have failed to be allocated.
[0095] Step S500: Based on the feedback information from the user terminal, an unoccupied channel is reselected in the preset channel list for the channel that fails to be allocated in the target gateway.
[0096] In this step, the user can receive the prompt information sent by the server through the user terminal, and reselect the channel in the preset channel list according to the channel allocation of the target gateway; among them, in order to ensure that the channel of the target gateway and the channel of the adjacent gateway do not collide with each other, the target gateway can be allocated a channel that is not occupied by the adjacent gateway.
[0097] Specifically, see Figure 8 , the server allocates channels to the gateways in the Internet of Things system, wherein, during the channel allocation process, if there are channels in the target gateway that fail to be allocated, in order to enable all the channels of the target gateway to be allocated, the server can send a prompt message to the user terminal to remind the user to reallocate the channels that failed to be allocated to the target gateway through the prompt message, such as reminding the user through the user terminal in the form of voice or text pop-up window; after receiving the prompt message, the user can reselect a channel in a preset channel list and reallocate the channel to the target gateway, wherein, in order to avoid signal collision between the channel of the target gateway and the channel of the adjacent gateway, the target gateway can be allocated a channel that is not occupied by the adjacent gateway.
[0098] In some embodiments, determining a target gateway in a pre-built list of gateways to be configured and allocating a channel to the target gateway includes: obtaining identification code information of a gateway in an Internet of Things system, and building a list of gateways to be configured based on the identification code information of the gateway, wherein any gateway has correspondingly unique identification code information.
[0099] Specifically, when allocating channels to gateways in the Internet of Things system, the server obtains the identification code information of all gateways in the Internet of Things system, wherein any gateway has unique identification code information. Therefore, a list of gateways to be configured can be pre-built based on the identification code information of all gateways in the Internet of Things system, and the list of gateways to be configured is managed by the server. When the server completes channel allocation to the target gateway, the server removes the target gateway from the list of gateways to be configured based on its identification code information to avoid subsequent repeated allocation.
[0100] In some embodiments, the gateway channel allocation method of the Internet of Things system further includes:
[0101] Pre-built list of configured gateways;
[0102] In response to removing the target gateway from the list of gateways to be configured according to the identification code information of the target gateway, the target gateway is moved into the list of configured gateways.
[0103] Specifically, the present application can also pre-construct a list of configured gateways. When the server completes channel allocation to the target gateway, the server removes the target gateway from the list of gateways to be configured based on the identification code information of the target gateway, and moves it into the list of configured gateways based on the identification code information of the target gateway, so as to count the configured gateways and avoid subsequent repeated allocation of gateway information.
[0104] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the method.
[0105] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0106] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a gateway channel allocation device for an Internet of Things system.
[0107] refer to Fig. 9 , a gateway channel allocation device of an Internet of Things system, comprising:
[0108] The allocation module 10 is used to determine the target gateway in the pre-built list of gateways to be configured and allocate a channel to the target gateway;
[0109] The acquisition module 20 is used to acquire the identification code information of the target gateway and the identification information of the occupied channel in response to determining that the channel allocation of the target gateway is completed;
[0110] The control module 30 is used to remove the target gateway from the list of gateways to be configured according to the identification code information and the identification information of the occupied channel.
[0111] Specifically, see Fig. 9When allocating channels for gateways in the Internet of Things system, the allocation module 10 selects a gateway to be configured from the pre-built list of gateways to be configured, and uses the gateway as the target gateway and allocates channels to it; when all channels of the target gateway are allocated, the target gateway occupies at least one channel, and the acquisition module 20 acquires the identification code information of the target gateway and the identification information of the occupied channel; after the channel allocation of the target gateway is completed, the target gateway has been configured, and at this time, the control module 30 removes the target gateway from the list of gateways to be configured according to the identification code information of the target gateway and the identification information of the occupied channel, so as to avoid repeated allocation of channels to the gateways that have been configured in the Internet of Things system, improve the rationality of gateway channel allocation, and reduce the occurrence of channel collision problems between gateways.
[0112] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0113] The device of the above embodiment is used to implement the gateway channel allocation method of the corresponding Internet of Things system in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0114] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the gateway channel allocation method of the Internet of Things system described in any of the above embodiments is implemented.
[0115] Fig.10 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0116] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0117] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0118] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0119] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0120] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0121] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0122] The electronic device of the above embodiment is used to implement the gateway channel allocation method of the corresponding Internet of Things system in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0123] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the gateway channel allocation method of the Internet of Things system as described in any of the above embodiments.
[0124] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0125] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the gateway channel allocation method of the Internet of Things system as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0126] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0127] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0128] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0129] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
Claims
1. A gateway channel allocation method for an Internet of Things system, It is characterized in that include: Determine a target gateway in a pre-built list of gateways to be configured, and allocate a channel to the target gateway; In response to determining that the channel allocation of the target gateway is completed, acquiring identification code information of the target gateway and identification information of the occupied channel; According to the identification code information and the identification information of the occupied channel, the target gateway is removed from the list of gateways to be configured.
2. The gateway channel allocation method of the Internet of Things system according to claim 1, It is characterized in that The allocating a channel to the target gateway comprises: At least one channel is selected from a preset channel list as a target channel of the target gateway, and the target channel is marked as an occupied channel based on identification information of the target channel.
3. The gateway channel allocation method of the Internet of Things system according to claim 1, It is characterized in that In response to determining that the channel allocation of the target gateway is completed, obtaining the identification code information of the target gateway and the identification information of the occupied channel includes: Sending a broadcast instruction to the target gateway; In response to determining that the target gateway receives the broadcast instruction, the target gateway is controlled to broadcast the identification code information and the identification information of the occupied channel.
4. The gateway channel allocation method of the Internet of Things system according to claim 1, It is characterized in that In response to determining that the channel allocation of the target gateway is completed, obtaining the identification code information of the target gateway and the identification information of the occupied channel also includes: Sending a listening instruction to other gateways in the Internet of Things system; In response to determining that the remaining gateways receive the listening instruction, the remaining gateways are controlled to listen to the identification code information of the target gateway and the identification information of the occupied channel.
5. The gateway channel allocation method of the Internet of Things system according to claim 4, It is characterized in that In response to determining that the channel allocation of the target gateway is completed, obtaining the identification code information of the target gateway and the identification information of the occupied channel also includes: In response to determining that there is a neighboring gateway among the remaining gateways that can detect the identification code information of the target gateway and the identification information of the occupied channel, receiving the identification code information of the target gateway and the identification information of the occupied channel sent by the neighboring gateway; In response to determining that there is no neighboring gateway among the remaining gateways that can detect the identification code information of the target gateway and the identification information of the occupied channel, the identification code information and the identification information of the occupied channel sent by the target gateway are received.
6. The gateway channel allocation method of the Internet of Things system according to claim 5, It is characterized in that The controlling the remaining gateways to listen to the identification code information of the target gateway and the identification information of the occupied channel also includes: The identification code information corresponding to the neighboring gateway and the identification information of the corresponding channel are obtained, and based on the identification code information of the neighboring gateway and the identification information of the corresponding channel, and the identification code information of the target gateway, a channel identification list of the neighboring gateway is constructed.
7. The gateway channel allocation method of the Internet of Things system according to claim 6, It is characterized in that The constructing the channel identification list of the neighboring gateway based on the identification code information of the neighboring gateway and the identification information of the corresponding channel, and the identification code information of the target gateway, includes: Determining whether there is an intersection area between the target gateway and the neighboring gateway according to the channel identification list of the neighboring gateway; In response to determining that there is an intersection area between the target gateway and the neighboring gateway, a channel different from that of the neighboring gateway is allocated to the target gateway.
8. The gateway channel allocation method of the Internet of Things system according to claim 1, It is characterized in that Also includes: In response to determining that the target gateway has a channel that fails to be allocated, sending a prompt message to the user terminal; Based on the feedback information of the user terminal, an unoccupied channel is reselected in the preset channel list for the channel that fails to be allocated in the target gateway.
9. The gateway channel allocation method of the Internet of Things system according to claim 1, It is characterized in that The step of determining a target gateway in a pre-built list of gateways to be configured and allocating a channel to the target gateway includes: The identification code information of the gateways in the Internet of Things system is obtained, and a list of gateways to be configured is constructed based on the identification code information of the gateways, wherein any gateway has correspondingly unique identification code information.
10. A gateway channel allocation device for an Internet of Things system, It is characterized in that include: An allocation module, configured to determine a target gateway in a pre-built list of gateways to be configured, and allocate a channel to the target gateway; an acquisition module, configured to acquire identification code information of the target gateway and identification information of the occupied channel in response to determining that the channel allocation of the target gateway is completed; The control module is used to remove the target gateway from the list of gateways to be configured according to the identification code information and the identification information of the occupied channel.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the method according to any one of claims 1 to 9 is implemented.
12. A non-transitory computer-readable storage medium storing computer instructions, It is characterized in that The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 9.
