A kind of system of Internet of things node equipment autonomously switching gateway
Technical field
The disclosure belongs to the Internet of Things communications field, and in particular to a kind of Internet of things node equipment autonomously switching gateway is
System.
Background technique
With the development of science and technology, Internet of Things is gradually deep into social every field, including intelligent transportation, environment are protected
Shield, government work, public safety, safety home etc., therefore the node device for being connected to Internet of Things is caused to be continuously increased.In object
In networking, node device has very high dependence to gateway.Gateway is as " closing from a network connection to another network
Mouthful ", once due to hardware facilities failures such as the network interface cards, power supply, cable of some gateway, or because access is by control and firewall setting
Etc. other reasons, then it is unavailable to will lead to node device all under the gateway.
Utility model content
In view of the above problems, the utility model provides a kind of system of Internet of Things interior joint equipment autonomously switching gateway, when
When some gateway is unavailable because of failure, node device can be independently switched on other available gateways, it is ensured that node device is normally transported
Row.
A kind of system of Internet of things node equipment autonomously switching things-internet gateway, comprising: at least one node device, at least
First, second gateway and cloud server;
The node device includes signal transmitting and receiving module, and the signal transmitting and receiving module includes trigger, for repeatability
Mode to the gateway broadcasts find request;
The node device further includes timer, for control node equipment by the signal transmitting and receiving module fixation when
Between introversive first gateway send heartbeat;
The cloud server is used for the link information of memory node equipment and gateway.
The node device and the first gateway for responding request at first establish connection, and online by the first gateway.
The set time is set as 30S.
If the node device heartbeat that continuously certain number does not receive the first gateway is responded, disconnects and connecting with the first gateway
It connects, re-broadcast discovery request and establishes connection with the second gateway for responding request, and is online by the second gateway.
The number is 3 times.
The cloud server is also used to the registration information of memory node equipment and gateway.
The cloud server is also used to distribute general unique identification to the node device for establishing connection with the gateway
Code.
The utility model bring the utility model has the advantages that
Node device in the utility model can establish connection between multiple gateways, when the damage of single gateway, with
The node device of gateway connection is connectable on other available gateways, it is ensured that working properly.
Detailed description of the invention
Fig. 1 is that a kind of system structure of Internet of things node equipment autonomously switching gateway provided by the embodiment of the utility model is shown
It is intended to;
Fig. 2 be the utility model embodiment gateway in normal state with the connection schematic diagram of node device;
The connection schematic diagram of node device and gateway when Fig. 3 is the gateway fails of the utility model embodiment;
Fig. 4 is the node device of the utility model embodiment and the connection schematic diagram of new gateway.
Specific embodiment
The technical solution of the utility model is described in detail with reference to the accompanying drawings and examples, but and is not so limited
The utility model.
As shown in Figure 1, the utility model embodiment includes at least one node device, at least the first, second gateway.Into one
Step, node device includes signal transmitting and receiving module, after node device booting, signal transmitting and receiving module in a manner of repeatability to
All gateway broadcasts discovery requests;The gateway for responding request at first is established and is connected as the first gateway, node device and the first gateway
After connecing, the first gateway is considered as available gateway and by the way that its is online;
The signal transmitting and receiving module includes rest-set flip-flop, d type flip flop, JK flip-flop, any one in T trigger.
Node device further includes timer, and under the control of timer, node device just passed through signal transmitting and receiving every 30 seconds
Module sends a heartbeat to the first gateway, when the heartbeat for not receiving the first gateway for node device continuous 3 times is responded, then node
Equipment is disconnected with the first gateway, is re-broadcast discovery request by signal transmitting and receiving module and is made if there is gateway to respond request
For the second gateway, node device is regarded as available gateway and establishes connection, and after establishing connection, node device passes through the second gateway
It is online.
The present embodiment further includes cloud server, and cloud server is used for the link information of memory node equipment and gateway,
It is also used to the registration information of memory node equipment and gateway.
Further, cloud server is also used to register node equipment and gateway, and via available gateway to node device
Distribute general unique identifier.
Further, when having new node device and available gateway to establish connection, cloud server can update this
The link information of node device and the available gateway, and push the link information and gateway can be used to this is arrived.
In another embodiment, as shown in Fig. 2, gateway A and gateway B are normally online, node device A1 passes through in gateway A
Line, node device B1 and B2 are online by gateway B.
In another embodiment, as shown in figure 3, gateway A failure can not work normally, the section being connect with gateway A
The heartbeat that point device A1 can not receive gateway A is responded, and node device A1 is disconnected with gateway A.
In another embodiment, as shown in figure 4, node device A1 is re-broadcast, real name discovery request is carried out.Gateway A
Since failure can not communicate, gateway B receives the response of response node device A1 after request, and node device A1 and gateway B, which are established, to be connected
It connects, node device A1 is online by gateway B.
Technical solution described in the utility model can be realized and establish connection between node device and multiple gateways, it is ensured that when
When single gateway damages, the node device being attached thereto is connectable on other available gateways and works normally.
Above-described embodiment is the preferable embodiment of the utility model, but the embodiments of the present invention is not by above-mentioned
The limitation of embodiment, it is made under other any spiritual essence and principles without departing from the utility model change, substitution, combination,
Simplify, should be equivalent substitute mode, be included within the protection scope of the utility model.