Movatterモバイル変換


[0]ホーム

URL:


CN104811375A - Smart home gateway and networking method thereof - Google Patents

Smart home gateway and networking method thereof
Download PDF

Info

Publication number
CN104811375A
CN104811375ACN201510234527.5ACN201510234527ACN104811375ACN 104811375 ACN104811375 ACN 104811375ACN 201510234527 ACN201510234527 ACN 201510234527ACN 104811375 ACN104811375 ACN 104811375A
Authority
CN
China
Prior art keywords
gateway
slave
master
jurisdiction
information
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
CN201510234527.5A
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.)
Samsung Electronics China R&D Center
Samsung Electronics Co Ltd
Original Assignee
Samsung Electronics China R&D Center
Samsung Electronics 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 Samsung Electronics China R&D Center, Samsung Electronics Co LtdfiledCriticalSamsung Electronics China R&D Center
Priority to CN201510234527.5ApriorityCriticalpatent/CN104811375A/en
Publication of CN104811375ApublicationCriticalpatent/CN104811375A/en
Pendinglegal-statusCriticalCurrent

Links

Landscapes

Abstract

Translated fromChinese

本申请公开了一种智能家居网关及其组网方法,包括:接收客户端的主网关设置指令,将自身模式设置为主网关;或者,接收客户端的从网关设置指令,将自身模式设置为从网关;当作为从网关的情况下,向主网关上报自身网关配置信息和自身检测到的所辖设备信息,接收来自主网关的对所辖设备的控制命令并转发给该所辖设备;当作为主网关的情况下,记录自身检测到的所辖设备信息,记录从网关上报的从网关配置信息及其所辖设备信息;向客户端展示所记录的设备信息,接收来自客户端的对设备的控制命令,如果是对本主网关所辖设备的控制命令则发送给该所辖设备,如果是对从网关所辖设备的控制命令则发送给从网关。本发明可以提高智能家居网络的组网规模,同时降低操作复杂度。

The application discloses a smart home gateway and a networking method thereof, including: receiving a master gateway setting instruction from a client, and setting its own mode as a master gateway; or receiving a client's slave gateway setting instruction, and setting its own mode as a slave gateway ; When acting as a slave gateway, report its own gateway configuration information and detected device information to the master gateway, receive control commands from the master gateway to the governed device and forward it to the governed device; act as the master In the case of a gateway, record the information of the devices under its jurisdiction detected by itself, record the configuration information of the slave gateway reported from the gateway and the information of the devices under its jurisdiction; display the recorded device information to the client, and receive control commands for the device from the client , if it is a control command to the device under the jurisdiction of the master gateway, it will be sent to the device under its jurisdiction, and if it is a control command to the device under the jurisdiction of the slave gateway, it will be sent to the slave gateway. The invention can increase the networking scale of the smart home network and reduce the operation complexity at the same time.

Description

Translated fromChinese
智能家居网关及其组网方法Smart home gateway and its networking method

技术领域technical field

本申请涉及智能家居领域,尤其涉及一种智能家居网关及其组网方法。The present application relates to the field of smart home, in particular to a smart home gateway and a networking method thereof.

背景技术Background technique

智能家居网关是智能家居的核心。在智能家居领域的发展过程中,以智能家居网关为中心的解决方案被广泛采用,智能家居网关是用户和终端设备之间的中介,网关内实现各种设备连接协议,网关对外统一提供IP通信方式,从而屏蔽了各种协议的差异,有利于部署和用户使用。The smart home gateway is the core of the smart home. In the development process of the smart home field, solutions centered on the smart home gateway are widely adopted. The smart home gateway is an intermediary between users and terminal devices. Various device connection protocols are implemented in the gateway, and the gateway provides IP communication externally. In this way, the differences of various protocols are shielded, which is beneficial to deployment and user use.

在智能家居领域,智能家居网关有着重要的作用。图1为现有技术中的一种典型的单网关智能家居结构件示意图。参见图1,现有的智能家居网关的主要功能包括:智能家居网关管理和连接着各种家用设备,例如:冰箱,电视,空调等;网关内可以实现多种通信协议,例如:IP协议、蓝牙、红外、z-wave,zigbee协议等;网关对外提供基于IP的通信方式,客户端通过IP协议连接到网关;以网关为中介,用户通过网关对终端设备进行控制和操作。具体实现操作处理方式是:网关接受用户指令,将用户指令按照与终端设备互通的协议转发给终端设备,进而控制终端设备。In the field of smart home, smart home gateway plays an important role. FIG. 1 is a schematic diagram of a typical single-gateway smart home structure in the prior art. Referring to Figure 1, the main functions of the existing smart home gateway include: the smart home gateway manages and connects various household devices, such as refrigerators, TVs, air conditioners, etc.; various communication protocols can be implemented in the gateway, such as: IP protocol, Bluetooth, infrared, z-wave, zigbee protocol, etc.; the gateway provides an IP-based communication method externally, and the client connects to the gateway through the IP protocol; with the gateway as an intermediary, the user controls and operates the terminal device through the gateway. The specific realization of the operation processing method is: the gateway accepts user instructions, forwards the user instructions to the terminal equipment according to the protocol for intercommunication with the terminal equipment, and then controls the terminal equipment.

智能家居网关有如下几个特点:The smart home gateway has the following characteristics:

A、网关对终端设备的操控方法可以屏蔽终端设备协议细节,延伸用户访问家庭的距离,用户可以使用各种移动设备连接家庭;A. The gateway’s control method for terminal equipment can shield the protocol details of terminal equipment, extend the distance for users to visit the home, and users can use various mobile devices to connect to the home;

B、除了可以在智能家居网关上实现主要功能外,还可以在网关提供各种增值服务,简化部署等。B. In addition to realizing the main functions on the smart home gateway, it can also provide various value-added services on the gateway and simplify deployment.

C、现有的智能家居网关的操控方法主要的关注点是给单个家庭提供智能服务。C. The main focus of the existing smart home gateway control method is to provide smart services to a single family.

虽然智能家居网关的方案被广泛采用,但是由于智能家居领域通信协议众多,设备差异大,参与的厂商多,目前的智能家居网关的具体实现标准与细节并不确定。Although the smart home gateway solution is widely used, due to the numerous communication protocols in the smart home field, the large differences in equipment, and the participation of many manufacturers, the specific implementation standards and details of the current smart home gateway are uncertain.

中国专利号CN101163073A,发明名称《智能家居系统的组网方法、数据传输方法及智能家居系统》的专利文献公开了一种智能家居系统的组网方法、数据传输方法及智能家居系统,该智能家居系统包括:交换服务器、网关、无线终端设备和/或有线终端设备,所述的有线终端设备与网关端口直接连接,组网方法包括:设置和所述网关端口连接的无线模块,无线模块与有线终端设备统一编址,所述无线模块与无线终端设备建立绑定;通过所述无线模块转发网关接收到的、由交换服务器下发至与该无线模块绑定的无线终端设备的数据包至所述无线终端设备;且转发与该无线模块绑定的无线终端设备发送至交换服务器的数据包至与其相连的网关。本发明使有线、无线终端设备具有平等的地位,简化了智能家居系统的组网结构,可以实现采用不同的通信协议的终端之间的信息传输。Chinese Patent No. CN101163073A, the patent document of the invention name "Networking method, data transmission method and smart home system of smart home system" discloses a networking method, data transmission method and smart home system of a smart home system. The system includes: an exchange server, a gateway, a wireless terminal device and/or a wired terminal device, the wired terminal device is directly connected to the gateway port, and the networking method includes: setting a wireless module connected to the gateway port, the wireless module and the wired terminal device The terminal equipment is uniformly addressed, and the wireless module establishes a binding with the wireless terminal equipment; the data packet received by the gateway and sent by the switching server to the wireless terminal equipment bound with the wireless module is forwarded to the wireless module through the wireless module. the wireless terminal device; and forward the data packet sent to the switch server by the wireless terminal device bound to the wireless module to the gateway connected thereto. The invention makes wired and wireless terminal equipment have equal status, simplifies the networking structure of the smart home system, and can realize information transmission between terminals using different communication protocols.

上述现有技术中,主要公开的是将终端设备加入单个网关的智能家居系统网络。总体来讲,现有技术存在以下缺点:In the above-mentioned prior art, what is mainly disclosed is to add terminal equipment to a smart home system network of a single gateway. Generally speaking, there is following shortcoming in prior art:

a)单个网关的智能家居方案是给单个家庭提供智能服务。网关只能连接特定范围内的设备:网关集成了红外,蓝牙,z-wave功能时,网关能连接的设备的距离有限制,组网规模较小。a) The smart home solution of a single gateway is to provide smart services to a single family. The gateway can only connect to devices within a specific range: when the gateway integrates infrared, bluetooth, and z-wave functions, the distance of the devices that the gateway can connect to is limited, and the network scale is small.

b)需要一个全功能的网关:如果网关A支持a类设备,但不支持b类型设备;B网关支持b类型设备,但不支持a类型设备。则终端用户此时需要连接两个网关,并且需要分别设置和管理,非常不方便多网关组网。b) A full-featured gateway is required: if gateway A supports type a devices but not type b devices; gateway B supports type b devices but not type a devices. At this time, end users need to connect to two gateways, and need to set up and manage them separately, which is very inconvenient for multi-gateway networking.

c)当拥有多个网关后,不好进行集中化管理:比如要重启某些网关,或对某些网关进行升级时,需要一个网关一个网关的进行操作,操作复杂,管理不方便。c) When there are multiple gateways, it is not easy to perform centralized management: for example, when restarting some gateways or upgrading some gateways, it is necessary to operate one gateway at a time, which is complicated to operate and inconvenient to manage.

发明内容Contents of the invention

有鉴于此,本发明的主要目的是提供一种智能家居网关组网方法和系统,以提高智能家居网络的组网规模,同时降低操作的复杂度。In view of this, the main purpose of the present invention is to provide a smart home gateway networking method and system to increase the networking scale of the smart home network while reducing the complexity of operations.

本发明的技术方案是这样实现的:Technical scheme of the present invention is realized like this:

一种智能家居网关的组网方法,该方法包括:A networking method of a smart home gateway, the method comprising:

接收客户端的自动发现请求,并返回响应给所述客户端;Receive an automatic discovery request from the client, and return a response to the client;

接收客户端的主网关设置指令,将自身模式设置为主网关;或者,接收客户端的从网关设置指令,将自身模式设置为从网关;Receive the master gateway setting instruction from the client, and set its own mode as the master gateway; or, receive the client’s slave gateway setting instruction, and set its own mode as the slave gateway;

当作为从网关的情况下,向主网关上报自身网关配置信息和自身检测到的所辖设备信息,接收来自主网关的对所辖设备的控制命令并转发给该所辖设备;When acting as a slave gateway, report its own gateway configuration information and detected device information to the master gateway, receive control commands from the master gateway to the governed device and forward it to the governed device;

当作为主网关的情况下,记录自身检测到的所辖设备信息,记录从网关上报的从网关配置信息及其所辖设备信息;向客户端展示所记录的设备信息,接收来自客户端的对设备的控制命令,如果是对本主网关所辖设备的控制命令则发送给该所辖设备,如果是对从网关所辖设备的控制命令则发送给从网关。When acting as the master gateway, record the information of the devices under its jurisdiction detected by itself, record the configuration information of the slave gateway and its devices under the jurisdiction reported by the gateway; display the recorded device information to the client, and receive the device information from the client If it is a control command for the device under the jurisdiction of the master gateway, it will be sent to the device under its jurisdiction, and if it is a control command for the device under the jurisdiction of the slave gateway, it will be sent to the slave gateway.

