CN107231262A - A kind of message route method cascaded based on MQTT multilayers - Google Patents
A kind of message route method cascaded based on MQTT multilayers Download PDFInfo
- Publication number
- CN107231262A CN107231262A CN201710495388.0A CN201710495388A CN107231262A CN 107231262 A CN107231262 A CN 107231262A CN 201710495388 A CN201710495388 A CN 201710495388A CN 107231262 A CN107231262 A CN 107231262A
- Authority
- CN
- China
- Prior art keywords
- gateway
- mqtt
- message
- uid
- route
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/12—Discovery or management of network topologies
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/2803—Home automation networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/44—Star or tree networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0893—Assignment of logical groups to network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
- H04L67/125—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/2803—Home automation networks
- H04L12/2816—Controlling appliance services of a home automation network by calling their functionalities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/66—Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Automation & Control Theory (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Small-Scale Networks (AREA)
Abstract
The present invention discloses a kind of message route method cascaded based on MQTT multilayers.This method includes the multiple gateway networking based on MQTT;Progress route is descending on the basis of based on MQTT multiple gateway networkings, and the message sent by MQTT control ends is routed to home appliance;Progress route is up on the basis of based on MQTT multiple gateway networkings, and the feedback message of home appliance is routed to MQTT control ends.The present invention improves the hub-and-spoke network topology of MQTT agreements, support the gateway topology of multilayer cascade, support connection networking and the message route of multiple gateway, connection, communication and the problem of management of current smart home multiple gateway are solved, and supports in family to be divided home appliance according to custom rule and carries out safe and efficient Intranet control in different zones and small range is managed.
Description
Technical field
The present invention relates to smart home communication technical field, more particularly to a kind of message route cascaded based on MQTT multilayers
Method.
Background technology
Intelligent domestic gateway household appliances equipment can be connected by wired mode, wireless mode with it after by one
Unified interface is communicated with external network, and core roles are served as in smart home.But smart home scheme is deposited at present
In many deficiencies, general household internal only disposes a gateway, and the hardware interface that single gateway can be provided is limited, radio area
Domain scope is limited.It is multiple although physical distance and the not enough defect of hardware resource can be made up using the structure of multiple gateway
Connection and management between gateway are a great problems, so less be used.
There are many host-host protocols, wherein MQTT in current Internet of Things(Message Queuing Telemetry
Transport, message queue remote measurement transmission)To be developed by IBM Corporation, operation with TCP/IP on, based on message push, can
Lean on, steadily and surely, the agreement increased income, all had a clear superiority in terms of versatility, scalability, compatibility, power consumption and flow.But
There are following two problems in the network service for being currently based on MQTT agreements:Opened up because MQTT communications are more using hub-and-spoke network
Flutter, in traditional MQTT remote controls, multiple intelligent domestic gateways in family can be each via internet and intelligent family
The MQTT Broker for occupying service platform are attached communication, so for one family, and multiple gateways externally there is
The interface of multiple communications, platform is inconvenient to the multiple gateway managements of the same family, also to multiple gateway managements of multiple families
Inconvenience.Another problem is that, when household internal has multiple gateways, the gateways that user needs access different go to control not same district
Home appliance in domain.
Deficiency for current smart home scheme and the characteristics of MQTT protocol communications, the present invention proposes one kind and is based on
The message route method of MQTT multilayers cascade, improves the hub-and-spoke network topology of MQTT agreements, supports the gateway of multilayer cascade
Topology, using the smart home scheme of multiple gateway, realizes the multilayer cascade network between multiple gateway and carries out message route.
The content of the invention
It is an object of the invention to provide the message route method cascaded based on MQTT multilayers, the concentration of MQTT agreements is improved
Hub-and-spoke network topology, supports the gateway topology of multilayer cascade, supports connection networking and the message route of multiple gateway, solves current intelligence
Can household multiple gateway connection, communication and problem of management, and support in family according to custom rule by home appliance divide in
Different zones carry out safe and efficient Intranet control and small range management.
The purpose of the present invention is realized at least through one of following technical scheme.
A kind of message route method cascaded based on MQTT multilayers, including the multiple gateway networking based on MQTT, are route descending
It is up with routeing;
It is described that new gateway is added in legacy network based on MQTT multiple gateway networkings, new household electrical appliances are added in new gateway and are set
Standby, new gateway is connected to form the network topology structure of the multilayer cascade based on MQTT with other gateways;
The descending message sent by MQTT control ends that refers to of the route is routed to home appliance, and it is based on MQTT to route descending
Subordinate's routing rule of gateway is searched in the network of multilayer cascade, and forwards the messages to subordinate's gateway;
The up feedback message for referring to home appliance of route is routed to MQTT control ends, and the feedback including home appliance disappears
Breath is routed to all MQTT control ends and the feedback message of home appliance is routed to one of MQTT control ends.
Further, described method comprises the following steps:
Step 1: the multiple gateway networking based on MQTT.
Step 2: progress route is descending on the basis of based on MQTT multiple gateway networkings, by disappearing that MQTT control ends are sent
Breath is routed to home appliance.
Step 3: carrying out routeing up, the feedback message road of home appliance on the basis of based on MQTT multiple gateway networkings
By to MQTT control ends.
The multiple gateway networking based on MQTT comprises the steps in above-mentioned steps one:
(1), gateways and starting when first inquire about local data base with the presence or absence of the UID of itself(Unique Identifier, the overall situation is only
One mark).If being not present, UID is generated according to Snowflake algorithms, UID is used to identify gateway, the automatic topic of subscription of gateway
“/UID/#”(MQTT theme forms, oblique line(/)It is at all levels in a subject tree for separating, it provides a layer
The theme space of secondary structure.Numerical chracter(#)I.e. multi-level asterisk wildcard, for matching the arbitrary levels in a theme.“/
UID/# " is represented in " all themes under/UID/ " levels).
(2), then inquire about local data base, user configures the IP of the upper level routing node of the node by web page
Address.
(3)And then UID gateways are attached with upper level gateway UID0.Obtain higher level's gateway routing rule " .../
UID0/#”(Ellipsis " ... " refers to higher level's gateway and there may be the gateway higher than itself level, routing rule " .../
UID0/# " refer to can be routed to theme level for " ... all themes of/UID0/ " below), update higher level in local routing table
The routing rule of gateway for " .../UID0/# ", the current routing rule of itself for " .../UID0/UID/# ".
(4), upper level gateway receive UID gateways connection after, in the subordinate's gateway routing rule of itself add one
“.../UID/#”。
(5), UID gateways and starting equipment discovery procedure, by search and information matches home appliance SID(System
Identification, systematic identification code)With the UID of itself, the globally unique of home appliance is used as using UID/SID form
Identify (USID), while gateway records " SID " and routing rule in the list of devices of itself.
(6), UID gateways USID is reported into upper level gateway, higher level's gateway records " UID/ in the list of devices of itself
SID " and routing rule.
(7), previous action is performed per one-level gateway recurrence, untill USID is reported to smart home service platform.
It is preferred that, the step(5)In, gateway records " SID " in the list of devices of itself and routing rule is specifically grasped
Make as follows:
Because the home appliance that current gateway searches SID is connected directly on gateway, therefore routing rule fills in gateway oneself
UID, and suffix filled on which hardware interface that the equipment is connected to gateway device, such as serial ports UART1, then remembered in list of devices
Record " SID ", routing rule " UID/UART0 ".
It is preferred that, the step(6)In, USID is reported upper level gateway by UID gateways, and higher level's gateway is set itself
Record " UID/SID " and routing rule concrete operations are as follows in standby list:
UID gateways search routing table in higher level's gateway routing rule for " .../UID0/ ", routing rule is used as issuing subject
Prefix.Such as gateway makes an announcement message, theme be " .../UID0/DEVINFO_NOTIFY ", content is USID;It is designated
UID0 higher level's gateway give tacit consent to automatic topic of subscription for " .../UID0/# " message, just can receive theme prefix for " .../
UID0/ " all message related to itself.The higher level's gateway for being designated UID0 is received after USID in itself original equipment
Addition record " SID " in list, routing rule is subordinate's gateway " UID ".
Progress route is descending on the basis of based on MQTT multiple gateway networkings in above-mentioned steps two, is sent by MQTT control ends
Message be routed to home appliance including following small steps:
(1), by step one constitute multilayer cascade network close structure in, any one gateway is received from MQTT control ends
During message, the controlled device in message is first extracted.
(2), then inquire about local device list.
(3)If, controlled device be not present in local device list, report upper level gateway, be finally reported to service
Platform, service platform abandons this message.
(4)If, controlled device be present in local device list, query routing rule, directly transmit the message to route
Subordinate's gateway in rule, if next stage is itself, home appliance is transmitted the message to by corresponding transparent transmission module.
It is preferred that, the step(1)(2)In, UID0 gateways receive MQTT control message themes be " .../UID0/
CONTROL/SID ", first extracts controlled device SID, then inquires about local device list and there is SID, routing rule is subordinate's net
Close " UID ", UID0 is UID in modification theme, forwards the message to subordinate's gateway.
Progress route is up on the basis of based on MQTT multiple gateway networkings in above-mentioned steps three, and the feedback of home appliance disappears
Breath, which is routed to MQTT control ends, includes two kinds of situations, and a kind of is that the feedback message of home appliance is routed to all MQTT control ends,
A kind of is that the feedback message of home appliance is routed to specific a certain MQTT control ends.
The feedback message of home appliance, which is routed to all MQTT control ends, includes following small steps:
(1), by step one constitute multilayer cascade network close structure in, any one gateway receives disappearing from home appliance
During breath, the local mobile control end list of inquiry obtains all MQTT control ends for being connected directly to the gateway.
(2), then forward messages to each direct-connected MQTT control end.
(3), information reporting is given to upper level gateway, and be sent to its next stage gateway.Higher level's gateway is received
Row message will also be sent to other subordinate's gateways in addition to the gateway for reporting the message except being sent to oneself higher level;Under
Level gateway is only handed down to subordinate when receiving upstream message, and each gateway can forward messages to all direct-connected MQTT controls
End processed, it is ensured that the synchronizing information of all MQTT control ends in intelligent domestic system.It is noted that being come from when subordinate's gateway is received
During the upstream message of higher level's gateway, subordinate's gateway no longer needs upstream message reporting higher level's gateway, otherwise can form broadcast
Storm.
The feedback message of home appliance, which is routed to specific a certain MQTT control ends, includes following small steps:
(1), by step one constitute multilayer cascade network close structure in, any one gateway receives disappearing from home appliance
During breath, the local mobile control end list of inquiry judges whether to include purpose MQTT control ends, if being sent to the purpose in the presence of if
MQTT control ends simultaneously stop, and higher level's gateway is sent to if being not present.
(2), higher level's gateway receive message, repeat step(1), until stopping or being sent to service platform.
Compared with prior art, the beneficial effects of the present invention are:
1)The hub-and-spoke network topology of MQTT agreements is improved, the gateway topology of multilayer cascade is supported.Smart home after improvement
The MQTT Broker of service platform need not be managed from multiple gateways with a family simultaneously, and each family can only have one
Individual one-level gateway is connected directly to service platform, and suitable one family only provides an external interface, and remaining gateway is connected to one-level net
Close following;And when household internal has multiple gateways, user can go to control the family in different zones by different gateways
Electric equipment, without assert that specific a certain gateway could control the equipment.
2)Connection networking and the message route of multiple gateway are supported, a kind of side that multiple gateway networking is carried out by MQTT is realized
Method.This method, which can be supported to be divided home appliance according to custom rule in family, carries out safe and efficient Intranet in different zones
Control and small range management, and expand wireless-communication-capable area scope.Such as support household internal according to physical distance or hard
Part communication interface is divided into different districts domain, and such as room one is divided into region one, and room two is region two, facilitates user to difference
Region carries out different controls and management.
Brief description of the drawings
Fig. 1 closes topological diagram for the multilayer cascade network based on MQTT realized in embodiment.
Fig. 2 is multiple gateway networking schematic flow sheet in embodiment.
Fig. 3 is route downflow figure in specific implementation process.
Fig. 4 is up to all MQTT control ends flow charts for route in specific implementation process.
Embodiment
Embodiment of the present invention is described further with specific embodiment below in conjunction with the accompanying drawings.
The message route method cascaded based on MQTT multilayers of this example, is mainly made up of, step is as follows four steps:
Step 1:Multiple gateway networking based on MQTT:New gateway is added, home appliance is connected to new gateway.Specific networking flow is such as
Shown in Fig. 2, the gateway topological diagram of Fig. 1 multilayer cascade is ultimately formed.
A) local data base is first inquired about during gateways and starting with the presence or absence of the UID of itself.If being not present, basis
Snowflake algorithms generate UID, and UID is used to identify gateway, automatic the topic of subscription "/UID/# " of gateway.
For example start new gateway, new gateway inquiry generates UID less than UID according to Snowflake algorithms, and gateway is ordered automatically
Read theme "/UID/# ".
B) user configures the IP address of the upper level routing node of the node by web page.
C) UID gateways are attached with upper level gateway.If higher level's gateway identification is UID0, and is connected directly to intelligent family
Service platform is occupied, "/UID0/# " updates the route rule of higher level's gateway in local routing table by the routing rule of acquisition higher level's gateway
Then for "/UID0/# ", the current routing rule of itself is "/UID0/UID/# ".
D) upper level gateway receive UID gateways connection after, in the subordinate's gateway routing rule of itself add one "/
UID/#”。
E) UID gateways and startings equipment discovery procedure, by search and information matches home appliance SID and itself
UID, using UID/SID form as the globally unique identifier of home appliance, while gateway is recorded in the list of devices of itself
" SID " and routing rule.
F) USID is reported higher level gateway UID0 by UID gateways, and higher level's gateway is recorded in the list of devices of itself
" UID/SID " and routing rule "/UID ".
G) previous action is performed per one-level gateway recurrence, untill USID is reported to smart home service platform.
Here USID is then reported to smart home service platform by higher level's gateway UID0 due to direct-connected service platform.
Step 2:User control device, data route is descending, and idiographic flow is as shown in Figure 3.
A) user connects any gateway using MQTT control ends, such as connects and be designated UID0 gateways.
B) user sends control message and controls a certain equipment, such as it is that "/CONTROL/SID " controls are designated to send theme
SID equipment.
C) it is SID that UID0 gateways extract controlled device in outbound message using last "/" suffix
D) UID0 gateways search local device list, there is SID, and routing rule is "/UID "
E) control message that the issue of UID0 gateways is received, theme is "/UID/CONTROL/SID "
F) due to have subscribed theme, "/UID/# ", it is "/UID/CONTROL/SID " then to receive theme to next stage gateway UID
Control message, it is same to extract outbound message controlled device SID, search local device list and there is " UID/SID ", by suffix match
Understand there is SID, routing rule is "/UID/UART0 " then forwards the message to local serial ports UART0
G) SID household electrical appliances receive the control message from serial ports UART0.
Step 3:Facility information feeds back to all users, and data route is up, and idiographic flow is as shown in Figure 4.
A) when any one gateway receives the message from home appliance, the local mobile control end list of inquiry is obtained
Cut-off is connected to all MQTT control ends of the gateway, then forwards messages to each direct-connected MQTT control end.
Such as SID equipment states change, and generate equipment state information, and UID gateways are sent to by UART0, and UID gateways are first
The local mobile control list of inquiry obtains MQTT control end lists, and status message is sent one by one to being connected directly to all MQTT of itself
Control end.
B) higher level's gateway receives upstream message except being sent to oneself higher level, to be also sent to except reporting the message
Other subordinate's gateways outside gateway;Subordinate's gateway is only handed down to subordinate when receiving upstream message, and each gateway can be by
Message is transmitted to all direct-connected MQTT control ends, it is ensured that the synchronizing information of all MQTT control ends in intelligent domestic system.
Status message is sent to higher level gateway UID0 by such as UID gateways, higher level's gateway UID0 receive after by inquiry
Level routing rule, is transmitted to smart home service platform due to no higher level, is otherwise sent to higher level's gateway;Then gateway
UID0 inquiries other subordinate's gateways in addition to the gateway UID reported, due to not stopping then, are otherwise sent to subordinate's gateway.
The local mobile control end list of UID0 gateways inquiry simultaneously, forwards messages to each direct-connected MQTT control
End.
Step 4:Facility information feeds back to some specific user, and route data is up
A) when any one gateway receives the message from home appliance, local mobile control end list is inquired about, judgement is
It is no to include purpose MQTT control ends, if being sent to purpose MQTT control ends in the presence of and if stopping, it being sent to if in the absence of if
Level gateway.
Such as SID equipment states change, and generate equipment state information, and merely desire to notice and be designated UUID(
Universally Unique Identifier, general unique identifier)MQTT control ends, then included in status message
UUID, and UID gateways are sent to by serial ports UART0.UID gateways are received after message, extract purpose MQTT control ends
UUID, and local mobile control end list is inquired about with the presence or absence of UUID, if sending and stopping in the presence of if, inquired about if in the absence of if
Higher level's gateway routing rule, and it is sent to higher level's gateway UID0.
B) higher level's gateway receives message, repeats previous step flat until being sent to purpose MQTT control ends or service
Platform.
Higher level's gateway UID0 receives message and first parses purpose MQTT control ends, then inquires about local mobile control list judgement
It whether there is, and if being sent to the MQTT control ends in the presence of and if stopping, if being not present, notify its upper level gateway, by
There is no higher level's gateway in UID0, so being sent to service platform and stopping.
Above-mentioned steps are not limited thereto for the present invention preferably embodiment, but protection scope of the present invention, appoint
What those familiar with the art the invention discloses technical scope in, the change or replacement that can be readily occurred in, all
It should be included within the scope of the present invention.Therefore, protection scope of the present invention should using scope of the claims as
It is accurate.
Claims (8)
1. a kind of message route method cascaded based on MQTT multilayers, including the multiple gateway networking based on MQTT, route it is descending and
Route is up;It is characterized in that:
It is described that new gateway is added in legacy network based on MQTT multiple gateway networkings, new household electrical appliances are added in new gateway and are set
Standby, new gateway is connected to form the network topology structure of the multilayer cascade based on MQTT with other gateways;
The descending message sent by MQTT control ends that refers to of the route is routed to home appliance, and it is based on MQTT to route descending
Subordinate's routing rule of gateway is searched in the network of multilayer cascade, and forwards the messages to subordinate's gateway;
The up feedback message for referring to home appliance of route is routed to MQTT control ends, and the feedback including home appliance disappears
Breath is routed to all MQTT control ends and the feedback message of home appliance is routed to one of MQTT control ends.
2. the message route method according to claim 1 cascaded based on MQTT multilayers, it is characterised in that described to be based on
The step of MQTT multiple gateway networking, includes:
(1), gateways and starting when first inquire about local data base with the presence or absence of the UID of itself;
If being not present, UID is generated according to Snowflake algorithms, UID is used to identify gateway, the automatic topic of subscription of gateway "/
UID/#”;
(2), then inquire about local data base, user configures the IP address of the upper level routing node of the node by web page;
(3)And then UID gateways are attached with upper level gateway UID0;
Obtain higher level's gateway routing rule " .../UID0/# ", updating the routing rule of higher level's gateway in local routing table is
" .../UID0/# ", the current routing rule of itself for " .../UID0/UID/# ";
(4), upper level gateway receive UID gateways connection after, in the subordinate's gateway routing rule of itself add one " .../
UID/#”;
(5), UID gateways and starting equipment discovery procedure, by search and information matches home appliance SID and the UID of itself,
Globally unique identifier (USID) using UID/SID form as home appliance, while gateway is remembered in the list of devices of itself
Record " SID " and routing rule;
(6), UID gateways USID is reported into upper level gateway, higher level's gateway records " UID/SID " in the list of devices of itself
And routing rule;
(7), previous action is performed per one-level gateway recurrence, untill USID is reported to smart home service platform.
3. the message route method according to claim 2 cascaded based on MQTT multilayers, it is characterised in that the step(5)
In, gateway records " SID " in the list of devices of itself and routing rule concrete operations are as follows:
Because the home appliance that current gateway searches SID is connected directly on gateway, therefore routing rule fills in gateway oneself
UID, and suffix adds which hardware interface that the equipment is connected to gateway device, then records " SID " in list of devices, route rule
Then " UID/UART0 ".
4. the message route method according to claim 2 cascaded based on MQTT multilayers, it is characterised in that step(6)In,
USID is reported upper level gateway by UID gateways, and higher level's gateway records " UID/SID " and route rule in the list of devices of itself
Then concrete operations are as follows:
UID gateways search routing table in higher level's gateway routing rule for " .../UID0/ ", routing rule is used as issuing subject
Prefix;
Such as gateway makes an announcement message, theme be " .../UID0/DEVINFO_NOTIFY ", content is USID;It is designated
UID0 higher level's gateway give tacit consent to automatic topic of subscription for " .../UID0/# " message, just can receive theme prefix for " .../
UID0/ " all message related to itself;
It is designated UID0 higher level's gateway and receives after USID the addition record " SID " in itself original list of devices, route
Rule is subordinate's gateway " UID ".
5. the message route method according to claim 2 cascaded based on MQTT multilayers, it is characterised in that described to be based on
The MQTT descending step of route includes:
(1), in the multilayer cascade network that is constituted closes structure, any one gateway receives the message from MQTT control ends
When, first extract the controlled device in message;
(2), then inquire about local device list;
(3)If, controlled device be not present in local device list, report upper level gateway, be finally reported to service platform,
Service platform abandons this message;
(4)If, controlled device be present in local device list, query routing rule, directly transmit the message to routing rule
In subordinate's gateway, if next stage is itself, home appliance is transmitted the message to by corresponding transparent transmission module.
6. the message route method according to claim 5 cascaded based on MQTT multilayers, it is characterised in that UID0 gateways are received
Be to MQTT control message themes " .../UID0/COTROL/SID ", controlled device SID is first extracted, then inquiry locally being set
There is SID in standby list, routing rule is subordinate's gateway " UID ", and it is UID to change UID0 in theme, forwards the message to subordinate's net
Close.
7. the message route method according to claim 2 cascaded based on MQTT multilayers, it is characterised in that described to be based on
MQTT route is up, and the feedback message of home appliance is routed to all MQTT control ends, and specific steps include:
(1)In the multilayer cascade network constituted closes structure, when any one gateway receives the message from home appliance, look into
Local mobile control end list is ask, all MQTT control ends for being connected directly to the gateway are obtained;
(2), then forward messages to each direct-connected MQTT control end;
(3), information reporting is given to upper level gateway, and be sent to its next stage gateway;Higher level's gateway receives up disappear
Breath will also be sent to other subordinate's gateways in addition to the gateway for reporting the message except being sent to oneself higher level;Subordinate's net
Subordinate is only handed down in pass when receiving upstream message, and each gateway can forward messages to all direct-connected MQTT controls
End, it is ensured that the synchronizing information of all MQTT control ends in intelligent domestic system.
8. the message route method according to claim 2 cascaded based on MQTT multilayers, it is characterised in that described to be based on
MQTT route is up, and the feedback message of home appliance is routed to a certain specific MQTT control ends, and specific steps include:
(1)In the multilayer cascade network pass structure of the composition, when any one gateway receives the message from home appliance,
The local mobile control end list of inquiry, judges whether to include purpose MQTT control ends, if being sent to purpose MQTT in the presence of if
Control end simultaneously stops, and higher level's gateway is sent to if being not present;
(2)Higher level's gateway receives message, repeat step(1), until stopping or being sent to service platform.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710495388.0A CN107231262B (en) | 2017-06-26 | 2017-06-26 | Message routing method based on MQTT multi-layer cascade |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710495388.0A CN107231262B (en) | 2017-06-26 | 2017-06-26 | Message routing method based on MQTT multi-layer cascade |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107231262A true CN107231262A (en) | 2017-10-03 |
CN107231262B CN107231262B (en) | 2021-05-14 |
Family
ID=59935603
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710495388.0A Active CN107231262B (en) | 2017-06-26 | 2017-06-26 | Message routing method based on MQTT multi-layer cascade |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107231262B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106713084A (en) * | 2016-12-01 | 2017-05-24 | 上海雍敏信息科技有限公司 | multi-gateway system of Internet of Things |
CN110099078A (en) * | 2018-01-29 | 2019-08-06 | 阿里巴巴集团控股有限公司 | Communication between devices, message synchronization method, apparatus, equipment and storage medium |
CN110365790A (en) * | 2019-07-23 | 2019-10-22 | 深圳市东微智能科技股份有限公司 | Method for message transmission, device, cascade network equipment and readable storage medium storing program for executing |
CN110635979A (en) * | 2019-10-21 | 2019-12-31 | 杭州鸿雁智能科技有限公司 | Method for interconnecting communication devices in local area network |
CN112532671A (en) * | 2019-09-19 | 2021-03-19 | 阿里巴巴集团控股有限公司 | Acquisition method, configuration method, edge computing cluster and device |
CN112751937A (en) * | 2020-12-30 | 2021-05-04 | 广东好太太智能家居有限公司 | Distributed edge intelligent Bluetooth Mesh gateway system and implementation method |
CN113179225A (en) * | 2021-04-26 | 2021-07-27 | 深圳市奇虎智能科技有限公司 | Application identification and processing method and system of sub-route, storage medium and computer equipment |
CN113271240A (en) * | 2020-02-17 | 2021-08-17 | 深圳市艾特智能科技有限公司 | Data transmission method, intelligent household system and readable storage medium |
CN114500174A (en) * | 2022-02-21 | 2022-05-13 | 杭州萤石软件有限公司 | Interconnection system and data transmission method |
CN115580534A (en) * | 2022-11-24 | 2023-01-06 | 锱云(上海)物联网科技有限公司 | Data acquisition and transmission method, system, equipment and gateway |
CN115766424A (en) * | 2022-09-30 | 2023-03-07 | 广东省工业边缘智能创新中心有限公司 | Industrial Internet data issuing and reporting method and intelligent gateway |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102064959A (en) * | 2010-11-16 | 2011-05-18 | 西安电子科技大学 | Three-network convergence oriented digital home network architecture |
CN102098651A (en) * | 2011-01-21 | 2011-06-15 | 北京邮电大学 | Method for performing strategy identification and control by using user service identification (USID) |
CN102624621A (en) * | 2012-03-11 | 2012-08-01 | 上海宜云物联科技有限公司 | Heterogeneous network adaptive data communication method and sensor network multi-protocol gateway |
US20140359035A1 (en) * | 2013-05-28 | 2014-12-04 | Convida Wireless, Llc | Data aggregation |
BG2065U1 (en) * | 2014-05-16 | 2015-05-29 | "Технически Иновации" Еоод | Adaptive multilinear system for assisting of elderly and people with disabilities |
CN104811375A (en) * | 2015-05-08 | 2015-07-29 | 三星电子(中国)研发中心 | Smart home gateway and networking method thereof |
CN105915577A (en) * | 2015-12-18 | 2016-08-31 | 美的集团股份有限公司 | Internet of things control system, terminal, gateway, remote control terminal and method |
-
2017
- 2017-06-26 CN CN201710495388.0A patent/CN107231262B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102064959A (en) * | 2010-11-16 | 2011-05-18 | 西安电子科技大学 | Three-network convergence oriented digital home network architecture |
CN102098651A (en) * | 2011-01-21 | 2011-06-15 | 北京邮电大学 | Method for performing strategy identification and control by using user service identification (USID) |
CN102624621A (en) * | 2012-03-11 | 2012-08-01 | 上海宜云物联科技有限公司 | Heterogeneous network adaptive data communication method and sensor network multi-protocol gateway |
US20140359035A1 (en) * | 2013-05-28 | 2014-12-04 | Convida Wireless, Llc | Data aggregation |
BG2065U1 (en) * | 2014-05-16 | 2015-05-29 | "Технически Иновации" Еоод | Adaptive multilinear system for assisting of elderly and people with disabilities |
CN104811375A (en) * | 2015-05-08 | 2015-07-29 | 三星电子(中国)研发中心 | Smart home gateway and networking method thereof |
CN105915577A (en) * | 2015-12-18 | 2016-08-31 | 美的集团股份有限公司 | Internet of things control system, terminal, gateway, remote control terminal and method |
Non-Patent Citations (3)
Title |
---|
FAGUI LIU ET AL.,: "Design of Cordova-based Message Push Module for Cross-platform Smart Home Application", 《2015 FIFTH INTERNATIONAL CONFERENCE ON INSTRUMENTATION AND MEASUREMENT, COMPUTER, COMMUNICATION AND CONTROL IMCCC》 * |
郑峰: "基于MQTT的云推送平台的研究及应用", 《中国优秀硕士学位论文全文数据库》 * |
顾亚文: "基于MQTT协议的通用智能家居系统设计与实现", 《中国优秀硕士学位论文全文数据库》 * |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106713084B (en) * | 2016-12-01 | 2020-06-09 | 杭州鸿信智能工程有限公司 | Multi-gateway system of Internet of things |
CN106713084A (en) * | 2016-12-01 | 2017-05-24 | 上海雍敏信息科技有限公司 | multi-gateway system of Internet of Things |
CN110099078A (en) * | 2018-01-29 | 2019-08-06 | 阿里巴巴集团控股有限公司 | Communication between devices, message synchronization method, apparatus, equipment and storage medium |
CN110099078B (en) * | 2018-01-29 | 2022-02-25 | 阿里巴巴集团控股有限公司 | Method, device, equipment and storage medium for communication between equipment and message synchronization |
CN110365790A (en) * | 2019-07-23 | 2019-10-22 | 深圳市东微智能科技股份有限公司 | Method for message transmission, device, cascade network equipment and readable storage medium storing program for executing |
CN110365790B (en) * | 2019-07-23 | 2022-04-22 | 深圳市东微智能科技股份有限公司 | Message transmission method and device, cascade networking equipment and readable storage medium |
CN112532671A (en) * | 2019-09-19 | 2021-03-19 | 阿里巴巴集团控股有限公司 | Acquisition method, configuration method, edge computing cluster and device |
CN110635979B (en) * | 2019-10-21 | 2022-02-01 | 杭州鸿雁智能科技有限公司 | Method for interconnecting communication devices in local area network |
CN110635979A (en) * | 2019-10-21 | 2019-12-31 | 杭州鸿雁智能科技有限公司 | Method for interconnecting communication devices in local area network |
CN113271240A (en) * | 2020-02-17 | 2021-08-17 | 深圳市艾特智能科技有限公司 | Data transmission method, intelligent household system and readable storage medium |
CN112751937A (en) * | 2020-12-30 | 2021-05-04 | 广东好太太智能家居有限公司 | Distributed edge intelligent Bluetooth Mesh gateway system and implementation method |
CN113179225A (en) * | 2021-04-26 | 2021-07-27 | 深圳市奇虎智能科技有限公司 | Application identification and processing method and system of sub-route, storage medium and computer equipment |
CN114500174A (en) * | 2022-02-21 | 2022-05-13 | 杭州萤石软件有限公司 | Interconnection system and data transmission method |
CN114500174B (en) * | 2022-02-21 | 2024-05-14 | 杭州萤石软件有限公司 | Interconnection and interworking system and data transmission method |
CN115766424A (en) * | 2022-09-30 | 2023-03-07 | 广东省工业边缘智能创新中心有限公司 | Industrial Internet data issuing and reporting method and intelligent gateway |
CN115580534A (en) * | 2022-11-24 | 2023-01-06 | 锱云(上海)物联网科技有限公司 | Data acquisition and transmission method, system, equipment and gateway |
CN115580534B (en) * | 2022-11-24 | 2023-02-21 | 锱云(上海)物联网科技有限公司 | Data acquisition and transmission method, system, equipment and gateway |
Also Published As
Publication number | Publication date |
---|---|
CN107231262B (en) | 2021-05-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107231262A (en) | A kind of message route method cascaded based on MQTT multilayers | |
US8060590B2 (en) | Distance-aware service discovery mechanism for determining the availability of remote services in wireless personal area networks | |
Villaverde et al. | Service discovery protocols for constrained machine-to-machine communications | |
EP2922321B1 (en) | 6lowpan network-based service discovery | |
CN103503487B (en) | Method and apparatus for accessing services affiliated with a discovered service provider | |
US7756065B2 (en) | Domain name service system and method thereof | |
CN104350725B (en) | The Seamless integration- and independent evolution method of information centre's network are carried out by software defined network | |
CN101512974B (en) | ZigBee/IP gateway | |
CN101577722B (en) | Method for realizing MAC forced forwarding function and device | |
EP1542409A1 (en) | Protocol for multi-hop ad-hoc networks | |
CN107852430A (en) | The wide-area services of Internet of Things are found | |
CN106797409A (en) | For the server of the device location registration in Internet of Things (IOT) | |
WO2014118622A1 (en) | Method of managing zigbee network in the internet of things | |
KR20140099663A (en) | Method and Apparatus of resource management of M2M network | |
US20130238779A1 (en) | Data structure for managing sensor network using id of sensor node and method using the same | |
KR100485621B1 (en) | Relay device | |
JP4682329B2 (en) | Name system and naming method in communication network | |
KR100429902B1 (en) | Apparatus and method for controlling devices in private network from public network | |
CN101562639A (en) | Information synchronization method, device and system | |
US8438292B2 (en) | Network system establishing communication by use of connectionless protocol | |
KR100639939B1 (en) | Method for Building Home Network | |
CN100499489C (en) | management method of network constituted by resource restricted apparatus | |
WO2011103723A1 (en) | Method for managing sensor nodes and apparatus thereof | |
WO2015145953A1 (en) | Communication terminal, communication method, and program-containing storage medium | |
JP2006171917A (en) | Protocol for radio multi-hop ad hoc network |
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 |