CN109274561B - Method and device for determining gateway role - Google Patents

Method and device for determining gateway role Download PDF

Info

Publication number
CN109274561B
CN109274561B CN201811129517.5A CN201811129517A CN109274561B CN 109274561 B CN109274561 B CN 109274561B CN 201811129517 A CN201811129517 A CN 201811129517A CN 109274561 B CN109274561 B CN 109274561B
Authority
CN
China
Prior art keywords
gateway
role
target
information
role 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.)
Active
Application number
CN201811129517.5A
Other languages
Chinese (zh)
Other versions
CN109274561A (en
Inventor
李洲烨
王艳青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Hisense Smart Life Technology Co Ltd
Original Assignee
Qingdao Hisense Smart Home Systems Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Hisense Smart Home Systems Co ltd filed Critical Qingdao Hisense Smart Home Systems Co ltd
Priority to CN201811129517.5A priority Critical patent/CN109274561B/en
Publication of CN109274561A publication Critical patent/CN109274561A/en
Application granted granted Critical
Publication of CN109274561B publication Critical patent/CN109274561B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2807Exchanging configuration information on appliance services in a home automation network

Abstract

The invention discloses a method and a device for determining a gateway role, which are used for solving the problems of inconvenience and easy error when the gateway role is manually configured in the prior art. The terminal and the gateway are positioned in the same local area network, and the method comprises the following steps: the terminal receives target role information of each target gateway in a first gateway system, which is input by a user; and aiming at each target gateway, identifying other gateways which are different from the target role information of the target gateway in the first gateway system, sending a role configuration instruction to the target gateway, wherein the role configuration instruction comprises the target role information of the target gateway and the identification information of the other identified gateways, so that the target gateway updates the currently stored role information according to the target role information in the role configuration instruction, and stores the identification information of the other gateways. The method and the system realize the automatic construction of the gateway system, save manpower and material resources and ensure the accuracy of the construction of the gateway system.

Description

Method and device for determining gateway role
Technical Field
The invention relates to the technical field of intelligent home, in particular to a method and a device for determining a gateway role.
Background
People have more and more abundant lives, and in large dwelling types such as villas and multi-storey residences, the problems that network coverage is limited, signal attenuation is obvious when obstacles such as walls are separated, and the number of accessed intelligent household devices is limited are easily caused when a single common gateway is arranged, so that a multi-gateway system is provided.
As shown in fig. 1, the multi-gateway system includes a master gateway and a plurality of slave gateways, such as slave gateway 0, slave gateway 1, … …, where the master gateway and the slave gateways allow access to smart home devices, and the smart home devices communicate with the gateways through a ZigBee wireless communication technology, which may be referred to as the smart home devices as ZigBee devices in fig. 1. The master gateway and the slave gateway are communicated through a local area network, the master gateway can be directly communicated with the cloud server, and the slave gateway can only be communicated with the cloud server through the master gateway. The master gateway and the slave gateway are respectively connected with the switch through twisted-pair lines, and the switch is connected with the router through the twisted-pair lines. The control end of the user can communicate with the router through WiFi, and the use of the master gateway and the slave gateway is realized through the router-switch. The primary gateway communicates with the cloud server through a switch-router, which communicates with the cloud server through a wide area network.
When a multi-gateway system is constructed, technicians are required to perform role assignment on gateways in advance, namely, a master gateway is determined, and a slave gateway is determined, the technicians write scripts of role configuration information corresponding to the gateways into the gateways, and the gateways are added into the multi-gateway system based on own roles. When the roles of the gateways in the multi-gateway system need to be switched, or a plurality of multi-gateway systems need to be combined, or a certain multi-gateway system needs to be split, technicians need to restore factory settings for the gateways, and rewrite scripts of role configuration information. When the gateway is placed at a position which is not easy to contact, technicians restore factory settings of the gateway, and the mode of rewriting the script is very inconvenient, so that manpower and material resources are wasted. Moreover, when the technician writes the script of the role configuration information, the data stored in the gateway may be lost, and a risk of writing errors may also occur.
Disclosure of Invention
The embodiment of the invention discloses a method and a device for determining a gateway role, which are used for solving the problems of inconvenience and easy error when the gateway role is manually configured in the prior art.
In order to achieve the above object, an embodiment of the present invention discloses a method for determining a role of a gateway, where a terminal and the gateway are located in the same local area network, and the method includes:
the terminal receives target role information of each target gateway in a first gateway system, which is input by a user;
and aiming at each target gateway, identifying other gateways which are different from the target role information of the target gateway in the first gateway system, sending a role configuration instruction to the target gateway, wherein the role configuration instruction comprises the target role information of the target gateway and the identification information of the other identified gateways, so that the target gateway updates the currently stored role information according to the target role information in the role configuration instruction, and stores the identification information of the other gateways.
Further, the receiving of the target role information of each target gateway in the first gateway system input by the user includes:
receiving a gateway system configuration instruction triggered by a user, and displaying identification information of each gateway capable of performing role configuration in a gateway system configuration interface;
and receiving target role information set by a user for the target gateway.
Further, after receiving a gateway system configuration instruction triggered by a user, before displaying identification information of each gateway capable of role configuration in a gateway system configuration interface, the method further includes:
sending a broadcast message inquired by a gateway;
and receiving response information sent by each gateway capable of performing role configuration, wherein the response information comprises identification information of the gateway.
Further, the response information also contains the current role information of the gateway;
and displaying the current role information of each gateway capable of role configuration in the gateway system configuration interface.
Further, if the current role information of the gateway sending the response information is the slave gateway, the response information also contains the identification information of the master gateway in the gateway system where the slave gateway is currently located;
before receiving target role information set by a user on a target gateway, the method further comprises the following steps:
for each master gateway, identifying each slave gateway corresponding to the master gateway;
in the gateway system configuration interface, for each master gateway, the master gateway and each slave gateway corresponding to the master gateway are displayed as a group.
The embodiment of the invention discloses a method for determining a gateway role, which comprises the following steps:
a gateway receives a role configuration instruction sent by a terminal, wherein the role configuration instruction comprises target role information of the gateway and identification information of other gateways which are different from the target role information of the gateway in a first gateway system where the gateway is located; the configuration instruction is sent after the terminal receives target role information of each gateway in a first gateway system input by a user and identifies identification information of other gateways in the first gateway system, wherein the identification information is different from the target role information of the gateways;
and updating the currently stored role information according to the target role information, and storing the identification information of other gateways.
Further, after the gateway receives the role configuration instruction sent by the terminal, the method further includes:
judging whether the currently stored role information is a slave gateway or not and whether the target role information included in the role configuration instruction is the slave gateway or not;
if at least one of the first intelligent household equipment and the second intelligent household equipment is yes, reporting identification information of each first intelligent household equipment accessed to the gateway to a cloud server, and deleting stored scene information;
and if the first gateway system and the second gateway system are not the same, determining whether the currently stored role information is a main gateway, and if the currently stored role information is the main gateway, setting the use state of each second intelligent household device stored in the gateway as unavailable, wherein the second intelligent household device is an intelligent household device accessed to a slave gateway in the non-first gateway system.
The embodiment of the invention discloses a device for determining the role of a gateway, which is applied to a terminal, wherein the terminal and the gateway are positioned in the same local area network, and the device comprises:
the role determining module is used for receiving target role information of each target gateway in the first gateway system, which is input by a user;
and the sending module is used for identifying other gateways which are different from the target role information of the target gateway in the first gateway system aiming at each target gateway, sending a role configuration instruction to the target gateway, wherein the role configuration instruction comprises the target role information of the target gateway and the identification information of the other identified gateways, so that the target gateway updates the currently stored role information according to the target role information in the role configuration instruction, and stores the identification information of the other gateways.
Further, the role determination module is specifically configured to receive a gateway system configuration instruction triggered by a user, and display identification information of each gateway capable of performing role configuration in a gateway system configuration interface; and receiving target role information set by a user for the target gateway.
Further, the role determination module is further configured to send a broadcast message of gateway query after receiving a gateway system configuration instruction triggered by a user and before displaying identification information of each gateway capable of role configuration in a gateway system configuration interface; and receiving response information sent by each gateway capable of performing role configuration, wherein the response information comprises identification information of the gateway.
Further, the response information also contains the current role information of the gateway;
the role determination module is further configured to further display current role information of each gateway capable of role configuration in the gateway system configuration interface.
Further, if the current role information of the gateway sending the response information is the slave gateway, the response information also contains the identification information of the master gateway in the gateway system where the slave gateway is currently located;
the role determination module is further configured to identify, for each master gateway, each slave gateway corresponding to the master gateway before receiving target role information set by a user for a target gateway; in the gateway system configuration interface, for each master gateway, the master gateway and each slave gateway corresponding to the master gateway are displayed as a group.
The embodiment of the invention discloses a device for determining the role of a gateway, which is applied to the gateway and comprises the following components:
a receiving module, configured to receive a role configuration instruction sent by a terminal, where the role configuration instruction includes target role information of the gateway and identification information of other gateways that are different from the target role information of the gateway in a first gateway system where the gateway is located; the configuration instruction is sent after the terminal receives target role information of each gateway in a first gateway system input by a user and identifies identification information of other gateways in the first gateway system, wherein the identification information is different from the target role information of the gateways;
and the role configuration module is used for updating the currently stored role information according to the target role information and storing the identification information of other gateways.
Further, the role configuration module is further configured to determine whether the currently stored role information is a slave gateway, and whether the target role information included in the role configuration instruction is a slave gateway;
if at least one of the first intelligent household equipment and the second intelligent household equipment is yes, reporting identification information of each first intelligent household equipment accessed to the gateway to a cloud server, and deleting stored scene information;
and if the first gateway system and the second gateway system are not the same, determining whether the currently stored role information is a main gateway, and if the currently stored role information is the main gateway, setting the use state of each second intelligent household device stored in the gateway as unavailable, wherein the second intelligent household device is an intelligent household device accessed to a slave gateway in the non-first gateway system.
The embodiment of the invention discloses a system for determining gateway roles, which comprises: the device for determining the gateway role applied to the terminal and the device for configuring the gateway role applied to the gateway are described in any one of the above.
The embodiment of the invention discloses an electronic device, which can be a terminal and comprises: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
the memory has stored therein a computer program which, when executed by the processor, causes the processor to perform the steps of any of the methods described above.
The embodiment of the invention discloses a computer readable storage medium, which stores a computer program executable by a terminal, and when the program runs on the terminal, the terminal is caused to execute the steps of any one of the methods.
The embodiment of the invention discloses an electronic device, which can be a gateway and comprises: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
the memory has stored therein a computer program which, when executed by the processor, causes the processor to perform the steps of any of the methods described above.
The embodiment of the invention discloses a computer readable storage medium, which stores a computer program executable by a gateway, and when the program runs on the gateway, the gateway executes the steps of any one of the methods.
In the embodiment of the invention, the terminal sends the target role information and the identification information of other gateways in the gateway system to the gateway, and the gateway updates the current role information and stores the identification information of other gateways so as to be convenient for subsequent communication with other gateways. The method and the system realize the automatic construction of the gateway system, save manpower and material resources and ensure the accuracy of the construction of the gateway system.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is an architecture diagram of a multi-gateway system according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a process of determining a gateway role according to an embodiment of the present invention;
fig. 3 is a configuration interface of a gateway system according to an embodiment of the present invention;
fig. 4 is a configuration interface of a gateway system according to an embodiment of the present invention;
fig. 5 is a configuration interface of a gateway system according to an embodiment of the present invention;
fig. 6 is a configuration interface of a gateway system according to an embodiment of the present invention;
fig. 7 is a diagram of a device structure for determining a gateway role according to an embodiment of the present invention;
fig. 8 is a diagram of a device structure for determining a gateway role according to an embodiment of the present invention;
fig. 9 is a system diagram for determining a gateway role according to an embodiment of the present invention;
fig. 10 is a terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1:
fig. 2 is a schematic diagram of a process for determining a gateway role according to an embodiment of the present invention, where the process includes the following steps:
s201: the terminal receives target role information of each target gateway in the first gateway system, which is input by a user.
S202: and aiming at each target gateway, identifying other gateways which are different from the target role information of the target gateway in the first gateway system, sending a role configuration instruction to the target gateway, wherein the role configuration instruction comprises the target role information of the target gateway and the identification information of the other identified gateways, so that the target gateway updates the currently stored role information according to the target role information in the role configuration instruction, and stores the identification information of the other gateways.
In the embodiment of the present invention, when a user wants to construct a gateway system, the user may input role information of each gateway in the gateway system that is desired to be constructed on a terminal, refer to the gateway system to be constructed of the terminal as a first gateway system, refer to each gateway in the first gateway system as a target gateway, and refer to the role information of the target gateway as target role information. The first gateway system may be a gateway system formed by a single common gateway, or may be a gateway system formed by a master gateway and at least one slave gateway. Each gateway stored in the terminal and the terminal are located in the same local area network, that is, each gateway in the first gateway system and the terminal are located in the same local area network.
The user may input the identification information of each target gateway in the first gateway system and the target role information of each target gateway on the terminal, and the target role information of the target gateway may be a master gateway, a slave gateway, or a common gateway. The terminal can be provided with an application for constructing the gateway system, and the terminal can display the virtual key for constructing the gateway system when the application for constructing the gateway is operated. When the terminal receives a click operation of a user on the virtual key for constructing the gateway system, the first gateway system can be constructed, specifically, an input interface for displaying identification information and role information of the gateway can be provided, the terminal determines the gateway corresponding to the identification information input by the user as a target gateway in the first gateway system, and determines the role information input by the target gateway as the target role information of the target gateway in the first gateway system.
After determining each target gateway in the first gateway system and the target role information of each target gateway, the terminal can identify other gateways in the first gateway system, the role information of which is different from the target role information of the target gateway, and identify the identification information of the other gateways, aiming at each target gateway. Other gateways in the first gateway system whose role information is different from the target role information of the target gateway may be understood as other gateways in the first gateway system that can communicate with the target gateway.
When the terminal identifies, for each target gateway, another gateway in the first gateway system that is different from the target role information of the target gateway, the terminal may identify that the target role information in the first gateway system is a gateway of a slave gateway if the role information of the target gateway is a master gateway; and if the role information of the target gateway is the slave gateway, identifying that the target role information in the first gateway system is the gateway of the master gateway.
The terminal stores the IP address of each gateway and the port number of each gateway, and after determining other corresponding gateways for each target gateway, the terminal can send a role configuration instruction to the target gateway according to the stored IP address and the port number of each gateway, wherein the role configuration instruction comprises target role information of the target gateway in a first gateway system and identification information of the other identified gateways, so that the target gateway updates the currently stored role information according to the target role information in the role configuration instruction, and stores the identification information of the other gateways.
And the terminal sends a role configuration instruction to the gateway, and the gateway receives the role configuration instruction sent by the terminal, wherein the role configuration instruction comprises target role information of the gateway in a first gateway system and identification information of other gateways which are different from the target role information of the gateway in the first gateway system where the gateway is located. The configuration instruction is sent after the terminal receives target role information of each gateway in a first gateway system input by a user and identifies identification information of other gateways in the first gateway system, wherein the other gateways are different from the target role information of the gateways, and the gateways are located in the first gateway system.
After analyzing the target role information in the role configuration instruction and the identification information of other gateways, the gateway can update the currently stored role information according to the target role information and store the identification information of other gateways in the configuration instruction.
The gateway may be provided with a field for indicating role information, and when updating the currently stored role information according to the target role information, the gateway may update the field for indicating the role information. For example, when the field for indicating role information is 1, it indicates that the gateway is a master gateway, when the field for indicating role information is 2, it indicates that the gateway is a slave gateway, and when the field for indicating role information is 3, it indicates that the gateway is a normal gateway.
The gateway may further include a field indicating change of the role information, and when updating the currently stored role information according to the target role information, the gateway may update the field indicating change of the role information. For example, if the field indicating the change of the role information is a, it indicates that the gateway is changed from the master gateway to the slave gateway, that is, the current role information stored in the gateway is the master gateway, and the target role information in the role configuration command is the slave gateway. When the field for marking the change of the role information is b, the gateway is changed from the slave gateway to the master gateway, when the field for marking the change of the role information is c, the gateway is changed from the common gateway to the master gateway, and the like.
If the first gateway system includes both the master gateway and the slave gateway, the terminal may send the role configuration instruction randomly when sending the role configuration instruction to each target gateway in the first gateway system, or may send the role configuration instruction to the gateway whose target role information is the master gateway according to a predetermined sending sequence, and send the role configuration instruction to the gateway whose target role information is the slave gateway after the gateway whose target role information is the master gateway replies the response information of successful configuration.
When sending the role configuration instruction to the target gateway, the terminal may send the role configuration instruction in a User Datagram Protocol (UDP) unicast format. During the process that the terminal sends the role configuration command to the target gateway, the terminal can display '… … in configuration' in the display interface.
The terminal sends the role configuration instruction to the gateway, the gateway can reply the successful terminal configuration by a unicast message after the role configuration is successful, and if the terminal does not receive the reply of the gateway, the role configuration instruction can be sent again. And if the response information of successful configuration replied by the gateway is not received after the set times of repeated sending, the target role information of the target gateway is considered to be failed to be configured. The number of times may be set to 2 or 3 times, for example.
The terminal can prompt the target gateway which fails to be configured, and the gateway which succeeds in configuration and the gateway which fails in configuration need to be distinguished and displayed.
In the embodiment of the invention, the terminal sends the target role information and the identification information of other gateways in the gateway system to the gateway, and the gateway updates the current role information and stores the identification information of other gateways so as to be convenient for subsequent communication with other gateways. The method and the system realize the automatic construction of the gateway system, save manpower and material resources and ensure the accuracy of the construction of the gateway system.
Example 2:
in order to construct the gateway system more accurately and conveniently, on the basis of the above embodiment, in the embodiment of the present invention, the receiving the target role information of each target gateway in the first gateway system input by the user includes:
receiving a gateway system configuration instruction triggered by a user, and displaying identification information of each gateway capable of performing role configuration in a gateway system configuration interface;
and receiving target role information set by a user for the target gateway.
In the embodiment of the invention, if a user wants to construct a gateway system, a gateway system configuration instruction can be triggered on a terminal, the terminal displays a gateway system configuration interface, identification information of each gateway capable of performing role configuration is displayed in the gateway system configuration interface, and the user constructs the gateway system according to each gateway displayed in the gateway system configuration interface. The identification information of each gateway capable of role configuration displayed on the gateway system configuration interface can be stored by the terminal.
The terminal can be provided with an application for constructing the gateway system, the application for constructing the gateway system can be opened when a user wants to construct the gateway system, and the terminal determines to receive a gateway system configuration instruction triggered by the user when receiving an operation instruction of the application constructed by the gateway system.
When the terminal runs the application constructed by the gateway system, a virtual key for constructing the gateway system can be displayed on the display interface, and a user can click the virtual key to construct the gateway system.
After receiving a gateway system configuration instruction triggered by a user, a terminal may display identification information of each gateway capable of performing role configuration in a gateway system configuration interface, and then the user may set role information of the gateway in a first gateway system to be constructed, refer to the gateway in the first gateway system to be constructed as a target gateway, refer to role information of the target gateway in the first gateway system as target role information, and receive the target role information set by the user for the target gateway, where the specific process may be as follows:
the user can select each target gateway in the first gateway system to be constructed according to the displayed identification information of each gateway capable of performing role configuration, the terminal identifies the target gateway selected by the user, and the terminal can display a display interface for configuring the role information of the target gateway after identifying that the user selects the target gateway. The user can set target role information of the target gateway in the first gateway system in the display interface for configuring the role of the target gateway. The display interface for configuring the role information of the target gateway can be a role information input interface, a user can input the role information which is desired to be configured for the target gateway in the role information input interface, the terminal receives the role information which is input by the user aiming at the target gateway, the terminal judges whether the role information which is input by the user is the role information which can be configured for the target gateway, and if so, the role information which is input by the user aiming at the target gateway is determined as the target role information of the target gateway.
In order to facilitate user operation, the display interface configured for the role information of the target gateway may also be a role information selection interface, each type of role information capable of being configured for the target gateway is displayed in the role information selection interface, a user may select the target role information of the target gateway on the role information selection interface, the terminal receives the target role information selected by the user for the target gateway, and determines the target role information selected by the user for the target gateway as the target role information of the target gateway input by the user.
To further facilitate user operation, as shown in fig. 3, not only the identification information of each gateway capable of role configuration, for example, "861010001000 eef 000000040", is displayed in the gateway system configuration interface, but also for each gateway displaying the identification information, options of role information that the gateway can be configured, for example, a master gateway, a slave gateway, and a normal gateway in role selection, are displayed. The terminal receives target role information selected by a user aiming at a displayed first gateway, determines the first gateway as a target gateway, and determines the target role information selected by the user aiming at the target gateway as the target role information of the target gateway input by the user.
Example 3:
on the basis of the foregoing embodiments, in an embodiment of the present invention, after receiving a gateway system configuration instruction triggered by a user, before displaying identification information of each gateway capable of performing role configuration in a gateway system configuration interface, the method further includes:
sending a broadcast message inquired by a gateway;
and receiving response information sent by each gateway capable of performing role configuration, wherein the response information comprises identification information of the gateway.
In the embodiment of the present invention, after receiving a gateway system configuration instruction triggered by a user, a terminal may send a broadcast message queried by a gateway, and receive response information sent by each gateway, where the gateway sending the response information is generally a gateway capable of performing role configuration, and the response information sent by the gateway includes identification information of the gateway.
When the terminal sends the broadcast message queried by the gateway, the terminal may send the broadcast message only once, or send the broadcast message multiple times according to a preset time interval, where the time interval may be 1S, and may be, for example, 3 times, 4 times, and the like. The terminal may display "… … in query" on the display interface of the terminal during the process of transmitting the broadcast message of the gateway query.
The gateway monitors a broadcast message receiving port, and after receiving a broadcast message sent by a terminal, the gateway can send a unicast response message to the terminal to realize the response to the terminal, wherein the response message at least comprises identification information wifiID of the gateway. And the terminal receives the response information sent by the gateway and displays the identification information of the gateway in a gateway system configuration interface.
As shown in fig. 3, a "refresh" button may be displayed in the terminal, and when the terminal recognizes that the user clicks the "refresh" button, the terminal may again transmit the broadcast message of the gateway query.
The response information sent by the gateway to the terminal may further include an IP address and a port number of the gateway, and the IP address and the port number stored in the terminal may be stored in the response information sent by the gateway and received by the terminal.
Example 4:
for the convenience of the user to construct the gateway system, on the basis of the foregoing embodiments, in the embodiment of the present invention, the response information sent by the gateway and received by the terminal may further include the current role information role of the gateway. As shown in fig. 3, the terminal may display not only the identification information of each gateway capable of role configuration on the gateway system configuration interface, but also the current role information of the gateway. Such as a master gateway, a slave gateway, a generic gateway, etc.
For each gateway, the gateway stores identification information of other gateways different from the role information of the gateway, and there may be one or more gateway systems currently existing in the local area network where the terminal is located. In order to further facilitate the user to construct the gateway system, the response information sent by the gateway and received by the terminal may further include identification information of other gateways different from the role information of the gateway in the gateway system where the gateway is currently located, and if the current role information included in the response information is a slave gateway, the response information sent by the terminal and received by the slave gateway may further include identification information of a master gateway in the gateway system where the slave gateway is currently located, and a master wifi id. If the current role information contained in the response information is the master gateway, the terminal may further contain identification information of each slave gateway in the gateway system where the master gateway is currently located in the response information sent by the master gateway.
The terminal may identify, for each master gateway, each slave gateway corresponding to the master gateway, and display, in the gateway system configuration interface, for each master gateway, the master gateway and each slave gateway corresponding to the master gateway as a group.
When each slave gateway corresponding to the master gateway is identified, the master gateway may be a gateway whose current role information is the master gateway, or the master gateway included in response information sent by a gateway whose current role information is the slave gateway.
As shown in fig. 3, the gateway system configuration interface uses the master gateway as a master key to perform group display on the master gateway and the slave gateways in the gateway system in which the master gateway is located, where a group 1 represents a gateway system, which includes 1 master gateway and 2 slave gateways, and a group 2 represents a gateway system, which includes 1 master gateway and 2 slave gateways, and the normal gateways can be displayed individually as a group.
As shown in fig. 4, the terminal compares each slave gateway responding to the information responded by the local area network with each slave gateway included in the response information responded by each master gateway, and if a certain slave gateway is included in the response information responded by the master gateway but the response information responded by the slave gateway is not received, the slave gateway is considered to be offline, the terminal can display the identification information of the slave gateway in a semi-transparent manner, and the slave gateway displays the corresponding identification information, but cannot configure the role information.
As shown in fig. 5, the terminal compares each master gateway replying response information in the local area network with the master gateway included in the response information replied by each slave gateway, and if the response information replied by the slave gateway includes the master gateway but does not receive the response information replied by the master gateway, the terminal may perform semi-transparent display on the identification information of the master gateway corresponding to the slave gateway, and the master gateway displays the identification information corresponding to the master gateway but cannot configure role information of the master gateway.
As shown in fig. 6, a user may select role information of a gateway in a gateway system configuration interface, determine the gateway with the selected role information as a target gateway in a first gateway system, and a terminal may only construct one gateway system at a time. When role configuration is performed, a target gateway can be selected across network relations, that is, a target gateway can be selected across groups in fig. 5, and the role information of unselected gateways is not changed. After determining the target role information of each target gateway in the first gateway system, the user may click the "confirm" button in fig. 5, and the terminal performs a subsequent process of identifying, for each target gateway, another gateway in the first gateway system that is different from the target role information of the target gateway, and sending a role configuration instruction to the target gateway.
The similarity between fig. 4, 5 and 6 and fig. 3 can be referred to the description of fig. 3.
Example 5:
in order to facilitate subsequent use, after receiving the role configuration instruction sent by the terminal, the gateway may report, to the cloud server, identification information of each first smart home device accessing the gateway, and in order to save resources of the gateway, in an embodiment of the present invention, after receiving the role configuration instruction sent by the terminal, the method further includes:
judging whether the currently stored role information is a slave gateway or not and whether the target role information included in the role configuration instruction is the slave gateway or not;
if at least one of the first intelligent household equipment and the second intelligent household equipment is yes, reporting identification information of each first intelligent household equipment accessed to the gateway to a cloud server, and deleting stored scene information;
and if the role information is not the master gateway, determining whether the currently stored role information is the master gateway, and if the currently stored role information is the master gateway, setting the use state of each second intelligent household device stored in the gateway as unavailable, wherein the second intelligent household device is an intelligent household device of a slave gateway accessed to the gateway.
The intelligent home devices can be accessed into the slave gateways or the master gateways, the slave gateways and the cloud server cannot directly communicate, and for convenience of management, the cloud server can save the intelligent home devices accessed into the master gateways and the intelligent home devices accessed into the slave gateways in the gateway system where the master gateways are located for each master gateway. When the role of the gateway changes, the smart home devices accessed to the gateway are generally unchanged, and the gateway can directly or indirectly report the smart home devices accessed to the gateway, so that the cloud server can manage the smart home devices by taking the main gateway as a unit. The master gateway can store identification information of the smart home devices accessing each slave gateway in the gateway system where the master gateway is located. The common gateway can also be directly communicated with the cloud server, and the cloud server can also be managed by taking the common gateway as a unit. In order to avoid data redundancy, the stored scene information may be deleted after the above-described role switching is performed. The scene information may be understood as related information when the smart home device is used, for example, information such as what condition an alarm is given to a camera, and what condition a power failure is given to a switch socket.
The gateway may be configured to determine whether the currently stored role information is a slave gateway, and whether the target role information included in the role configuration instruction is a slave gateway;
and if at least one of the currently stored role information and the target role information included in the role configuration instruction is a slave gateway, reporting identification information of each first intelligent household device accessed to the gateway to a cloud server.
When the gateway is switched from the slave gateway to the master gateway, the role information currently stored by the gateway is the slave gateway, the target role information is the master gateway, and the gateway can directly report the identification information of the first smart home device accessed to the gateway to the cloud server.
When the gateway is switched from the common gateway to the slave gateway, the role information currently stored by the gateway is the common gateway, the target role information is the slave gateway, and the gateway can report the identification information of the first smart home device accessed to the gateway to the cloud server through the master gateway in the role configuration instruction.
When the gateway is switched from the master gateway to the slave gateway, the role information currently stored by the gateway is the master gateway, the target role information is the slave gateway, and the gateway can report the identification information of the first smart home device accessed to the gateway to the cloud server through the master gateway in the role configuration instruction.
When the gateway is switched from the slave gateway to the slave gateway, the role information currently stored by the gateway is the slave gateway, the target role information is the slave gateway, and the gateway can report the identification information of the first intelligent home device accessed to the gateway to the cloud server through the master gateway in the role configuration instruction.
In order to reduce the workload of the gateway, if the currently stored role information is the slave gateway and the target role information included in the role configuration instruction is the slave gateway, before reporting the identification information of each first smart home device accessing the gateway to the cloud server and deleting the stored scene information, the method further includes:
and determining whether the currently stored identification information of the main gateway is the same as the identification information of other gateways included in the role configuration instruction, if so, performing subsequent steps, and if so, not performing the subsequent steps.
When the gateway is switched from the slave gateway to the common gateway, the role information currently stored by the gateway is the slave gateway, the target role information is the common gateway, the gateway can report the identification information of the first intelligent home equipment accessed to the gateway to the cloud server directly through the fact that the identification information of other gateways does not exist in the role configuration instruction.
The terminal determines whether the currently stored role information is a master gateway or not when determining that the currently stored role information is not a slave gateway and the target role information included in the role configuration instruction is not a slave gateway, and if the currently stored role information is the master gateway, the terminal sets the use state of each second intelligent home device stored in the gateway to be unavailable, wherein the second intelligent home devices are intelligent home devices accessed to the slave gateways in the non-first gateway system.
When the gateway is switched from the master gateway to the ordinary gateway, the role information currently stored by the gateway is the master gateway, the target role information is the ordinary gateway, the gateway can set the second intelligent home equipment, which is accessed into each slave gateway in the gateway system where the master gateway is currently located, to be in an offline state, namely an unavailable state, before the role information is updated, and delete the relevant information of the second intelligent home equipment, wherein each slave gateway in the gateway system where the master gateway is currently located is a slave gateway in a non-first gateway system before the role information is updated.
When the gateway is switched from the master gateway to the master gateway, the role information currently stored by the gateway is the master gateway, the target role information is the master gateway, the gateway can set the second intelligent home equipment in each slave gateway accessed to the non-first gateway system to be in an offline state, namely an unavailable state, and delete the related information of the second intelligent home equipment.
For switching from the common gateway to the common gateway or switching from the common gateway to the main gateway, the gateway may not report the identification information of the smart home device accessed to the gateway to the cloud service, and may not perform the operation of deleting the scene information and the identification information of the smart home device.
Before the gateway reports the identification information of each first smart home device accessed to the gateway to the cloud server, the gateway can also set an access flag bit of the smart home device accessed to the gateway to be not accessed, directly or indirectly report the smart home device with the identification bit set to be not accessed to the cloud server, and after receiving an access response replied by the cloud server, set the access flag bit to be accessed.
Example 6:
fig. 7 is a structural diagram of a device for determining a gateway role according to an embodiment of the present invention, where the device is applied to a terminal, and the terminal and the gateway are located in the same local area network, and the device includes:
a role determination module 71, configured to receive user input of target role information of each target gateway in the first gateway system;
a sending module 72, configured to identify, for each target gateway, another gateway in the first gateway system that is different from the target role information of the target gateway, send a role configuration instruction to the target gateway, where the role configuration instruction includes the target role information of the target gateway and the identification information of the identified other gateway, so that the target gateway updates the currently stored role information according to the target role information in the role configuration instruction, and stores the identification information of the other gateway.
Further, the role determination module 71 is specifically configured to receive a gateway system configuration instruction triggered by a user, and display identification information of each gateway capable of performing role configuration in a gateway system configuration interface; and receiving target role information set by a user for the target gateway.
Further, the role determination module 71 is further configured to, after receiving a gateway system configuration instruction triggered by a user, send a broadcast message of a gateway query before displaying identification information of each gateway capable of role configuration in a gateway system configuration interface; and receiving response information sent by each gateway capable of performing role configuration, wherein the response information comprises identification information of the gateway.
Further, the response information also contains the current role information of the gateway;
the role determination module 71 is further configured to further display current role information of each gateway capable of role configuration in the gateway system configuration interface.
Further, if the current role information of the gateway sending the response information is the slave gateway, the response information also contains the identification information of the master gateway in the gateway system where the slave gateway is currently located;
the role determination module 71 is further configured to, before receiving target role information set by a user for a target gateway, identify, for each master gateway, each slave gateway corresponding to the master gateway; in the gateway system configuration interface, for each master gateway, the master gateway and each slave gateway corresponding to the master gateway are displayed as a group.
Example 7:
fig. 8 is a structural diagram of an apparatus for determining a gateway role according to an embodiment of the present invention, where the apparatus is applied to a gateway, and the apparatus includes:
a receiving module 81, configured to receive a role configuration instruction sent by a terminal, where the role configuration instruction includes target role information of the gateway and identification information of another gateway in a first gateway system where the gateway is located, where the other gateway is different from the target role information of the gateway; the configuration instruction is sent after the terminal receives target role information of each gateway in a first gateway system input by a user and identifies identification information of other gateways in the first gateway system, wherein the identification information is different from the target role information of the gateways;
and the role configuration module 82 is configured to update the currently stored role information according to the target role information, and store the identification information of the other gateways.
Further, the role configuration module 82 is further configured to determine whether currently stored role information is a slave gateway, and whether target role information included in the role configuration instruction is a slave gateway;
if at least one of the first intelligent household equipment and the second intelligent household equipment is yes, reporting identification information of each first intelligent household equipment accessed to the gateway to a cloud server, and deleting stored scene information;
and if the first gateway system and the second gateway system are not the same, determining whether the currently stored role information is a main gateway, and if the currently stored role information is the main gateway, setting the use state of each second intelligent household device stored in the gateway as unavailable, wherein the second intelligent household device is an intelligent household device accessed to a slave gateway in the non-first gateway system.
Example 8:
fig. 9 is a system for determining a role of a gateway according to an embodiment of the present invention, where the system includes: any of the above-described means for determining a gateway role for the terminal 91 and any of the above-described means for configuring a gateway role for the gateway 92.
Example 9:
fig. 10 discloses a terminal according to an embodiment of the present invention, which includes: the system comprises a processor 101, a communication interface 102, a memory 103 and a communication bus 104, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of:
receiving target role information of each target gateway in a first gateway system, which is input by a user;
and aiming at each target gateway, identifying other gateways which are different from the target role information of the target gateway in the first gateway system, sending a role configuration instruction to the target gateway, wherein the role configuration instruction comprises the target role information of the target gateway and the identification information of the other identified gateways, so that the target gateway updates the currently stored role information according to the target role information in the role configuration instruction, and stores the identification information of the other gateways.
Further, the receiving of the target role information of each target gateway in the first gateway system input by the user includes:
receiving a gateway system configuration instruction triggered by a user, and displaying identification information of each gateway capable of performing role configuration in a gateway system configuration interface;
and receiving target role information set by a user for the target gateway.
Further, after receiving a gateway system configuration instruction triggered by a user, sending a broadcast message of gateway query before displaying identification information of each gateway capable of role configuration in a gateway system configuration interface;
and receiving response information sent by each gateway capable of performing role configuration, wherein the response information comprises identification information of the gateway.
Further, the response information also contains the current role information of the gateway;
and displaying the current role information of each gateway capable of role configuration in the gateway system configuration interface.
Further, if the current role information of the gateway sending the response information is the slave gateway, the response information also contains the identification information of the master gateway in the gateway system where the slave gateway is currently located;
before receiving target role information set by a user on a target gateway, identifying each slave gateway corresponding to each master gateway aiming at each master gateway;
in the gateway system configuration interface, for each master gateway, the master gateway and each slave gateway corresponding to the master gateway are displayed as a group.
The communication bus mentioned in the above embodiments may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
And the communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a central processing unit, a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.
Example 10:
the embodiment of the invention discloses a computer readable storage medium, which stores a computer program executable by a terminal, and when the program runs on the terminal, the terminal is enabled to execute the following steps:
receiving target role information of each target gateway in a first gateway system, which is input by a user;
and aiming at each target gateway, identifying other gateways which are different from the target role information of the target gateway in the first gateway system, sending a role configuration instruction to the target gateway, wherein the role configuration instruction comprises the target role information of the target gateway and the identification information of the other identified gateways, so that the target gateway updates the currently stored role information according to the target role information in the role configuration instruction, and stores the identification information of the other gateways.
Further, the receiving of the target role information of each target gateway in the first gateway system input by the user includes:
receiving a gateway system configuration instruction triggered by a user, and displaying identification information of each gateway capable of performing role configuration in a gateway system configuration interface;
and receiving target role information set by a user for the target gateway.
Further, after receiving a gateway system configuration instruction triggered by a user, sending a broadcast message of gateway query before displaying identification information of each gateway capable of role configuration in a gateway system configuration interface;
and receiving response information sent by each gateway capable of performing role configuration, wherein the response information comprises identification information of the gateway.
Further, the response information also contains the current role information of the gateway;
and displaying the current role information of each gateway capable of role configuration in the gateway system configuration interface.
Further, if the current role information of the gateway sending the response information is the slave gateway, the response information also contains the identification information of the master gateway in the gateway system where the slave gateway is currently located;
before receiving target role information set by a user on a target gateway, identifying each slave gateway corresponding to each master gateway aiming at each master gateway;
in the gateway system configuration interface, for each master gateway, the master gateway and each slave gateway corresponding to the master gateway are displayed as a group.
The computer readable storage medium in the above embodiments may be any available medium or data storage device that can be accessed by the processor in the terminal, including but not limited to magnetic memory such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MOs), etc., optical memory such as CDs, DVDs, BDs, HVDs, etc., and semiconductor memory such as ROMs, EPROMs, EEPROMs, non-volatile memories (NAND FLASH), Solid State Disks (SSDs), etc.
Example 11:
the embodiment of the invention discloses a gateway, which comprises: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of:
receiving a role configuration instruction sent by a terminal, wherein the role configuration instruction comprises target role information of the gateway and identification information of other gateways which are different from the target role information of the gateway in a first gateway system where the gateway is located; the configuration instruction is sent after the terminal receives target role information of each gateway in a first gateway system input by a user and identifies identification information of other gateways in the first gateway system, wherein the identification information is different from the target role information of the gateways;
and updating the currently stored role information according to the target role information, and storing the identification information of other gateways.
Further, after receiving the role configuration instruction sent by the terminal, the gateway determines whether the currently stored role information is a slave gateway or not and whether the target role information included in the role configuration instruction is the slave gateway or not;
if at least one of the first intelligent household equipment and the second intelligent household equipment is yes, reporting identification information of each first intelligent household equipment accessed to the gateway to a cloud server, and deleting stored scene information;
and if the first gateway system and the second gateway system are not the same, determining whether the currently stored role information is a main gateway, and if the currently stored role information is the main gateway, setting the use state of each second intelligent household device stored in the gateway as unavailable, wherein the second intelligent household device is an intelligent household device accessed to a slave gateway in the non-first gateway system.
The communication bus mentioned in the gateway in the above embodiments may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
And the communication interface is used for communication between the gateway and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a central processing unit, a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.
Example 12:
the embodiment of the invention discloses a computer readable storage medium, which stores a computer program executable by a gateway, and when the program runs on the gateway, the gateway executes the following steps:
receiving a role configuration instruction sent by a terminal, wherein the role configuration instruction comprises target role information of the gateway and identification information of other gateways which are different from the target role information of the gateway in a first gateway system where the gateway is located; the configuration instruction is sent after the terminal receives target role information of each gateway in a first gateway system input by a user and identifies identification information of other gateways in the first gateway system, wherein the identification information is different from the target role information of the gateways;
and updating the currently stored role information according to the target role information, and storing the identification information of other gateways.
Further, after receiving the role configuration instruction sent by the terminal, the gateway determines whether the currently stored role information is a slave gateway or not and whether the target role information included in the role configuration instruction is the slave gateway or not;
if at least one of the first intelligent household equipment and the second intelligent household equipment is yes, reporting identification information of each first intelligent household equipment accessed to the gateway to a cloud server, and deleting stored scene information;
and if the first gateway system and the second gateway system are not the same, determining whether the currently stored role information is a main gateway, and if the currently stored role information is the main gateway, setting the use state of each second intelligent household device stored in the gateway as unavailable, wherein the second intelligent household device is an intelligent household device accessed to a slave gateway in the non-first gateway system.
The computer readable storage medium in the above embodiments may be any available medium or data storage device that can be accessed by the processor in the gateway, including but not limited to magnetic memory such as floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc., optical memory such as CDs, DVDs, BDs, HVDs, etc., and semiconductor memory such as ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), Solid State Disks (SSDs), etc.
In the embodiment of the invention, the terminal sends the target role information and the identification information of other gateways in the gateway system to the gateway, and the gateway updates the current role information and stores the identification information of other gateways so as to be convenient for subsequent communication with other gateways. The method and the system realize the automatic construction of the gateway system, save manpower and material resources and ensure the accuracy of the construction of the gateway system.
For the system/apparatus embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
It is to be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or operation from another entity or operation without necessarily requiring or implying any actual such relationship or order between such entities or operations.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely application embodiment, or an embodiment combining application and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (9)

1. A method for determining gateway role is characterized in that a terminal and a gateway are located in the same local area network, and the method comprises the following steps:
the terminal receives target role information of each target gateway in a first gateway system, which is input by a user;
aiming at each target gateway, identifying other gateways which are different from the target role information of the target gateway in the first gateway system, sending a role configuration instruction to the target gateway, wherein the role configuration instruction comprises the target role information of the target gateway and the identification information of the other identified gateways, so that the target gateway updates the currently stored role information according to the target role information in the role configuration instruction, and stores the identification information of the other gateways;
the terminal sends a role configuration instruction to the target gateway, so that the target gateway judges whether the currently stored role information is a slave gateway or not and whether the target role information included in the role configuration instruction is the slave gateway or not; if at least one of the first intelligent home equipment and the second intelligent home equipment is yes, enabling the target gateway to report identification information of each first intelligent home equipment accessed to the gateway to a cloud server, and enabling the target gateway to delete stored scene information; and if the current role information is not the master role, enabling the target gateway to determine whether the currently stored role information is the master role, and if the current role information is the master role, enabling the target gateway to set the use state of each second intelligent household device stored by the target gateway to be unavailable, wherein the second intelligent household devices are intelligent household devices accessed to slave gateways in the non-first gateway system.
2. The method of claim 1, wherein receiving user input of target role information for each target gateway in the first gateway system comprises:
receiving a gateway system configuration instruction triggered by a user, and displaying identification information of each gateway capable of performing role configuration in a gateway system configuration interface;
and receiving target role information set by a user for the target gateway.
3. The method of claim 2, wherein after receiving a user-triggered gateway system configuration instruction, prior to displaying identification information for each role-configurable gateway in a gateway system configuration interface, the method further comprises:
sending a broadcast message inquired by a gateway;
receiving response information sent by each gateway capable of performing role configuration, wherein the response information comprises identification information of the gateway;
wherein, the response information also comprises the current role information of the gateway;
the current role information of each gateway capable of role configuration is also displayed in the gateway system configuration interface;
if the current role information of the gateway sending the response information is the slave gateway, the response information also comprises identification information of a master gateway in a gateway system where the slave gateway is located;
before receiving target role information set by a user on a target gateway, the method further comprises the following steps:
for each master gateway, identifying each slave gateway corresponding to the master gateway;
in the gateway system configuration interface, for each master gateway, the master gateway and each slave gateway corresponding to the master gateway are displayed as a group.
4. A method for gateway role determination, the method comprising:
a gateway receives a role configuration instruction sent by a terminal, wherein the role configuration instruction comprises target role information of the gateway and identification information of other gateways which are different from the target role information of the gateway in a first gateway system where the gateway is located; the configuration instruction is sent after the terminal receives target role information of each gateway in a first gateway system input by a user and identifies identification information of other gateways in the first gateway system, wherein the identification information is different from the target role information of the gateways;
updating the currently stored role information according to the target role information, and storing the identification information of other gateways;
after the gateway receives the role configuration instruction sent by the terminal, the method further includes:
judging whether the currently stored role information is a slave gateway or not and whether the target role information included in the role configuration instruction is the slave gateway or not;
if at least one of the first intelligent household equipment and the second intelligent household equipment is yes, reporting identification information of each first intelligent household equipment accessed to the gateway to a cloud server, and deleting stored scene information;
and if the first gateway system and the second gateway system are not the same, determining whether the currently stored role information is a main gateway, and if the currently stored role information is the main gateway, setting the use state of each second intelligent household device stored in the gateway as unavailable, wherein the second intelligent household device is an intelligent household device accessed to a slave gateway in the non-first gateway system.
5. An apparatus for determining a role of a gateway, the apparatus being applied to a terminal, the terminal and the gateway being located in a same local area network, the apparatus comprising:
the role determining module is used for receiving target role information of each target gateway in the first gateway system, which is input by a user;
a sending module, configured to identify, for each target gateway, another gateway in the first gateway system that is different from the target role information of the target gateway, send a role configuration instruction to the target gateway, where the role configuration instruction includes the target role information of the target gateway and identification information of the identified other gateway, so that the target gateway updates currently stored role information according to the target role information in the role configuration instruction, and stores the identification information of the other gateway;
the sending module sends a role configuration instruction to the target gateway, so that the target gateway judges whether the currently stored role information is a slave gateway or not and whether the target role information included in the role configuration instruction is the slave gateway or not; if at least one of the first intelligent home equipment and the second intelligent home equipment is yes, enabling the target gateway to report identification information of each first intelligent home equipment accessed to the gateway to a cloud server, and enabling the target gateway to delete stored scene information; and if the current role information is not the master role, enabling the target gateway to determine whether the currently stored role information is the master role, and if the current role information is the master role, enabling the target gateway to set the use state of each second intelligent household device stored by the target gateway to be unavailable, wherein the second intelligent household devices are intelligent household devices accessed to slave gateways in the non-first gateway system.
6. An apparatus for determining a gateway role, applied to a gateway, the apparatus comprising:
a receiving module, configured to receive a role configuration instruction sent by a terminal, where the role configuration instruction includes target role information of the gateway and identification information of other gateways that are different from the target role information of the gateway in a first gateway system where the gateway is located; the configuration instruction is sent after the terminal receives target role information of each gateway in a first gateway system input by a user and identifies identification information of other gateways in the first gateway system, wherein the identification information is different from the target role information of the gateways;
the role configuration module is used for updating the currently stored role information according to the target role information and storing the identification information of other gateways;
the role configuration module is further configured to determine whether currently stored role information is a slave gateway, and whether target role information included in the role configuration instruction is a slave gateway;
if at least one of the first intelligent household equipment and the second intelligent household equipment is yes, reporting identification information of each first intelligent household equipment accessed to the gateway to a cloud server, and deleting stored scene information;
and if the first gateway system and the second gateway system are not the same, determining whether the currently stored role information is a main gateway, and if the currently stored role information is the main gateway, setting the use state of each second intelligent household device stored in the gateway as unavailable, wherein the second intelligent household device is an intelligent household device accessed to a slave gateway in the non-first gateway system.
7. A system for gateway role determination, the system comprising: the apparatus for gateway role determination applied to a terminal of claim 5 and the apparatus for gateway role configuration applied to a gateway of claim 6.
8. An electronic device, comprising: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
the memory has stored therein a computer program which, when executed by the processor, causes the processor to perform the steps of the method of any one of claims 1-3 or the steps of the method of claim 4.
9. A computer-readable storage medium, characterized in that it stores a computer program executable by an electronic device, which program, when run on the electronic device, causes the electronic device to perform the steps of the method of any one of claims 1-3 or the steps of the method of claim 4.
CN201811129517.5A 2018-09-27 2018-09-27 Method and device for determining gateway role Active CN109274561B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811129517.5A CN109274561B (en) 2018-09-27 2018-09-27 Method and device for determining gateway role

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811129517.5A CN109274561B (en) 2018-09-27 2018-09-27 Method and device for determining gateway role

Publications (2)

Publication Number Publication Date
CN109274561A CN109274561A (en) 2019-01-25
CN109274561B true CN109274561B (en) 2021-03-19

Family

ID=65198979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811129517.5A Active CN109274561B (en) 2018-09-27 2018-09-27 Method and device for determining gateway role

Country Status (1)

Country Link
CN (1) CN109274561B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110535736A (en) * 2019-08-22 2019-12-03 厦门盈趣科技股份有限公司 A kind of method, network node and the home network of dynamic adjustment gateway
CN114826889A (en) * 2021-01-28 2022-07-29 星络家居云物联科技有限公司 Computer readable storage medium, gateway device and configuration method thereof
CN114338256B (en) * 2021-11-29 2023-10-03 广州河东科技有限公司 Intelligent home gateway configuration method, device, terminal equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200094A (en) * 2013-03-14 2013-07-10 成都卫士通信息产业股份有限公司 Method for achieving gateway dynamic load distribution
CN104796444A (en) * 2014-01-21 2015-07-22 广州海图克计算机技术有限公司 Digital household scene control management system and method
CN104811375A (en) * 2015-05-08 2015-07-29 三星电子(中国)研发中心 Smart home gateway and networking method thereof
EP3158681A1 (en) * 2014-06-20 2017-04-26 Samsung Electronics Co., Ltd. Method and apparatus for registering devices in gateway

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200094A (en) * 2013-03-14 2013-07-10 成都卫士通信息产业股份有限公司 Method for achieving gateway dynamic load distribution
CN104796444A (en) * 2014-01-21 2015-07-22 广州海图克计算机技术有限公司 Digital household scene control management system and method
EP3158681A1 (en) * 2014-06-20 2017-04-26 Samsung Electronics Co., Ltd. Method and apparatus for registering devices in gateway
CN104811375A (en) * 2015-05-08 2015-07-29 三星电子(中国)研发中心 Smart home gateway and networking method thereof