优选的,该方法进一步包括:Preferably, the method further comprises:

接收客户端的中继网关设置指令,将自身模式设置为中继网关,并确定其上一级网关和下一级网关;该中继网关为上一级网关的从网关;Receive the client's relay gateway setting instruction, set its own mode as a relay gateway, and determine its upper-level gateway and lower-level gateway; the relay gateway is the slave gateway of the upper-level gateway;

当作为中继网关的情况下,向上一级网关上报自身网关配置信息和自身检测到的所辖设备信息,将下一级网关上报的网关配置信息和所辖设备信息上报给上一级网关;接收来自上一级网关的对设备的控制命令,如果是对本中继网关所辖设备的控制命令则发送给该所辖设备,如果是对下一级网关所辖设备的控制命令则发送给下一级网关。When used as a relay gateway, report its own gateway configuration information and its detected device information to the upper-level gateway, and report the gateway configuration information and managed device information reported by the lower-level gateway to the upper-level gateway; Receive the control command for the device from the upper level gateway, if it is a control command for the device under the jurisdiction of the relay gateway, it will be sent to the device under the jurisdiction, if it is a control command for the device under the jurisdiction of the lower level gateway, it will be sent to the next Level 1 gateway.

优选的,所述主网关、中继网关、和从网关,依照上下级关系,形成树状结构,其中所述树状结构的最大级数为3。Preferably, the master gateway, the relay gateway, and the slave gateway form a tree structure according to the upper-lower relationship, wherein the maximum number of levels in the tree structure is three.

优选的,所述从网关向主网关同步的自身信息包括自身网关功能信息和配置信息;当作为主网关的情况下,向客户端展示所记录的设备信息时,进一步展示所述设备的功能信息,如果所述设备属于从网关,则所述设备的功能信息从从网关获取;接受客户端根据该功能信息的引导所发出的针对设备的控制命令。Preferably, the self-information synchronized from the gateway to the master gateway includes its own gateway function information and configuration information; in the case of the master gateway, when the recorded device information is displayed to the client, the function information of the device is further displayed , if the device belongs to the slave gateway, then obtain the function information of the device from the slave gateway; accept the control command for the device issued by the client according to the guidance of the function information.

优选的,该方法进一步包括:Preferably, the method further comprises:

在作为从网关的情况下,周期性地向主网关发送可靠性报文;In the case of being a slave gateway, periodically send reliability messages to the master gateway;

在作为主网关的情况下,接收从网关周期发送的可靠性报文,通过解析该可靠性报文判断该从网关是否异常。In the case of being the master gateway, it receives the reliability message periodically sent by the slave gateway, and judges whether the slave gateway is abnormal by analyzing the reliability message.

优选的,当作为主网关的情况下,所述向客户端展示所记录的设备信息时,进一步包括:对于至少两个网关所辖的设备标识相同的设备,只向客户端展示一个该设备的信息。Preferably, in the case of the main gateway, when displaying the recorded device information to the client, it further includes: for at least two devices with the same device identifier under the jurisdiction of the gateway, only displaying the information of one device to the client information.

优选的,当作为主网关的情况下,该方法进一步包括:保存从网关和其所辖设备之间的映射关系,当检测到某个从网关失效时,根据所述映射关系,查找该从网关的所辖设备,再查找所述所辖设备的所属的有效从网关,将所述有效从网关设置为对应所辖设备的有效管理从网关。Preferably, in the case of the master gateway, the method further includes: saving the mapping relationship between the slave gateway and the devices under its jurisdiction, and when a slave gateway is detected to be invalid, according to the mapping relationship, searching for the slave gateway Then search for the effective slave gateway to which the governed device belongs, and set the effective slave gateway as the effective management slave gateway corresponding to the governed device.

优选的,该方法进一步包括:Preferably, the method further comprises:

在作为从网关的情况下,接收来自主网关的对本从网关的控制命令,根据该控制命令执行对应的操作;从网关向主网关上报自身网关配置信息、自身检测到的所辖设备信息、所辖设备更新信息。In the case of a slave gateway, it receives a control command from the master gateway to the slave gateway, and performs corresponding operations according to the control command; the slave gateway reports its own gateway configuration information, detected device information, and Administer device update information.

优选的,所述网关之间通过IP协议进行通信,通信时将网关唯一标示符映射为目标地址。Preferably, the gateways communicate with each other through the IP protocol, and the unique identifier of the gateway is mapped to the target address during the communication.

优选的,在将自身模式设置为从网关的情况下,保存主网关的令牌,并将本从网关的令牌通过客户端反馈给主网关;Preferably, in the case of setting its own mode as a slave gateway, save the token of the master gateway, and feed back the token of the slave gateway to the master gateway through the client;

主网关与从网关之间交互信息时,携带自身的令牌;When exchanging information between the master gateway and the slave gateway, carry its own token;

从网关接收主网关的控制命令时,验证该主网关令牌是否所存储的主网关令牌一致,在令牌一致的情况下,从网关才接受该控制命令;主网关在接收从网关的更新消息时,也验证该从网关的令牌是否与所存储的该从网关的令牌一致,在令牌一致的情况下才接受该更新消息。When the slave gateway receives the control command from the master gateway, verify whether the master gateway token stored in the master gateway token is consistent with the master gateway token. If the token is consistent, the slave gateway accepts the control command; the master gateway receives the update from the slave gateway When receiving the message, it also verifies whether the token of the slave gateway is consistent with the stored token of the slave gateway, and only accepts the update message when the token is consistent.

优选的,该方法进一步包括:Preferably, the method further comprises:

当作为主网关的情况下,发送自动发现请求,在收到从网关的响应后判定该从网关在线;When acting as the master gateway, send an automatic discovery request, and determine that the slave gateway is online after receiving the response from the slave gateway;

当作为从网关的情况下,接收主网关发送的自动发现请求,并返回响应给所述主网关。When acting as a slave gateway, it receives the automatic discovery request sent by the master gateway, and returns a response to the master gateway.

一种智能家居网关,包括:A smart home gateway, comprising:

自动发现协议模块,用于接收客户端的自动发现请求,并返回响应给所述客户端;An auto-discovery protocol module, configured to receive an auto-discovery request from a client, and return a response to the client;

网关设置模块,用于接收客户端的主网关设置指令,将自身模式设置为主网关;或者,接收客户端的从网关设置指令,将自身模式设置为从网关;The gateway setting module is used to receive the master gateway setting instruction of the client, and set its own mode as the master gateway; or receive the client's slave gateway setting instruction, and set its own mode as the slave gateway;

从网关模块,用于当作为从网关的情况下,向主网关上报自身网关配置信息和自身检测到的所辖设备信息,接收来自主网关的对所辖设备的控制命令并转发给该所辖设备;The slave gateway module is used to report its own gateway configuration information and detected device information to the master gateway when acting as a slave gateway, receive control commands from the master gateway to the governed devices and forward them to the master gateway equipment;

主网关模块,用于当作为主网关的情况下,记录自身检测到的所辖设备信息,记录从网关上报的从网关配置信息及其所辖设备信息;向客户端展示所记录的设备信息,接收来自客户端的对设备的控制命令,如果是对本主网关所辖设备的控制命令则发送给该所辖设备,如果是对从网关所辖设备的控制命令则发送给从网关。The master gateway module is used as the master gateway to record the information of the devices under its jurisdiction detected by itself, record the configuration information of the slave gateway reported by the gateway and the information of the devices under its jurisdiction; display the recorded device information to the client, Receive the control command to the device from the client, if it is a control command to the device under the jurisdiction of the master gateway, it will send it to the device under its jurisdiction, if it is a control command to the device under the jurisdiction of the slave gateway, it will send it to the slave gateway.

优选的,所述网关设置模块进一步用于:接收客户端的中继网关设置指令,将自身模式设置为中继网关,并确定其上一级网关和下一级网关;该中继网关为上一级网关的从网关;Preferably, the gateway setting module is further configured to: receive a relay gateway setting instruction from the client, set its own mode as a relay gateway, and determine its upper-level gateway and lower-level gateway; the relay gateway is the upper-level gateway The secondary gateway of the level gateway;

该网关进一步包括中继网关模块,用于当作为中继网关的情况下,向上一级网关上报自身网关配置信息和自身检测到的所辖设备信息,将下一级网关上报的网关配置信息和所辖设备信息上报给上一级网关;接收来自上一级网关的对设备的控制命令,如果是对本中继网关所辖设备的控制命令则发送给该所辖设备,如果是对下一级网关所辖设备的控制命令则发送给下一级网关。The gateway further includes a relay gateway module, which is used to report its own gateway configuration information and its detected device information to the upper-level gateway when it is used as a relay gateway, and report the gateway configuration information reported by the lower-level gateway and Report the information of the equipment under its jurisdiction to the upper-level gateway; receive the control command for the device from the upper-level gateway, if it is a control command for the equipment under the jurisdiction of the relay gateway, it will be sent to the equipment under its jurisdiction; if it is for the next level The control commands of the devices under the jurisdiction of the gateway are sent to the next-level gateway.

与现有技术相比,本发明公开了一种智能家居网关及其组网方法,可以针对多个网关进行组网,其中可以选取某一个网关作为主网关(Master网关),其余网关作为从网关(Slave网关),组网后,多个网关在逻辑上形成树形结构。主网关控制与管理从网关。终端用户不需要知道从网关,只需要连接主网关就可以实现对所有网关与设备的控制。因此本发明可以将各种网关结合起来,用一种简单的方式进行组网,提高了智能家居网络的组网规模,同时降低操作复杂度。Compared with the prior art, the present invention discloses a smart home gateway and its networking method, which can be used for multiple gateways, wherein a certain gateway can be selected as the master gateway (Master gateway), and the rest of the gateways can be used as slave gateways. (Slave gateway), after networking, multiple gateways logically form a tree structure. The master gateway controls and manages the slave gateways. End users do not need to know the slave gateway, they only need to connect to the master gateway to control all gateways and devices. Therefore, the present invention can combine various gateways to form a network in a simple manner, which improves the network scale of the smart home network and reduces the operation complexity.

附图说明Description of drawings

图1为现有技术中的一种典型的单网关智能家居结构件示意图;FIG. 1 is a schematic diagram of a typical single-gateway smart home structure in the prior art;

图2为本发明所述的智能家居网关的组网示意图;Fig. 2 is a schematic diagram of networking of the smart home gateway according to the present invention;

图3是本发明所述网关模式设置的一种流程示意图;Fig. 3 is a schematic flow chart of gateway mode setting in the present invention;

图4为当多个网关发现同一设备时,主网关根据发现设备时间,选择设备的网关拥有者的举例说明示意图;FIG. 4 is a schematic illustration of the main gateway selecting the gateway owner of the device according to the device discovery time when multiple gateways discover the same device;

图5为本发明所述一种智能家居网关的组成示意图。FIG. 5 is a schematic diagram of the composition of a smart home gateway according to the present invention.

具体实施方式Detailed ways

下面结合附图及具体实施例对本发明再作进一步详细的说明。The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

图2为本发明所述的智能家居网关的组网示意图。本文中,将所述智能家居网关简称为网关。参见图2,本发明可以针对多个网关进行组网,其中可以选取某一个网关作为主网关(Master网关),其余网关作为从网关(Slave网关),组网后,可以将网关连接起来,让多个网关在逻辑上形成树状结构。从而可以解决单个网关在功能、距离上的限制。主网关控制与管理从网关。终端用户不需要知道从网关,只需要通过客户端连接主网关就可以实现对所有网关与设备的控制。Fig. 2 is a schematic diagram of networking of the smart home gateway according to the present invention. Herein, the smart home gateway is referred to as a gateway for short. Referring to Fig. 2, the present invention can carry out networking for a plurality of gateways, and wherein can select certain gateway as master gateway (Master gateway), all the other gateways are as slave gateway (Slave gateway), after networking, gateway can be connected, let Multiple gateways logically form a tree structure. Thus, the limitation of function and distance of a single gateway can be solved. The master gateway controls and manages the slave gateways. End users do not need to know the slave gateway, they only need to connect to the master gateway through the client to control all gateways and devices.

本发明中,所述主网关和从网关是逻辑概念,本发明所述的网关的模式可以根据用户要求进行设置。其中可以将网关设置为从网关也可以设置成主网关;主网关同时也可以是从网关,它可以被更高级别的网关控制。如果在一个网关结构中只有一个网关,则该网关缺省为主网关,这样就不会影响现有的单个网关的智能方案。如果存在多个网关时,选取某一个网关作为主网关,其余网关作为从网关,主网关控制与管理从网关,主网关和从网关都可以连接其所辖的各个设备,所述“所辖设备”就是指所拥有的设备,也就是该网关能够检测到并进行管理交互的设备。例如图2所示,主网关可以连接其所辖家庭影院、各种小家电、各节点监视器等,从网关1可以连接报警器,从网关2可以连接窗帘控制器、灯光智能开关、电饭煲智能开关等。In the present invention, the master gateway and the slave gateway are logical concepts, and the mode of the gateway in the present invention can be set according to user requirements. Among them, the gateway can be set as a slave gateway or a master gateway; the master gateway can also be a slave gateway, which can be controlled by a higher-level gateway. If there is only one gateway in a gateway structure, the gateway defaults to be the main gateway, so that the existing smart solution of a single gateway will not be affected. If there are multiple gateways, select a certain gateway as the master gateway, and the other gateways as the slave gateways. The master gateway controls and manages the slave gateways. Both the master gateway and the slave gateways can connect to the devices under their jurisdiction. "Refers to the owned device, that is, the device that the gateway can detect and perform management interactions. For example, as shown in Figure 2, the main gateway can be connected to the home theater, various small household appliances, and monitors of each node under its jurisdiction. switch etc.

本发明中,组网的各个网关的功能可以相同或不同,他们所支持的协议可以互补,最终在主网关上,用户可以使用所有网关提供功能的并集;用户只需要连接到主网关就可以控制所有设备,在控制设备时,各个从网关对用户透明,用户感受不到从网关的存在。In the present invention, the functions of each gateway in the networking can be the same or different, and the protocols they support can complement each other. Finally, on the main gateway, users can use the union of functions provided by all gateways; users only need to connect to the main gateway. Control all devices. When controlling devices, each slave gateway is transparent to users, and users cannot feel the existence of slave gateways.

下面详细介绍本发明所述智能家居网关的组网方法,该方法包括:The following describes in detail the networking method of the smart home gateway of the present invention, which method includes:

A、自动发现过程,该过程具体包括:网关接收客户端的自动发现请求,并返回响应给所述客户端。A. The automatic discovery process, which specifically includes: the gateway receives the automatic discovery request from the client, and returns a response to the client.

本发明所述的网关和客户端都需具有自动发现协议模块。客户端通过自动发现协议发现智能家居网关,比如简单服务发现协议(SSDP,Simple ServiceDiscovery Protocol)或可扩展通讯和表示协议(XMPP,Extensible Messagingand Presence Protocol)。具体是客户端通过自动发现协议发出自动发现请求,同样设置有自动发现协议模块的网关会接收到该自动发现请求,之后返回响应(其中包括该网关的标识等信息)给所述发出自动发现请求的客户端,该客户端收到响应后则判定发现了该网关,在客户端上展示该网关的标识等信息供用户选择。Both the gateway and the client in the present invention need to have an automatic discovery protocol module. The client discovers the smart home gateway through an automatic discovery protocol, such as the Simple Service Discovery Protocol (SSDP, Simple Service Discovery Protocol) or the Extensible Messaging and Presence Protocol (XMPP, Extensible Messaging and Presence Protocol). Specifically, the client sends an auto-discovery request through the auto-discovery protocol, and the gateway that is also provided with the auto-discovery protocol module will receive the auto-discovery request, and then return a response (including information such as the identification of the gateway) to the described auto-discovery request. After receiving the response, the client will determine that the gateway has been found, and display the gateway's logo and other information on the client for the user to choose.

B、网关模式设置过程,该过程具体包括:网关接收客户端的主网关设置指令,将自身模式设置为主网关;或者,接收客户端的从网关设置指令,将自身模式设置为从网关。B. The gateway mode setting process, which specifically includes: the gateway receives the master gateway setting instruction from the client, and sets its own mode as the master gateway; or receives the client's slave gateway setting instruction, and sets its own mode as the slave gateway.

在具体实现时,在发现网关后,用户可以先选择一个被发现的网关设置为主网关,之后再从剩余的网关中选择设置为从网关,将从网关加入到主网关;设置为主网关的网关也可以再作为独立的从网关加入到新的主网关中;在网关设置过程中,设置了令牌(Token)用于网关间后续通信的安全凭证。在设置完网关模式的同时,需要共享主网关和从网关之间的Token,用作后续网关间通信时,验证数据来源的有效性。In the specific implementation, after discovering the gateway, the user can first select a discovered gateway to set as the master gateway, and then choose to set it as the slave gateway from the remaining gateways, and add the slave gateway to the master gateway; The gateway can also be added to the new master gateway as an independent slave gateway; during the gateway setting process, a token (Token) is set for security credentials for subsequent communication between gateways. After setting the gateway mode, it is necessary to share the Token between the master gateway and the slave gateway to verify the validity of the data source when used for subsequent communication between gateways.

C、从网关模式处理过程,该过程主要包括:当作为从网关的情况下,向主网关上报(也可以是同步)自身网关配置信息和自身检测到的所辖设备信息,其中包括在自身更新或所辖设备更新时向主网关上报对应的更新信息;接收来自主网关的对所辖设备的控制命令并转发给该所辖设备。C. The processing process of the slave gateway mode, which mainly includes: when acting as a slave gateway, report (or synchronize) its own gateway configuration information and its own detected device information to the master gateway, including updating itself Or report the corresponding update information to the master gateway when the governed device is updated; receive the control command from the master gateway to the governed device and forward it to the governed device.

D、主网关模式处理过程,该过程主要包括:当作为主网关的情况下,记录自身检测到的所辖设备信息,记录从网关上报的从网关配置信息及其所辖设备信息,其中包括接收并记录自身所辖设备的更新信息、从网关的更新信息、从网关所辖设备的更新信息;向客户端展示所记录的设备信息,其中不展示从网关信息,用户只需要连接到主网关就可以控制所有设备,在控制设备时,各个从网关对用户透明,用户感受不到从网关的存在;接收来自客户端的对设备的控制命令,如果是对本主网关所辖设备的控制命令则发送给该所辖设备,如果是对从网关所辖设备的控制命令则发送给从网关。D. The processing process of the master gateway mode, which mainly includes: when acting as the master gateway, record the information of the devices under its jurisdiction detected by itself, record the configuration information of the slave gateway reported by the gateway and the information of the devices under its jurisdiction, including receiving And record the update information of the equipment under its own jurisdiction, the update information of the slave gateway, and the update information of the equipment under the jurisdiction of the gateway; display the recorded device information to the client, which does not display the information of the slave gateway, and the user only needs to connect to the master gateway. All devices can be controlled. When controlling devices, each slave gateway is transparent to the user, and the user cannot feel the existence of the slave gateway; receive the control command for the device from the client, and send it to the If the controlled device is a control command to the controlled device of the slave gateway, it will be sent to the slave gateway.

另外,本发明所述网关的自动发现协议模块,也具有主从网关之间的自动发现步骤。尤其是主网关可以自动发现从网关。因为当网关模式设置完成后,主网关和从网关都有可能重启,重启后,主网关需要知道从网关是否在线。主网关自动发现从网关的过程具体是主网关在启动后通过自动发现协议,向所保存的从网关发出自动发现请求,同样设置有自动发现协议模块的从网关会接收到该自动发现请求,之后返回响应(其中包括该网关的标识等信息)给所述发出自动发现请求的主网关,该主网关收到响应后则判定该从网关在线,如果主网关在规定的时间没有收到从网关的响应则判定该从网关离线。当从网关重启后,也会向外广播自身信息。主网关收到该信息后,判断出该从网关上线。In addition, the automatic discovery protocol module of the gateway of the present invention also has an automatic discovery step between master and slave gateways. Especially the master gateway can automatically discover the slave gateways. Because when the gateway mode setting is completed, both the master gateway and the slave gateway may be restarted. After restarting, the master gateway needs to know whether the slave gateway is online. The process of the master gateway automatically discovering the slave gateway is specifically that the master gateway sends an auto-discovery request to the saved slave gateway through the auto-discovery protocol after startup, and the slave gateway with the auto-discovery protocol module will receive the auto-discovery request, and then Return a response (including information such as the identification of the gateway) to the master gateway that sends out the automatic discovery request. After receiving the response, the master gateway determines that the slave gateway is online. The response determines that the slave gateway is offline. When the slave gateway is restarted, it will also broadcast its own information to the outside world. After receiving the information, the master gateway determines that the slave gateway is online.

在本发明中,可以将网关设置为从网关也可以设置成主网关;主网关同时也可以是从网关,它可以被更高级别的网关控制。因此在本发明进一步实施例中,该方法还可以进一步包括:网关接收客户端的中继网关设置指令,将自身模式设置为中继网关,并确定其上一级网关和下一级网关;该中继网关为上一级网关的从网关,下一级网关的父(parent)网关。如图2所示,从网关2就是中继网关,这种中继网关的存在,可以实现在某些大范围场景中,实现主网关和从网关的远距离组网和通信。In the present invention, the gateway can be set as a slave gateway or a master gateway; the master gateway can also be a slave gateway, which can be controlled by a higher-level gateway. Therefore, in a further embodiment of the present invention, the method may further include: the gateway receives the client's relay gateway setting instruction, sets its own mode as a relay gateway, and determines its upper-level gateway and lower-level gateway; The successor gateway is the slave gateway of the upper-level gateway, and the parent gateway of the lower-level gateway. As shown in FIG. 2 , the slave gateway 2 is a relay gateway. The existence of this relay gateway can realize long-distance networking and communication between the master gateway and the slave gateway in some large-scale scenarios.

当网关作为中继网关的情况下,需要向上一级网关上报自身网关配置信息和自身检测到的所辖设备信息,其中包括在自身更新或所辖设备更新时向上一级网关上报对应的更新信息;还需要将下一级网关上报的网关配置信息和所辖设备信息上报给上一级网关;在控制设备时,接收来自上一级网关的对设备的控制命令,如果是对本中继网关所辖设备的控制命令则发送给该所辖设备,如果是对下一级网关所辖设备的控制命令则发送给下一级网关。When the gateway acts as a relay gateway, it needs to report its own gateway configuration information and the information of the devices it detects to the upper-level gateway, including reporting the corresponding update information to the upper-level gateway when it updates itself or the devices under its jurisdiction. ; It is also necessary to report the gateway configuration information reported by the lower-level gateway and the information of the equipment under its jurisdiction to the upper-level gateway; when controlling the device, receive the control command for the device from the upper-level gateway. The control command of the governing device is sent to the governing device, and if the control command is for the device governed by the next-level gateway, it is sent to the next-level gateway.

