CN115174293B - Scene information synchronization method and device, storage medium and electronic device - Google Patents

Scene information synchronization method and device, storage medium and electronic device Download PDF

Info

Publication number
CN115174293B
CN115174293B CN202210597243.2A CN202210597243A CN115174293B CN 115174293 B CN115174293 B CN 115174293B CN 202210597243 A CN202210597243 A CN 202210597243A CN 115174293 B CN115174293 B CN 115174293B
Authority
CN
China
Prior art keywords
scene
information
gateway
synchronization
execution
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
CN202210597243.2A
Other languages
Chinese (zh)
Other versions
CN115174293A (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 Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202210597243.2A priority Critical patent/CN115174293B/en
Publication of CN115174293A publication Critical patent/CN115174293A/en
Application granted granted Critical
Publication of CN115174293B publication Critical patent/CN115174293B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • 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
    • H04L12/2809Exchanging configuration information on appliance services in a home automation network indicating that an appliance service is present in a home automation network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • H04L67/306User profiles
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The application provides a scene information synchronization method and device, a storage medium and an electronic device. The method is applied to a first gateway and comprises the following steps: confirming the host gateway of each scene according to the host gateway number in the locally stored scene information of each scene; acquiring scene change information of a host gateway, wherein the scene change information is scene added information and/or scene deleted information; acquiring first scene information added in the scene added information and storing the first scene information; and/or acquiring second scene information deleted from the scene deletion information, and deleting the second scene information from a locally stored scene information list. The method ensures that the information of all edge gateways in the home is synchronous, so that the functions of the edge gateways in use are enriched, and the portability of the edge gateways in use is improved.

Description

Scene information synchronization method and device, storage medium and electronic device
Technical Field
The present disclosure relates to edge gateway information synchronization technologies, and in particular, to a method and an apparatus for synchronizing scene information, a storage medium, and an electronic device.
Background
Intelligent home equipment such as intelligent air conditioner, intelligent refrigerator, intelligent door and window, intelligent stereo set, intelligent robot that sweeps floor all need access edge gateway, constitute intelligent home systems with cloud ware jointly.
The existing intelligent home control method is that a scene is created at a mobile phone end, a cloud server generates a control instruction according to a configuration file related to the scene, which is uploaded to the cloud server by the mobile phone, the control instruction is sent to a host gateway, and the host gateway in the host gateway sends the control instruction to intelligent home equipment appointed by the control instruction after receiving the control instruction.
One or more edge gateways can be arranged in different areas of the home according to the functional requirements, and scene information among the edge gateways is mutually independent, so that a great deal of inconvenience is brought to users. For example, when a user wants to replace a home gateway of a scene or controls the home gateway to execute scene logic by manipulating an edge gateway nearest to the user, it cannot be realized due to information dyssynchrony between the edge gateways.
Therefore, how to synchronize the scene information between the edge gateways in the home to enrich the functions of the edge gateways in use and improve the portability of the edge gateways in use is still a problem to be solved.
Disclosure of Invention
The application provides a scene information synchronization method and device, a storage medium and an electronic device, which are used for synchronizing information of all edge gateways in a household so as to enrich functions of the edge gateways in use and improve portability of the edge gateways in use.
In one aspect, the present application provides a method for synchronizing scene information, which is applied to a first gateway, and the method includes:
confirming the host gateway of each scene according to the host gateway number in the locally stored scene information of each scene;
acquiring scene change information of a host gateway, wherein the scene change information is scene added information and/or scene deleted information;
acquiring first scene information added in the scene added information and storing the first scene information; and/or the number of the groups of groups,
and acquiring second scene information deleted from the scene deletion information, and deleting the second scene information from a locally stored scene information list.
In one embodiment, the obtaining the scene change information of the hosting gateway includes one of the following:
receiving scene change information sent by a host gateway; or,
receiving scene change information sent by a cloud server; or,
And if scene change information sent by the host gateway is received, ignoring the scene change information sent by the cloud server.
In one embodiment, before the obtaining the scene change information of the hosting gateway, the method further includes:
and sending an information synchronization request to the host gateway, wherein the information synchronization request is used for requesting the host gateway to send scene change information when the scene information is changed.
In one embodiment, the first scene information at least includes a scene number, a scene type, a home gateway number, and a home number to which the first scene information belongs;
the second scene information includes at least a scene number.
In one embodiment, the method further comprises:
a scene synchronization request is sent to a cloud server at preset time, wherein the scene synchronization request carries a family number;
acquiring a scene synchronization response sent by the cloud server, wherein the scene synchronization response comprises scene information of each scene under a family corresponding to the family number, and the scene information at least comprises a host gateway number of the scene;
and updating a locally stored scene information list corresponding to the family number according to the scene synchronization response.
In one embodiment, the scenario information in the scenario synchronization response includes at least a scenario number and a hosting gateway number of each scenario, where the hosting gateway number is used to define a hosting gateway, and the method further includes:
when the host gateway of the third scene is the edge gateway, sending a third scene execution script issuing request to the cloud server, wherein the third scene execution script issuing request carries a scene number of the third scene;
and acquiring a third scene execution script response sent by the cloud server, wherein the third scene execution script response at least comprises execution logic information of the third scene, and the execution logic information at least comprises execution equipment information.
In another aspect, the present application provides a method for synchronizing scene information, applied to a second gateway, where the method includes:
receiving an update scene request, wherein the update scene request is a request for deleting a scene and/or a request for adding a scene, and the host gateway of the deletion scene and the host gateway of the addition scene are both the second gateway;
responding to the scene updating request, and executing scene adding and/or scene deleting;
and when the scene addition is successful and/or the scene deletion is successful, sending scene change information to the non-hosting gateway, wherein the scene change information is scene addition information and/or scene deletion information.
In one embodiment, the method further comprises:
and when the scene addition is successful or the scene deletion is successful, sending a response of the scene updating request to a cloud server, so that the cloud server sends scene change information to the non-hosting gateway after receiving the response.
In one embodiment, the method further comprises:
receiving an information synchronization request sent by the non-hosting gateway, responding to the information synchronization request, and triggering an information issuing logic;
the information issuing logic is used for sending scene change information to the non-hosting gateway when the scene information is changed.
In another aspect, the present application provides a method for remotely controlling a hosting gateway, applied to a third gateway, where the third gateway and the fourth gateway are synchronized by the scene information synchronization method according to the first aspect, or by the scene information synchronization method according to the second aspect, where the method includes:
and responding to the scene execution operation, sending a scene execution command to the fourth gateway, and enabling the fourth gateway to be a host gateway of the scene designated by the scene execution operation.
On the other hand, the application also provides a scene information synchronization device, which is applied to the first gateway and comprises:
The processing module is used for confirming the host gateway of each scene according to the host gateway number in the locally stored scene information of each scene;
the acquisition module is used for acquiring scene change information of the host gateway, wherein the scene change information is scene added information and/or scene deleted information;
the storage module is used for acquiring first scene information added in the scene added information and storing the first scene information; and/or the number of the groups of groups,
the storage module is further used for acquiring second scene information deleted from the scene deletion information, and deleting the second scene information from a locally stored scene information list.
On the other hand, the application also provides an information synchronization device between edge gateways, which is applied to a second gateway and comprises:
the communication module is used for receiving an update scene request, wherein the update scene request is a request for deleting a scene and/or a request for adding a scene, and the host gateway of the deletion scene and the host gateway of the addition scene are both the second gateway;
the processing module is used for responding to the scene updating request and executing scene adding and/or scene deleting;
the communication module is further used for sending scene change information to the non-host gateway when the scene addition is successful and/or the scene deletion is successful, wherein the scene change information is scene addition information and/or scene deletion information.
In another aspect, the present application provides a computer readable storage medium, where the computer readable storage medium includes a stored program, where the program when executed performs the method for synchronizing scene information according to the first aspect, or performs the method for synchronizing scene information according to the second aspect, or performs the method for remotely controlling a hosting gateway according to the third aspect.
In another aspect, the application provides an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the method for synchronizing scene information according to the first aspect, or execute the method for synchronizing scene information according to the second aspect, or execute the method for remotely controlling a hosting gateway according to the third aspect by using the computer program.
The method provided by the embodiment of the application is applied to the first gateway and comprises the step of confirming the host gateway of each scene according to the host gateway number in the locally stored scene information of each scene. And acquiring scene change information of the host gateway, wherein the scene change information is scene added information and/or scene deleted information. Acquiring first scene information added in the scene added information and storing the first scene information; and/or acquiring second scene information deleted from the scene deletion information, and deleting the second scene information from a locally stored scene information list.
That is, the first gateway subscribes to the scene information of the hosting gateway, and changes its own scene information along with the change of the scene information of the hosting gateway when the scene information of the hosting gateway changes. Therefore, the synchronization of the scene information among the edge gateways is realized, and the edge gateways based on the synchronization of the scene information can realize the inter-scene remote operation of the edge gateways or realize other functions requiring the synchronization of the information of the edge gateways. Therefore, the application enriches the functions of the edge gateway in use and indirectly improves the portability of the edge gateway in use.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is an application scenario schematic diagram of a scenario information synchronization method provided in the present application;
fig. 2 is a flow chart of a scenario information synchronization method according to an embodiment of the present application;
fig. 3 is an interaction schematic diagram between a first gateway and a host gateway in a scenario information synchronization method according to an embodiment of the present application;
fig. 4 is a flowchart of a scenario information synchronization method according to another embodiment of the present application;
Fig. 5 is a flowchart of a scenario information synchronization method according to another embodiment of the present application;
fig. 6 is a flowchart of a scenario information synchronization method according to another embodiment of the present application;
fig. 7 is a schematic interaction diagram between a first gateway, a second gateway, and a cloud server according to an embodiment of the present application;
fig. 8 is a flow chart of a method for remotely controlling a hosting gateway according to one embodiment of the present application;
fig. 9 is a schematic diagram of a third central control screen of a gateway according to an embodiment of the present application;
fig. 10 is a schematic diagram of a scene information synchronization device according to an embodiment of the present application;
fig. 11 is a schematic diagram of an information synchronization device between edge gateways according to an embodiment of the present application;
fig. 12 is a schematic diagram of an electronic device according to an embodiment of the present application.
Specific embodiments of the present disclosure have been shown by way of the above drawings and will be described in more detail below. These drawings and the written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the disclosed concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The terms involved in the present application are explained as follows:
edge gateway: the gateway arranged at the network edge side is connected with the physical world and the digital world through functions such as network connection, protocol conversion and the like, and provides light connection management, real-time data analysis and application management functions.
And (3) a host gateway: and finally executing the edge gateway of the scene logic.
Non-hosting gateway: other edge gateways besides the home gateway are in the home.
Intelligent home equipment such as intelligent air conditioner, intelligent refrigerator, intelligent door and window, intelligent stereo set, intelligent robot that sweeps floor all need access edge gateway, constitute intelligent home systems with cloud ware jointly.
The existing intelligent home control method is that a scene is created at a mobile phone end, a cloud server generates a control instruction according to a configuration file related to the scene, which is uploaded to the cloud server by the mobile phone, the control instruction is sent to an edge gateway, and after receiving the control instruction, a host gateway in the edge gateway sends the control instruction to intelligent home equipment appointed by the control instruction. The edge gateway that sends control instructions to the smart home device is referred to as the hosting gateway, while other edge gateways under the home are referred to as non-hosting gateways. Whether an edge gateway is a hosting gateway or a non-hosting gateway depends on whether the scenario that the user ultimately triggers is performed at the present edge gateway or other edge gateways.
One or more edge gateways can be arranged in different areas of the home according to the functional requirements, and scene information among the edge gateways is mutually independent, so that a great deal of inconvenience is brought to users. For example, when a user wants to replace a home gateway of a scene or controls the home gateway to execute scene logic by manipulating an edge gateway nearest to the user, it cannot be realized due to information dyssynchrony between the edge gateways.
Therefore, how to synchronize the scene information between the edge gateways in the home to enrich the functions of the edge gateways in use and improve the portability of the edge gateways in use is still a problem to be solved.
Based on the above, the application provides a scene information synchronization method and device, a storage medium and an electronic device. The scene information synchronization method is applied to a first gateway and comprises the step of confirming the host gateway of each scene according to the host gateway number in the locally stored scene information of each scene. And acquiring scene change information of the host gateway, wherein the scene change information is scene added information and/or scene deleted information. Acquiring first scene information added in the scene added information and storing the first scene information; and/or acquiring second scene information deleted from the scene deletion information, and deleting the second scene information from a locally stored scene information list.
That is, the edge gateway subscribes to the scene information of the host gateway, and changes its own scene information along with the change of the scene information of the host gateway when the scene information of the host gateway changes. Therefore, the synchronization of the scene information among the edge gateways is realized, and the edge gateways based on the synchronization of the scene information can realize the inter-scene remote operation of the edge gateways or realize other functions requiring the synchronization of the information of the edge gateways. Therefore, the application enriches the functions of the edge gateway in use and indirectly improves the portability of the edge gateway in use.
The scene information synchronization method is applied to the first gateway or other electronic equipment capable of controlling the intelligent home equipment. Fig. 1 is an application schematic diagram of a scenario information synchronization method provided in the present application, in which the edge gateway confirms a hosting gateway of each scenario according to a hosting gateway number in locally stored scenario information of each scenario, for example, fig. 1 determines a hosting gateway of one scenario. When the scene information of the host gateway is changed, the scene change information of the host gateway is obtained, and further the scene information added in the scene change information and/or the scene information deleted in the scene change information is obtained. And updating the locally stored scene information list according to the added scene information and/or the deleted scene information.
Referring to fig. 2, an embodiment of the present application provides a scene information synchronization method, applied to a first gateway, including:
s210, confirming the host gateway of each scene according to the host gateway number in the locally stored scene information of each scene.
The scene information of each scene at least includes a hosting gateway number of the scene, and may further include a scene type of the scene, a scene number (generated by the cloud server at the time of scene creation), and a home number to which the scene belongs.
When creating a scene, a user creates newly added scene configuration information on a terminal (e.g., mobile phone, edge gateway, cloud). The terminal uploads the newly added scene configuration information to the cloud server, and the cloud server stores the newly added scene configuration information as newly added scene information.
The newly added scene configuration information at least comprises a scene type, a host gateway number and a home number of the newly added scene. The newly added scene configuration information is, for example, a scene in which the edge gateway 01 in the home number 305 is configured to be automatically executed, for example, to control the washing machine to start washing and drying laundry at a preset time, and to control the sweeping robot to start sweeping at a preset time.
Each home has a unique home ID (identification number), and when creating the configuration information of the new scene, the user needs to designate the home to which the home gateway of the new scene belongs, and sets the home to which the home gateway of the new scene belongs by setting a home code.
Each edge gateway has a unique gateway number, i.e. a gateway ID (identification number), and when creating the configuration information of the new scene, the user needs to designate the host gateway of the new scene, and sets the host gateway of the new scene by setting the host gateway number.
The scene type is, for example, a manual execution type or an automatic execution type, wherein the manual execution type refers to that the scene logic is executed after the manual trigger is needed, and the automatic execution type may be that the scene logic is automatically started to be executed at a fixed time.
When the cloud server stores the newly added scene configuration information as newly added scene information, the scene type, the host gateway number and the home number of the newly added scene are stored in a one-to-one correspondence. More specifically, the cloud server allocates a scene number to a scene to distinguish different scenes, so when storing the newly-added scene information, the cloud server allocates the scene number to the newly-added scene, and then stores the scene number, the scene type, the information of the host gateway and the home number to which the newly-added scene belongs.
The first gateway stores the serial number of each edge gateway in the home, so that the first gateway not only can confirm whether the first gateway is a host gateway according to the host gateway serial number in the scene information of each scene, but also can confirm the host gateway of each scene according to the host gateway serial number in the scene information of each scene stored locally. When the first gateway confirms that the first gateway is not the hosting gateway, an information synchronization request is sent to the hosting gateway, wherein the information synchronization request is used for requesting the hosting gateway to send scene change information when the scene information is changed.
For example, the gateway number of the first gateway is edge gateway 01, and the host gateway number in the scene information of one scene is edge gateway 03, and the host gateway of the one scene is confirmed to be the edge gateway with the gateway number of edge gateway 03. The first gateway sends an information synchronization request to an edge gateway with a gateway number of edge gateway 03, where the information synchronization request is used to request the edge gateway with the gateway number of edge gateway 03 to send scene change information when local scene information changes.
S220, obtaining scene change information of the host gateway, wherein the scene change information is scene added information and/or scene deleted information.
Referring to fig. 3, after confirming the hosting gateway of each scene, the first gateway subscribes to the scene change information of each hosting gateway, where the scene change information is added information of the scene and/or deleted information of the scene. For example, when scene a is added to the edge gateway 03, the first gateway acquires information about scene addition of the edge gateway 03 (hosting gateway). For example, when the scene B is deleted in the edge gateway 03, the first gateway acquires information about the deletion of the scene in the edge gateway 03 (hosting gateway).
It should be noted that, adding a scene refers to adding an entire scene, and similarly, deleting a scene refers to deleting an entire scene.
S230, acquiring first scene information added in the scene added information and storing the first scene information; and/or acquiring second scene information deleted from the scene deletion information, and deleting the second scene information from a locally stored scene information list.
The scene added information and part of the scene deleted information are notification information which is actively sent to the first gateway by the host gateway or the cloud server and is used for notifying the first gateway that the host gateway has scene information change. That is, the first gateway receives the scene change information sent by the hosting gateway or receives the scene change information sent by the cloud server. In an optional embodiment, if the first gateway receives the scene change information sent by the hosting gateway, the first gateway ignores the scene change information sent by the cloud server.
After the first gateway obtains the scene change information of the host gateway, the first gateway obtains added scene information and/or deleted scene information included in the scene change information.
And if the scene change information is scene added information, acquiring first scene information added in the scene added information and storing the first scene information. Of course, the scene added information may include not only scene information to which one scene is added but also scene information to which a plurality of scenes are added. Correspondingly, the first gateway stores scene information of a plurality of scenes.
And if the scene change information is the scene deletion information, acquiring second scene information deleted from the scene deletion information and deleting the second scene information from a locally stored scene information list. Of course, the information of the scene deletion may include not only the scene information of deleting one scene, but also the scene information of deleting a plurality of scenes, and correspondingly, the first gateway deletes the scene information of the plurality of scenes from the locally stored scene information list.
When the first gateway stores scene information, the scene information is stored in a scene information list, each family number corresponds to one scene information list, and the scene information list is shown in table 1, and the scene numbers, the host gateway numbers and the scene types are stored in a one-to-one correspondence.
Table 1:
if the scene change information is scene added information, the acquired first scene information added in the scene added information at least comprises a scene number, a scene type, a host gateway number and a home number to which the scene is added. If the home number included in the first scene information is already stored in the first gateway, the scene number, the scene type and the home gateway number included in the first scene information are stored in a scene information list of the home number. If the home number to which the first scene information belongs is not stored in the first gateway, a scene information list corresponding to the home number to which the first scene information belongs is created.
As shown in table 1, the scene number of each scene is unique, and if the scene change information is the information of scene deletion, the acquired second scene information deleted in the scene deletion information at least includes the scene number. And finding second scene information in the locally stored scene information list according to the scene number included in the deleted second scene information, and deleting the second scene information from the locally stored scene information list.
In summary, the method provided in this embodiment is applied to the first gateway, and includes confirming the hosting gateway of each scene according to the hosting gateway number in the locally stored scene information of each scene. And acquiring scene change information of the host gateway, wherein the scene change information is scene added information and/or scene deleted information. Acquiring first scene information added in the scene added information and storing the first scene information; and/or acquiring second scene information deleted from the scene deletion information, and deleting the second scene information from a locally stored scene information list.
That is, the first gateway subscribes to the scene information of the hosting gateway, and changes its own scene information along with the change of the scene information of the hosting gateway when the scene information of the hosting gateway changes. Therefore, the synchronization of the scene information among the edge gateways is realized, and the edge gateways based on the synchronization of the scene information can realize the inter-scene remote operation of the edge gateways or realize other functions requiring the synchronization of the information of the edge gateways. Therefore, the application enriches the functions of the edge gateway in use and indirectly improves the portability of the edge gateway in use.
Referring to fig. 4, on the basis of the scenario information synchronization method provided in any one of the above embodiments, an embodiment of the present application further provides a scenario information synchronization method applied to the first gateway. The method provided in this embodiment further describes the scene information synchronization method provided in any one of the above embodiments.
S410, a scene synchronization request is sent to the cloud server at preset time, wherein the scene synchronization request carries a family number.
As described in the related description in step S210, when the cloud server stores the configuration information of the new scene as the information of the new scene, the scene type, the host gateway number and the home number of the new scene are stored in one-to-one correspondence. More specifically, the cloud server allocates a scene number to a scene to distinguish different scenes, so when storing the newly-added scene information, the cloud server allocates the scene number to the newly-added scene, and then stores the scene number, the scene type, the information of the host gateway and the home number to which the newly-added scene belongs.
Correspondingly, the scene synchronization request is used for requesting the cloud server to issue scene information of each scene under the family corresponding to the family number, so that the scene synchronization request only carries the family number. After the cloud server analyzes the family number carried by the scene synchronization request, the family number carried by the scene synchronization request is queried from the local storage, and the scene information of each scene under the family corresponding to the family number carried by the scene synchronization request is found.
The preset time may be, for example, 10 am each day, 1 pm each day, 4 pm each day, and the preset time may be one or more. The preset time may be set according to actual needs, and the embodiment is not limited.
S420, acquiring a scene synchronization response sent by the cloud server, wherein the scene synchronization response comprises scene information of each scene under the family corresponding to the family number, and the scene information at least comprises a host gateway number of the scene.
The scene information of each scene includes at least a scene number and a hosting gateway number of each scene. Wherein the hosting gateway number of the scene is used to make the first gateway confirm whether itself is the hosting gateway of the scene.
For example, when the hosting gateway of the first scene is the first gateway, a first scene execution script issuing request is generated based on the scene number of the first scene, where the first scene execution script issuing request carries the scene number of the first scene. The first gateway sends a first scenario execution script issuing request to a cloud server.
After receiving the first scene execution script issuing request, the cloud server inquires related information of the first scene according to the scene number of the first scene and generates a first scene execution script response. The first scene execution script response at least comprises execution logic information of the first scene, and the execution logic information of the first scene at least comprises the execution device information. The execution device information includes, for example, washing machine information and sweeping robot information. The execution logic information of the first scenario may further include logic specifically executed by an execution device, such as a washing machine performing laundry washing and drying, and a sweeping robot sweeping a certain home area.
When the host gateway of the first scene is not the first gateway, the first gateway only stores the scene information of the first scene and does not send the first scene execution script issuing request to the cloud server.
It should be noted that, the execution logic information of the scene (i.e., the execution script of the scene) is only issued to the hosting gateway of the scene, and the non-hosting gateway of the scene will not receive and store the execution logic information of the scene. The execution logic information of the scene is generated by the cloud server according to the scene configuration information, and the host gateway controls execution equipment designated by the execution logic information of the scene to operate after operating the execution logic information of the scene, for example, controls the washing machine to perform clothes washing and drying, and controls the sweeping robot to sweep.
And S430, updating a scene information list corresponding to the family number in a local storage mode according to the scene synchronization response.
The scene information list is shown in table 1.
The scene synchronization response includes scene information of each scene under the family corresponding to the family number, and when the scene information list corresponding to the family number is locally stored according to the scene synchronization response, the scene information list may be partially updated or completely updated.
For example, comparing the scene information of each scene under the family corresponding to the family number included in the scene synchronization response with the scene information of each scene in the locally stored scene information list, and updating the scene information different from the scene information of each scene under the family corresponding to the family number included in the scene synchronization response in the scene information of each scene in the locally stored scene information list.
For example, the scene information of all the scenes in the locally stored scene information list is deleted, and then the scene information of each scene under the family corresponding to the family number included in the scene synchronization response is sequentially stored in the locally stored scene information list.
In an alternative embodiment, the scene information in the scene sync response includes at least a scene number of each scene and a hosting gateway number, the hosting gateway number defining a hosting gateway. The first gateway is further used for confirming whether the first gateway is the host gateway of the scene according to the host gateway number of the scene.
For example, when the hosting gateway of the third scene is the first gateway, the first gateway generates a third scene execution script issuing request based on the scene number of the third scene, where the third scene execution script issuing request carries the scene number of the third scene. The first gateway sends a third scenario execution script issuing request to the cloud server.
After receiving the third scene execution script issuing request, the cloud server inquires related information of the third scene according to the scene number of the third scene and generates a third scene execution script response. The third scenario execution script response at least comprises execution logic information of the third scenario, and the execution logic information of the third scenario at least comprises the execution device information. The execution device information includes, for example, washing machine information and sweeping robot information. The execution logic information of the third scenario may further include logic specifically executed by an execution device, such as a washing machine performing laundry washing and drying, and a sweeping robot sweeping a certain home area.
When the host gateway of the third scene is not the first gateway, the first gateway does not send a request for issuing the third scene execution script to the cloud server.
It should be noted that, the execution logic information of the scene (i.e., the execution script of the scene) is only issued to the hosting gateway of the scene, and the non-hosting gateway of the scene will not receive and store the execution logic information of the scene. The execution logic information of the scene is generated by the cloud server according to the scene configuration information, and the host gateway controls execution equipment designated by the execution logic information of the scene to operate after operating the execution logic information of the scene, for example, controls the washing machine to perform clothes washing and drying, and controls the sweeping robot to sweep.
It should be noted that, the step S410 and the step S210-step S230 are independent from each other, and the step S410-step S430 is started as long as the preset time is reached, and the step S410 may be performed before the step S210-step S230 or after the step S210-step S230, which is not limited in this embodiment.
In summary, the method for synchronizing scene information provided in this embodiment sends a scene synchronization request (carrying a family number) to a cloud server, and obtains a scene synchronization response sent by the cloud server, where the scene synchronization response includes scene information of each scene under a family corresponding to the family number. And updating a scene information list which is stored locally and corresponds to the family number according to the scene synchronization response. Therefore, each edge gateway and the cloud server in the home synchronize scene information, and the synchronization of the scene information among the edge gateways in the home is indirectly realized. The method provided by the embodiment can further ensure the synchronization of the scene information among the edge gateways, so that each edge gateway synchronizes the scene information to the cloud server at regular time, and the synchronization of the scene information between the first gateway and at least one edge gateway is realized.
The edge gateways based on the synchronous scene information can realize cross-scene remote operation of the edge gateway or realize other functions requiring the synchronization of the information of the edge gateways, so that the functions of the edge gateway in use are enriched, and the portability of the edge gateway in use is indirectly improved.
Referring to fig. 5, an alternative embodiment of the present application provides a scenario information synchronization method applied to the first gateway. The method provided by the embodiment describes that besides the scene information synchronization between the timing and the cloud server to realize the scene information synchronization between the edge gateways, the scene information synchronization between the edge gateways can be realized based on the edge gateways.
And S510, when the scene synchronization response is not acquired, acquiring the scene information currently stored by at least one edge gateway in the family corresponding to the family number.
All edge gateways in the home send scene synchronization requests to the cloud server, and some edge gateways receive scene synchronization responses sent by the cloud server, so that a locally stored scene information list is updated according to the scene synchronization responses. In an alternative embodiment, each edge gateway in the home sends the scene synchronization request to the cloud server at the same time, e.g., each edge gateway in the home sends a scene synchronization request to the cloud server once every day at 8 am. Each edge gateway in the home sends the scene synchronization request to the cloud server at a plurality of preset times of day, e.g., each edge gateway in the home sends a scene synchronization request to the cloud server at 8 am every day and sends a scene synchronization request to the cloud server at 4 pm every day.
If the first gateway does not acquire the scene synchronization response sent by the cloud server, the synchronization of the scene information can also be performed based on other edge gateways. At this time, the first gateway obtains scene information currently stored in at least one edge gateway in the home.
In an alternative embodiment, it may be to obtain scene information currently stored by all edge gateways in the home.
In an alternative embodiment, the time when the M edge gateways update the locally stored scene information list in the home corresponding to the home number may be obtained first, so as to obtain M update times, where M is an integer greater than 1. And screening out the reference edge gateway corresponding to the largest update time in the M update times. And acquiring scene information currently stored by the reference edge gateway. The M edge gateways may be all edge gateways in the home except the present first gateway.
S520, updating the locally stored scene information list according to the scene information currently stored by the at least one edge gateway.
In an alternative embodiment, the locally stored scene information list may be updated based on scene information currently stored by all edge gateways in the home except the first gateway.
In an alternative embodiment, the locally stored list of scene information may be updated based on the scene information currently stored by the reference edge gateway.
As described in step S430, when the hosting gateway of the third scenario is the present first gateway, a third scenario execution script issuing request is sent to the cloud server, where the third scenario execution script issuing request carries a scenario number of the third scenario. However, when the third scenario execution script response is not acquired, a third scenario execution script issue request may be sent to the at least one edge gateway, so that the at least one edge gateway forwards the third scenario execution script issue request to the cloud server. After receiving the request for issuing the third scenario execution script, the cloud server sends a third scenario execution script response to the host gateway (i.e., the first gateway) of the third scenario, where the third scenario execution script response at least includes execution logic information of the third scenario, and the execution logic information at least includes execution device information. The first gateway controls the execution device to run based on the execution logic information of the third scene.
The method provided by the embodiment further provides a possible way for synchronizing scene information among edge gateways. When the edge gateway cannot synchronize scene information with the cloud server to realize scene information synchronization between the edge gateways, the edge gateway can interact with other edge gateways to realize scene information synchronization between the edge gateway and other edge gateways. Therefore, the at least two edge gateways in the home are synchronized with each other in scene information, and at least one edge gateway can be operated remotely across scenes or other functions requiring at least one edge gateway information synchronization can be realized based on the at least two edge gateways synchronized with the scene information.
Referring to fig. 6, one embodiment of the present application further provides a scenario information synchronization method, applied to a second gateway, including:
s610, receiving an update scene request, wherein the update scene request is a request for deleting a scene and/or a request for adding a scene, and the host gateway of the deletion scene and the host gateway of the addition scene are both the second gateway.
As shown in fig. 7, the second gateway receives an update scenario request sent by the cloud server, and adds and/or deletes a scenario according to the update scenario request. The hosting gateway for both the deleted scene and the added scene is the second gateway.
S620, in response to the update scenario request, scenario addition and/or scenario deletion is performed.
The host gateway number in the update scenario request requesting to add a scenario needs to be the gateway number of the second gateway, otherwise the second gateway will not perform scenario addition. Likewise, when the scene to be deleted in the update scene request received by the second gateway is not the scene stored in the second gateway, the second gateway does not perform scene deletion.
And S630, when the scene addition is successful and/or the scene deletion is successful, sending scene change information to the non-hosting gateway, wherein the scene change information is scene addition information and/or scene deletion information.
Referring to fig. 7, when scene addition is successful and/or scene deletion is successful, the second gateway transmits scene change information to the non-hosting gateway. The scene change information may refer to the scene change information described in step S220, and will not be described herein.
In an alternative embodiment, the second gateway also receives an information synchronization request sent by the non-hosting gateway before issuing the scene change information to the non-hosting gateway. The second gateway responds to the information synchronization request and triggers an information issuing logic, and the information issuing logic is used for sending scene change information to the non-hosting gateway when the scene information is changed. The second gateway responds to the information synchronization request to complete subscription of scene information between the second gateway and the non-hosting gateway, and the second gateway actively transmits the scene change information to the non-hosting gateway after autonomously realizing scene information change and/or realizing scene information change under the request of the cloud server.
In an alternative embodiment, when the scene addition is successful or the scene deletion is successful, the second gateway further sends a response to the request for updating the scene to the cloud server, so that the cloud server sends the scene change information to the non-hosting gateway after receiving the response.
As shown in fig. 7, the cloud server remotely transmits the scene change information of the second gateway to the non-hosting gateway after receiving the response of the update scene request. That is, the non-hosting gateway will receive the scene change information twice, once sent by the second gateway (hosting gateway) and once sent by the cloud server.
The scene change information of the second gateway sent by the cloud server and the scene change information sent by the second gateway are both used for describing the change of the scene information in the second gateway. As shown in fig. 7, the second gateway adds and/or deletes the scene a at the request of the cloud server, the scene change information sent by the second gateway is added and/or deleted for the scene a, and the scene change information sent by the cloud server is added and/or deleted for the scene a in the second gateway.
In an alternative embodiment, after the non-hosting gateway has received the scene change information sent by the second gateway (hosting gateway), if the scene change information sent by the cloud server is received again, the scene change information sent by the cloud server is ignored. If communication between the non-hosting gateway and the second gateway is abnormal (such as that a local area network is not available), the non-hosting gateway updates a locally stored scene information list corresponding to the family number according to scene change information sent by the cloud server.
The purpose of sending scene change information by both the cloud server and the second gateway (hosting gateway) is to prevent the situation that scene information cannot be updated due to abnormal communication between the non-hosting gateway and the second gateway, and further guarantee scene information synchronization between edge gateways.
In summary, the method provided in this embodiment is applied to a second gateway, where the second gateway is used as a hosting gateway in this embodiment, performs scene addition and/or scene deletion after receiving the update scene request, and then sends the scene change information to a non-hosting gateway. Furthermore, the hosting gateway also sends a response for updating the scene request to the cloud server, so that the cloud server sends scene change information to the non-hosting gateway after receiving the response. The method provided by the embodiment can ensure that the host gateway can cause the non-host gateway to synchronously update the scene information after the scene information is updated, thereby realizing the synchronization of the scene information among the edge gateways.
Referring to fig. 8, an embodiment of the present application further provides a method for remotely controlling a hosting gateway, which is applied to a third gateway, and the third gateway and the fourth gateway are synchronized by using the scene information synchronization method provided in any one of the embodiments above. The method for remotely controlling the hosting gateway provided by the embodiment comprises the following steps:
And S810, responding to the scene execution operation, sending a scene execution command to the fourth gateway, and enabling the fourth gateway to be a host gateway of the scene designated by the scene execution operation.
The scene specified by the scene execution operation is named as a scene to be executed.
The scene execution operation refers to a user operation, for example, as shown in fig. 9, in which the user operates the information of the selected scene to be executed (scene a) and the execution button (scene execution operation) on the center screen of the third gateway, the scene execution operation carrying the information of the scene to be executed (scene a).
In an alternative embodiment, the user performs the scenario execution operation on a remote terminal (e.g., a mobile phone), and the scenario execution operation generates a scenario triggering instruction, where the scenario triggering instruction is uploaded to the cloud server, and then the cloud server sends the scenario triggering instruction to the third gateway. The scene trigger instruction carries information of a scene to be executed.
The information of the to-be-executed scene at least comprises a scene number of the to-be-executed scene.
The information of the to-be-executed scene at least comprises a scene number of the to-be-executed scene, wherein the scene number of each scene is unique, and the scene number also corresponds to the host gateway number. The hosting gateway for the scene to be executed can be determined by the scene number of the scene to be executed.
Or, the scene information of each edge gateway includes a gateway number, so the third gateway can confirm the corresponding host gateway number according to the scene number of the scene to be executed, and then confirm the host gateway of the scene to be executed through the host gateway number.
The fourth gateway is an edge gateway in the same family, and if the host gateway of the scene to be executed is the fourth gateway, the starting instruction of the scene to be executed is sent to the fourth gateway through a wireless network (local area network). The start instruction of the to-be-executed scene is used for commanding the fourth gateway to execute the to-be-executed scene, and the fourth gateway feeds back an execution result after executing the to-be-executed scene.
The third gateway obtains an execution result of the scene to be executed, and executes corresponding operation according to the execution result. For example, when the execution result is that the execution is successful, the process is ended, and the execution of the scene to be executed across the gateway is realized. And when the execution result is that the execution is successful, the fourth gateway is indicated to store the scene information of the scene to be executed. The fourth gateway also stores the execution script information of the to-be-executed scene, and when the to-be-executed scene is executed, the execution script information of the to-be-executed scene is also controlled to specify the equipment to run.
For another example, when the execution result is that the execution fails, it may be that the fourth gateway does not store the scene information of the to-be-executed scene and does not have the execution script of the to-be-executed scene, and the third gateway re-acquires the scene information in the fourth gateway and updates the locally stored scene information list. Specifically, when the execution result is that the execution fails, the third gateway obtains failure information carried by the execution result. And when the failure information is the scene information of the scene to be executed which is not stored in the fourth gateway, acquiring the scene information in the fourth gateway again, and updating a locally stored scene information list. When the third gateway updates the locally stored scene information list, it may partially update the locally stored scene information list, for example, only delete the scene information of the to-be-executed scene from the locally stored scene information list.
In an optional embodiment, if the determined hosting gateway of the to-be-executed scene is the third gateway, the third gateway executes the to-be-executed scene and sends an execution result of the to-be-executed scene to the fourth gateway. The third gateway may execute the to-be-executed scene when receiving an execution command of the to-be-executed scene, where the execution command of the to-be-executed scene may be sent by a user through touching a central control screen of the third gateway, or may be sent to the third gateway remotely through a cloud server by a mobile phone.
If the execution result is that the execution fails, the fourth gateway updates a locally stored scene information list, for example, the information of the scene to be executed is deleted from the locally stored scene information list. The fourth gateway needs to be notified if the execution is successful.
The third gateway receives an execution result of the to-be-executed scene sent by the host gateway or receives an execution result of the to-be-executed scene sent by the cloud server. However, if the execution result of the to-be-executed scene sent by the host gateway is received, the execution result of the to-be-executed scene sent by the cloud server is ignored.
In summary, the method for remotely controlling the gateway provided in the present embodiment is applied to a third gateway, where the third gateway is synchronous with scene information between other edge gateways in the home. And the third gateway responds to the scene execution operation and sends a scene execution command to the fourth gateway, and the fourth gateway is a host gateway of the scene designated by the scene execution operation. In actual operation, the cross-gateway execution scenario may be implemented by triggering the scenario execution on the non-hosting gateway to control the hosting gateway execution scenario of the scenario. Therefore, the method provided by the embodiment supports the user to autonomously select the edge gateway which is manually controlled to control the host gateway to execute the scene logic, so that functions of the edge gateway in use are enriched, and portability of the edge gateway in use is improved.
Referring to fig. 10, an embodiment of the present application provides a scene information synchronization device 10, applied to a first gateway, including:
a processing module 11, configured to confirm the hosting gateway of each scene according to the hosting gateway number in the locally stored scene information of each scene;
the acquiring module 12 is configured to acquire scene change information of the hosting gateway, where the scene change information is information added to a scene and/or information deleted from the scene;
a storage module 13, configured to acquire first scene information added in the scene added information and store the first scene information; and/or the number of the groups of groups,
the storage module 13 is further configured to obtain second scene information deleted from the scene deletion information, and delete the second scene information from a locally stored scene information list.
The acquisition module 12 is specifically configured to:
receiving scene change information sent by a host gateway; or,
receiving scene change information sent by a cloud server; or,
and if the scene change information sent by the host gateway is received, the scene change information sent by the cloud server is ignored.
Also included is a communication module 14, the communication module 14 being configured to send an information synchronization request to the hosting gateway, the information synchronization request being configured to request the hosting gateway to send scene change information when the scene information changes.
The first scene information at least comprises a scene number, a scene type, a host gateway number and a home number to which the host gateway belongs; the second scene information includes at least a scene number.
The communication module 14 is further configured to send a scene synchronization request to the cloud server at a preset time, where the scene synchronization request carries a family number;
the obtaining module 12 is further configured to obtain a scenario synchronization response sent by the cloud server, where the scenario synchronization response includes scenario information of each scenario under a family corresponding to the family number, and the scenario information includes at least a hosting gateway number of the scenario;
the storage module 13 is further configured to update a locally stored scene information list corresponding to the family number according to the scene synchronization response.
The scenario information in the scenario synchronization response includes at least a scenario number and a hosting gateway number of each scenario, where the hosting gateway number is used to define a hosting gateway, and the communication module 14 is further configured to send a third scenario execution script issue request to the cloud server when the hosting gateway of the third scenario is the edge gateway, where the third scenario execution script issue request carries the scenario number of the third scenario. The obtaining module 12 is further configured to obtain a third scenario execution script response sent by the cloud server, where the third scenario execution script response includes at least execution logic information of the third scenario, and the execution logic information includes at least execution device information.
Referring to fig. 11, an embodiment of the present application further provides an information synchronization device 20 between edge gateways, which is applied to a second gateway, and includes:
the communication module 21 is configured to receive an update scenario request, where the update scenario request is a request for deleting a scenario and/or a request for adding a scenario, and both the deleted scenario and the added scenario are the second gateway.
The processing module 22 is configured to perform scene addition and/or scene deletion in response to the update scene request.
The communication module 21 is further configured to send, when the scene addition is successful and/or the scene deletion is successful, scene change information to the non-hosting gateway, where the scene change information is scene addition information and/or scene deletion information.
The communication module 21 is further configured to send a response to the request for updating the scene to the cloud server when the scene addition is successful or the scene deletion is successful, so that the cloud server sends the scene change information to the non-hosting gateway after receiving the response.
The communication module 21 is further configured to receive an information synchronization request sent by the non-hosting gateway, and trigger an information issuing logic in response to the information synchronization request; the information delivery logic is configured to send the scene change information to the non-hosting gateway when the scene information changes.
Referring to fig. 12, an embodiment of the present application further provides an electronic device 30 including a memory 31 and a processor 32. The memory 31 has stored therein a computer program, by means of which the processor 32 is arranged to perform the method of scene information synchronization as provided in any of the embodiments above, or to perform the method of remotely controlling a hosting gateway as provided in any of the embodiments above.
The present application also provides a computer readable storage medium having stored therein computer executable instructions that when executed cause a computer to perform the method for synchronizing scene information as provided in any of the above embodiments or to perform the method for remotely controlling a hosting gateway as provided in any of the above embodiments when executed by a processor.
The present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the method for synchronizing scene information as provided in any of the above embodiments, or performs the method for remotely controlling a hosting gateway as provided in any of the above embodiments.
The computer readable storage medium may be a Read Only Memory (ROM), a programmable Read Only Memory (Programmable Read-Only Memory, PROM), an erasable programmable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable programmable Read Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic random access Memory (Ferromagnetic Random Access Memory, FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a compact disk Read Only Memory (Compact Disc Read-Only Memory, CD-ROM). But may be various electronic devices such as mobile phones, computers, tablet devices, personal digital assistants, etc., that include one or any combination of the above-mentioned memories.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the claims, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application, or direct or indirect application in other related technical fields are included in the scope of the claims of the present application.

Claims (8)

1. A method for synchronizing scene information, applied to a first gateway, the method comprising:
confirming the host gateway of each scene according to the host gateway number in the locally stored scene information of each scene;
acquiring scene change information of a host gateway, wherein the scene change information is scene added information and/or scene deleted information;
acquiring first scene information added in the scene added information and storing the first scene information; and/or the number of the groups of groups,
Acquiring second scene information deleted from the scene deletion information, and deleting the second scene information from a locally stored scene information list;
a scene synchronization request is sent to a cloud server at preset time, wherein the scene synchronization request carries a family number;
acquiring a scene synchronization response sent by the cloud server, wherein the scene synchronization response comprises scene information of each scene under a family corresponding to the family number, and the scene information at least comprises a host gateway number of the scene;
updating a locally stored scene information list corresponding to the family number according to the scene synchronization response;
the scene information in the scene synchronization response at least comprises a scene number and a hosting gateway number of each scene, wherein the hosting gateway number is used for defining a hosting gateway, and the method further comprises:
when the host gateway of the third scene is the edge gateway, sending a third scene execution script issuing request to the cloud server, wherein the third scene execution script issuing request carries a scene number of the third scene;
acquiring a third scene execution script response sent by the cloud server, wherein the third scene execution script response at least comprises execution logic information of the third scene, and the execution logic information at least comprises execution equipment information;
And when the third scene execution script response is not acquired, sending a third scene execution script issuing request to the at least one edge gateway, so that the at least one edge gateway forwards the third scene execution script issuing request to the cloud server.
2. The method of claim 1, wherein the obtaining scene change information for the hosting gateway comprises one of:
receiving scene change information sent by a host gateway; or,
receiving scene change information sent by a cloud server; or,
and if scene change information sent by the host gateway is received, ignoring the scene change information sent by the cloud server.
3. The method of claim 2, wherein prior to the obtaining the scene change information for the hosting gateway, the method further comprises:
and sending an information synchronization request to the host gateway, wherein the information synchronization request is used for requesting the host gateway to send scene change information when the scene information is changed.
4. A method according to any of claims 1-3, characterized in that the first scene information comprises at least a scene number, a scene type, a home gateway number and a home number to which it belongs;
The second scene information includes at least a scene number.
5. A method for remotely controlling a hosting gateway, applied to a third gateway, wherein the third gateway and the fourth gateway are synchronized by a scene information synchronization method according to any one of claims 1-4, the method comprising:
and responding to the scene execution operation, sending a scene execution command to the fourth gateway, and enabling the fourth gateway to be a host gateway of the scene designated by the scene execution operation.
6. A scene information synchronization device, applied to a first gateway, comprising:
the processing module is used for confirming the host gateway of each scene according to the host gateway number in the locally stored scene information of each scene;
the acquisition module is used for acquiring scene change information of the host gateway, wherein the scene change information is scene added information and/or scene deleted information;
the storage module is used for acquiring first scene information added in the scene added information and storing the first scene information; and/or the number of the groups of groups,
the storage module is also used for acquiring second scene information deleted from the scene deletion information and deleting the second scene information from a locally stored scene information list;
The communication module is used for sending a scene synchronization request to the cloud server at preset time, wherein the scene synchronization request carries a family number;
the acquisition module is further configured to acquire a scene synchronization response sent by the cloud server, where the scene synchronization response includes scene information of each scene under the family corresponding to the family number, and the scene information includes at least a host gateway number of the scene;
the storage module is further used for updating a locally stored scene information list corresponding to the family number according to the scene synchronization response;
the scene information in the scene synchronization response at least comprises a scene number and a host gateway number of each scene, wherein the host gateway number is used for defining a host gateway;
the communication module is further configured to send a third scenario execution script issuing request to the cloud server when the host gateway of the third scenario is the edge gateway, where the third scenario execution script issuing request carries a scenario number of the third scenario;
the acquisition module is further configured to acquire a third scenario execution script response sent by the cloud server, where the third scenario execution script response includes at least execution logic information of the third scenario, and the execution logic information includes at least execution device information;
And the communication module is further used for sending a third scenario execution script issuing request to the at least one edge gateway when the third scenario execution script response is not acquired, so that the at least one edge gateway forwards the third scenario execution script issuing request to the cloud server.
7. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program when run performs the scene information synchronization method of any one of claims 1 to 4.
8. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, the processor being arranged to perform the method of scene information synchronization of any of claims 1 to 4 or the method of remotely controlling a hosting gateway of claim 5 by means of the computer program.
CN202210597243.2A 2022-05-30 2022-05-30 Scene information synchronization method and device, storage medium and electronic device Active CN115174293B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210597243.2A CN115174293B (en) 2022-05-30 2022-05-30 Scene information synchronization method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210597243.2A CN115174293B (en) 2022-05-30 2022-05-30 Scene information synchronization method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN115174293A CN115174293A (en) 2022-10-11
CN115174293B true CN115174293B (en) 2024-03-22

Family

ID=83482502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210597243.2A Active CN115174293B (en) 2022-05-30 2022-05-30 Scene information synchronization method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115174293B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104796444A (en) * 2014-01-21 2015-07-22 广州海图克计算机技术有限公司 Digital household scene control management system and method
CN110262261A (en) * 2019-05-31 2019-09-20 华为技术有限公司 A kind of method, Cloud Server and smart home system controlling device service
CN110794773A (en) * 2019-09-26 2020-02-14 青岛海信智慧家居系统股份有限公司 Click-type scene creating method and device
CN111400777A (en) * 2019-11-14 2020-07-10 杭州海康威视系统技术有限公司 Network storage system, user authentication method, device and equipment
CN111865736A (en) * 2020-07-17 2020-10-30 青岛易来智能科技股份有限公司 Equipment control method and device
CN111913450A (en) * 2020-08-04 2020-11-10 青岛海信日立空调系统有限公司 Control method of intelligent household equipment, intelligent household system and gateway thereof
CN112152892A (en) * 2020-08-12 2020-12-29 青岛海尔智能家电科技有限公司 Method for controlling gateway, intelligent gateway and intelligent home system
CN113452772A (en) * 2021-06-24 2021-09-28 青岛海尔科技有限公司 Intelligent scene processing method and device, storage medium and electronic equipment
CN113625589A (en) * 2021-09-15 2021-11-09 云茂互联智能科技(厦门)有限公司 Equipment control method and device, electronic equipment and storage medium
CN113835369A (en) * 2021-08-17 2021-12-24 青岛海尔科技有限公司 Edge terminal scene management method, device and system
CN114137842A (en) * 2021-11-01 2022-03-04 青岛海尔科技有限公司 Scene configuration method and device, electronic equipment and storage medium
CN114500554A (en) * 2022-02-09 2022-05-13 南京戎光软件科技有限公司 Internet of things system management method
CN114528064A (en) * 2020-11-23 2022-05-24 深圳Tcl新技术有限公司 Scene configuration method, storage medium and terminal equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015002402A (en) * 2013-06-14 2015-01-05 株式会社東芝 Information processing method, information processing apparatus, and information processing program

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104796444A (en) * 2014-01-21 2015-07-22 广州海图克计算机技术有限公司 Digital household scene control management system and method
CN110262261A (en) * 2019-05-31 2019-09-20 华为技术有限公司 A kind of method, Cloud Server and smart home system controlling device service
CN110794773A (en) * 2019-09-26 2020-02-14 青岛海信智慧家居系统股份有限公司 Click-type scene creating method and device
CN111400777A (en) * 2019-11-14 2020-07-10 杭州海康威视系统技术有限公司 Network storage system, user authentication method, device and equipment
CN111865736A (en) * 2020-07-17 2020-10-30 青岛易来智能科技股份有限公司 Equipment control method and device
CN111913450A (en) * 2020-08-04 2020-11-10 青岛海信日立空调系统有限公司 Control method of intelligent household equipment, intelligent household system and gateway thereof
CN112152892A (en) * 2020-08-12 2020-12-29 青岛海尔智能家电科技有限公司 Method for controlling gateway, intelligent gateway and intelligent home system
CN114528064A (en) * 2020-11-23 2022-05-24 深圳Tcl新技术有限公司 Scene configuration method, storage medium and terminal equipment
CN113452772A (en) * 2021-06-24 2021-09-28 青岛海尔科技有限公司 Intelligent scene processing method and device, storage medium and electronic equipment
CN113835369A (en) * 2021-08-17 2021-12-24 青岛海尔科技有限公司 Edge terminal scene management method, device and system
CN113625589A (en) * 2021-09-15 2021-11-09 云茂互联智能科技(厦门)有限公司 Equipment control method and device, electronic equipment and storage medium
CN114137842A (en) * 2021-11-01 2022-03-04 青岛海尔科技有限公司 Scene configuration method and device, electronic equipment and storage medium
CN114500554A (en) * 2022-02-09 2022-05-13 南京戎光软件科技有限公司 Internet of things system management method

Also Published As

Publication number Publication date
CN115174293A (en) 2022-10-11

Similar Documents

Publication Publication Date Title
JP6207734B2 (en) Intelligent device scene mode customization method and apparatus
CN112073471B (en) Control method and device of equipment, storage medium and electronic device
CN103605531A (en) Household appliance control method and device and mobile terminal
CN105577493A (en) Control method and device of smart home devices and system
CN110687811B (en) Method and device for scene configuration of smart home offline voice equipment
CN111176133A (en) Method and device for determining smart home scene
CN113225744B (en) Intelligent device ad hoc network method, intelligent networking system and storage medium
WO2013131497A1 (en) Pairing method, control system, and device
CN104270665A (en) Displaying method and device of video auxiliary information
CN112436986A (en) Network distribution method and device, network distribution equipment and computer readable storage medium
CN112866070A (en) Interaction method, interaction device, storage medium and electronic equipment
CN109974232B (en) Rapid control method and terminal of air conditioner system, air conditioner system and medium
CN114697150B (en) Command issuing method and device, storage medium and electronic device
CN110233874B (en) Information transmission method and device for Internet of things equipment
CN115174293B (en) Scene information synchronization method and device, storage medium and electronic device
CN108111379A (en) A kind of method and apparatus for controlling smart home device
CN109218085B (en) Equipment automation and scene configuration management method and device and mobile terminal
CN112230554A (en) Linkage control method and system, terminal, computer device and storage medium
CN115174295A (en) Scene information synchronization method and device, storage medium and electronic device
WO2024016539A1 (en) Device control method and apparatus, and storage medium and electronic apparatus
CN115174294A (en) Cross-gateway scene processing method and device, storage medium and electronic device
CN113992698A (en) Intelligent device management method, gateway and computer readable storage medium
CN105847916A (en) Theme synchronizing and switching method and system
CN105827589A (en) Method and device for authorizing wireless equipment and sending control command for authorization of electric appliances
CN114637216A (en) Scene configuration method and device, control method and device, intelligent equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant