CN115529208A - Gateway switching method, device and system for intelligent equipment and gateway equipment - Google Patents

Gateway switching method, device and system for intelligent equipment and gateway equipment Download PDF

Info

Publication number
CN115529208A
CN115529208A CN202210546465.1A CN202210546465A CN115529208A CN 115529208 A CN115529208 A CN 115529208A CN 202210546465 A CN202210546465 A CN 202210546465A CN 115529208 A CN115529208 A CN 115529208A
Authority
CN
China
Prior art keywords
gateway
gateway device
configuration information
equipment
connection
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.)
Pending
Application number
CN202210546465.1A
Other languages
Chinese (zh)
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.)
Qingdao Haier Intelligent Home Appliance Technology Co Ltd
Original Assignee
Qingdao Haier Intelligent Home Appliance 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 Qingdao Haier Intelligent Home Appliance Technology Co Ltd filed Critical Qingdao Haier Intelligent Home Appliance Technology Co Ltd
Priority to CN202210546465.1A priority Critical patent/CN115529208A/en
Publication of CN115529208A publication Critical patent/CN115529208A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/22Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Abstract

The application relates to the technical field of communication of the Internet of things, and discloses a gateway switching method for intelligent equipment, which is applied to first gateway equipment and comprises the following steps: sending a connection request to a gateway device located in the same network as the first gateway device; determining that the gateway device sending the connection response is a second gateway device and establishing long connection with the second gateway device, wherein the connection response is generated by the second gateway device when receiving the connection request and is sent to the first gateway device; and transmitting the first configuration information of the first gateway device to the second gateway device, so that the second gateway device determines a first pairing device associated with the first gateway device according to the first configuration information, and establishes network connection with the first pairing device when determining that the first gateway device is offline. The method can improve the utilization rate of the network resources when the intelligent equipment is switched over the gateway. The application also discloses a network connection system and device and gateway equipment.

Description

Gateway switching method, device and system for intelligent equipment and gateway equipment
Technical Field
The application relates to the technical field of communication of the internet of things, for example, to a gateway switching method, device and system for intelligent equipment and gateway equipment.
Background
At present, with the development of IOT (Internet of Things), smart home systems are becoming more and more popular. In the smart home system, the smart device is usually connected to the cloud server through a single gateway device, and the application program acquires data of the smart device through the cloud server, so as to acquire the state of the smart device according to the data or issue a control instruction to the smart device through the cloud server. Because the intelligent device is connected with the cloud server only through a single gateway device, if the gateway device breaks down, a user cannot know the state of the intelligent device through an application program and cannot control the intelligent device.
In order to solve the technical problem, the related art discloses a method for automatically switching gateways of node devices of the internet of things, which comprises the following steps: s1: the node device broadcasts a discovery request to all gateways in the network. S2: and the node equipment establishes connection with the first gateway which responds at first and is on line through the first gateway. S3: and the node equipment sends a certain number of heartbeats to the first gateway within a fixed time, and if the node equipment does not receive the heartbeat response of the first gateway, the node equipment returns to execute the S1. And the node equipment establishes connection with the first responded second gateway and is on line through the second gateway. In step S2, after all gateways are powered on and online and receive a request of a node Device, a sub-Device list is requested from the cloud server, where the list includes a Device TD of a bound node Device, and the gateway determines whether to respond to the request of the node Device according to a search condition of the sub-Device list. The node equipment in the network and the gateways can be connected, and when a certain gateway fails to work, the node equipment below the gateway can be automatically connected to other gateways, so that the availability of the gateway is improved.
In the process of implementing the embodiments of the present disclosure, it is found that at least the following problems exist in the related art:
in the method for automatically switching gateways by node equipment adopted in the related art, after the node equipment sends a request in a broadcasting mode, all the gateways respond to the request. And the node equipment selects the first gateway responded from the responded gateways to establish connection. Because the gateways which are not selected by the node equipment also utilize network resources in the response stage, the utilization rate of the network is low when the node equipment switches the gateways.
Disclosure of Invention
The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview nor is intended to identify key/critical elements or to delineate the scope of such embodiments but rather as a prelude to the more detailed description that is presented later.
The embodiment of the disclosure provides a gateway switching method, device and system for intelligent equipment and gateway equipment, so as to improve the utilization rate of network resources when the intelligent equipment switches gateways.
In some embodiments, the method is applied to a first gateway device, and the method includes: sending a connection request to a gateway device located in the same network as the first gateway device; determining that the gateway device sending the connection response is a second gateway device and establishing long connection with the second gateway device, wherein the connection response is generated by the second gateway device when receiving the connection request and is sent to the first gateway device; and transmitting the first configuration information of the first gateway device to the second gateway device, so that the second gateway device determines a first paired device associated with the first gateway device according to the first configuration information, and establishes network connection with the first paired device when determining that the first gateway device is offline.
In some embodiments, the method is applied to a second gateway device, and the method includes: receiving a connection request sent by a first gateway device located in the same network as the second gateway device, generating a connection response, sending the connection response to the first gateway device, and establishing long connection with the first gateway device; receiving first configuration information of the first gateway device sent by the first gateway device, and determining a first paired device associated with the first gateway device according to the first configuration information; establishing a network connection with the first paired device if it is determined that the second gateway device is offline.
In some embodiments, the system, comprises: a first paired device; the first gateway device is provided with first configuration information, is in network connection with the first pairing device, and is configured to send a connection request to a gateway device located in the same network as the first gateway device, establish long connection with a second gateway device after the second gateway device is determined, and send the first configuration information to the second gateway device; the second gateway device is configured to generate a connection response when receiving the connection request, send the connection response to the first gateway device, determine the first pairing device according to the received first configuration information, and establish network connection with the first pairing device when determining that the first gateway device is offline.
In some embodiments, the apparatus includes a processor and a memory storing program instructions, the processor being configured to execute the gateway switching method for a smart device as described above when executing the program instructions.
In some embodiments, the gateway device includes a gateway switching apparatus for an intelligent device as described above.
The gateway switching method, device and system for the intelligent device and the gateway device provided by the embodiment of the disclosure can achieve the following technical effects:
after sending a connection request to a gateway device located in the same network as the first gateway device, the first gateway device establishes a long connection with a second gateway device sending a connection response, so that the second gateway device forms a backup gateway of the first gateway device. The second gateway device realizes backup management of the configuration information of the first gateway device by storing the first configuration information transmitted by the first gateway device and determines the first paired device according to the first configuration information so as to establish network connection with the first paired device when the first gateway device is offline due to a fault. When a certain gateway device in the internet of things goes wrong and goes offline, the paired device associated with the gateway device can keep network connection through the backup gateway. According to the method, only the second gateway equipment which establishes long connection with the first gateway equipment forms a backup relation with the first gateway equipment, the first pairing equipment can continuously form network connection through establishing network connection with the second gateway equipment, and the utilization rate of network resources is high. In conclusion, the method can improve the utilization rate of the network resources when the intelligent device switches the gateway.
The foregoing general description and the following description are exemplary and explanatory only and are not restrictive of the application.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the accompanying drawings and not in limitation thereof, in which elements having the same reference numeral designations are shown as like elements and not in limitation thereof, and wherein:
fig. 1 is a schematic diagram of a gateway switching method for an intelligent device according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of another gateway switching method for an intelligent device according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of another gateway switching method for an intelligent device according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of another gateway switching method for an intelligent device according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of another gateway switching method for an intelligent device according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of another gateway handover method for an intelligent device according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of another gateway handover method for an intelligent device according to an embodiment of the present disclosure;
FIG. 8-1 is a schematic diagram of an application of an embodiment of the present disclosure;
FIG. 8-2 is a schematic diagram of another application of an embodiment of the present disclosure;
fig. 9 is a schematic diagram of a gateway switching apparatus for an intelligent device according to an embodiment of the present disclosure.
Detailed Description
So that the manner in which the features and elements of the disclosed embodiments can be understood in detail, a more particular description of the disclosed embodiments, briefly summarized above, may be had by reference to the embodiments, some of which are illustrated in the appended drawings. In the following description of the technology, for purposes of explanation, numerous details are set forth in order to provide a thorough understanding of the disclosed embodiments. However, one or more embodiments may be practiced without these details. In other instances, well-known structures and devices may be shown in simplified form in order to simplify the drawing.
The terms "first," "second," and the like in the description and in the claims, and the above-described drawings of embodiments of the present disclosure, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the present disclosure described herein may be made. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions.
The term "plurality" means two or more unless otherwise specified.
In the embodiment of the present disclosure, the character "/" indicates that the preceding and following objects are in an or relationship. For example, A/B represents: a or B.
The term "and/or" is an associative relationship that describes objects, meaning that three relationships may exist. For example, a and/or B, represents: a or B, or A and B.
The term "correspond" may refer to an association or binding relationship, and a corresponds to B refers to an association or binding relationship between a and B.
In the embodiment of the disclosure, the smart device is a home appliance product formed by introducing a microprocessor, a sensor technology and a network communication technology into the home appliance device, and has the characteristics of intelligent control, intelligent sensing and intelligent application, the operation process of the smart device usually depends on the application and processing of modern technologies such as internet of things, internet and an electronic chip, for example, the smart device can realize remote control and management of a user on the smart device by connecting the smart device with the electronic device.
The embodiment of the disclosure provides an internet of things system, which comprises a router, at least two gateway devices and a plurality of intelligent devices. The router is connected with all gateway devices through network cables. Any gateway device is in communication connection with the corresponding pairing device through Zigbee (Zigbee protocol).
Referring to fig. 1, an embodiment of the present disclosure provides a gateway switching method for an intelligent device, which is applied to a first gateway device. The method comprises the following steps:
and S01, the first gateway equipment sends a connection request to the gateway equipment which is positioned in the same network with the first gateway equipment.
And S02, the first gateway device determines that the gateway device sending the connection response is the second gateway device and establishes long connection with the second gateway device, and the connection response is generated by the second gateway device when receiving the connection request and is sent to the first gateway device.
In the above steps, the connection request may be a search packet. The search packet carries a search keyword, identification information and IP (Internet Protocol) of the first gateway device, a software/hardware version number of the first gateway device, and the like. The identification information may be a Media Access Control Address (MAC Address). The connection response may be a reply message. The response packet carries the search keyword, identification information and IP (Internet Protocol) of the second gateway device, a software/hardware version number of the second gateway device, and the like.
And S03, the first gateway device transmits first configuration information of the first gateway device to the second gateway device, so that the second gateway device determines a first paired device associated with the first gateway device according to the first configuration information, and establishes network connection with the first paired device when the first gateway device is determined to be offline.
In this step, the first configuration information carries a child device list of the first gateway device. The sub-device list includes identification information, IP, and software/hardware version numbers of the sub-devices of the first gateway device.
By adopting the gateway switching method for the intelligent device provided by the embodiment of the disclosure, the first gateway device establishes long connection with the second gateway device which sends the connection response after sending the connection request to the gateway device which is located in the same network as the first gateway device, so that the second gateway device forms a backup gateway of the first gateway device. The second gateway device realizes backup management of the configuration information of the first gateway device by storing the first configuration information transmitted by the first gateway device and determines the first paired device according to the first configuration information so as to establish network connection with the first paired device when the first gateway device is offline due to a fault. When a certain gateway device in the internet of things goes wrong and goes offline, the paired device associated with the gateway device can keep network connection through the backup gateway. According to the method, only the second gateway equipment which establishes long connection with the first gateway equipment forms a backup relation with the first gateway equipment, the first pairing equipment can continuously form network connection through establishing network connection with the second gateway equipment, and the utilization rate of network resources is high. In conclusion, the method can improve the utilization rate of the network resources when the intelligent device switches the gateway.
In addition, in the internet of things, the gateway device is usually in communication connection with a plurality of node devices, and therefore, in the related art, if a plurality of node devices in communication connection with the same gateway device broadcast simultaneously, network congestion is caused, and a network blocking phenomenon occurs. The pairing device provided by the embodiment of the disclosure is only connected with the second gateway device serving as the backup gateway after the first gateway device is disconnected from the network, and the backup gateway is not determined in a broadcasting manner, so that network congestion and even network blocking can not be caused, and the network operation is smoother.
Optionally, as shown in fig. 2, the establishing, by the first gateway device, a long connection with the second gateway device includes:
s11, the first gateway equipment sends heartbeat messages to the second gateway equipment in a preset period.
S12, the first gateway equipment receives the response message. And the response message is generated when the second gateway equipment receives the heartbeat message and is sent to the first gateway equipment.
In this way, the first gateway device is continuously maintained in network connection with the second gateway device. And the second gateway device can judge whether the first gateway device is off-line through whether the first gateway device sends the heartbeat message, and the first gateway device can judge whether the first gateway device is off-line through whether the response message is received.
Specifically, the heartbeat packet carries the number of paired devices associated with the current gateway device and the number information of the paired devices associated with the current gateway device. The information carried by the response packet is consistent with the heartbeat packet, and details of the embodiment of the present disclosure are not repeated herein.
As an example, the preset period is 0.7 seconds. The first gateway device sends heartbeat messages to the second gateway device in units of 0.7 second, and once the second gateway device receives the heartbeat messages, the second gateway device sends response messages to the gateway device sending the heartbeat messages.
Referring to fig. 3, an embodiment of the present disclosure further provides a gateway switching method for an intelligent device, which is applied to a first gateway device. The method comprises the following steps:
s21, the first gateway device sends a connection request to a gateway device located in the same network as the first gateway device.
And S22, the first gateway device determines that the gateway device sending the connection response is the second gateway device and establishes long connection with the second gateway device, and the connection response is generated by the second gateway device when receiving the connection request and is sent to the first gateway device.
And S23, the first gateway device transmits the first configuration information of the first gateway device to the second gateway device, so that the second gateway device determines a first paired device associated with the first gateway device according to the first configuration information, and establishes network connection with the first paired device when the first gateway device is determined to be offline.
And S24, the first gateway device receives second configuration information sent by the second gateway device, so that the first gateway device determines a third paired device associated with the second gateway device according to the second configuration information and establishes network connection with the third paired device when determining that the second gateway device is offline.
In this step, the second configuration information carries a sub device list of the second gateway device. The sub-device list includes identification information, IP, and software/hardware version numbers of the sub-devices of the second gateway device.
By adopting the gateway switching method for the intelligent device provided by the embodiment of the disclosure, the first gateway device realizes backup management of the configuration information of the second gateway device by storing the second configuration information transmitted by the second gateway device and determines the third paired device according to the second configuration information, so as to establish network connection with the third paired device when the second gateway device is offline due to a failure. Thereby, the first gateway device and the second gateway device each act as a backup gateway for each other. Meanwhile, each first gateway device can realize backup management of the configuration information only by sharing the configuration information once, and the utilization rate of network resources when the intelligent device switches the gateways is effectively improved.
With reference to fig. 4, an embodiment of the present disclosure further provides a gateway switching method for an intelligent device, which is applied to a first gateway device. The method comprises the following steps:
s31, the first gateway device sends a connection request to a gateway device located in the same network as the first gateway device.
And S32, the first gateway device determines that the gateway device sending the connection response is the second gateway device and establishes long connection with the second gateway device, and the connection response is generated by the second gateway device when receiving the connection request and is sent to the first gateway device.
And S33, the first gateway device transmits the first configuration information of the first gateway device to the second gateway device, so that the second gateway device determines a first paired device associated with the first gateway device according to the first configuration information, and establishes network connection with the first paired device when determining that the first gateway device is offline.
And S34, the first gateway equipment acquires the updating state of the first configuration information.
And S35, the first gateway device sends the updated first configuration information to the second gateway device under the condition that the first configuration information is determined to be updated and the first gateway device is online.
By adopting the gateway switching method for the intelligent device provided by the embodiment of the disclosure, before the first gateway device is not offline, the information of the paired device connected with the first gateway device is updated in real time. In order to realize the real-time sharing of the configuration information, the first gateway equipment acquires the updating state of the first configuration information and sends the updated first configuration information to the second gateway equipment when the first configuration information is determined to be updated and the equipment is online. Therefore, the second gateway device can perform backup management on the latest updated configuration information, so that the synchronization and sharing of the configuration information are realized, and the reliability of network connection of the paired devices is improved.
With reference to fig. 5, an embodiment of the present disclosure further provides a gateway switching method for an intelligent device, which is applied to a second gateway device. The method comprises the following steps:
and S41, the second gateway equipment receives a connection request sent by the first gateway equipment which is positioned in the same network with the second gateway equipment, generates a connection response, sends the connection response to the first gateway equipment, and establishes long connection with the first gateway equipment.
And S42, the second gateway device receives the first configuration information of the first gateway device sent by the first gateway device, and determines a first paired device associated with the first gateway device according to the first configuration information.
And S43, the second gateway device establishes network connection with the first pairing device under the condition that the first gateway device is determined to be offline.
By adopting the gateway switching method for the intelligent equipment provided by the embodiment of the disclosure, when a certain gateway equipment in the internet of things breaks down and is offline, the paired equipment associated with the gateway equipment can keep network connection through the backup gateway, and the utilization rate of the intelligent equipment on network resources during gateway switching is improved.
With reference to fig. 6, an embodiment of the present disclosure further provides a gateway switching method for an intelligent device, which is applied to a second gateway device. The method comprises the following steps:
and S51, the second gateway device receives the connection request sent by the first gateway device located in the same network with the second gateway device, generates a connection response, sends the connection response to the first gateway device, and establishes long connection with the first gateway device.
S52, the second gateway device receives the first configuration information of the first gateway device sent by the first gateway device, and determines a first paired device associated with the first gateway device according to the first configuration information.
And S53, the second gateway device establishes network connection with the first pairing device under the condition that the first gateway device is determined to be offline.
And S54, the second gateway equipment monitors the network connection state of the first gateway equipment.
And S55, when the network connection state indicates that the first gateway device is switched from off-line to on-line, the second gateway device reestablishes long connection with the first gateway device, and transmits the current configuration information of the second gateway device to the first gateway device, so that the first gateway device determines a second pairing device according to the current configuration information.
In this step, the second paired device may be the first paired device, or may be an intelligent device that establishes a new network connection with the second gateway device after the first gateway device is offline.
And S56, the second gateway equipment is disconnected from the second pairing equipment through the network, and the first gateway equipment establishes network connection with the second pairing equipment after the second gateway equipment is disconnected from the second pairing equipment through the network.
By adopting the gateway switching method for the intelligent device provided by the embodiment of the disclosure, after the second gateway device establishes network connection with the first pairing device, the network connection state of the first gateway device is continuously monitored, when the first gateway device is determined to be switched from off-line to on-line, the second gateway device is reconnected to the first gateway device for a long time, and the current configuration information of the second gateway device is transmitted to the first gateway device to realize the sharing of the configuration information. In addition, since the first gateway device is a main gateway of the pairing device connected to the network, after the first gateway device is online, the second gateway device is disconnected from the second pairing device, and the first gateway device establishes network connection with the second pairing device after the second gateway device is disconnected from the second pairing device.
Optionally, after the second gateway device reestablishes the long connection with the first gateway device, the method further includes:
the second gateway device sends the first configuration information to the first gateway device, so that the first gateway device reestablishes network connection with the first pairing device according to the first configuration information.
In this way, after the first gateway device goes offline, the first configuration information stored before the first gateway device goes offline may not be successfully stored or may be lost. Therefore, after the second gateway device and the first gateway device reestablish the long connection, the first configuration information is transmitted to the first gateway device, so that the first gateway device and the first pairing device reestablish the network connection according to the first configuration information, the situation that the network of the first pairing device is disconnected due to the loss of the first configuration information is avoided, and the stability of the network connection of the pairing device is improved.
Optionally, as shown in fig. 7, the monitoring, by the second gateway device, the network connection status of the first gateway device includes:
and S61, the second gateway equipment sends the monitoring message to the first gateway equipment. The monitoring message carries the number information of the paired devices associated with the second gateway device and/or the respective number information of the paired devices. The monitoring message may be the aforementioned heartbeat message.
And S62, under the condition that the second gateway equipment receives the response message corresponding to the monitoring message within the preset time length, determining that the network connection state is on-line.
And S63, under the condition that the second gateway equipment does not receive the response message corresponding to the monitoring message within the preset time length, determining that the network connection state is offline.
In this way, under the condition that the monitoring message is a heartbeat message, the second gateway device can judge the network connection state of the first gateway device according to whether a response message corresponding to the monitoring message is received within the preset time length. Thereby, continuous monitoring of the network connection status of the first gateway device is achieved.
The embodiment of the disclosure provides a gateway switching system for intelligent equipment, which comprises first pairing equipment, first gateway equipment and second gateway equipment. The first gateway device has first configuration information, is network-connected to the first pairing device, is configured to send a connection request to a gateway device located in the same network as the first gateway device, establishes a long connection with the second gateway device after determining the second gateway device, and sends the first configuration information to the second gateway device. The second gateway device is configured to generate a connection response when receiving the connection request, send the connection response to the first gateway device, determine the first paired device according to the received first configuration information, and establish network connection with the first paired device when determining that the first gateway device is offline.
By adopting the gateway switching system for the intelligent equipment provided by the embodiment of the disclosure, the utilization rate of the network resources when the intelligent equipment is switched by the gateway can be improved. And, keeping the network unobstructed.
Optionally, the second gateway device is further configured to monitor a network connection status of the first gateway device, and transmit current configuration information of the second gateway device to the first gateway device and disconnect the network connection with the second pairing device when the network connection status indicates that the first gateway device is switched from offline to online.
The first gateway device is further configured to determine a second paired device according to the current configuration information when the first gateway device is switched from offline to online, and establish network connection with the second paired device after the second gateway device and the second paired device are disconnected from each other.
In practical applications, fig. 8-1 and 8-2 show an interactive flowchart of a gateway switching method for an intelligent device. As shown in fig. 8-1 or fig. 8-2, the first gateway device establishes a network connection with the first paired device. The second network device is a backup gateway of the first gateway device.
The gateway switching method for the intelligent device specifically executes the following steps:
step S81, the first gateway device sends a connection request to the second gateway device.
Step S82, the second gateway device generates a connection response when receiving the connection request and sends the connection response to the first gateway device.
And S83, the first gateway equipment establishes long connection with the second gateway equipment.
Step S84, the first gateway device transmits the first configuration information of the first gateway device to the second gateway device, so that the second gateway device determines the first pairing device associated with the first gateway device according to the received first configuration information.
The first gateway device fails at the moment and is switched from online to offline.
Step S85, the second gateway device monitors the network connection state of the first gateway device. Specifically, a monitoring packet is sent to the first gateway device.
Step S86, the second gateway device determines that the network connection state is offline when the response packet corresponding to the monitoring packet is not received within the preset time period. And the second gateway equipment switches to the network number and the channel number of the first gateway equipment according to the first configuration information.
Step S87, the second gateway device sends a switching notification to the first pairing device.
And step S88, the first pairing equipment sends a switching response to the second gateway equipment after receiving the switching notification, and determines to perform network switching. Thereby, the first paired device is switched from a network connection with the first gateway device to a network connection with the second gateway device.
The first network equipment recovers normal operation at the moment and is switched from off-line to on-line.
Step S89, the first gateway device reestablishes the long connection with the second gateway device.
Step S90, the second gateway device sends the current configuration information to the first gateway device, so that the first gateway device determines the first paired device again according to the current configuration information.
Step S91, the second gateway device determines that the first gateway device is online.
In step S92, the second gateway device sends the switching notification to the first pairing device again.
Step S93, the first pairing device sends a configuration switching response to the second gateway device, and determines to perform network switching.
Step S94, the first pairing device reestablishes the network connection with the first gateway device.
By adopting the gateway switching method for the intelligent device, the second gateway device in the gateway devices in the same network performs backup management on the first configuration information of the first gateway device. And when the first gateway equipment corresponding to the first pairing equipment fails to operate continuously and the first gateway equipment is determined to be offline, the first gateway equipment serving as a backup gateway is connected with the first pairing equipment through a network. And after the first gateway equipment recovers normal operation, receiving current configuration information transmitted by the second gateway equipment so that the first gateway equipment establishes network connection with the first paired equipment again according to the current configuration information. The method can realize the continuous network connection of the paired equipment in the network, and improves the continuity and stability of the network connection.
As shown in fig. 9, an embodiment of the present disclosure provides a gateway switching apparatus for a smart device, which includes a processor (processor) 100 and a memory (memory) 101. Optionally, the apparatus may also include a Communication Interface (Communication Interface) 102 and a bus 103. The processor 100, the communication interface 102, and the memory 101 may communicate with each other via a bus 103. The communication interface 102 may be used for information transfer. The processor 100 may call logic instructions in the memory 101 to perform the gateway switching method for the intelligent device of the above-described embodiments.
In addition, the logic instructions in the memory 101 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products.
The memory 101 is used as a computer readable storage medium for storing software programs, computer executable programs, such as program instructions/modules corresponding to the methods in the embodiments of the present disclosure. The processor 100 executes functional applications and data processing by executing program instructions/modules stored in the memory 101, that is, implements the gateway switching method for the intelligent device in the above-described embodiments.
The memory 101 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. In addition, the memory 101 may include a high-speed random access memory, and may also include a nonvolatile memory.
The embodiment of the disclosure provides a gateway device, which includes the gateway switching device for the intelligent device.
The embodiment of the disclosure provides a computer-readable storage medium, which stores computer-executable instructions configured to execute the gateway switching method for an intelligent device.
The disclosed embodiments provide a computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the above-mentioned gateway switching method for a smart device.
The computer-readable storage medium described above may be a transitory computer-readable storage medium or a non-transitory computer-readable storage medium.
The technical solution of the embodiments of the present disclosure may be embodied in the form of a software product, where the computer software product is stored in a storage medium and includes one or more instructions to enable a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present disclosure. And the aforementioned storage medium may be a non-transitory storage medium comprising: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes, and may also be a transient storage medium.
The above description and the drawings sufficiently illustrate embodiments of the disclosure to enable those skilled in the art to practice them. Other embodiments may incorporate structural, logical, electrical, process, and other changes. The examples merely typify possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and features of some embodiments may be included in or substituted for those of others. Furthermore, the words used in the specification are words of description only and are not intended to limit the claims. As used in the description of the embodiments and the claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term "and/or" as used in this application is meant to encompass any and all possible combinations of one or more of the associated listed. Furthermore, the terms "comprises" and/or "comprising," when used in this application, 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. Without further limitation, an element defined by the phrase "comprising a …" does not exclude the presence of additional like elements in a process, method, or apparatus that comprises the element. In this document, each embodiment may be described with emphasis on differences from other embodiments, and the same and similar parts between the respective embodiments may be referred to each other. For methods, products, etc. of the embodiment disclosures, reference may be made to the description of the method section for relevance if it corresponds to the method section of the embodiment disclosure.
Those of skill in the art would 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 may depend upon the particular application and design constraints imposed on the solution. 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 disclosed embodiments. It can be clearly understood by the skilled person that, for convenience and simplicity of description, the specific working processes of the above-described systems, apparatuses, and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments disclosed herein, the disclosed methods, products (including but not limited to devices, apparatuses, etc.) may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units may be merely a logical division, and in actual implementation, there may be another division, for example, multiple 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 implement the present embodiment. In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. In the description corresponding to the flowcharts and block diagrams in the figures, operations or steps corresponding to different blocks may also occur in different orders than disclosed in the description, and sometimes there is no specific order between the different operations or steps. For example, two sequential operations or steps may in fact be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. Each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

Claims (11)

1. A gateway switching method for intelligent equipment is applied to first gateway equipment, and comprises the following steps:
sending a connection request to a gateway device located in the same network as the first gateway device;
determining that the gateway device sending the connection response is a second gateway device and establishing long connection with the second gateway device, wherein the connection response is generated by the second gateway device when receiving the connection request and is sent to the first gateway device;
and transmitting the first configuration information of the first gateway device to the second gateway device, so that the second gateway device determines a first paired device associated with the first gateway device according to the first configuration information, and establishes network connection with the first paired device when determining that the first gateway device is offline.
2. The method of claim 1, wherein after determining that the gateway device that sends the connection response is the second gateway device and establishing the long connection with the second gateway device, the method further comprises:
receiving second configuration information sent by the second gateway device, so that the first gateway device determines a third paired device associated with the second gateway device according to the second configuration information and establishes network connection with the third paired device when determining that the second gateway device is offline.
3. The method of claim 1, further comprising:
acquiring the updating state of the first configuration information;
and under the condition that the first configuration information is determined to be updated and the first gateway device is online, sending the updated first configuration information to the second gateway device.
4. A gateway switching method for an intelligent device is applied to a second gateway device, and comprises the following steps:
receiving a connection request sent by first gateway equipment which is positioned in the same network with the second gateway equipment, generating a connection response, sending the connection response to the first gateway equipment, and establishing long connection with the first gateway equipment;
receiving first configuration information of the first gateway device sent by the first gateway device, and determining a first paired device associated with the first gateway device according to the first configuration information;
establishing a network connection with the first paired device if it is determined that the first gateway device is offline.
5. The method of claim 4, wherein after establishing the network connection with the first paired device, further comprising:
monitoring a network connection state of the first gateway device;
under the condition that the network connection state indicates that the first gateway equipment is switched from off-line to on-line, reestablishing long connection with the first gateway equipment;
transmitting the current configuration information of the second gateway device to the first gateway device, so that the first gateway device determines a second paired device according to the current configuration information;
and the first gateway equipment is disconnected with the second pairing equipment, and the first gateway equipment establishes network connection with the second pairing equipment after the second gateway equipment is disconnected with the second pairing equipment.
6. The method of claim 5, wherein after reestablishing the long connection with the first gateway device, further comprising:
and sending the first configuration information to the first gateway device so that the first gateway device reestablishes network connection with the first pairing device according to the first configuration information.
7. The method of claim 5, wherein the monitoring the network connection status of the first gateway device comprises:
sending a monitoring message to the first gateway equipment;
determining that the network connection state is on-line under the condition that a response message corresponding to the monitoring message is received within a preset time length;
and under the condition that a response message corresponding to the monitoring message is not received within a preset time length, determining that the network connection state is offline.
8. A gateway switching system for a smart device, comprising:
a first paired device;
the first gateway device is provided with first configuration information, is in network connection with the first pairing device, and is configured to send a connection request to a gateway device located in the same network as the first gateway device, establish long connection with a second gateway device after the second gateway device is determined, and send the first configuration information to the second gateway device;
the second gateway device is configured to generate a connection response when receiving the connection request, send the connection response to the first gateway device, determine the first pairing device according to the received first configuration information, and establish network connection with the first pairing device when determining that the first gateway device is offline.
9. The system of claim 8, wherein the second gateway device is further configured to monitor a network connection status of the first gateway device, and if the network connection status indicates that the first gateway device is switched from offline to online, transmit current configuration information of the second gateway device to the first gateway device, and disconnect the network connection from the second paired device;
the first gateway device is further configured to determine a second paired device according to the current configuration information when switching from offline to online, and establish network connection with the second paired device after the second gateway device and the second paired device are disconnected from each other.
10. A gateway switching apparatus for a smart device, comprising a processor and a memory storing program instructions, wherein the processor is configured to execute the gateway switching method for a smart device according to any one of claims 1 to 3 when executing the program instructions.
11. Gateway device, characterized in that it comprises a gateway switching means for intelligent devices according to claim 10.
CN202210546465.1A 2022-05-19 2022-05-19 Gateway switching method, device and system for intelligent equipment and gateway equipment Pending CN115529208A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210546465.1A CN115529208A (en) 2022-05-19 2022-05-19 Gateway switching method, device and system for intelligent equipment and gateway equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210546465.1A CN115529208A (en) 2022-05-19 2022-05-19 Gateway switching method, device and system for intelligent equipment and gateway equipment