Also Published As

Publication number Publication date
CN109274561A (en) 2019-01-25

Similar Documents

Publication Publication Date Title
CN109274561B (en) Method and device for determining gateway role
CN113133086B (en) Intelligent device network distribution method and device, electronic device and storage medium
US9081818B2 (en) SAS fabric discovery
US9930632B2 (en) M2M application remote registration method, device, system and storage medium
CN108551413B (en) Intelligent household equipment binding method and device, gateway equipment and storage medium
CN108897658B (en) Method and device for monitoring master database, computer equipment and storage medium
US20200084060A1 (en) Method of controlling iot device using cloud platform, cloud server and system for controlling iot device
EP3993350A1 (en) Method and device for ip address allocation and topology management in das system, and storage medium
US10944716B2 (en) Metering device address management method, collection terminal, and metering device
CN114221955B (en) Device cross-region access method and device, electronic device and storage medium
EP4274190A1 (en) Smart device control method and apparatus, electronic device, and computer readable medium
CN108306796B (en) Intelligent home system, and information processing method and device of intelligent home equipment
US20180357193A1 (en) Computing device and operation method
CN107852344B (en) Storage network element discovery method and device
CN103595566A (en) Method and device for detecting idle IP addresses
CN108924043A (en) System monitoring method, gateway communication, gateway apparatus, service processing equipment
TW201734861A (en) Description information generating method and device
WO2019080719A1 (en) Data processing method and device, storage medium, processor, and system
WO2019205133A1 (en) Vpn line handover method, apparatus and electronic device
US11108588B2 (en) Configuration information to an internet of things multiplexer
US20230045914A1 (en) Method and apparatus for controlling device in internet of things, and gateway device and storage medium
CN115550427A (en) Equipment upgrading method, device, equipment and storage medium
CN111629054B (en) Message processing method, device and system, electronic equipment and readable storage medium
CN115567400A (en) Whole cabinet management method, device, equipment and medium
CN114967510A (en) Method, device, system, equipment and medium for configuring intelligent linkage action of equipment

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
CP01 Change in the name or title of a patent holder

Address after: 266100 Songling Road, Laoshan District, Qingdao, Shandong Province, No. 399

Patentee after: Qingdao Hisense Smart Life Technology Co.,Ltd.

Address before: 266100 Songling Road, Laoshan District, Qingdao, Shandong Province, No. 399

Patentee before: QINGDAO HISENSE SMART HOME SYSTEMS Co.,Ltd.

CP01 Change in the name or title of a patent holder