根据图2所示,所述主网关、中继网关、和从网关,依照上下级关系,形成树状结构。所述中继网关的最大级数可以根据场景需要进行设置。但是在一种优选实施例中,其中所述树状结构的最大级数为3,这样可以避免级数过多时可能存在的延时问题。As shown in FIG. 2 , the master gateway, the relay gateway, and the slave gateway form a tree structure according to the upper-lower relationship. The maximum number of stages of the relay gateway can be set according to the needs of the scene. However, in a preferred embodiment, the maximum number of stages in the tree structure is 3, which can avoid possible delay problems when there are too many stages.

在本发明的一种优选实施例中,所述从网关向主网关同步的自身信息包括自身网关功能信息和配置信息;In a preferred embodiment of the present invention, the self-information synchronized from the slave gateway to the master gateway includes self-gateway function information and configuration information;

当作为主网关的情况下,向客户端展示所记录的设备信息时,进一步展示所述设备的功能信息,如果所述设备属于从网关,则所述设备的功能信息从从网关获取。接受客户端根据该功能信息的引导所发出的针对设备的控制命令。这样就可以将不同从网关的不同功能都集成到主网关上,使得用户看到的是本组网网络中所有网关的功能并集。In the case of the master gateway, when the recorded device information is displayed to the client, the function information of the device is further displayed, and if the device belongs to the slave gateway, the function information of the device is obtained from the slave gateway. Accept the control command for the device issued by the client according to the guidance of the function information. In this way, different functions of different slave gateways can be integrated into the main gateway, so that what the user sees is the union of the functions of all gateways in the network.

也就是说,各个网关的功能可以相同或不同,他们所支持的协议可以互补,最终在主网关上,用户可以使用所有网关提供功能的并集。That is to say, the functions of each gateway can be the same or different, and the protocols they support can complement each other. Finally, on the main gateway, users can use the union of the functions provided by all gateways.

例如参见图2,从网关1具备针对报警器1的a参数(例如音量参数)的设置功能,则主网关在向客户端展示时,会展示报警器1的标识,并在报警器1标识的对应位置展示“音量设置”的功能信息,用户会在该功能信息的引导下输入对报警器1的音量参数命令,主网关在接收到对报警器1的音量参数命令后转发给从网关1,从网关1将该针对报警器1的音量参数命令发送给报警器1从而实现对报警器1的音量控制。再例如从网关2具备针对灯光智能开关的b参数(例如光强参数)的设置功能,则主网关在向客户端展示时,会展示灯光智能开关的标识,并在该灯光智能开关标识的对应位置展示“光强设置”的功能信息,用户会在该功能信息的引导下输入对灯光智能开关的光强参数命令,主网关在接收到对灯光智能开关的光强参数命令后转发给从网关2,从网关2将该针对灯光智能开关的光强参数命令发送给灯光智能开关从而实现对灯光的光强的控制。For example, referring to Figure 2, if the slave gateway 1 has the setting function for the a parameter (such as the volume parameter) of the alarm 1, then the master gateway will display the logo of the alarm 1 when it is displayed to the client, and the alarm 1 logo The corresponding position displays the function information of "Volume Setting". The user will input the volume parameter command for alarm 1 under the guidance of the function information. After receiving the volume parameter command for alarm 1, the master gateway forwards it to slave gateway 1. The volume parameter command for the alarm 1 is sent from the gateway 1 to the alarm 1 so as to control the volume of the alarm 1 . For another example, if the slave gateway 2 has the setting function for the b parameter (such as the light intensity parameter) of the smart light switch, then the master gateway will display the smart light switch logo when it is displayed to the client, and in the corresponding The location displays the function information of "Light Intensity Setting". Under the guidance of this function information, the user will input the light intensity parameter command for the smart light switch. After receiving the light intensity parameter command for the smart light switch, the master gateway forwards it to the slave gateway. 2. The gateway 2 sends the light intensity parameter command for the smart light switch to the smart light switch so as to control the light intensity of the light.

图3是本发明所述网关模式设置的一种流程示意图,主要包括:Fig. 3 is a kind of schematic flow chart of gateway mode setting of the present invention, mainly comprises:

步骤S301:客户端通过自动发现协议(比如SSDP或XMPP)发现智能家居网关。Step S301: the client discovers the smart home gateway through an automatic discovery protocol (such as SSDP or XMPP).

步骤S302:用户在客户端上先选择其中一个网关作为主网关,发送主网关设置指令(也称为Master命令)给该网关。Step S302: The user first selects one of the gateways as the master gateway on the client terminal, and sends a master gateway setting command (also called a Master command) to the gateway.

步骤S303:接收到主网关设置指令的网关将自身模式设置为主网关,返回主网关的令牌(token),客户端接收该主网关的令牌,主网关设置成功。Step S303: The gateway that has received the master gateway setting instruction sets its own mode as the master gateway, returns the token of the master gateway, and the client receives the token of the master gateway, and the master gateway is set successfully.

步骤S304:客户端从自动发现的网关中,选取其他某一个网关(称为当前网关)作为从网关,之后可以直接跳到步骤S307,也可以进一步执行步骤S305。Step S304: the client selects another gateway (called the current gateway) as the slave gateway from the automatically discovered gateways, and then directly skips to step S307, or further executes step S305.

步骤S305:也可以在客户端当前选取当前网关作为从网关后,再选取一个已设置的从网关作为该当前网关的上一级网关,该上一级网关就是一个中继网关。Step S305: After the client currently selects the current gateway as the secondary gateway, it can also select a set secondary gateway as the upper-level gateway of the current gateway, and the upper-level gateway is a relay gateway.

步骤S306:如果该上一级网关的级数大于2,则返回上一步重新选择其他已设置的从网关作为当前网关的上一级网关,否则客户端获取该上一级网关的令牌,进入下一步。本步骤可以限制所述组网网关的树状结构的最大级数为3。Step S306: If the number of levels of the upper-level gateway is greater than 2, return to the previous step and reselect other set secondary gateways as the upper-level gateway of the current gateway, otherwise the client obtains the token of the upper-level gateway and enters Next step. In this step, the maximum number of levels in the tree structure of the networking gateway can be limited to three.

所述中继网关是一个相对的网关,即中继网关是其下级网关的主网关,同时又是其上级网关的从网关。中继网关与其上级网关的通信方式可采用从网关与其主网关的通信方式,中继网关与其下级网关的通信方式可采用主网关与其从网关的通信方式。The relay gateway is a relative gateway, that is, the relay gateway is the master gateway of its subordinate gateway, and is also the slave gateway of its superior gateway. The communication mode between the relay gateway and its superior gateway can be the communication mode between the slave gateway and its master gateway, and the communication mode between the relay gateway and its subordinate gateway can be the communication mode between the master gateway and its slave gateway.

步骤S307:客户端发送从网关设置指令(也称为slave命令)给该当前网关,该从网关设置指令中携带当前网关上一级网关的令牌,可以是主网关令牌或所述中继网关的令牌。接收到从网关设置指令的当前网关将自身模式设置为从网关,存储上一级网关的令牌,并返回从网关的令牌给客户端,客户端接收该从网关的令牌,将该从网关的令牌发送给上一级网关(即该从网关的主网关)存储,从网关设置成功。Step S307: The client sends a slave gateway setting command (also called a slave command) to the current gateway. The slave gateway setting command carries the token of the upper-level gateway of the current gateway, which can be the master gateway token or the relay Gateway's token. The current gateway that receives the slave gateway setting instruction sets its own mode as a slave gateway, stores the token of the upper level gateway, and returns the token of the slave gateway to the client, and the client receives the token of the slave gateway and uses the slave gateway The token of the gateway is sent to the upper-level gateway (that is, the master gateway of the slave gateway) for storage, and the slave gateway is set successfully.

步骤S308:从网关将自身信息同步到主网关,所述自身信息包括自身检测到的所辖设备信息以及自身网关配置信息,如果上一级是中继网关则通过中继网关继续向上一级网关上报所述信息,直到到达主网关;所述从网关将自身信息同步到主网关,其中还包括在后续过程中,如果该从网关自身更新或所辖设备更新时向主网关上报对应的更新信息。所述所辖设备信息例如包括设备标识、设备状态、设备具体参数数据等。例如对于图2所述的灯光智能开关,可以包括具体的光强参数等数据。Step S308: The slave gateway synchronizes its own information to the master gateway. The self-information includes the detected device information and its own gateway configuration information. If the upper level is a relay gateway, continue to the upper level gateway through the relay gateway Report the information until it reaches the master gateway; the slave gateway synchronizes its own information to the master gateway, which also includes reporting the corresponding update information to the master gateway if the slave gateway itself is updated or the device under its jurisdiction is updated in the subsequent process . The governed device information includes, for example, device identification, device status, specific device parameter data, and the like. For example, for the intelligent light switch described in FIG. 2 , data such as specific light intensity parameters may be included.

步骤S309:如果还有剩余网关需要设置,则返回步骤S304继续设置网关模式;否则网关模式设置结束。Step S309: If there are remaining gateways to be set, return to step S304 to continue setting the gateway mode; otherwise, the setting of the gateway mode ends.

下面介绍本发明网关间的通信方式。The communication mode between the gateways of the present invention will be introduced below.

本发明所述网关之间通过IP协议进行网络通信,通信时将以网关唯一标示映射为目标地址。所述网关唯一标示符例如可以是IP地址、jabber id、或者其它唯一标示符如Samsung account中的peer_id等。从而使通信距离可以不局限于局域网,可以扩展至广域网,故而网关间的通信可能需要网络地址转换(NAT,Network Address Translation)技术来处理。The network communication between the gateways in the present invention is carried out through the IP protocol, and the unique label of the gateway is mapped as the target address during the communication. The unique identifier of the gateway may be, for example, an IP address, a jabber id, or other unique identifiers such as peer_id in a Samsung account. Therefore, the communication distance can not be limited to the local area network, but can be extended to the wide area network, so the communication between the gateways may need to be processed by Network Address Translation (NAT, Network Address Translation) technology.

主网关和从网关之间的交互主要包括:主网关向从网关发送用户控制命令,以及从网关向主网关发送自身信息和通知消息;从网关之间不需要交互。从网关除了向主网关汇报设备消息外,还周期性的向主网关发送可靠性报文,主网关接收从网关周期发送的可靠性报文,通过解析该可靠性报文判断该从网关是否异常。这样可以及时发现出错的网关,提高系统稳定性。The interaction between the master gateway and the slave gateway mainly includes: the master gateway sends user control commands to the slave gateway, and the slave gateway sends its own information and notification messages to the master gateway; there is no interaction between the slave gateways. In addition to reporting device information to the master gateway, the slave gateway also periodically sends a reliability message to the master gateway. The master gateway receives the reliability message periodically sent from the slave gateway, and judges whether the slave gateway is abnormal by analyzing the reliability message. . In this way, the wrong gateway can be found in time, and the system stability can be improved.

