CN113676850B - Network roaming method, terminal device, gateway and computer readable storage medium - Google Patents

Network roaming method, terminal device, gateway and computer readable storage medium Download PDF

Info

Publication number
CN113676850B
CN113676850B CN202110975026.8A CN202110975026A CN113676850B CN 113676850 B CN113676850 B CN 113676850B CN 202110975026 A CN202110975026 A CN 202110975026A CN 113676850 B CN113676850 B CN 113676850B
Authority
CN
China
Prior art keywords
roaming
gateway
terminal device
unique identifier
terminal equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110975026.8A
Other languages
Chinese (zh)
Other versions
CN113676850A (en
Inventor
董帅晨
何国贤
程祺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Mercury Communication Technology Co ltd
Original Assignee
Shenzhen Mercury Communication Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Mercury Communication Technology Co ltd filed Critical Shenzhen Mercury Communication Technology Co ltd
Priority to CN202110975026.8A priority Critical patent/CN113676850B/en
Publication of CN113676850A publication Critical patent/CN113676850A/en
Application granted granted Critical
Publication of CN113676850B publication Critical patent/CN113676850B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/14Reselecting a network or an air interface
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/24Reselection being triggered by specific parameters
    • H04W36/30Reselection being triggered by specific parameters by measured or perceived connection quality data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application is applicable to the technical field of wireless communication, and provides a network roaming method, terminal equipment, a gateway and a computer readable storage medium, wherein the network roaming method comprises the following steps: if the terminal equipment detects that the terminal equipment meets roaming conditions, a roaming inquiry is sent in a broadcasting mode, wherein the roaming inquiry comprises a unique identifier of the terminal equipment and a user account corresponding to the terminal equipment; if reply information sent by at least one gateway based on the unique identifier of the terminal equipment is received, determining a target gateway according to the signal strength of each received reply information, wherein the reply information comprises the unique identifier of the gateway, and a user account corresponding to the gateway is the same as a user account corresponding to the terminal equipment; and sending a roaming request to the target gateway according to the unique identifier of the target gateway, wherein the roaming request is used for requesting to join a network corresponding to the target gateway. By the method, the signal intensity of the selected network can better meet the requirements of users.

Description

Network roaming method, terminal device, gateway and computer readable storage medium
Technical Field
The present application belongs to the field of wireless communication technologies, and in particular, to a network roaming method, a terminal device, a gateway, and a computer-readable storage medium.
Background
At present, short-distance wireless communication technologies (such as Zigbee technology and wireless fidelity (Wi-Fi) technology) are widely applied in the field of smart home. Because the sensor and the switch device in the smart home may have a mobile use requirement, the sensor and the switch device have a roaming use requirement.
However, the existing ZigBee protocol standard only supports the roaming use of the terminal device in a single ZigBee network, and therefore, the existing ZigBee protocol standard does not support the scenario in which the terminal device is roaming used among a plurality of ZigBee networks. If roaming is needed among a plurality of ZigBee networks, exciters are needed to be arranged in different areas, and after the terminal equipment is close to the exciters, the upper computer judges whether the terminal equipment needs to carry out ZigBee network switching or not. However, since the method selects whether to perform network handover according to the location of the terminal device, there is a possibility that a handover to a network that does not satisfy the user's needs may occur when performing network handover using the method.
Disclosure of Invention
The embodiment of the application provides a network roaming method, terminal equipment, a gateway and a computer readable storage medium, which can solve the problem that the existing wireless communication technology can be switched to a ZigBee network which cannot meet the user requirement when network roaming is realized.
In a first aspect, an embodiment of the present application provides a network roaming method, which is applied to a terminal device, and includes:
if the terminal equipment detects that the terminal equipment meets roaming conditions, a roaming inquiry is sent in a broadcasting mode, wherein the roaming inquiry comprises a unique identifier of the terminal equipment and a user account corresponding to the terminal equipment;
if reply information sent by at least one gateway based on the unique identifier of the terminal equipment is received, determining a target gateway according to the signal strength of each received reply information, wherein the reply information comprises the unique identifier of the gateway, and a user account corresponding to the gateway is the same as a user account corresponding to the terminal equipment;
and sending a roaming request to the target gateway according to the unique identifier of the target gateway, wherein the roaming request is used for requesting to join in a Zigbee network corresponding to the target gateway.
In a second aspect, an embodiment of the present application provides a network roaming method, which is applied to a gateway, and includes:
receiving a roaming inquiry broadcasted by a terminal device, wherein the roaming inquiry comprises a unique identifier of the terminal device and a user account corresponding to the terminal device;
if the user account corresponding to the gateway is the same as the user account corresponding to the terminal equipment, sending reply information to the terminal equipment according to the unique identifier of the terminal equipment, wherein the reply information comprises the unique identifier of the gateway;
and if the terminal equipment receives a roaming request sent by the terminal equipment based on the unique identifier of the gateway, verifying the terminal equipment, and if the terminal equipment passes the verification, agreeing to join the corresponding Zigbee network.
In a third aspect, an embodiment of the present application provides a terminal device, including:
a roaming inquiry broadcasting module, configured to send a roaming inquiry in a broadcast manner if the terminal device detects that the terminal device itself meets a roaming condition, where the roaming inquiry includes a unique identifier of the terminal device and a user account corresponding to the terminal device;
the reply information receiving module is used for determining a target gateway according to the signal strength of each received reply information if the reply information sent by at least one gateway based on the unique identifier of the terminal equipment is received, wherein the reply information comprises the unique identifier of the gateway, and the user account corresponding to the gateway is the same as the user account corresponding to the terminal equipment;
a roaming request receiving module, configured to send a roaming request to the target gateway according to the unique identifier of the target gateway, where the roaming request is used to request to join a Zigbee network corresponding to the target gateway.
In a fourth aspect, an embodiment of the present application provides a gateway, including:
a roaming inquiry receiving module, configured to receive a roaming inquiry broadcasted by a terminal device, where the roaming inquiry includes a unique identifier of the terminal device and a user account corresponding to the terminal device;
the reply information sending module is used for sending reply information to the terminal equipment according to the unique identifier of the terminal equipment if the user account corresponding to the gateway is the same as the user account corresponding to the terminal equipment, and the reply information comprises the unique identifier of the gateway;
and the roaming request receiving module is used for verifying the terminal equipment if a roaming request sent by the terminal equipment based on the unique identifier of the gateway is received, and agreeing to the terminal equipment to join the corresponding Zigbee network if the terminal equipment passes the verification.
In a fifth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the method according to the first aspect or the second aspect.
In a sixth aspect, an embodiment of the present application provides a computer program product, which, when run on a terminal device, causes the terminal device to execute the method described in the first aspect.
Compared with the prior art, the embodiment of the application has the advantages that:
in the embodiment of the application, when detecting that the terminal device meets the roaming condition, the terminal device actively sends a roaming inquiry in a broadcasting manner, determines the target gateway according to the signal strength of the received reply information, and then requests the target gateway to join the network corresponding to the target gateway, that is, the terminal device is used as a decision maker to actively perform short-distance network exploration and network selection around the terminal device, and the network selection is performed according to the signal strength, so that the network selection can be performed more timely, the signal strength of the selected network can better meet the user requirements, and the terminal device can be switched to the Zigbee network which better meets the user requirements. In addition, because the reply message is sent by the gateway corresponding to the same user account as the terminal device, it can be ensured that the switching is only performed between Zigbee networks of the same user when the switching action is performed, thereby improving the accuracy of Zigbee network switching.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the embodiments or the description of the prior art will be briefly described below.
Fig. 1 is a flowchart of a network roaming method applied to a terminal device according to an embodiment of the present application;
fig. 2 is a schematic interaction diagram of a terminal device and a gateway according to an embodiment of the present application;
fig. 3 is a flowchart of a network roaming method applied to a gateway according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a gateway according to another embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather mean "one or more but not all embodiments" unless specifically stated otherwise.
The first embodiment is as follows:
at present, if a terminal device accesses a network through a ZigBee technology, when the position of the terminal device changes, an upper computer determines whether the terminal device needs to be switched to a ZigBee network corresponding to the current position of the terminal device. However, because the network quality of the same ZigBee network may be different at different times at the same location, the ZigBee network with poor network quality may be switched to by using the method, thereby bringing poor experience to the user.
In order to solve the foregoing technical problem, an embodiment of the present application provides a network roaming method, where a terminal device detects whether the terminal device itself meets a roaming condition, and if so, broadcasts a roaming inquiry, determines a target gateway according to signal strength of received reply information, and then requests to join a network corresponding to the target gateway. The target gateway is determined by the terminal device according to the signal strength of the received reply message, that is, the signal strength of the network corresponding to the target gateway inevitably reaches a certain degree, and the signal strength reflects the network quality, so that the terminal device can be switched to the network with better network quality by the method.
The network roaming method provided by the embodiment of the present application is described below with reference to the specific drawings.
Fig. 1 shows a flowchart of a network roaming method provided by an embodiment of the present application, which is applied to terminal devices (e.g., sensors, switch devices — such as wired panel switches on a wall, wireless switches, magic cube switches, etc.), and is detailed as follows:
step S11, if the terminal device detects that it satisfies the roaming condition, it sends a roaming inquiry in a broadcast manner, where the roaming inquiry includes the unique identifier of the terminal device and the user account corresponding to the terminal device.
The unique identifier of the terminal device may be an Institute of Electrical and Electronics Engineers (IEEE) address of the terminal device, and the IEEE address is an address allocated before the terminal device enters the network, that is, the IEEE address can uniquely identify the terminal device.
One user account corresponds to one user, and usually, a plurality of terminal devices correspond to the same user account.
In this embodiment, if the network to which the terminal device currently accesses cannot meet the communication requirement, it indicates that the terminal device currently meets the roaming condition. When the terminal device satisfies the roaming condition, the terminal device will seek other accessible networks. In particular, the terminal device will broadcast a roaming inquiry to find the appropriate gateway. Wherein each gateway uniquely corresponds to one network. Since the roaming inquiry is transmitted in a broadcast manner, the gateways existing around the terminal device can be found as much as possible.
In some embodiments, the roaming inquiry may be sent through a Beacon Request (Beacon Request), that is, a Beacon Request is used to probe a network covering its own area.
Step S12, if a reply message sent by at least one gateway based on the unique identifier of the terminal device is received, determining a target gateway according to the signal strength of each received reply message, where the reply message includes the unique identifier of the gateway, and a user account corresponding to the gateway is the same as a user account corresponding to the terminal device.
Wherein, the unique identifier of the gateway can be a network address of the gateway, etc. In some embodiments, the gateway is a ZigBee gateway, and the ZigBee gateway is configured to create a ZigBee network and is also responsible for protocol data conversion between ZigBee and other networks, such as protocol data conversion between ZigBee and WiFi.
In this embodiment, after the gateway receives the roaming query and parses the unique identifier of the terminal device and the user account corresponding to the terminal device from the roaming query, the gateway identifies whether the user account corresponding to the terminal device is the same as the user account corresponding to the terminal device, and if so, sends a reply message to the terminal device. When the terminal device receives each reply message, it determines the signal strength of each received reply message, and then selects one gateway as the target gateway according to each signal strength, for example, the gateway corresponding to the strongest signal strength is taken as the target gateway.
Step S13, sending a roaming request to the target gateway according to the unique identifier of the target gateway, where the roaming request is used to request to join the Zigbee network corresponding to the target gateway.
In this embodiment, the terminal device sends the roaming request to the target gateway according to the unique identifier of the target gateway, that is, the terminal device sends the roaming request in a unicast manner, so that it is ensured that the sent roaming request is more targeted and does not interfere with other gateways.
In the embodiment of the application, when detecting that the terminal device meets the roaming condition, the terminal device actively sends the roaming inquiry in a broadcasting mode, determines the target gateway according to the signal intensity of the received reply information, and then requests the target gateway to join the network corresponding to the target gateway, namely, the terminal device is used as a decision maker to actively perform short-distance network exploration and network selection around the terminal device, and the network selection is performed according to the signal intensity, so that the network selection can be performed more timely, the signal intensity of the selected network can better meet the user requirement, and the network can be switched to the network which better meets the user requirement. In addition, since the reply message is sent by the gateway corresponding to the same user account as the terminal device, it can be ensured that only the Zigbee networks of the same user are switched when the switching action is executed, thereby improving the accuracy of Zigbee network switching.
In some embodiments, the roaming condition includes any one of:
the signal intensity of the currently mounted gateway is smaller than a preset intensity threshold value, and the data packet can be successfully sent to the currently mounted gateway only after the retransmission for a preset number of times and the data packet retransmission to the currently mounted gateway fails.
The preset strength threshold is set according to an actual situation, for example, the strength of a signal corresponding to a failure of sending or receiving a data packet in the terminal device is set as the strength threshold.
In this embodiment, when the roaming conditions are different, the broadcast timing of the roaming inquiry may be different.
For example, when the terminal device detects that the signal strength of the currently mounted gateway is smaller than the preset strength threshold (i.e. the signal quality of the currently mounted packet is smaller than the preset strength threshold), the terminal device may broadcast the roaming inquiry again in idle.
For example, when the terminal device detects that it sends a data packet to the currently mounted gateway, a retransmission phenomenon occurs, and the retransmission times exceed a preset number, the terminal device may broadcast the roaming inquiry again in idle.
For example, when the terminal device detects that it sends a packet to the currently mounted gateway, retransmission fails, and detects that it is offline, it immediately broadcasts a roaming inquiry.
Since the terminal device indicates that the terminal device currently has a data packet that needs to be received or sent when the terminal device is not currently idle, in this embodiment, when the terminal device can also communicate with the gateway, even if it is detected that the terminal device meets the roaming condition, the terminal device also selects to broadcast the roaming inquiry when the terminal device is idle, so that the phenomenon of data packet loss caused by network handover can be avoided. And when the terminal equipment can not communicate with the gateway, the terminal equipment selects to immediately broadcast the roaming inquiry, so that the terminal equipment can recover the communication in a more timely manner. For example, if a terminal device that has accessed the ZigBee network has an old gateway under the same account damaged and updated to a new gateway, a roaming inquiry is immediately broadcast (that is, a scene of "when the terminal device detects that it has failed to retransmit a data packet sent to a currently mounted gateway, and detects that it has gone offline" is met), so that the terminal device can re-access the network without manual operation of the user, the good experience of the user is improved, and the network access efficiency of the terminal device is also improved.
In some embodiments, considering that the terminal device and the gateway are generally controlled by only one user, in order to avoid the roaming inquiry broadcast by the terminal device interfering with the gateways of other users, before the step S11, the method includes:
and reporting the unique identifier of the terminal equipment to a cloud end, wherein the cloud end is used for binding the unique identifier of the terminal equipment with a corresponding user account, and the terminal equipment receives the user account issued by the cloud end.
In this embodiment, because the unique identifier of the terminal device and the user account are bound through the cloud, the affiliation between the terminal device and the user account can be recorded, that is, the control range of the user (the device cannot control others) and the roaming range of the terminal device (the terminal device can only roam between gateways of the user to which the terminal device belongs) are recorded. After the unique identifier and the user account of the gateway are bound by the cloud, the subordinate relationship (namely, the relationship influencing the linkage message) between the terminal device and the gateway can be recorded.
In some embodiments, to improve the security of communication, the network roaming method further includes:
and receiving an encryption key and a decryption key corresponding to the user account issued by the cloud, wherein the encryption key and the decryption key adopted by each device bound with the same user account are the same.
Correspondingly, the sending of the roaming inquiry in a broadcast manner in step S11 includes:
and encrypting the roaming inquiry by using the encryption key, and transmitting the encrypted roaming inquiry in a broadcasting mode.
Correspondingly, the step S12 includes:
if the reply information sent by at least one gateway based on the unique identifier of the terminal equipment is received, the decryption key is adopted to decrypt the reply information to obtain the unique identifier of the gateway included in the reply information, and a target gateway is determined according to the signal strength of each received reply information.
In this embodiment, the cloud binds the terminal device to the corresponding user account, the terminal device and the gateway under each user account use the same encryption key and decryption key (the decryption key is a key capable of decrypting information encrypted by using the encryption key), and different user accounts correspond to different encryption keys and decryption keys, so that the gateway (or the terminal device) of one user account cannot decrypt information sent by the terminal devices (or gateways) of other user accounts, that is, the gateway and the terminal device that are not the same user account cannot communicate. For example, if the terminal device encrypts the roaming inquiry by using the encryption key under the user account bound to the terminal device and broadcasts the roaming inquiry, the gateway under the user account can decrypt the roaming inquiry by using the corresponding decryption key and then sends the reply information to the terminal device, but the gateway under the user account cannot decrypt the roaming inquiry and then does not send the reply information to the terminal device. That is, since the terminal device and the gateway are bound to the corresponding user account and share the same encryption key and decryption key, after the terminal device broadcasts the encrypted roaming inquiry, only the reply information sent by the gateway under the same user account as the terminal device is received, thereby improving the security of communication between the terminal device and the gateway.
In some embodiments, in order to improve the security of the communication between the terminal device and the gateway, the roaming challenge further includes a first random number, and the step S12 includes:
a1, if a reply message sent by at least one gateway based on the unique identifier of the terminal device is received, identifying whether the reply message includes the first random number.
The first random number is a random number generated by the terminal device according to a preset random function, or is a random number acquired by the terminal device from other devices. In order to ensure the security of communication, the first random number included in each roaming inquiry is different.
A2, if the reply message includes the first random number, determining a target gateway according to the signal strength of each received reply message.
If the reply message further includes a second random number, step S13 includes:
and sending a roaming request to the target gateway corresponding to the unique identifier of the target gateway, wherein the roaming request comprises the second random number.
In this embodiment, the terminal device broadcasts a roaming inquiry including a first random number, after receiving the roaming inquiry, the gateway acquires the first random number included in the roaming inquiry, generates a second random number, and sends reply information including the first random number and the second random number to the terminal device, and the terminal device sends a roaming request including the second random number to the target gateway determined by the terminal device. Because the reply information sent by the gateway and the roaming request sent by the terminal equipment both comprise the random number generated by the opposite party, the corresponding verification of the terminal equipment on the gateway is facilitated, the corresponding verification of the terminal equipment by the gateway is facilitated, and the communication safety of the terminal equipment and the gateway is improved.
In some embodiments, the second random number is different from the first random number.
It should be noted that, the roaming inquiry and the reply message may be encrypted messages, and certainly, if the roaming inquiry and the reply messages are encrypted messages, the terminal device and the gateway need to perform corresponding decryption processing after receiving corresponding messages.
In order to more clearly describe the network roaming method provided by the embodiment of the present application, the following description is made with reference to fig. 2.
In fig. 2, the terminal device, the gateway a, and the gateway B report their corresponding unique identifiers to the cloud, and the cloud binds the terminal device, the gateway a, and the gateway B with the corresponding user account and issues the corresponding user account, the encryption key, and the decryption key to the terminal device, the gateway a, and the gateway B. When the terminal device detects that it satisfies the roaming condition, it sends the roaming inquiry in a broadcast manner. Assume that gateway a and gateway B receive the roaming inquiry and that both gateway a and gateway B send reply information back to the terminal device. The terminal device determines a target gateway according to the signal strength of the received reply message, and if the determined target gateway is the gateway B, the terminal device sends a roaming request to the gateway B in a unicast mode. Further, if the terminal device successfully joins the network corresponding to the gateway B, the gateway B reports the roaming event to the cloud, and the cloud sends the configuration information of the terminal device to the gateway B.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by functions and internal logic of the process, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Example two:
fig. 3 is a flowchart illustrating another network roaming method provided in an embodiment of the present application, which is applied to a gateway, and is detailed as follows:
step S31, receiving a roaming query broadcasted by a terminal device, where the roaming query includes a unique identifier of the terminal device and a user account corresponding to the terminal device.
Wherein, the unique identifier of the gateway can be a network address of the gateway, etc.
Step S32, if the user account corresponding to the gateway is the same as the user account corresponding to the terminal device, sending a reply message to the terminal device according to the unique identifier of the terminal device, where the reply message includes the unique identifier of the gateway.
In this embodiment, the gateway determines whether the user account corresponding to the terminal device in the roaming inquiry is the same as the user account bound to the terminal device, and if so, sends the reply information back to the terminal device, otherwise, does not send the reply information back to the terminal device.
Step S33, if a roaming request sent by the terminal device based on the unique identifier of the gateway is received, the terminal device is verified, and if the terminal device passes the verification, the terminal device is allowed to join the corresponding Zigbee network.
In this embodiment, the gateway verifies whether the terminal device that sends the roaming request is the terminal device that sends the reply information back by the gateway, and if so, the terminal device is allowed to join the created Zigbee network.
In the embodiment of the application, the terminal equipment which is communicated with the gateway is used as a decision maker to actively carry out network exploration and network selection, and the network selection is carried out according to the signal intensity, so that the network selection can be carried out more timely, and the signal intensity of the selected network can better meet the requirements of users. In addition, because the gateway only replies the roaming inquiry broadcasted by the terminal device with the same user account number as the corresponding terminal device, the gateway can ensure that the terminal devices which agree to join the Zigbee network belong to the same user as the terminal devices, thereby improving the accuracy of Zigbee network switching.
In some embodiments, considering that the gateway is usually controlled by only one user, therefore, in order to avoid the information sent by the gateway interfering with the terminal devices of other users, the method further includes:
and reporting the unique identifier of the gateway to a cloud, receiving the user account issued by the cloud, and binding the unique identifier of the gateway with the corresponding user account by the cloud.
In some embodiments, the network roaming method further includes:
and receiving an encryption key and a decryption key which are sent by the cloud and correspond to the user account, wherein the encryption key and the decryption key which are adopted by each device bound with the same user account are the same.
Correspondingly, after the above step S31, the method includes:
and decrypting the roaming inquiry by using the decryption key to obtain the unique identifier of the terminal equipment and the user account corresponding to the terminal equipment, which are included in the roaming inquiry.
Correspondingly, the step S32 includes:
and encrypting the reply information by using the encryption key, and sending the encrypted reply information to the terminal equipment according to the unique identifier of the terminal equipment, which is included in the roaming inquiry.
In this embodiment, the cloud binds the gateway to the corresponding user account, the terminal device and the gateway under each user account use the same encryption key and decryption key, and different user accounts correspond to different encryption keys and decryption keys. And when the gateway receives the roaming inquiry subjected to the encryption processing, the received roaming inquiry is decrypted by adopting the decryption key corresponding to the gateway, and if the roaming inquiry can be successfully decrypted, the reply information is encrypted by adopting the encryption key corresponding to the gateway and then is sent to the corresponding terminal equipment. Because only the terminal equipment and the gateway which acquire the encryption key and the decryption key can communicate, the safety of the terminal equipment and the gateway is improved.
In this embodiment, since the gateway is bound to the corresponding user account, the affiliation of the gateway and the user account can be recorded. In addition, the cloud terminal also binds the terminal equipment with the corresponding user account, so that after the user account is bound, the cloud terminal can record the subordinate relationship between the gateway and the terminal equipment.
In some embodiments, after the step S31, the method further includes:
b1, obtaining the first random number included in the roaming inquiry.
And B2, acquiring a second random number.
In this embodiment, the gateway may obtain a second random number different from the first random number from another device, or generate the second random number by a random number generator pre-stored in the gateway. In order to ensure the security of subsequent communication, the second random numbers acquired each time may be different.
B3, sending reply information including the second random number and the first random number to the terminal device according to the unique identifier of the terminal device.
The step S32 includes:
if a roaming request sent by the terminal device based on the unique identifier of the gateway is received, identifying whether the roaming request includes the second random number, if the roaming request includes the second random number, opening a network access window, and adding the terminal device into a corresponding Zigbee network through the network access window.
In this embodiment, if the gateway determines that the roaming request includes the second random number added to the reply message, it indicates that the terminal device that sent the roaming request is a terminal device that communicates with the gateway, and then the gateway opens the access window so that the terminal device can successfully join the network that the gateway creates, otherwise, the gateway does not open the access window so that the terminal device cannot join the network that the gateway creates. That is, in this embodiment, since both the terminal device and the gateway pass the verification of the other party, the accuracy of the terminal device accessed by the gateway can be ensured, and the security of the communication process between the gateway and the terminal device can be improved.
In some embodiments, the second random number is different from the first random number.
In some embodiments, after the opening the web access window, the method further includes:
and C1, reporting the unique identifier of the terminal equipment to the cloud.
When the cloud judges that the terminal device and the gateway belong to the same user account, the binding relationship between the terminal device and the gateway is updated, and configuration information is issued to the gateway, otherwise, the cloud can require the gateway to kick off the terminal device.
C2, if the configuration information of the terminal device sent by the cloud is received, storing the configuration information.
And C3, if the kicking message sent by the cloud is received, kicking the terminal device from the network according to the kicking message.
In this embodiment, the gateway reports a roaming event to the cloud, where the roaming event includes a unique identifier of the terminal device. In some embodiments, the roaming event may further include a roaming request sequence number, which corresponds to the roaming request one-to-one. And after the cloud receives the roaming event reported by the gateway, judging whether the unique identifier of the terminal equipment is an identifier bound with the gateway in the same user account, if so, issuing configuration information of the terminal equipment to the gateway, otherwise, issuing a kicking message to the gateway.
The configuration information of the terminal equipment comprises equipment information and linkage information. The device information includes a device type (the device type is used to indicate that the terminal device is a switch or sensor type information), a device resource (the device resource is used to indicate a resource to which the terminal device belongs, and the resource may be a key, a relay, or the like), and a resource attribute (for example, the resource is used to control the key to be turned on or off, and an LED light is turned on or off).
The linkage information refers to which terminal device should be controlled to make what response when the gateway receives a specific message, for example, the known configured linkage is:
the button of the wireless switch is pressed, and the curtain motor opens the curtain.
The gateway mounted by the curtain motor only receives the information that the wireless switch key is pressed down, and specifically controls who and what should be controlled, and the gateway needs to be executed according to the configuration information of the curtain motor issued by the cloud.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Example three:
corresponding to the foregoing network roaming method in the first embodiment, fig. 4 shows a block diagram of a terminal device according to an embodiment of the present application, and for convenience of description, only a part related to the embodiment of the present application is shown.
Referring to fig. 4, the terminal device includes: a roaming inquiry broadcasting module 41, a reply information receiving module 42, and a roaming request sending module 43, wherein:
a roaming inquiry broadcasting module 41, configured to send a roaming inquiry in a broadcast manner if the terminal device detects that the terminal device itself meets a roaming condition, where the roaming inquiry includes the unique identifier of the terminal device and a user account corresponding to the terminal device.
A reply information receiving module 42, configured to determine a target gateway according to the signal strength of each received reply information if a reply information sent by at least one gateway based on the unique identifier of the terminal device is received, where the reply information includes the unique identifier of the gateway, and a user account corresponding to the gateway is the same as a user account corresponding to the terminal device.
A roaming request sending module 43, configured to send a roaming request to the target gateway according to the unique identifier of the target gateway, where the roaming request is used to request to join the Zigbee network corresponding to the target gateway.
In the embodiment of the application, when detecting that the terminal device meets the roaming condition, the terminal device actively sends the roaming inquiry in a broadcasting mode, determines the target gateway according to the signal strength of the received reply information, and then requests the target gateway to join the network corresponding to the target gateway, that is, the terminal device is taken as a decision maker to actively perform short-distance network exploration and network selection around the terminal device, and the network selection is performed according to the signal strength, so that the network selection can be performed more timely, and the signal strength of the selected network can better meet the user requirements. In addition, since the reply message is sent by the gateway corresponding to the same user account as the terminal device, it can be ensured that only the Zigbee networks of the same user are switched when the switching action is executed, thereby improving the accuracy of Zigbee network switching.
In some embodiments, the roaming condition includes any one of:
the signal intensity of the currently mounted gateway is smaller than a preset intensity threshold value, and the data packet can be successfully sent to the currently mounted gateway only after the retransmission for a preset number of times and the data packet retransmission to the currently mounted gateway fails.
In some embodiments, the roaming query broadcasting module 41 is specifically configured to:
and if the terminal equipment detects that the signal intensity of the gateway currently mounted by the terminal equipment is smaller than a preset intensity threshold value, sending a roaming inquiry in a broadcasting mode in idle.
In some embodiments, considering that the terminal device and the gateway are generally controlled by only one user, in order to avoid the roaming inquiry broadcast by the terminal device interfering with the gateways of other users, the terminal device includes:
and the unique identifier reporting module of the terminal equipment is used for reporting the unique identifier of the terminal equipment to a cloud end, and the cloud end is used for binding the unique identifier of the terminal equipment with the corresponding user account.
And the user account receiving module of the terminal equipment is used for receiving the user account sent by the cloud.
In some embodiments, the terminal device further comprises:
and the encryption and decryption key receiving module of the terminal equipment is used for receiving an encryption key and a decryption key which are sent by the cloud and correspond to the user account, wherein the encryption keys adopted by the equipment bound with the same user account are the same, and the decryption keys adopted by the equipment are also the same.
Correspondingly, the roaming inquiry broadcasting module 41 is configured to:
and encrypting the roaming inquiry by using the encryption key, and transmitting the encrypted roaming inquiry in a broadcasting mode.
Correspondingly, the reply information receiving module 42 is specifically configured to:
if the reply information sent by at least one gateway based on the unique identifier of the terminal equipment is received, the decryption key is adopted to decrypt the reply information to obtain the unique identifier of the gateway included in the reply information, and the target gateway is determined according to the signal strength of each received reply information.
In this embodiment, since the terminal device and the gateway are bound to the corresponding user account and share the same encryption key and decryption key, after the terminal device broadcasts the encrypted roaming inquiry, only the reply information sent by the gateway under the same user account as the terminal device is received, thereby improving the security of communication between the terminal device and the gateway.
In some embodiments, in order to improve the security of the communication between the terminal device and the gateway, the roaming inquiry further includes a first random number, and the reply information receiving module 42 includes:
and the first random number identification unit is used for identifying whether the reply information comprises the first random number or not if the reply information sent by at least one gateway based on the unique identifier of the terminal equipment is received.
The first random number is a random number generated by the terminal device according to a preset random function, or a random number acquired by the terminal device from other devices. In order to ensure the security of communication, the first random number included in each roaming inquiry is different.
And a target gateway determining unit, configured to determine a target gateway according to the received signal strength of each piece of the reply information if the reply information includes the first random number.
The reply message further includes a second random number, and correspondingly, the roaming request sending module 43 is specifically configured to:
and sending a roaming request to the target gateway corresponding to the unique identifier of the target gateway, wherein the roaming request comprises the second random number.
In this embodiment, because both the reply information sent by the gateway and the roaming request sent by the terminal device include the random number generated by the other party, the corresponding verification of the gateway by the terminal device is facilitated, and the corresponding verification of the terminal device by the gateway is facilitated, so that the communication security of the terminal device and the gateway is improved.
In some embodiments, the second random number is different from the first random number.
It should be noted that, the roaming inquiry and the reply message may be encrypted messages, and certainly, if the roaming inquiry and the reply messages are encrypted messages, the terminal device and the gateway need to perform corresponding decryption processing after receiving corresponding messages.
It should be noted that, because the contents of information interaction, execution process, and the like between the modules/units are based on the same concept as that of the method embodiment of the present application, specific functions and technical effects thereof may be referred to specifically in the method embodiment section, and are not described herein again.
Example four:
corresponding to the above network roaming method in the second embodiment, fig. 5 shows a block diagram of a gateway provided in the embodiment of the present application, and for convenience of description, only the relevant parts of the embodiment of the present application are shown.
The gateway 5 includes: a roaming inquiry receiving module 51, a reply information sending module 52 and a roaming request receiving module 53. Wherein:
a roaming query receiving module 51, configured to receive a roaming query broadcasted by a terminal device, where the roaming query includes a unique identifier of the terminal device and a user account corresponding to the terminal device.
Wherein, the unique identifier of the gateway can be a network address of the gateway, etc.
And the reply information sending module 52 is configured to send reply information to the terminal device according to the unique identifier of the terminal device if the user account corresponding to the gateway is the same as the user account corresponding to the terminal device, where the reply information includes the unique identifier of the gateway.
A roaming request receiving module 53, configured to verify the terminal device if a roaming request sent by the terminal device based on the unique identifier of the gateway is received, and if the terminal device passes the verification, agree to join the corresponding Zigbee network.
In the embodiment of the application, the terminal equipment which is communicated with the gateway is used as a decision maker to actively carry out network exploration and network selection, and the network selection is carried out according to the signal intensity, so that the network selection can be carried out more timely, and the signal intensity of the selected network can better meet the requirements of users. In addition, because the gateway only replies the roaming inquiry broadcasted by the terminal device with the same user account number as the corresponding terminal device, the gateway can ensure that the terminal devices which agree to join the Zigbee network belong to the same user as the terminal devices, thereby improving the accuracy of Zigbee network switching.
In some embodiments, considering that the gateway is usually controlled by only one user, therefore, in order to avoid the information sent by the gateway interfering with the terminal devices of other users, the gateway 5 further includes:
and the unique identifier reporting module of the gateway is used for reporting the unique identifier of the gateway to the cloud, and the cloud is used for binding the unique identifier of the gateway with the corresponding user account.
And the user account receiving module of the gateway is used for receiving the user account sent by the cloud.
The gateway 5 further comprises:
and the encryption and decryption key receiving module of the gateway is used for receiving the encryption key and the decryption key which are sent by the cloud and correspond to the user account, wherein the encryption key and the decryption key which are adopted by each device bound with the same user account are the same, and the decryption keys which are adopted are also the same.
And the roaming inquiry analyzing module is used for decrypting the roaming inquiry by adopting the decryption key to obtain the unique identifier of the terminal equipment and the user account corresponding to the terminal equipment, wherein the unique identifier of the terminal equipment is included in the roaming inquiry.
Correspondingly, the reply information sending module is specifically configured to:
and the reply information encryption unit is used for encrypting the reply information by adopting the encryption key and sending the encrypted reply information to the terminal equipment according to the unique identifier of the terminal equipment.
In this embodiment, the cloud binds the gateway to the corresponding user account, the terminal device and the gateway under each user account use the same encryption key and decryption key, and different user accounts correspond to different encryption keys and decryption keys. And when the gateway receives the roaming inquiry subjected to the encryption processing, the received roaming inquiry is decrypted by adopting the decryption key corresponding to the gateway, and if the roaming inquiry can be successfully decrypted, the reply information is encrypted by adopting the encryption key corresponding to the gateway and then is sent to the corresponding terminal equipment. Because only the terminal equipment and the gateway which acquire the encryption key and the decryption key can communicate, the safety of the terminal equipment and the gateway is improved.
In some embodiments, the gateway 5 further comprises:
the first random number acquisition module is used for acquiring the first random number included in the roaming inquiry.
And the second random number acquisition module is used for acquiring a second random number, and the second random number is different from the first random number.
In this embodiment, the gateway may obtain a second random number different from the first random number from another device, or generate the second random number by a random number generator pre-stored in the gateway. In order to ensure the security of subsequent communication, the second random numbers acquired each time may be different.
Correspondingly, the reply information sending module 52 is specifically configured to:
and sending reply information comprising the second random number and the first random number to the terminal equipment according to the unique identification of the terminal equipment, which is included in the roaming inquiry.
Correspondingly, the roaming request receiving module 53 is specifically configured to:
and if the roaming request sent by the terminal equipment based on the unique identifier of the gateway is received, identifying whether the roaming request comprises a second random number, if the roaming request comprises the second random number, opening a network access window, and adding the terminal equipment into the corresponding Zigbee network through the network access window.
In this embodiment, since both the terminal device and the gateway pass the verification of the other side, the accuracy of the terminal device accessed by the gateway can be ensured, and the security of the communication process between the gateway and the terminal device can be improved.
In some embodiments, the gateway 5 further comprises:
and the roaming event reporting module is used for reporting the unique identifier of the terminal equipment to the cloud.
And the configuration information receiving module is used for storing the configuration information if the configuration information of the terminal equipment sent by the cloud is received.
And the kicking message receiving module is used for kicking the terminal equipment from the network according to the kicking message if the kicking message transmitted by the cloud is received.
In this embodiment, the gateway reports a roaming event to the cloud, where the roaming event includes a unique identifier of the terminal device. In some embodiments, the roaming event may further include a roaming request sequence number, which corresponds to a roaming request in a one-to-one manner. And after the cloud receives the roaming event reported by the gateway, judging whether the unique identifier of the terminal equipment is an identifier bound with the gateway in the same user account, if so, issuing configuration information of the terminal equipment to the gateway, otherwise, issuing a kicking message to the gateway.
The configuration information of the terminal equipment comprises equipment information and linkage information. The device information includes a device type, a device resource, and a resource attribute.
The linkage information refers to which terminal device should be controlled to make what response when the gateway receives a specific message.
It should be noted that, for the contents of information interaction, execution process, and the like between the modules/units, specific functions and technical effects brought by the embodiments of the method of the present application based on the same concept can be specifically referred to the embodiments of the method, and are not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
An embodiment of the present application further provides a network device, where the network device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, the processor implementing the steps of any of the method embodiments when executing the computer program.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the foregoing method embodiments.
The embodiments of the present application provide a computer program product, which when running on a terminal device, enables the terminal device to implement the steps in the above method embodiments when executed.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer-readable medium may include at least: the computer program code can include any entity or means to a photographing apparatus/terminal device, a recording medium, a computer Memory, a Read-Only Memory (ROM), a Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the above modules or units is only one logical function division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (14)

1. A short-distance wireless communication network roaming method is applied to a terminal device and comprises the following steps:
if the terminal equipment detects that the terminal equipment meets roaming conditions, a roaming inquiry is sent in a broadcasting mode, wherein the roaming inquiry comprises a unique identifier of the terminal equipment and a user account corresponding to the terminal equipment;
if reply information sent by at least one gateway based on the unique identifier of the terminal equipment is received, determining a target gateway according to the signal strength of each received reply information, wherein the reply information comprises the unique identifier of the gateway, and a user account corresponding to the gateway is the same as a user account corresponding to the terminal equipment;
and sending a roaming request to the target gateway according to the unique identifier of the target gateway, wherein the roaming request is used for requesting to join in a Zigbee network corresponding to the target gateway.
2. The network roaming method of claim 1, wherein the roaming condition comprises any one of:
the signal intensity of the currently mounted gateway is smaller than a preset intensity threshold value, and the data packet can be successfully sent to the currently mounted gateway only after the retransmission for a preset number of times and the data packet retransmission to the currently mounted gateway fails.
3. The network roaming method of claim 2, wherein the sending a roaming inquiry in a broadcast manner if the terminal device detects that it satisfies a roaming condition comprises:
and if the terminal equipment detects that the signal intensity of the gateway currently mounted by the terminal equipment is smaller than a preset intensity threshold value, sending a roaming inquiry in a broadcasting mode in idle.
4. The network roaming method of claim 1, wherein prior to the broadcast sending of the roaming query, comprising:
reporting the unique identifier of the terminal equipment to a cloud end, wherein the cloud end is used for binding the unique identifier of the terminal equipment with a corresponding user account;
and receiving the user account sent by the cloud.
5. The network roaming method of claim 4, further comprising:
receiving an encryption key and a decryption key which are sent by the cloud and correspond to the user account, wherein the encryption key and the decryption key which are adopted by each device bound with the same user account are the same;
the sending the roaming inquiry in a broadcast mode comprises the following steps:
encrypting the roaming inquiry by adopting the encryption key, and sending the encrypted roaming inquiry in a broadcast mode;
if reply information sent by at least one gateway based on the unique identifier of the terminal equipment is received, determining a target gateway according to the signal strength of each received reply information, wherein the reply information comprises the following steps:
if the reply information sent by at least one gateway based on the unique identifier of the terminal equipment is received, the decryption key is adopted to decrypt the reply information to obtain the unique identifier of the gateway included in the reply information, and the target gateway is determined according to the signal intensity of each received reply information.
6. The network roaming method of any one of claims 1 to 5, wherein the roaming inquiry further includes a first random number, and if a reply message sent by at least one gateway based on the unique identifier of the terminal device is received, determining a target gateway according to the signal strength of each received reply message includes:
if reply information sent by at least one gateway based on the unique identifier of the terminal equipment is received, identifying whether the reply information comprises the first random number;
if the reply information comprises the first random number, determining a target gateway according to the received signal strength of each reply information;
the reply message further includes a second random number, and the sending of the roaming request to the target gateway according to the unique identifier of the target gateway includes:
and sending a roaming request to the target gateway corresponding to the unique identifier of the target gateway, wherein the roaming request comprises the second random number.
7. A network roaming method is applied to a gateway and comprises the following steps:
receiving a roaming inquiry broadcasted by a terminal device, wherein the roaming inquiry is sent when the terminal device detects that the terminal device meets roaming conditions, and the roaming inquiry comprises a unique identifier of the terminal device and a user account corresponding to the terminal device;
if the user account corresponding to the gateway is the same as the user account corresponding to the terminal equipment, sending reply information to the terminal equipment according to the unique identifier of the terminal equipment, wherein the reply information comprises the unique identifier of the gateway;
and if the terminal equipment receives a roaming request sent by the terminal equipment based on the unique identifier of the gateway, verifying the terminal equipment, and if the terminal equipment passes the verification, agreeing to the terminal equipment to join the corresponding Zigbee network, wherein the roaming request is a request sent to a target gateway after the terminal equipment determines the target gateway based on the received signal strength of the reply information sent by at least one gateway.
8. The network roaming method of claim 7, further comprising:
reporting the unique identifier of the gateway to a cloud, wherein the cloud is used for binding the unique identifier of the gateway with a corresponding user account;
and receiving the user account sent by the cloud.
9. The network roaming method of claim 8, further comprising:
receiving an encryption key and a decryption key which are sent by the cloud and correspond to the user account, wherein the encryption key and the decryption key adopted by each device bound with the same user account are the same;
after the roaming inquiry broadcasted by the receiving terminal equipment, the method comprises the following steps:
decrypting the roaming inquiry by adopting the decryption key to obtain the unique identifier of the terminal equipment and the user account corresponding to the terminal equipment, which are included in the roaming inquiry;
the sending of the reply information to the terminal device according to the unique identifier of the terminal device includes:
and encrypting the reply information by adopting the encryption key, and sending the encrypted reply information to the terminal equipment according to the unique identifier of the terminal equipment.
10. The network roaming method of claim 7, wherein after receiving the roaming query broadcast by the terminal device, comprising:
acquiring a first random number included in the roaming inquiry;
acquiring a second random number;
the sending of the reply information to the terminal device according to the unique identifier of the terminal device includes:
sending reply information comprising the second random number and the first random number to the terminal equipment according to the unique identifier of the terminal equipment;
if receiving a roaming request sent by the terminal device based on the unique identifier of the gateway, verifying the terminal device, and if the terminal device passes the verification, agreeing to join the corresponding Zigbee network, including:
if a roaming request sent by the terminal device based on the unique identifier of the gateway is received, identifying whether the roaming request includes the second random number, if the roaming request includes the second random number, opening a network access window, and adding the terminal device into a corresponding Zigbee network through the network access window.
11. The network roaming method of claim 10, wherein after the opening of the network entry window, comprising:
reporting the unique identifier of the terminal equipment to a cloud;
if the configuration information of the terminal equipment issued by the cloud is received, storing the configuration information;
and if the kicking message issued by the cloud is received, kicking the terminal equipment from the network according to the kicking message.
12. A terminal device, comprising:
a roaming inquiry broadcasting module, configured to send a roaming inquiry in a broadcast manner if the terminal device detects that the terminal device itself meets a roaming condition, where the roaming inquiry includes a unique identifier of the terminal device and a user account corresponding to the terminal device;
the reply information receiving module is used for determining a target gateway according to the signal strength of each received reply information if the reply information sent by at least one gateway based on the unique identifier of the terminal equipment is received, wherein the reply information comprises the unique identifier of the gateway, and the user account corresponding to the gateway is the same as the user account corresponding to the terminal equipment;
a roaming request sending module, configured to send a roaming request to the target gateway according to the unique identifier of the target gateway, where the roaming request is used to request to join a Zigbee network corresponding to the target gateway.
13. A gateway, comprising:
a roaming inquiry receiving module, configured to receive a roaming inquiry broadcasted by a terminal device, where the roaming inquiry is sent by the terminal device when detecting that the terminal device itself meets a roaming condition, and the roaming inquiry includes a unique identifier of the terminal device and a user account corresponding to the terminal device;
the reply information sending module is used for sending reply information to the terminal equipment according to the unique identifier of the terminal equipment if the user account corresponding to the gateway is the same as the user account corresponding to the terminal equipment, and the reply information comprises the unique identifier of the gateway;
a roaming request receiving module, configured to verify the terminal device if a roaming request sent by the terminal device based on the unique identifier of the gateway is received, and approve the terminal device to join the corresponding Zigbee network if the roaming request passes the verification, where the roaming request is a request sent to the target gateway after the terminal device determines the target gateway based on the received signal strength of the reply information sent by at least one gateway.
14. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 11.
CN202110975026.8A 2021-08-24 2021-08-24 Network roaming method, terminal device, gateway and computer readable storage medium Active CN113676850B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110975026.8A CN113676850B (en) 2021-08-24 2021-08-24 Network roaming method, terminal device, gateway and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110975026.8A CN113676850B (en) 2021-08-24 2021-08-24 Network roaming method, terminal device, gateway and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113676850A CN113676850A (en) 2021-11-19
CN113676850B true CN113676850B (en) 2022-09-06

Family

ID=78545609

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110975026.8A Active CN113676850B (en) 2021-08-24 2021-08-24 Network roaming method, terminal device, gateway and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113676850B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107635265A (en) * 2016-07-19 2018-01-26 三星(中国)半导体有限公司 Switching method and node for ZigBee wireless networks
CN108112005A (en) * 2017-12-25 2018-06-01 上海斐讯数据通信技术有限公司 The switching method and system of a kind of wireless network roaming
CN108184260A (en) * 2017-12-26 2018-06-19 生迪智慧科技有限公司 The network state identification method and device of Zigbee nodes
CN109348458A (en) * 2018-10-23 2019-02-15 深圳绿米联创科技有限公司 Network connection configuration method, apparatus, electronic equipment and network system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107635265A (en) * 2016-07-19 2018-01-26 三星(中国)半导体有限公司 Switching method and node for ZigBee wireless networks
CN108112005A (en) * 2017-12-25 2018-06-01 上海斐讯数据通信技术有限公司 The switching method and system of a kind of wireless network roaming
CN108184260A (en) * 2017-12-26 2018-06-19 生迪智慧科技有限公司 The network state identification method and device of Zigbee nodes
CN109348458A (en) * 2018-10-23 2019-02-15 深圳绿米联创科技有限公司 Network connection configuration method, apparatus, electronic equipment and network system

Also Published As

Publication number Publication date
CN113676850A (en) 2021-11-19

Similar Documents

Publication Publication Date Title
US11165767B2 (en) Identity authentication method and system, server, and terminal
US10306432B2 (en) Method for setting terminal in mobile communication system
EP1713289B1 (en) A method for establishing security association between the roaming subscriber and the server of the visited network
RU2008115492A (en) METHOD AND DEVICE FOR USING MOBILE NODES FOR TRANSFER OF STATE
CN110958142A (en) Device maintenance method, maintenance device, storage medium, and computer program product
US10243974B2 (en) Detecting deauthentication and disassociation attack in wireless local area networks
CN102056160B (en) Method, device and system for generating key
EP3200486B1 (en) Connection establishment method, device, and system
WO2015142247A1 (en) Authentication in device to device discovery
CN102348206B (en) Secret key insulating method and device
CN105764058A (en) Network access method, device and system
US11743733B2 (en) Method and devices for hardware identifier-based subscription management
CN105792194A (en) Base station legality authentication method, device and system and network device
CN102783218A (en) Method and apparatus for redirecting data traffic
US9241232B2 (en) Method and apparatus for machine communication
KR102088848B1 (en) Security supporting method and system for proximity based service group communication or public safety in mobile telecommunication system environment
CN101990211A (en) Method, device and system for network access
CN113068181B (en) Multi-type intelligent terminal safety network access method
CN103384365A (en) Method and system for network access, method for processing business and equipment
CN113676850B (en) Network roaming method, terminal device, gateway and computer readable storage medium
US20050013268A1 (en) Method for registering broadcast/multicast service in a high-rate packet data system
CN103188662B (en) A kind of method and device verifying WAP (wireless access point)
KR101131841B1 (en) System and method for adaptive roaming threshold parameter setup
CN112218317B (en) Rewarding method and device
KR20140039674A (en) Method and apparatus for managing security of terminal in mobile communication system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant