Gateway selection method and system
Through the terminal regularly requesting and receiving reply information from multiple gateways, combined with signal strength and delay time, it selects the optimal gateway and uses channels of different frequencies, which solves the problem of signal collision in a multi-gateway environment and achieves smooth and smooth wireless communication. Coverage.
Patent Information
- Application Number
- CN202410637447.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-09-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In complex indoor environments, wireless signals from multiple gateways are prone to collision, causing terminals to be unable to communicate smoothly and unable to select the optimal gateway in local areas, resulting in signal blind spots or duplicate coverage areas, affecting data reception and factory-wide roaming communications.
The terminal regularly requests and receives reply information from multiple gateways, uses signal strength and delay time to select the optimal gateway to avoid signal collisions, and uses beacon channels and data communication channels of different frequencies to ensure that wireless channels do not interfere with each other and pass the delay time. and signal strength judgment to dynamically switch gateways.
It enables the terminal to select the optimal gateway in a local area, ensuring the smoothness and coverage of wireless communication, avoiding signal collisions and blind spots, and ensuring the success of data reception and the rapid switching capability of mobile terminals.
Smart Images

Figure CN118590956A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a gateway selection method and system. Background Art
[0002] The coverage of the wireless gateway is limited. When working indoors, it is blocked by indoor equipment or walls, which limits its working range. At this time, when the factory achieves wireless coverage throughout the factory, multiple gateways must be deployed. At the same time, in order to achieve factory-wide roaming communication of wireless devices, wireless communication can be achieved at any location in the factory. The wireless communication parameters of the gateway must be consistent. The gateway synchronizes the clock with the beacon of the device to determine the communication time. When the gateway synchronizes the beacon, due to its consistent wireless communication channel, a wireless signal collision will occur. After the wireless data collision, the data reception of the device will be affected, causing its synchronization to fail.
[0003] The existing Beacon synchronization collision avoidance is to make the wireless signals non-overlapping so that the device can work within the wireless coverage of a specific gateway to receive its signal. However, the gateway is installed in a complex indoor environment, and its signal coverage is difficult to determine, which may result in signal blind spots or repeated coverage areas. In the blind spots, the terminal will not be able to communicate and cannot achieve full coverage. In the repeated coverage area, the gateway beacon will cause a collision when it is sent, making it impossible for the terminal to receive data normally. Summary of the invention
[0004] In view of this, one of the technical problems solved by the embodiments of the present invention is to provide a gateway selection method and system for overcoming the problem in the prior art of how to avoid signal collision and ensure smooth wireless communication in a local area with multiple gateways so as to select the optimal gateway.
[0005] The first aspect of the embodiment of the present application discloses a gateway selection method, including:
[0006] The terminals include first-category terminals and second-category terminals;
[0007] The first type of terminal is communicatively connected with the first gateway;
[0008] The second type of terminal is communicatively connected with the second gateway;
[0009] In response to the first type of terminal sending the first information, the first type of terminal receiving the first reply information of the first gateway and the reply information of at least one other gateway within a first time period;
[0010] The first type of terminal switches from a communication connection with the first gateway to a communication connection with a second gateway;
[0011] The second type of terminal sends second information to the third gateway and at least one other gateway at a second time period;
[0012] In response to the second-type terminal receiving the second reply information from the fourth gateway, the second-type terminal switches the communication connection with the second gateway to the communication connection with the fourth gateway.
[0013] In some embodiments, the reply message includes a synchronization message and a confirmation receipt message.
[0014] In some embodiments, the first type of terminals comprises mobile terminals.
[0015] In some embodiments, the second type of terminals comprises fixed terminals.
[0016] In some embodiments, the method further comprises:
[0017] In response to the first-category terminal not sending the first information within a third time period, the first-category terminal sends third information to at least one other gateway.
[0018] In some embodiments, the first time period includes a receiving time and a delay time.
[0019] In some embodiments, the delay time is greater than or equal to the channel index value of the synchronization information*20ms.
[0020] In some embodiments, the second time period is at least 24 hours.
[0021] In some embodiments, the second gateway is selected based on signal strengths of the first reply information of the first gateway and reply information of at least one other gateway.
[0022] In some embodiments, the fourth gateway is a gateway in which the second type of terminal receives the second reply information sent by the third gateway and at least one other gateway in the shortest time.
[0023] A second aspect of an embodiment of the present application discloses a gateway selection system, the system comprising:
[0024] Terminal module;
[0025] A gateway module, the gateway module is used to receive information sent by the terminal module and send reply information to the terminal module;
[0026] A control module, wherein the control module is configured to implement the method described in the first aspect.
[0027] The present invention has the following advantages: It solves the problem of how a terminal selects the optimal gateway under the coverage of multiple gateways in a local area. The terminal's periodic request and reply receiving mechanism can ensure the communication connection between the terminal and the gateway. At the same time, the gateway selection method of the mobile terminal receives reply information of multiple gateways by extending the receiving reply time after sending information, so that the mobile terminal can select the optimal gateway in the local area. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 The present invention is a flow chart of a gateway selection method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The present disclosure will now be discussed with reference to several exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and thus implement the present disclosure, rather than implying any limitation on the scope of the present disclosure.
[0030] As used herein, the term "including" and its variants are to be interpreted as open-ended terms meaning "including but not limited to". The term "based on" is to be interpreted as "based at least in part on". The terms "one embodiment" and "an embodiment" are to be interpreted as "at least one embodiment". The term "another embodiment" is to be interpreted as "at least one other embodiment". The orientation or position relationship indicated by the terms "upper", "lower", "left", "right", "front", "back", "top", "bottom", "inner", "outer", "vertical", "horizontal", "lateral", "longitudinal" and the like is based on the orientation or position relationship shown in the accompanying drawings. These terms are mainly for better describing the present application and its embodiments, and are not used to limit the indicated devices, elements or components to have a specific orientation, or to be constructed and operated in a specific orientation. In addition, in addition to being used to indicate an orientation or position relationship, some of the above terms may also be used to indicate other meanings, such as the term "upper" may also be used to indicate a certain dependency or connection relationship in some cases. For those of ordinary skill in the art, the specific meanings of these terms in this application can be understood according to the specific circumstances. In addition, the terms "install", "set", "provided with", "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral structure; it can be a mechanical connection, or an electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, or it can be an internal connection between two devices, elements or components. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to the specific circumstances. In addition, the terms "first", "second", etc. are mainly used to distinguish different devices, elements or components (the specific types and structures may be the same or different), and are not used to indicate or imply the relative importance and quantity of the indicated devices, elements or components. Unless otherwise specified, "plurality" means two or more.
[0031] The embodiment of the present application discloses a gateway selection method, including:
[0032] The terminals include first-category terminals and second-category terminals;
[0033] The first type of terminal is communicatively connected with the first gateway;
[0034] The second type of terminal is communicatively connected with the second gateway;
[0035] In response to the first type of terminal sending the first information, the first type of terminal receiving the first reply information of the first gateway and the reply information of at least one other gateway within a first time period;
[0036] The first type of terminal switches from a communication connection with the first gateway to a communication connection with a second gateway;
[0037] The second type of terminal sends second information to the third gateway and at least one other gateway at a second time period;
[0038] In response to the second-type terminal receiving the second reply information from the fourth gateway, the second-type terminal switches the communication connection with the second gateway to the communication connection with the fourth gateway.
[0039] In some embodiments, the reply message includes a synchronization message and a confirmation receipt message.
[0040] In the embodiment of the present invention, the synchronization information is beacon information, and the confirmation receipt information is ACK information.
[0041] In the embodiment of the present invention, the reply information includes beacon information (information that the gateway and the wireless terminal synchronize regularly, used for time synchronization or synchronization of other key information) and ACK (reply for confirming that the information has been received) information, wherein the beacon information content includes gateway time, gateway working status, number of terminals under the gateway, gateway ID, etc., which are used for terminal time synchronization, selection of gateway to join, and understanding of network status, etc. The reply information contains beacon information sent through the beacon channel, wherein the beacon channel uses different channel frequencies for different gateways, so as to avoid mutual interference when the gateways send data at the same time.
[0042] The data communication channel of the gateway and the beacon sending channel use different frequencies. At the same time, different gateways use different beacon channels. The terminal obtains the beacon channel information of different gateways by communicating with different gateways. The terminal determines the gateway from which it wants to receive beacon information through the communication signal strength information with each gateway, and opens the corresponding channel when receiving beacon information. Therefore, when different gateways use different beacon channels, the channels for sending beacons operate at different frequencies, ensuring that the wireless channels do not interfere with each other. The data communication channel remains consistent, so that the terminal can interact with all gateways for data, and the terminal can roam and communicate seamlessly within the entire wireless coverage area. By selecting different beacon frequencies, it is ensured that wireless signals will not collide with each other when beacons are sent.
[0043] In some embodiments, the first type of terminals comprises mobile terminals.
[0044] In some embodiments, the first time period includes a receiving time and a delay time.
[0045] In the embodiment of the present invention, the mobile terminal often switches back and forth between multiple gateways. This method of actively requesting information still has a lag and cannot respond to changes in the gateway in a timely manner. Therefore, considering energy efficiency and usage scenarios, a periodic request method is adopted for fixed devices, and a more efficient implementation is adopted for mobile terminals.
[0046] Each time the mobile terminal receives ACK information during communication, the ACK reception time is extended for a period of time, which is the delay time. The terminal receives ACK replies from all nearby gateways. Through the content of the ACK reply, the terminal dynamically analyzes the signal strength and gateway beacon channel of each gateway reply, and quickly switches to a gateway with a better signal. To avoid the terminal switching gateways too frequently, the terminal can comprehensively analyze the signal strength of the gateway reply, and switch only after the difference with the signal of the currently joined gateway reaches a certain value. In this way, the mobile terminal and the fixed terminal use different strategies to obtain the gateway to join, which not only ensures the low power consumption of the fixed equipment, but also ensures the fast switching capability of the mobile terminal.
[0047] In some embodiments, the delay time is greater than or equal to the channel index value of the synchronization information*20ms.
[0048] In the embodiment of the present invention, the delay time is set because the data communication channels of all gateways and terminals are the same. Therefore, when the gateway receives the terminal data, it will reply ACK to the terminal information, or the gateways reply information at the same time. Due to the same frequency, mutual interference will occur, thereby affecting the data reception of the terminal and causing ACK reception failure. For this reason, the ACK reply delay is added. At the same time, this delay is also used for the mobile terminal to receive ACK information from different gateways to determine the function of adding a gateway. The mobile terminal uses this ACK information to obtain the communication signal strength of different gateways. Therefore, it will receive all the ACK information of the gateways. The receiving time is relatively long, covering the reply ACK time of the surrounding gateways. The fixed terminal does not need to receive all the ACK replies of the gateways. As long as one ACK message is received, the reception is completed immediately. Different gateways can stagger the time of replying ACK by setting different delay parameters N. When the terminal requests the gateway beacon information, it uses the data communication channel. The data communication channel of the gateway is the same. When the terminal requests the gateway information, the gateway that receives the request information will send its information to the terminal. At this time, if the gateway sends the information at the same time, it will cause interference with the wireless signal, causing the terminal to be unable to receive the gateway information normally. By adding a delay to each gateway when replying to the beacon request information, mutual interference of signals can be avoided. The delay time is selected based on the beacon channel index value * 20ms. 20ms is the maximum time for each gateway to send information once, so that enough time is reserved for each gateway to send information. The terminal start receiving time should cover the sending time of multiple gateways to ensure that the terminal receives the information sent by all gateways.
[0049] In some embodiments, the second gateway is selected based on signal strengths of the first reply information of the first gateway and reply information of at least one other gateway.
[0050] In an embodiment of the present invention, when a terminal is under the wireless signal coverage of multiple gateways, it can receive information from multiple gateways. When the terminal chooses to join a gateway, it will judge the signal strength of the gateway communicating with it. In order to reduce the communication overhead of switching gateways, when the gateway switching is judged by signal strength, the signal strength interval is used to judge. When a gateway with better signal strength appears, the gateway switching is performed only when the strength reaches a certain threshold with the existing gateway. If the difference does not reach the specified difference, the gateway switching is not performed. This judgment interval can effectively reduce the switching frequency of the terminal under the same signal gateway, and ensure that the terminal does not switch frequently in gateways with similar signal strengths.
[0051] In some embodiments, the second type of terminals comprises fixed terminals.
[0052] In the embodiment of the present invention, the fixed terminal actively selects the gateway channel for receiving beacons by periodically requesting gateway information. The problem is that if the interval between such active requests is too short, the request frequency will be high, and the device will consume more power. For devices that do not move frequently, there is no need to request gateway information too much. For mobile devices that will not be moved for several days, the frequency of requesting gateway information can be set to 24 hours or longer, so as to save power consumption for requesting gateway information.
[0053] After the terminal obtains the gateway information, it decides the gateway to join by judging the working status of the gateway, the number of terminals under the gateway, and the communication quality parameters with the gateway. The selection strategy is to give priority to online gateways and gateways with a small number of terminals. At the same time, the gateway to join is selected based on the RSSI value of wireless communication. When the wireless communication RSSI value of a gateway is better than that of the existing gateway and reaches the switching threshold, the switch is made.
[0054] In some embodiments, the method further comprises:
[0055] In response to the first-category terminal not sending the first information within a third time period, the first-category terminal sends third information to at least one other gateway.
[0056] In some embodiments, the second time period is at least 24 hours.
[0057] In some embodiments, the fourth gateway is a gateway in which the second type of terminal receives the second reply information sent by the third gateway and at least one other gateway in the shortest time.
[0058] Another embodiment of the present invention discloses a gateway selection system, the system comprising:
[0059] A gateway module, which is used for clock synchronization and data transmission and reception;
[0060] A first terminal module, the first terminal module comprising at least one first terminal;
[0061] A control device, wherein the control device is configured to implement the above-mentioned gateway selection method.
[0062] The beneficial effect of the present invention is that it solves the problem of how a terminal selects the optimal gateway under the coverage of multiple gateways in a local area. The terminal's periodic request and reply receiving mechanism can ensure the communication connection between the terminal and the gateway. At the same time, the gateway selection method of the mobile terminal receives reply information of multiple gateways by extending the receiving reply time after sending information, so that the mobile terminal can select the optimal gateway in the local area.
[0063] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other.
[0064] It should be understood that the size of the sequence number of each step in the content of the invention and the embodiments of the present invention does not absolutely mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention. For the purpose of example and description, the above description of the implementation of the present disclosure has been given. The above description is not exhaustive and is not intended to limit the present disclosure to the exact form disclosed. According to the above teachings, there may be various deformations and modifications, or various deformations and modifications may be obtained from the practice of the present disclosure. These embodiments are selected and described to illustrate the principles of the present disclosure and its practical application, so that those skilled in the art can use the present disclosure in various embodiments and various modifications for the specific purpose suitable for the conception. It can be understood by those of ordinary skill in the art that the above-mentioned embodiments are specific cases for implementing the present disclosure, and in practical applications, various changes can be made to them in form and detail without departing from the spirit and scope of the present disclosure.
Claims
1. A gateway selection method, characterized in that: The method comprises: The terminals include first-category terminals and second-category terminals; The first type of terminal is communicatively connected with the first gateway; The second type of terminal is communicatively connected with the second gateway; In response to the first type of terminal sending the first information, the first type of terminal receiving the first reply information of the first gateway and the reply information of at least one other gateway within a first time period; The first type of terminal switches from a communication connection with the first gateway to a communication connection with a second gateway; The second type of terminal sends second information to the third gateway and at least one other gateway at a second time period; In response to the second-type terminal receiving the second reply information from the fourth gateway, the second-type terminal switches the communication connection with the second gateway to the communication connection with the fourth gateway.
2. The method according to claim 1, characterized in that The reply information includes synchronization information and confirmation receipt information.
3. The method according to claim 1, characterized in that The first type of terminals includes mobile terminals.
4. The method according to claim 1, characterized in that The second type of terminals includes fixed terminals.
5. The method according to claim 1, characterized in that The method further comprises: In response to the first-category terminal not sending the first information within a third time period, the first-category terminal sends third information to at least one other gateway.
6. The method according to claim 2, characterized in that The first time period includes a receiving time and a delay time.
7. The method according to claim 6, characterized in that The delay time is greater than or equal to the channel index value of the synchronization information*20ms.
8. The method according to claim 1, characterized in that The second time period is at least 24 hours.
9. The method according to claim 1, characterized in that The second gateway is selected according to the signal strength of the first reply information of the first gateway and the reply information of at least one other gateway.
10. The method according to claim 1, characterized in that The fourth gateway is a gateway in which the second type of terminal receives the second reply information sent by the third gateway and at least one other gateway in the shortest time.
11. A gateway selection system, characterized in that: The system comprises: Terminal module; A gateway module, the gateway module is used to receive information sent by the terminal module and send reply information to the terminal module; A control device, wherein the control device is configured to implement the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Wireless frequency point management method and system
CN108616904A
Gateway switching and binding method and device for Internet of Things terminal
CN112543457A
Network roaming method, terminal equipment, gateway and computer readable storage medium
CN113676850A
Node, terminal and system networking method based on multi-channel scanning
CN116390199A
Wi-Fi link automatic switching method based on FTTR gateway, medium and communication system
CN117580119A