主网关与从网关之间交互信息时,需要携带自身的令牌。从网关接收主网关的控制命令时,验证令牌是否与网关模式设置时获得并存储的主网关令牌一致,在令牌一致的情况下,从网关才接受该控制命令;主网关在接收从网关的更新消息时,也需要验证该从网关的令牌是否与所存储的该从网关的令牌一致,在令牌一致的情况下才接受更新消息。When exchanging information between the master gateway and the slave gateway, it needs to carry its own token. When the slave gateway receives the control command from the master gateway, verify whether the token is consistent with the master gateway token obtained and stored when the gateway mode is set. When receiving an update message from the gateway, it is also necessary to verify whether the token of the slave gateway is consistent with the stored token of the slave gateway, and only accept the update message when the token is consistent.

因此,在一种具体实施例中,网关在作为从网关的情况下,周期性地向主网关发送可靠性报文;网关在作为主网关的情况下,接收从网关周期发送的可靠性报文,通过解析该可靠性报文判断该从网关是否异常。Therefore, in a specific embodiment, the gateway, as a slave gateway, periodically sends a reliability message to the master gateway; when the gateway acts as a master gateway, it receives the reliability message periodically sent from the gateway , judging whether the slave gateway is abnormal by analyzing the reliability message.

进一步的,在客户端与各个网关之间,还有通过动态发现协议继续保持通信,通过动态发现协议,客户端也可以及时的检测到出错或掉线的网关。Further, there is a dynamic discovery protocol between the client and each gateway to continue to maintain communication. Through the dynamic discovery protocol, the client can also detect errors or disconnected gateways in time.

下面介绍本发明所述网关的设备管理方法。The device management method of the gateway of the present invention is introduced below.

在本发明中,主网关上展示的设备是所有网关上设备的并集,但是同一设备不会重复展示。客户端从主网关上查看所有设备,客户端不用在意设备的网关拥有者;如果多个网关都检测到了同一个设备,主网关只展示最先发现的设备,而不是将相同设备重复展示。要达到这以目标要有两个条件:1.设备需要通过设备ID唯一标示;2.只将新发现的用户展示给用户,如果该设备在系统中已经能查到,则标示该设备已经发现了,则只是记录下这个设备,并不展示给用户;In the present invention, the devices displayed on the main gateway are the union of devices on all gateways, but the same device will not be displayed repeatedly. The client checks all devices from the main gateway, and the client does not care about the gateway owner of the device; if multiple gateways detect the same device, the main gateway only displays the first discovered device instead of repeatedly displaying the same device. To achieve this goal, there are two conditions: 1. The device needs to be uniquely marked by the device ID; 2. Only the newly discovered user is displayed to the user. If the device has been found in the system, it is marked that the device has been discovered , it just records the device and does not show it to the user;

因此在具体实施中,当网关作为主网关的情况下,所述向客户端展示所记录的设备信息时,进一步包括:主网关会记录设备标识,对于至少两个网关所辖的设备标识相同的设备,只向客户端展示一个该设备的信息。Therefore, in a specific implementation, when the gateway is the main gateway, when presenting the recorded device information to the client, it further includes: the main gateway will record the device ID, and for at least two gateways with the same device ID Device, only one device information is displayed to the client.

图4为当多个网关发现同一设备时,主网关根据发现设备时间,选择设备的网关拥有者的举例说明示意图。参见图4,FIG. 4 is a schematic illustration of an example illustrating that the main gateway selects the gateway owner of the device according to the device discovery time when multiple gateways discover the same device. See Figure 4,

1)从网关1发现设备A,通知主网关,主网关记录下设备的ID以及网关拥有者(即从网关1),主网关查找该设备ID,如果不能查找到该ID,则将该设备标志为新发现设备;如果发现该设备已经存在,则忽略该设备;例如在图4的例子中,主网关查找不到该设备ID,因此把该设备标记为新发现设备,并通知客户端。1) Discover device A from gateway 1, notify the master gateway, the master gateway records the ID of the device and the gateway owner (that is, slave gateway 1), the master gateway searches for the device ID, if the ID cannot be found, it marks the device It is a newly discovered device; if it is found that the device already exists, the device is ignored; for example, in the example in Figure 4, the main gateway cannot find the device ID, so it marks the device as a newly discovered device and notifies the client.

2)从网关2发现设备A,通知主网关,主网关记录下设备的ID以及网关拥有者(即从网关2);主网关查找该设备ID,如果不能查找到该ID,则将该设备标志为新发现设备;如果发现该设备已经存在,则忽略该设备。在图4的例子中,因为该设备在步骤1)中已经发现了,主网关不把该设备标记为新发现设备。2) Discover device A from gateway 2, notify the master gateway, the master gateway records the ID of the device and the gateway owner (that is, slave gateway 2); the master gateway searches for the device ID, if the ID cannot be found, it marks the device It is a newly discovered device; if it is found that the device already exists, the device is ignored. In the example of FIG. 4, since the device has already been discovered in step 1), the master gateway does not mark the device as a newly discovered device.

本发明还可以进一步实现设备拥有者网关的热切换:当某个从网关故障或掉线后,自动把该从网关所辖的设备切换到邻近从网关。也就是说,当所述网关作为主网关的情况下,该方法进一步包括:保存从网关和其所辖设备之间的映射关系,当检测到某个从网关失效时,根据所述映射关系,查找该从网关的所辖设备,再查找所述所辖设备的所属的有效从网关,将所述有效从网关设置为对应所辖设备的有效管理从网关,即该设备所属的有效从网关。The present invention can further realize the hot switching of the device owner's gateway: when a certain slave gateway fails or goes offline, the device under the jurisdiction of the slave gateway is automatically switched to an adjacent slave gateway. That is to say, when the gateway is used as the master gateway, the method further includes: saving the mapping relationship between the slave gateway and the device under its jurisdiction, and when a failure of a slave gateway is detected, according to the mapping relationship, Find the devices under the jurisdiction of the slave gateway, and then find the effective slave gateway to which the device under the jurisdiction belongs, and set the effective slave gateway as the effective management slave gateway corresponding to the device under the jurisdiction, that is, the effective slave gateway to which the device belongs.

本发明所述网关组网方法中,对设备的控制方法包括:In the gateway networking method of the present invention, the control method for the device includes:

1)当客户端控制主网关所辖的设备时,主网关直接转发命令给该设备。1) When the client controls the device under the jurisdiction of the main gateway, the main gateway directly forwards the command to the device.

2)当客户端控制从网关所辖的设备时,控制命令先发送到主网关,主网关转发命令至设备所属的从网关,从网关再转发该控制命令给对应的设备。2) When the client controls the device under the jurisdiction of the slave gateway, the control command is first sent to the master gateway, the master gateway forwards the command to the slave gateway to which the device belongs, and the slave gateway forwards the control command to the corresponding device.

3)当主网关所辖的设备发生更新时,设备直接将更新信息发送到主网关。3) When the device under the jurisdiction of the master gateway is updated, the device directly sends the update information to the master gateway.

4)当从网关所辖的设备发生更新时,或者从网关本身发生更新时,从网关将相关更新消息发送到主网关,主网关接收更新消息,做预处理后(解析从网关消息,将缓存设备状态更新等)后,再展示给客户端。4) When the device under the jurisdiction of the slave gateway is updated, or when the slave gateway itself is updated, the slave gateway will send the relevant update message to the master gateway, and the master gateway will receive the update message and perform preprocessing (parse the slave gateway message, cache Device status update, etc.), and then displayed to the client.

本发明所述网关组网方法中,还涉及到对网关的管理,具体包括:In the gateway networking method described in the present invention, it also involves the management of the gateway, specifically including:

为方便众多网关的管理,当多个网关通过多网关策略连接起来后,主网关对从网关有控制功能,控制包括:网关重启、关闭、更新等操作。In order to facilitate the management of many gateways, when multiple gateways are connected through a multi-gateway strategy, the master gateway has control functions for the slave gateways, and the control includes: gateway restart, shutdown, update and other operations.

具体的,在网关作为从网关的情况下,接收来自主网关的对本从网关的控制命令,根据该控制命令执行对应的操作。例如,本从网关的重启、关闭、更新、软件升级等操作。从网关向主网关上报自身网关配置信息、自身检测到的所辖设备信息以及所辖设备更新信息。Specifically, when the gateway is a slave gateway, it receives a control command from the master gateway to the slave gateway, and performs corresponding operations according to the control command. For example, operations such as restarting, shutting down, updating, and software upgrading of the slave gateway. The slave gateway reports the configuration information of its own gateway, the information of the devices it detects, and the update information of the devices it manages to the master gateway.

本发明对网关也可以软件升级,升级时,主网关上先存储好升级时需要的数据;之后在主网关选择需要升级的从网关,发送命令给从网关,从网关从主网关下载更新数据,从网关更新后,通知主网关更新完成或者失败;The present invention can also upgrade the software of the gateway. When upgrading, the master gateway first stores the data needed for the upgrade; then selects the slave gateway that needs to be upgraded at the master gateway, sends a command to the slave gateway, and the slave gateway downloads the updated data from the master gateway. After the slave gateway is updated, notify the master gateway of the completion or failure of the update;

与上述方法对应,本发明还公开了一种智能家居网关,用于执行上述方法,图5为本发明所述一种智能家居网关的组成示意图,参见图5,该智能家居网关,包括:Corresponding to the above method, the present invention also discloses a smart home gateway for performing the above method. FIG. 5 is a schematic diagram of the composition of a smart home gateway according to the present invention. Referring to FIG. 5, the smart home gateway includes:

自动发现协议模块501,用于接收客户端的自动发现请求,并返回响应给所述客户端;该模块也可用于主网关,从网关之间的发现处理:主网关监测从网关的上线与离线;The automatic discovery protocol module 501 is used to receive the automatic discovery request of the client, and return a response to the client; this module can also be used for the discovery process between the master gateway and the slave gateway: the master gateway monitors the online and offline of the slave gateway;

网关设置模块502,用于接收客户端的主网关设置指令,将自身模式设置为主网关;或者,接收客户端的从网关设置指令,将自身模式设置为从网关;The gateway setting module 502 is used to receive the master gateway setting instruction of the client, and set its own mode as the master gateway; or receive the client's slave gateway setting instruction, and set its own mode as the slave gateway;

从网关模块503,用于当作为从网关的情况下,向主网关上报自身网关配置信息和自身检测到的所辖设备信息,接收来自主网关的对所辖设备的控制命令并转发给该所辖设备;The slave gateway module 503 is used to report its own gateway configuration information and detected device information to the master gateway when acting as a slave gateway, receive control commands from the master gateway to the governed devices and forward them to the master gateway. Jurisdiction equipment;

主网关模块504,用于当作为主网关的情况下,记录自身检测到的所辖设备信息,记录从网关上报的从网关配置信息及其所辖设备信息;向客户端展示所记录的设备信息,接收来自客户端的对设备的控制命令,如果是对本主网关所辖设备的控制命令则发送给该所辖设备,如果是对从网关所辖设备的控制命令则发送给从网关。The master gateway module 504 is used to record the information of the devices under its jurisdiction detected by itself when acting as the master gateway, record the configuration information of the slave gateway reported by the gateway and the information of the devices under its jurisdiction; display the recorded device information to the client , to receive the control command to the device from the client, if it is a control command to the device under the jurisdiction of the master gateway, it will be sent to the device under the jurisdiction, if it is a control command to the device under the jurisdiction of the slave gateway, it will be sent to the slave gateway.

所述主网关模块也需要记录缓存现有网络中的所有设备,以及设备的拥有网关,同时主网关也需要缓存现有设备的状态,这样在查询设备时可以减少网关之间的交互。缓存设备状态对于大量的查询请求尤其有用。The main gateway module also needs to record and cache all the devices in the existing network and the owning gateways of the devices, and the main gateway also needs to cache the status of the existing devices, so that the interaction between gateways can be reduced when querying devices. Caching device state is especially useful for a large number of query requests.

在一种优选实施例中,所述网关设置模块502进一步用于:接收客户端的中继网关设置指令,将自身模式设置为中继网关,并确定其上一级网关和下一级网关;该中继网关为上一级网关的从网关;In a preferred embodiment, the gateway setting module 502 is further configured to: receive the client's relay gateway setting instruction, set its own mode as a relay gateway, and determine its upper-level gateway and lower-level gateway; The relay gateway is the slave gateway of the upper level gateway;

该网关进一步包括中继网关模块,用于当作为中继网关的情况下,向上一级网关上报自身网关配置信息和自身检测到的所辖设备信息,将下一级网关上报的网关配置信息和所辖设备信息上报给上一级网关;接收来自上一级网关的对设备的控制命令,如果是对本中继网关所辖设备的控制命令则发送给该所辖设备,如果是对下一级网关所辖设备的控制命令则发送给下一级网关。The gateway further includes a relay gateway module, which is used to report its own gateway configuration information and its detected device information to the upper-level gateway when it is used as a relay gateway, and report the gateway configuration information reported by the lower-level gateway and Report the information of the equipment under its jurisdiction to the upper-level gateway; receive the control command for the device from the upper-level gateway, if it is a control command for the equipment under the jurisdiction of the relay gateway, it will be sent to the equipment under its jurisdiction; if it is for the next level The control commands of the devices under the jurisdiction of the gateway are sent to the next-level gateway.

本发明所述的智能家居网关中还包括数据解析模块,用于解析主网关的命令或者从网关的更新消息。主网关和从网关之间交互的信息都需要遵照某种预订好的协议,只有这样,信息才可以被解析和理解。The smart home gateway of the present invention also includes a data parsing module for parsing commands from the master gateway or update messages from the slave gateway. The information exchanged between the master gateway and the slave gateway needs to comply with a predetermined protocol, only in this way can the information be parsed and understood.

本智能家居网关还可以执行上述方法中的任何一种实施例的操作步骤。The smart home gateway can also execute the operation steps of any one of the above method embodiments.

与现有技术相比,基于本发明的智能家居网关及其组网方法,还具有下列优点:Compared with the prior art, the smart home gateway and its networking method based on the present invention also have the following advantages:

1)用户可以连接不同网络(不同局域网,不同协议的网络)的网关从而实现对他所想接入的设备的无缝连接;1) The user can connect to gateways of different networks (different local area networks, networks of different protocols) to realize seamless connection to the devices he wants to access;

2)通过本发明,在需要扩大组网面积时,或者需要支持不同协议网关设备时,可以方便地增加更多的网关加入到网络中,从而可以有助于提高设备的信号强度可达性;2) Through the present invention, when it is necessary to expand the networking area, or when it is necessary to support gateway devices of different protocols, more gateways can be conveniently added to the network, thereby helping to improve the signal strength accessibility of the devices;

3)方便用户通过一个主网关来控制和管理多个分散的网关,提高操作管理效率;3) It is convenient for users to control and manage multiple decentralized gateways through a main gateway, improving the efficiency of operation and management;

4)本发明特别适用于包括众多局域网的办公室或者商场的联合组网,而且可以通过主网关这一单节点对所有网关和设备进行集中控制,节约了管理成本;4) The present invention is especially suitable for joint networking of offices or shopping malls including many local area networks, and can centrally control all gateways and devices through the single node of the main gateway, saving management costs;

5)本发明可以非常方便地把第三方的智能家居网关加入到已经存在的网关网络中,扩展性非常强。5) The present invention can very conveniently add a third-party smart home gateway to the existing gateway network, and the scalability is very strong.

另外,在本发明各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each module may exist separately physically, or two or more modules may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

另外,本发明的每一个实施例可以通过由数据处理设备如计算机执行的数据处理程序来实现。显然,数据处理程序构成了本发明。此外,通常存储在一个存储介质中的数据处理程序通过直接将程序读取出存储介质或者通过将程序安装或复制到数据处理设备的存储设备(如硬盘和或内存)中执行。因此,这样的存储介质也构成了本发明。存储介质可以使用任何类型的记录方式,例如纸张存储介质(如纸带等)、磁存储介质(如软盘、硬盘、闪存等)、光存储介质(如CD-ROM等)、磁光存储介质(如MO等)等。In addition, each embodiment of the present invention can be realized by a data processing program executed by a data processing device such as a computer. Obviously, the data processing program constitutes the present invention. In addition, usually a data processing program stored in a storage medium is executed by directly reading the program out of the storage medium or by installing or copying the program into a storage device (such as a hard disk and/or memory) of the data processing device. Therefore, such a storage medium also constitutes the present invention. The storage medium can use any type of recording method, such as paper storage medium (such as paper tape, etc.), magnetic storage medium (such as floppy disk, hard disk, flash memory, etc.), optical storage medium (such as CD-ROM, etc.), magneto-optical storage medium ( Such as MO, etc.) etc.

因此本发明还公开了一种存储介质,其中存储有数据处理程序,该数据处理程序用于执行本发明上述方法的任何一种实施例。Therefore, the present invention also discloses a storage medium, in which a data processing program is stored, and the data processing program is used to execute any embodiment of the above-mentioned method of the present invention.

另外,本发明所述的方法步骤除了可以用数据处理程序来实现,还可以由硬件来实现,例如,可以由逻辑门、开关、专用集成电路(ASIC)、可编程逻辑控制器和嵌入微控制器等来实现。因此这种可以实现本发明所述方法的硬件也可以构成本发明。In addition, the method steps described in the present invention can be implemented by hardware besides data processing programs, for example, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded micro-controllers can also be implemented. device etc. to achieve. Therefore, such hardware capable of implementing the method of the present invention may also constitute the present invention.

以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明保护的范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the present invention. within the scope of protection.

Claims (13)