Publications (1)

Publication Number Publication Date
CN115529208A true CN115529208A (en) 2022-12-27

Family

ID=84695312

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210546465.1A Pending CN115529208A (en) 2022-05-19 2022-05-19 Gateway switching method, device and system for intelligent equipment and gateway equipment

Country Status (1)

Country Link
CN (1) CN115529208A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170063605A1 (en) * 2015-08-26 2017-03-02 Tatung Company Fail recovery method and internet of things system and charging system using the same
CN107360034A (en) * 2017-07-25 2017-11-17 美的智慧家居科技有限公司 Gateway restoration methods, device and its equipment
CN108712297A (en) * 2018-06-22 2018-10-26 青岛清控人居数据科技有限公司 A kind of method of Internet of things node equipment autonomously switching gateway
WO2020077041A1 (en) * 2018-10-10 2020-04-16 Hughes Network Systems, Llc System and apparatus for disaster backup gateway for a multi-gateway spot beam satellite
CN113709839A (en) * 2021-08-19 2021-11-26 珠海格力电器股份有限公司 Multi-gateway network switching method, device and system, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170063605A1 (en) * 2015-08-26 2017-03-02 Tatung Company Fail recovery method and internet of things system and charging system using the same
CN107360034A (en) * 2017-07-25 2017-11-17 美的智慧家居科技有限公司 Gateway restoration methods, device and its equipment
CN108712297A (en) * 2018-06-22 2018-10-26 青岛清控人居数据科技有限公司 A kind of method of Internet of things node equipment autonomously switching gateway
WO2020077041A1 (en) * 2018-10-10 2020-04-16 Hughes Network Systems, Llc System and apparatus for disaster backup gateway for a multi-gateway spot beam satellite
CN113709839A (en) * 2021-08-19 2021-11-26 珠海格力电器股份有限公司 Multi-gateway network switching method, device and system, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112448877B (en) SBFD session establishment method, device and system
CN109982447B (en) Wireless network networking method and system and wireless AP
CN103873472A (en) Method for automatically having access to network
CN106603261B (en) Hot backup method, first main device, standby device and communication system
CN110324375B (en) Information backup method and related equipment
CN104144124B (en) Data forwarding method, Apparatus and system
EP3629535B1 (en) Method, device, and system for implementing mux machine
CN111542130A (en) Method and device for controlling household appliance and terminal equipment
CN111447094A (en) Master-slave switching method of dual computers, terminal equipment and computer readable storage medium
US10037253B2 (en) Fault handling methods in a home service system, and associated household appliances and servers
CN104301407A (en) Data backing up method and device in distributed type monitoring system
CN105471983A (en) Method and system for establishing internet-of-things communication
CN111343019B (en) Reconnection method, reconnection device and storage medium
CN107948063B (en) Method for establishing aggregation link and access equipment
EP3255838A1 (en) Method, switching device and network controller for protecting links in software-defined network (sdn)
CN111682982A (en) Path fault detection method, device, equipment, system and storage medium
CN106817267B (en) Fault detection method and equipment
WO2016027447A1 (en) Communication device, communication system and communication method
CN108667640B (en) Communication method and device, and network access system
CN111371680B (en) Route management method, device, equipment and storage medium for dual-computer hot standby
CN115529208A (en) Gateway switching method, device and system for intelligent equipment and gateway equipment
CN115022384B (en) HSMS communication connection method and device
CN111934912B (en) Hot standby redundancy system of double-host isolation gateway and control method
CN111181766B (en) Redundant FC network system and method for realizing dynamic configuration of switch
CN114422335A (en) Communication method, communication device, server and storage medium

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