Translated fromChinese
1.一种智能家居网关的组网方法,其特征在于,该方法包括:1. A networking method of a smart home gateway, characterized in that the method comprises:接收客户端的自动发现请求,并返回响应给所述客户端;Receive an automatic discovery request from the client, and return a response to the client;接收客户端的主网关设置指令,将自身模式设置为主网关;或者,接收客户端的从网关设置指令,将自身模式设置为从网关;Receive the master gateway setting instruction from the client, and set its own mode as the master gateway; or, receive the client’s slave gateway setting instruction, and set its own mode as the slave gateway;当作为从网关的情况下,向主网关上报自身网关配置信息和自身检测到的所辖设备信息,接收来自主网关的对所辖设备的控制命令并转发给该所辖设备;When acting as a slave gateway, report its own gateway configuration information and detected device information to the master gateway, receive control commands from the master gateway to the governed device and forward it to the governed device;当作为主网关的情况下,记录自身检测到的所辖设备信息,记录从网关上报的从网关配置信息及其所辖设备信息;向客户端展示所记录的设备信息,接收来自客户端的对设备的控制命令,如果是对本主网关所辖设备的控制命令则发送给该所辖设备,如果是对从网关所辖设备的控制命令则发送给从网关。When acting as the master gateway, record the information of the devices under its jurisdiction detected by itself, record the configuration information of the slave gateway and its devices under the jurisdiction reported by the gateway; display the recorded device information to the client, and receive the device information from the client If it is a control command for the device under the jurisdiction of the master gateway, it will be sent to the device under its jurisdiction, and if it is a control command for the device under the jurisdiction of the slave gateway, it will be sent to the slave gateway.2.根据权利要求1所述的组网方法,其特征在于,该方法进一步包括:2. The networking method according to claim 1, characterized in that the method further comprises:接收客户端的中继网关设置指令,将自身模式设置为中继网关,并确定其上一级网关和下一级网关;该中继网关为上一级网关的从网关;Receive the client's relay gateway setting instruction, set its own mode as a relay gateway, and determine its upper-level gateway and lower-level gateway; the relay gateway is the slave gateway of the upper-level gateway;当作为中继网关的情况下,向上一级网关上报自身网关配置信息和自身检测到的所辖设备信息,将下一级网关上报的网关配置信息和所辖设备信息上报给上一级网关;接收来自上一级网关的对设备的控制命令,如果是对本中继网关所辖设备的控制命令则发送给该所辖设备,如果是对下一级网关所辖设备的控制命令则发送给下一级网关。When used as a relay gateway, report its own gateway configuration information and its detected device information to the upper-level gateway, and report the gateway configuration information and managed device information reported by the lower-level gateway to the upper-level gateway; Receive the control command for the device from the upper level gateway, if it is a control command for the device under the jurisdiction of the relay gateway, it will be sent to the device under the jurisdiction, if it is a control command for the device under the jurisdiction of the lower level gateway, it will be sent to the next Level 1 gateway.3.根据权利要求2所述的组网方法,其特征在于,所述主网关、中继网关、和从网关,依照上下级关系,形成树状结构,其中所述树状结构的最大级数为3。3. The networking method according to claim 2, wherein the master gateway, the relay gateway, and the slave gateway form a tree structure according to the relationship between the upper and lower levels, wherein the maximum number of stages of the tree structure is for 3.4.根据权利要求1所述的组网方法,其特征在于,4. The networking method according to claim 1, characterized in that,所述从网关向主网关同步的自身信息包括自身网关功能信息和配置信息;The self-information synchronized from the gateway to the master gateway includes self-gateway function information and configuration information;当作为主网关的情况下,向客户端展示所记录的设备信息时,进一步展示所述设备的功能信息,如果所述设备属于从网关,则所述设备的功能信息从从网关获取;接受客户端根据该功能信息的引导所发出的针对设备的控制命令。When the master gateway is used as the master gateway, when the recorded device information is displayed to the client, the function information of the device is further displayed. If the device belongs to the slave gateway, the function information of the device is obtained from the slave gateway; accept the client The control command for the device issued by the terminal according to the guidance of the function information.5.根据权利要求1所述的组网方法,其特征在于,该方法进一步包括:5. The networking method according to claim 1, characterized in that the method further comprises:在作为从网关的情况下,周期性地向主网关发送可靠性报文;In the case of being a slave gateway, periodically send reliability messages to the master gateway;在作为主网关的情况下,接收从网关周期发送的可靠性报文,通过解析该可靠性报文判断该从网关是否异常。In the case of being the master gateway, it receives the reliability message periodically sent by the slave gateway, and judges whether the slave gateway is abnormal by analyzing the reliability message.6.根据权利要求1所述的组网方法,其特征在于,当作为主网关的情况下,所述向客户端展示所记录的设备信息时,进一步包括:对于至少两个网关所辖的设备标识相同的设备,只向客户端展示一个该设备的信息。6. The networking method according to claim 1, characterized in that, in the case of the main gateway, when presenting the recorded device information to the client, further comprising: for the devices under the jurisdiction of at least two gateways Identify the same device, and only display the information of one device to the client.7.根据权利要求6所述的组网方法,其特征在于,当作为主网关的情况下,该方法进一步包括:保存从网关和其所辖设备之间的映射关系,当检测到某个从网关失效时,根据所述映射关系,查找该从网关的所辖设备,再查找所述所辖设备的所属的有效从网关,将所述有效从网关设置为对应所辖设备的有效管理从网关。7. The networking method according to claim 6, characterized in that, in the case of the master gateway, the method further includes: saving the mapping relationship between the slave gateway and the device under its jurisdiction, when a slave gateway is detected When the gateway fails, according to the mapping relationship, search for the device under the jurisdiction of the slave gateway, and then search for the effective slave gateway to which the device under the jurisdiction belongs, and set the effective slave gateway as the effective management slave gateway corresponding to the device under the jurisdiction .8.根据权利要求1所述的组网方法,其特征在于,该方法进一步包括:8. The networking method according to claim 1, characterized in that the method further comprises:在作为从网关的情况下,接收来自主网关的对本从网关的控制命令,根据该控制命令执行对应的操作;从网关向主网关上报自身网关配置信息、自身检测到的所辖设备信息、所辖设备更新信息。In the case of a slave gateway, it receives a control command from the master gateway to the slave gateway, and performs corresponding operations according to the control command; the slave gateway reports its own gateway configuration information, detected device information, and Administer device update information.9.根据权利要求1至8任一项所述的组网方法,其特征在于,所述网关之间通过IP协议进行通信,通信时将网关唯一标示符映射为目标地址。9. The networking method according to any one of claims 1 to 8, characterized in that, the gateways communicate through the IP protocol, and the gateway unique identifier is mapped to a target address during communication.10.根据权利要求1至8任一项所述的组网方法,其特征在于,10. The networking method according to any one of claims 1 to 8, characterized in that,在将自身模式设置为从网关的情况下,保存主网关的令牌,并将本从网关的令牌通过客户端反馈给主网关;In the case of setting its own mode as a slave gateway, save the token of the master gateway, and feed back the token of the slave gateway to the master gateway through the client;主网关与从网关之间交互信息时,携带自身的令牌;When exchanging information between the master gateway and the slave gateway, carry its own token;从网关接收主网关的控制命令时,验证该主网关令牌是否所存储的主网关令牌一致,在令牌一致的情况下,从网关才接受该控制命令;主网关在接收从网关的更新消息时,也验证该从网关的令牌是否与所存储的该从网关的令牌一致,在令牌一致的情况下才接受该更新消息。When the slave gateway receives the control command from the master gateway, verify whether the master gateway token stored in the master gateway token is consistent with the master gateway token. If the token is consistent, the slave gateway accepts the control command; the master gateway receives the update from the slave gateway When receiving the message, it also verifies whether the token of the slave gateway is consistent with the stored token of the slave gateway, and only accepts the update message when the token is consistent.11.根据权利要求1至8任一项所述的组网方法,其特征在于,该方法进一步包括:11. The networking method according to any one of claims 1 to 8, characterized in that the method further comprises:当作为主网关的情况下,发送自动发现请求,在收到从网关的响应后判定该从网关在线;When acting as the master gateway, send an automatic discovery request, and determine that the slave gateway is online after receiving the response from the slave gateway;当作为从网关的情况下,接收主网关发送的自动发现请求,并返回响应给所述主网关。When acting as a slave gateway, it receives the automatic discovery request sent by the master gateway, and returns a response to the master gateway.12.一种智能家居网关,其特征在于,包括:12. A smart home gateway, characterized in that it comprises:自动发现协议模块,用于接收客户端的自动发现请求,并返回响应给所述客户端;An auto-discovery protocol module, configured to receive an auto-discovery request from a client, and return a response to the client;网关设置模块,用于接收客户端的主网关设置指令,将自身模式设置为主网关;或者,接收客户端的从网关设置指令,将自身模式设置为从网关;The gateway setting module is used to receive the master gateway setting instruction of the client, and set its own mode as the master gateway; or receive the client's slave gateway setting instruction, and set its own mode as the slave gateway;从网关模块,用于当作为从网关的情况下,向主网关上报自身网关配置信息和自身检测到的所辖设备信息,接收来自主网关的对所辖设备的控制命令并转发给该所辖设备;The slave gateway module is used to report its own gateway configuration information and detected device information to the master gateway when acting as a slave gateway, receive control commands from the master gateway to the governed devices and forward them to the master gateway equipment;主网关模块,用于当作为主网关的情况下,记录自身检测到的所辖设备信息,记录从网关上报的从网关配置信息及其所辖设备信息;向客户端展示所记录的设备信息,接收来自客户端的对设备的控制命令,如果是对本主网关所辖设备的控制命令则发送给该所辖设备,如果是对从网关所辖设备的控制命令则发送给从网关。The master gateway module is used as the master gateway to record the information of the devices under its jurisdiction detected by itself, record the configuration information of the slave gateway reported by the gateway and the information of the devices under its jurisdiction; display the recorded device information to the client, Receive the control command to the device from the client, if it is a control command to the device under the jurisdiction of the master gateway, it will send it to the device under its jurisdiction, if it is a control command to the device under the jurisdiction of the slave gateway, it will send it to the slave gateway.13.根据权利要求12所述的网关,其特征在于,13. The gateway of claim 12, wherein所述网关设置模块进一步用于:接收客户端的中继网关设置指令,将自身模式设置为中继网关,并确定其上一级网关和下一级网关;该中继网关为上一级网关的从网关;The gateway setting module is further used to: receive the relay gateway setting instruction of the client, set its own mode as a relay gateway, and determine its upper-level gateway and lower-level gateway; the relay gateway is the upper-level gateway from the gateway;该网关进一步包括中继网关模块,用于当作为中继网关的情况下,向上一级网关上报自身网关配置信息和自身检测到的所辖设备信息,将下一级网关上报的网关配置信息和所辖设备信息上报给上一级网关;接收来自上一级网关的对设备的控制命令,如果是对本中继网关所辖设备的控制命令则发送给该所辖设备,如果是对下一级网关所辖设备的控制命令则发送给下一级网关。The gateway further includes a relay gateway module, which is used to report its own gateway configuration information and its detected device information to the upper-level gateway when it is used as a relay gateway, and report the gateway configuration information reported by the lower-level gateway and Report the information of the equipment under its jurisdiction to the upper-level gateway; receive the control command for the device from the upper-level gateway, if it is a control command for the equipment under the jurisdiction of the relay gateway, it will be sent to the equipment under its jurisdiction; if it is for the next level The control commands of the devices under the jurisdiction of the gateway are sent to the next-level gateway.
CN201510234527.5A2015-05-082015-05-08Smart home gateway and networking method thereofPendingCN104811375A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201510234527.5ACN104811375A (en)2015-05-082015-05-08Smart home gateway and networking method thereof

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201510234527.5ACN104811375A (en)2015-05-082015-05-08Smart home gateway and networking method thereof

Publications (1)

Publication NumberPublication Date
CN104811375Atrue CN104811375A (en)2015-07-29

Family

ID=53695884

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201510234527.5APendingCN104811375A (en)2015-05-082015-05-08Smart home gateway and networking method thereof

Country Status (1)

CountryLink
CN (1)CN104811375A (en)

Cited By (36)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105141589A (en)*2015-08-052015-12-09北京思特奇信息技术股份有限公司Method and system for sharing and maintaining token of multiple instances
CN105306726A (en)*2015-11-102016-02-03深圳市智慧猫软件技术有限公司Mobile phone and host pairing method and host
CN106028303A (en)*2016-05-162016-10-12青岛海信移动通信技术股份有限公司Smart device discovering method and device
CN106094754A (en)*2016-07-122016-11-09腾讯科技(深圳)有限公司Apparatus control system, method and device
CN106534198A (en)*2016-12-222017-03-22深圳市艾森魏尔科技有限公司Intelligent home gateway and many-to-many communication system and algorithm for control terminal in local area network
CN106603352A (en)*2016-12-222017-04-26深圳市艾森魏尔科技有限公司Intelligent household user, application server management load balancing system and algorithm
CN106713421A (en)*2016-12-052017-05-24天津宅美智能科技有限公司Automatic updating method of intelligent door lock voice prompt system
CN106990717A (en)*2016-02-022017-07-28中国科学院上海高等研究院A kind of radio multiplex MANET, network-building method and its communication means
CN107231262A (en)*2017-06-262017-10-03华南理工大学A kind of message route method cascaded based on MQTT multilayers
CN107360034A (en)*2017-07-252017-11-17美的智慧家居科技有限公司Gateway restoration methods, device and its equipment
WO2018010533A1 (en)*2016-07-122018-01-18腾讯科技(深圳)有限公司Device control system, method and apparatus, and gateway
CN107976911A (en)*2016-10-242018-05-01腾讯科技(深圳)有限公司Apparatus control method, apparatus and system
CN108111358A (en)*2018-01-122018-06-01重庆惠家通信息技术有限公司POE intelligent domestic gateway networking configuration methods
CN108141743A (en)*2015-09-252018-06-08德国电信股份有限公司The method of improved disposition, telecommunication network, user equipment, system, program and the computer program product exchanged at least one communication between telecommunication network and at least one user equipment
CN109005094A (en)*2018-11-012018-12-14上海顺舟智能科技股份有限公司Zigbee smart home device management method and device based on internet of things
CN109257803A (en)*2018-11-202019-01-22北京千丁互联科技有限公司Intelligent door lock network-building method, device and intelligent door lock
CN109274561A (en)*2018-09-272019-01-25青岛海信智慧家居系统股份有限公司A kind of method and apparatus that gateway role determines
CN111683142A (en)*2020-06-082020-09-18广东美的暖通设备有限公司Metering device, metering method, and computer-readable storage medium
CN111770518A (en)*2020-07-102020-10-13浙江瑞瀛物联科技有限公司 Zigbee smart home expansion system and method
CN111913450A (en)*2020-08-042020-11-10青岛海信日立空调系统有限公司Control method of intelligent household equipment, intelligent household system and gateway thereof
CN112019434A (en)*2020-07-282020-12-01烽火通信科技股份有限公司WEB centralized management method and device for networking equipment
CN112034799A (en)*2020-08-262020-12-04普联国际有限公司 A smart home control system and method
CN112272230A (en)*2020-10-232021-01-26四川长虹电器股份有限公司Multi-gateway scene linkage control method
CN112714051A (en)*2020-12-302021-04-27深圳市艾特智能科技有限公司Method for realizing multi-control of equipment across gateways, main gateway and intelligent home system
CN112751937A (en)*2020-12-302021-05-04广东好太太智能家居有限公司Distributed edge intelligent Bluetooth Mesh gateway system and implementation method
CN113569247A (en)*2020-04-282021-10-29深圳绿米联创科技有限公司Equipment upgrading method, device and system and electronic equipment
CN113934151A (en)*2021-10-222022-01-14洛阳职业技术学院 An Internet of Things gateway and its communication method
CN113934998A (en)*2021-11-012022-01-14阳光保险集团股份有限公司Gateway authentication method, service system authentication method and gateway authentication system
CN114125823A (en)*2020-08-252022-03-01云米互联科技(广东)有限公司Networking communication encryption method, server, household appliance, system and storage medium
CN114338256A (en)*2021-11-292022-04-12广州河东科技有限公司Intelligent home gateway configuration method and device, terminal equipment and storage medium
CN114567524A (en)*2022-03-142022-05-31杭州萤石软件有限公司Communication system and method based on dynamic gateway
CN114679354A (en)*2022-04-062022-06-28北京小米移动软件有限公司Gateway device, bridging method and device, and storage medium
CN114710375A (en)*2020-12-162022-07-05深圳Tcl新技术有限公司Network distribution method, intelligent gateway and computer readable storage medium
CN114902616A (en)*2022-04-062022-08-12北京小米移动软件有限公司 Multi-gateway networking method, device, system, gateway device and storage medium
CN116867110A (en)*2023-08-072023-10-10广东艾科智泊科技股份有限公司Bluetooth tree-like ad hoc network method and system
CN117880068A (en)*2024-03-112024-04-12四川天邑康和通信股份有限公司Master-slave gateway equipment synchronization method, device, equipment and medium based on FTTR

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1531262A (en)*2003-03-112004-09-22��Ϊ�������޹�˾ Network communication method for realizing network load sharing function
CN1599344A (en)*2003-09-152005-03-23电视电声研究所Architecture structure and realizing method of home network system
CN102291283A (en)*2011-08-032011-12-21中山大学深圳研究院Digital home network system
CN102811452A (en)*2011-05-312012-12-05德赛电子(惠州)有限公司Distributed wireless gateway system and communication method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1531262A (en)*2003-03-112004-09-22��Ϊ�������޹�˾ Network communication method for realizing network load sharing function
CN1599344A (en)*2003-09-152005-03-23电视电声研究所Architecture structure and realizing method of home network system
CN102811452A (en)*2011-05-312012-12-05德赛电子(惠州)有限公司Distributed wireless gateway system and communication method
CN102291283A (en)*2011-08-032011-12-21中山大学深圳研究院Digital home network system

Cited By (58)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105141589A (en)*2015-08-052015-12-09北京思特奇信息技术股份有限公司Method and system for sharing and maintaining token of multiple instances
CN105141589B (en)*2015-08-052018-06-22北京思特奇信息技术股份有限公司A kind of token of more examples shares the method and system with safeguarding
CN108141743B (en)*2015-09-252021-07-27德国电信股份有限公司 Method, network, apparatus, system, medium and apparatus for handling communication exchanges
US11006339B2 (en)2015-09-252021-05-11Deutsche Telekom AgHandling at least one communication exchange between a telecommunications network and at least one user equipment
CN108141743A (en)*2015-09-252018-06-08德国电信股份有限公司The method of improved disposition, telecommunication network, user equipment, system, program and the computer program product exchanged at least one communication between telecommunication network and at least one user equipment
CN105306726A (en)*2015-11-102016-02-03深圳市智慧猫软件技术有限公司Mobile phone and host pairing method and host
CN105306726B (en)*2015-11-102018-09-25深圳市智慧猫软件技术有限公司A kind of mobile phone and host matching method and a kind of host
CN106990717A (en)*2016-02-022017-07-28中国科学院上海高等研究院A kind of radio multiplex MANET, network-building method and its communication means
CN106028303A (en)*2016-05-162016-10-12青岛海信移动通信技术股份有限公司Smart device discovering method and device
CN106028303B (en)*2016-05-162020-05-22青岛海信移动通信技术股份有限公司Intelligent device discovery method and device
CN106094754A (en)*2016-07-122016-11-09腾讯科技(深圳)有限公司Apparatus control system, method and device
WO2018010533A1 (en)*2016-07-122018-01-18腾讯科技(深圳)有限公司Device control system, method and apparatus, and gateway
US11131976B2 (en)*2016-07-122021-09-28Tencent Technology (Shenzhen) Company LimitedDevice control system, method and apparatus, and gateways
CN106094754B (en)*2016-07-122019-09-20腾讯科技(深圳)有限公司Apparatus control system, method and device
CN107976911A (en)*2016-10-242018-05-01腾讯科技(深圳)有限公司Apparatus control method, apparatus and system
CN106713421A (en)*2016-12-052017-05-24天津宅美智能科技有限公司Automatic updating method of intelligent door lock voice prompt system
CN106534198B (en)*2016-12-222019-10-08深圳市艾森魏尔科技有限公司A kind of intelligent domestic gateway and control terminal are in local area network many-many communication method
CN106603352A (en)*2016-12-222017-04-26深圳市艾森魏尔科技有限公司Intelligent household user, application server management load balancing system and algorithm
CN106603352B (en)*2016-12-222020-09-15深圳市艾森魏尔科技有限公司System and method for managing load balance of smart home user and application server
CN106534198A (en)*2016-12-222017-03-22深圳市艾森魏尔科技有限公司Intelligent home gateway and many-to-many communication system and algorithm for control terminal in local area network
CN107231262B (en)*2017-06-262021-05-14华南理工大学Message routing method based on MQTT multi-layer cascade
CN107231262A (en)*2017-06-262017-10-03华南理工大学A kind of message route method cascaded based on MQTT multilayers
CN107360034A (en)*2017-07-252017-11-17美的智慧家居科技有限公司Gateway restoration methods, device and its equipment
CN107360034B (en)*2017-07-252021-03-19美智光电科技股份有限公司 Gateway recovery method, device and equipment
CN108111358A (en)*2018-01-122018-06-01重庆惠家通信息技术有限公司POE intelligent domestic gateway networking configuration methods
CN108111358B (en)*2018-01-122020-11-10重庆惠家通信息技术有限公司POE intelligent home gateway networking configuration method
CN109274561A (en)*2018-09-272019-01-25青岛海信智慧家居系统股份有限公司A kind of method and apparatus that gateway role determines
CN109274561B (en)*2018-09-272021-03-19青岛海信智慧家居系统股份有限公司Method and device for determining gateway role
CN109005094B (en)*2018-11-012021-02-02上海顺舟智能科技股份有限公司Zigbee intelligent household equipment management method and device based on Internet of things
CN109005094A (en)*2018-11-012018-12-14上海顺舟智能科技股份有限公司Zigbee smart home device management method and device based on internet of things
CN109257803A (en)*2018-11-202019-01-22北京千丁互联科技有限公司Intelligent door lock network-building method, device and intelligent door lock
CN113569247A (en)*2020-04-282021-10-29深圳绿米联创科技有限公司Equipment upgrading method, device and system and electronic equipment
CN111683142B (en)*2020-06-082023-02-21上海美控智慧建筑有限公司Metering apparatus, metering method, and computer-readable storage medium
CN111683142A (en)*2020-06-082020-09-18广东美的暖通设备有限公司Metering device, metering method, and computer-readable storage medium
CN111770518A (en)*2020-07-102020-10-13浙江瑞瀛物联科技有限公司 Zigbee smart home expansion system and method
CN112019434A (en)*2020-07-282020-12-01烽火通信科技股份有限公司WEB centralized management method and device for networking equipment
CN112019434B (en)*2020-07-282021-08-03烽火通信科技股份有限公司WEB centralized management method and device for networking equipment
CN111913450A (en)*2020-08-042020-11-10青岛海信日立空调系统有限公司Control method of intelligent household equipment, intelligent household system and gateway thereof
CN114125823A (en)*2020-08-252022-03-01云米互联科技(广东)有限公司Networking communication encryption method, server, household appliance, system and storage medium
CN112034799A (en)*2020-08-262020-12-04普联国际有限公司 A smart home control system and method
CN112272230A (en)*2020-10-232021-01-26四川长虹电器股份有限公司Multi-gateway scene linkage control method
CN114710375A (en)*2020-12-162022-07-05深圳Tcl新技术有限公司Network distribution method, intelligent gateway and computer readable storage medium
CN114710375B (en)*2020-12-162024-03-12深圳Tcl新技术有限公司Distribution network method, intelligent gateway and computer readable storage medium
CN112714051A (en)*2020-12-302021-04-27深圳市艾特智能科技有限公司Method for realizing multi-control of equipment across gateways, main gateway and intelligent home system
CN112751937A (en)*2020-12-302021-05-04广东好太太智能家居有限公司Distributed edge intelligent Bluetooth Mesh gateway system and implementation method
CN113934151A (en)*2021-10-222022-01-14洛阳职业技术学院 An Internet of Things gateway and its communication method
CN113934151B (en)*2021-10-222022-05-27洛阳职业技术学院 A communication method applied to an Internet of Things gateway
CN113934998A (en)*2021-11-012022-01-14阳光保险集团股份有限公司Gateway authentication method, service system authentication method and gateway authentication system
CN114338256A (en)*2021-11-292022-04-12广州河东科技有限公司Intelligent home gateway configuration method and device, terminal equipment and storage medium
CN114338256B (en)*2021-11-292023-10-03广州河东科技有限公司Intelligent home gateway configuration method, device, terminal equipment and storage medium
CN114567524B (en)*2022-03-142024-02-02杭州萤石软件有限公司Dynamic gateway communication system and method of (a)
CN114567524A (en)*2022-03-142022-05-31杭州萤石软件有限公司Communication system and method based on dynamic gateway
CN114902616A (en)*2022-04-062022-08-12北京小米移动软件有限公司 Multi-gateway networking method, device, system, gateway device and storage medium
CN114679354A (en)*2022-04-062022-06-28北京小米移动软件有限公司Gateway device, bridging method and device, and storage medium
CN114902616B (en)*2022-04-062023-10-24北京小米移动软件有限公司Multi-gateway networking method, device, system, gateway equipment and storage medium
CN116867110A (en)*2023-08-072023-10-10广东艾科智泊科技股份有限公司Bluetooth tree-like ad hoc network method and system
CN117880068A (en)*2024-03-112024-04-12四川天邑康和通信股份有限公司Master-slave gateway equipment synchronization method, device, equipment and medium based on FTTR
CN117880068B (en)*2024-03-112024-06-07四川天邑康和通信股份有限公司FTTR-based master-slave gateway equipment synchronization method, FTTR-based master-slave gateway equipment synchronization device, FTTR-based master-slave gateway equipment synchronization device and medium

Similar Documents

PublicationPublication DateTitle
CN104811375A (en)Smart home gateway and networking method thereof
CN101552697B (en)Network access apparatus upgrade system and network access apparatus upgrade method
CN105392181B (en)Networking method, device and system of intelligent equipment
CN101820435B (en)Synchronization method and device for MAC (Media Access Control) address table information of distributed network processing system
KR20170041743A (en)Method and apparatus for automatically generating an events dictionary in an internet of things (iot) network
EP2339786B1 (en)Apparatus and method for providing information for a wireless network connection using Wi-Fi
RU2584499C2 (en)Method for operation and commissioning of network devices in zigbee network
KR20170010377A (en)Triggering commands on a target device in response to broadcasted event notifications
JP2012095336A (en)Radio communication system and base station
US10148739B2 (en)M2M data querying and invoking methods, querying and invoking devices, and system
WO2018224040A1 (en)Method and device of information transmission
TW202103475A (en)Method for terminal device management, server and terminal device
CN111654844A (en)Device pairing method and related device and device
CN111367542A (en)Household appliance and household appliance firmware upgrading method
WO2021087892A1 (en)Resource subscription method and device, and storage medium
WO2023040678A1 (en)Information transmission method and apparatus, and electronic device, chip, storage medium, program and program product
WO2015070763A1 (en)Self-establishing method and apparatus for x2 interface
CN115242824B (en) Device control method and device, router, wireless mesh network system and medium
CN105246128B (en)The network-building method and device of a kind of intelligent terminal
CN111274319A (en)State information query method and device
CN115943616B (en)Attribute subscription method, device and equipment for Zigbee equipment
CN114788393B (en)Inter-device communication method, device and storage medium
CN105207811B (en) A method and device for replacing non-AllJoyn equipment
CN116980286A (en)Device configuration method, device control method, storage medium, and terminal
CN106330631A (en) Home gateway remote connection method and device

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
EXSBDecision made by sipo to initiate substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication

Application publication date:20150729

RJ01Rejection of invention patent application after publication

[8]ページ先頭

©2009-2025 Movatter.jp