CN115174295B - 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
CN115174295B
CN115174295B CN202210597444.2A CN202210597444A CN115174295B CN 115174295 B CN115174295 B CN 115174295B CN 202210597444 A CN202210597444 A CN 202210597444A CN 115174295 B CN115174295 B CN 115174295B
Authority
CN
China
Prior art keywords
scene
gateway
information
execution
synchronization
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
CN202210597444.2A
Other languages
Chinese (zh)
Other versions
CN115174295A (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
Qingdao Haier Intelligent Home Appliance Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Qingdao Haier Intelligent Home Appliance 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, Qingdao Haier Intelligent Home Appliance Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202210597444.2A priority Critical patent/CN115174295B/en
Publication of CN115174295A publication Critical patent/CN115174295A/en
Application granted granted Critical
Publication of CN115174295B publication Critical patent/CN115174295B/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/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/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72415User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories for remote control of appliances
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/16Gateway arrangements
    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Human Computer Interaction (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a scene information synchronization method and device, a storage medium and an electronic device. The method is applied to the edge gateway and comprises the following steps: a scene synchronization request is sent to a cloud server, 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 updating a scene information list which is stored locally and corresponds to the family number according to the scene synchronization response. The method of the application can synchronize the information of all the edge gateways in the home so as to enrich the functions of the edge gateways in use and improve the portability of the edge gateways in use.

Description

Scene information synchronization method and device, storage medium and electronic device
Technical Field
The present application relates to edge gateway information synchronization technologies, and in particular, to a method and 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 in a mobile terminal (such as a mobile phone), a cloud server generates control commands according to configuration files related to the scene, which are uploaded to the cloud server by the mobile phone, the control commands are sent to an edge gateway one by one, and the edge gateway sends the control commands to intelligent home equipment appointed by the control commands after receiving the control commands.
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 family 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 an edge gateway, and the method includes:
a scene synchronization request is sent to a cloud server, 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 updating a scene information list which is stored locally and corresponds to the family number according to the scene synchronization response.
In one embodiment, the method further comprises:
When the scene synchronization response is not acquired, acquiring scene information currently stored by at least one edge gateway in the family corresponding to the family number;
and updating the locally stored scene information list according to the scene information currently stored by the at least one edge gateway.
In one embodiment, the obtaining the scene information currently stored by at least one edge gateway in the home corresponding to the home number includes:
Acquiring the time of updating a locally stored scene information list by M edge gateways in a household corresponding to the household number to obtain M updating time, wherein M is an integer greater than 1;
Screening out a reference edge gateway corresponding to the largest update time in M update times;
acquiring scene information currently stored by the reference edge gateway;
the updating the locally stored scene information list according to the scene information currently stored by the at least one edge gateway comprises:
And updating the locally stored scene information list according to the scene information currently stored by the reference edge gateway.
In one embodiment, the scene information in the scene synchronization response and the scene information currently stored in the at least one edge gateway each include at least a scene number and a hosting gateway number of each scene, where the hosting gateway number is used to define a hosting gateway, and the method further includes:
when the host gateway of the first scene is the edge gateway, a first scene execution script issuing request is sent to the cloud server, wherein the first scene execution script issuing request carries a scene number of the first scene;
And acquiring a first scene execution script response sent by the cloud server, wherein the first scene execution script response at least comprises execution logic information of the first scene, and the execution logic information at least comprises execution equipment information.
In one embodiment, the method further comprises:
And when the first scene execution script response is not acquired, sending a first scene execution script issuing request to the at least one edge gateway, so that the at least one edge gateway forwards the first scene execution script issuing request to the cloud server.
In one embodiment, each edge gateway in the family corresponding to the family number simultaneously sends the scene synchronization request to the cloud server.
On the other hand, the application provides a scene information synchronization method, which is applied to a cloud server and comprises the following steps:
Receiving a scene synchronization request sent by an edge gateway, wherein the scene synchronization request carries a family number;
acquiring scene information of each scene under a household corresponding to the household number according to the household number, and generating a scene synchronization response;
And sending the scene synchronization response to the edge gateway.
In one embodiment, the method further comprises:
Acquiring newly-added scene configuration information, wherein the newly-added scene configuration information at least comprises a scene type of a newly-added scene, a host gateway number and a home number to which the newly-added scene belongs;
Assigning a scene number to the newly added scene;
And storing the scene number, the scene type, the information of the host gateway and the home number of the newly added scene.
In one embodiment, the scene information includes at least a scene type, a home gateway number, and a home number of the scene, and the method further includes:
generating a scene execution script of a scene according to the scene type, the host gateway number and the home number of the scene;
and sending the scene execution script to a host gateway corresponding to the host gateway number of the scene.
In another aspect, the present application provides a method for remotely controlling a gateway, applied to a first gateway, where the scene information of the first gateway and the scene information of a second 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 second gateway, and enabling the second gateway to be a host gateway of the scene designated by the scene execution operation.
In another aspect, the present application provides a scene information synchronization device, applied to an edge gateway, including:
The communication module is used for sending a scene synchronization request to the cloud server, wherein the scene synchronization request carries a family number;
the acquisition module is used for 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 storage module is used for updating a scene information list which is stored locally and corresponds to the family number according to the scene synchronization response.
In another aspect, the present application provides a scene information synchronization device, applied to a cloud server, including:
The communication module is used for receiving a scene synchronization request sent by the edge gateway, wherein the scene synchronization request carries a family number;
The processing module is used for acquiring the scene information of each scene under the family corresponding to the family number according to the family number and generating a scene synchronization response;
the communication module is further configured to send the scene synchronization response to the edge gateway.
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 gateway according to the third aspect.
In another aspect, the present 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 gateway according to the third aspect, by using the computer program.
The scene information synchronization method provided by the embodiment of the application sends a scene synchronization request (carrying a family number) to a cloud server, and acquires 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 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 edge gateways based on the synchronous scene information can realize the inter-scene remote operation of the edge gateway or realize other functions requiring the synchronous information of the edge gateways, so 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 a schematic view of an application scenario of a scenario information synchronization method provided by 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 a flowchart of a scenario information synchronization method according to another 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 scene information synchronization method according to another embodiment of the present application;
fig. 6 is an interaction schematic diagram of a scene information synchronization method according to an embodiment of the present application;
Fig. 7 is a flow chart of a method for remotely controlling a gateway according to an embodiment of the present application;
fig. 8 is a schematic diagram of a central control screen of a first gateway according to an embodiment of the present application;
Fig. 9 is a schematic diagram of a scene information synchronization device according to an embodiment of the present application;
Fig. 10 is a schematic diagram of a scene information synchronization device according to another embodiment of the present application;
fig. 11 is a schematic diagram of an electronic device according to an embodiment of the 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 control commands according to configuration files related to the scene, which are uploaded to the cloud server by the mobile phone, the control commands are sent to a host gateway one by one, and the host gateway sends the control commands to intelligent home equipment appointed by the control commands after receiving the control commands.
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 an edge gateway and comprises the steps of sending a scene synchronization request (carrying a family number) to a cloud server, and obtaining 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 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 edge gateways based on the synchronous scene information can realize the inter-scene remote operation of the edge gateway or realize other functions requiring the synchronous information of the edge gateways, so 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 provided by the application is applied to the edge 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 by the present application, in the diagram, the edge gateway sends a scenario synchronization request to a cloud server, where the scenario synchronization request carries a family number. And 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 updating a scene information list which is stored locally and corresponds to the family number according to the scene synchronization response, and completing scene information synchronization with the cloud server.
Referring to fig. 2, an embodiment of the present application provides a scene information synchronization method, applied to an edge gateway, including:
S210, sending a scene synchronization request to the cloud server, wherein the scene synchronization request carries a family number.
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.
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.
S220, 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.
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 edge gateway confirm whether itself is the hosting gateway of the scene.
For example, when the hosting gateway of the first scene is the own edge 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 edge gateway sends a first scenario execution script issuing request to the 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 own edge gateway, the own edge 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 S230, updating a scene information list corresponding to the family number in a local storage mode according to the scene synchronization response.
Each family number corresponds to a scene information list, which is shown in table 1.
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 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 edge gateways based on the synchronous scene information can realize the inter-scene remote operation of the edge gateway or realize other functions requiring the synchronous information of the edge gateways, so 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. 3, in an alternative embodiment of the present application, the edge gateway does not acquire the scene synchronization response, and needs to perform synchronization of scene information based on other edge gateways in the home.
And S310, 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 edge 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 present edge 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 home edge gateway.
S320, 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 list of scene information may be updated based on scene information currently stored by all edge gateways in the home except the home edge gateway.
In an alternative embodiment, the locally stored scene information list may be updated based on the scene information currently stored by the reference edge gateway as described in step S310.
As described in the related description in step S220, when the hosting gateway of the first scene is the home edge gateway, a first scene execution script issuing request is sent to the cloud server, where the first scene execution script issuing request carries a scene number of the first scene. But when the first scenario execution script response is not acquired, a first 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 first scenario execution script issue request to the cloud server. After receiving the request for issuing the first scenario execution script, the cloud server sends a first scenario execution script response to the host gateway (i.e. the edge gateway) of the first scenario, where the first scenario execution script response at least includes execution logic information of the first scenario, and the execution logic information at least includes execution device information. The edge gateway controls the execution device to run based on the execution logic information of the first 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 scene information, and at least one edge gateway can be remotely operated 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. 4, an embodiment of the present application further provides a method for synchronizing scene information, which is applied to a cloud server, and includes:
s410, receiving a scene synchronization request sent by an edge gateway, wherein the scene synchronization request carries a family number.
As described in the related description in step S210, when a scene needs to be created, the user creates newly added scene configuration information on the 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.
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.
S420, acquiring scene information of each scene under the family corresponding to the family number according to the family number, and generating a scene synchronization response.
The scene synchronization response includes scene information of each scene under the family corresponding to the family number. 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 edge gateway confirm whether itself is the hosting gateway of the scene.
S430, sending the scene synchronization response to the edge gateway.
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. Correspondingly, the cloud server sends the scene synchronization response to each edge gateway in the family, so that the synchronization of the scene information among each edge gateway in the family is indirectly realized.
In an optional embodiment, the scenario information includes at least a scenario type of the scenario, a home gateway number and a home number to which the scenario belongs, and the cloud server generates a scenario execution script of the scenario according to the scenario type of the scenario, the home gateway number and the home number to which the scenario belongs, and sends the scenario execution script to the home gateway corresponding to the home gateway number of the scenario.
In an alternative embodiment, after receiving, for example, a first scenario execution script issuing request, the cloud service queries related information of the first scenario according to a scenario number of the first scenario to generate a first scenario execution script response, and issues the first scenario execution script response to a host gateway of the first scenario. The first scenario execution script response includes execution logic information of the first scenario including at least execution device information. And after receiving the first scene execution script response, the host gateway of the first scene autonomously or passively controls the execution device to run based on the first scene execution response.
In summary, the scene information synchronization method provided by the embodiment is applied to the cloud server. After receiving the scene synchronization request sent by the edge gateway, the cloud server acquires the scene information of each scene under the home corresponding to the home number according to the home number carried by the scene synchronization request, and generates a scene synchronization response. The scene synchronization response includes scene information of each scene under the family corresponding to the family number. And the edge gateway updates a scene information list corresponding 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 edge gateways based on the synchronous scene information can realize the inter-scene remote operation of the edge gateway or realize other functions requiring the synchronous information of the edge gateways, so 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. 5, an embodiment of the present application further provides a scene information synchronization method, applied to a first gateway, including:
s510, 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.
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.
S520, scene change information of the host gateway is obtained, wherein the scene change information is scene added information and/or scene deleted information.
Referring to fig. 6, 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). As shown in fig. 6, the hosting gateway receives an update scenario request sent by the cloud server, and adds and/or deletes a scenario according to the update scenario request.
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.
S530, 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.
Referring to fig. 6, after adding a scene and/or deleting a scene, the hosting gateway further sends a response for updating the scene request to a cloud server, and if the cloud server receives the response for updating the scene request, the cloud server sends scene change information of the hosting gateway to the first gateway.
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 first gateway stores the scene information in a scene information list, and each family number corresponds to one scene information list
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.
The scene number of each scene is unique, and if the scene change information is the scene deletion information, the acquired second scene information deleted in the scene deletion information at least comprises 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. 7, an embodiment of the present application provides a method for remotely controlling a gateway, which is applied to a first gateway, and the first gateway is synchronized by the scene information synchronization method provided in any one of the embodiments above. The method for remotely controlling the gateway comprises the following steps:
s710, responding to the scene execution operation, sending a scene execution command to the second gateway, wherein the second gateway is 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. 8, in which the user operates information of selecting a scene to be executed (scene a) and an execution button (scene execution operation) on the central control screen of the first 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 a cloud server, and then the cloud server sends the scenario triggering instruction to the first 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 comprises a gateway number, so that the first 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 second gateway is an edge gateway in the same family, and if the host gateway of the scene to be executed is the second gateway, the starting instruction of the scene to be executed is sent to the second gateway through a wireless network (local area network). The starting instruction of the to-be-executed scene is used for commanding the second gateway to execute the to-be-executed scene, and the second gateway feeds back an execution result after executing the to-be-executed scene.
The first 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 second gateway is indicated to store the scene information of the scene to be executed. The second gateway also stores the execution script information of the scene to be executed, and when the scene to be executed is executed, the device specified by the execution script information of the scene to be executed is controlled to run.
For another example, when the execution result is that the execution fails, it may be that the second 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 first gateway re-acquires the scene information in the second gateway and updates the locally stored scene information list. Specifically, when the execution result is that the execution fails, the first gateway acquires 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 second gateway, acquiring the scene information in the second gateway again, and updating a locally stored scene information list. When the first 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 first gateway, the first gateway executes the to-be-executed scene and sends an execution result of the to-be-executed scene to the second gateway. The first gateway can execute the scene to be executed when receiving the execution command of the scene to be executed, and the execution command of the scene to be executed can be sent by a user through touching a central control screen of the first gateway or can be sent to the first gateway through a mobile phone remotely through a cloud server.
If the execution result is that the execution fails, the second 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 second gateway needs to be notified if the execution is successful.
The first gateway receives an execution result of a scene to be executed sent by the host gateway, or receives an execution result of the scene to be executed 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 the first gateway, where the first gateway is synchronous with the scene information between other edge gateways in the home. The first gateway responds to the scene execution operation and sends a scene execution command to the second gateway, and the second 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. 9, an embodiment of the present application further provides a scene information synchronization device 10, applied to an edge gateway, where the scene information synchronization device 10 includes:
The communication module 11 is configured to send a scene synchronization request to the cloud server, where the scene synchronization request carries a family number;
the acquiring module 12 is 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 a storage module 13, configured to update a scene information list corresponding to the family number stored locally according to the scene synchronization response.
The obtaining module 12 is further configured to obtain, when the scene synchronization response is not obtained, scene information currently stored by at least one edge gateway in a home corresponding to the home number.
The storage module 13 is further configured to update the locally stored scene information list according to the scene information currently stored by the at least one edge gateway.
The obtaining module 12 is specifically configured to obtain M times of updating the locally stored scene information list by M edge gateways in a home corresponding to the home number, where M is an integer greater than 1; screening out a reference edge gateway corresponding to the largest update time in M update times; and acquiring scene information currently stored by the reference edge gateway.
The storage module 13 is specifically configured to update the locally stored scene information list according to the scene information currently stored by the reference edge gateway.
The scene information in the scene sync response and the scene information currently stored by the at least one edge gateway each include at least a scene number for each scene and a hosting gateway number for defining a hosting gateway,
The communication module 11 is further configured to send a first scenario execution script issuing request to the cloud server when the hosting gateway of the first scenario is the edge gateway, where the first scenario execution script issuing request carries a scenario number of the first scenario.
The obtaining module 12 is further configured to obtain a first scenario execution script response sent by the cloud server, where the first scenario execution script response includes at least execution logic information of the first scenario, and the execution logic information includes at least execution device information.
The communication module 11 is further configured to send a first scenario execution script issuing request to the at least one edge gateway when the first scenario execution script response is not acquired, so that the at least one edge gateway forwards the first scenario execution script issuing request to the cloud server.
And each edge gateway in the family corresponding to the family number simultaneously sends the scene synchronization request to the cloud server.
Referring to fig. 10, an embodiment of the present application further provides a scene information synchronization device 20, which is applied to a cloud server, where the scene information synchronization device 10 includes:
The communication module 21 is configured to receive a scene synchronization request sent by the edge gateway, where the scene synchronization request carries a home number.
The processing module 22 is configured to obtain, according to the family number, scene information of each scene under the family corresponding to the family number, and generate a scene synchronization response.
The communication module 21 is further configured to send the scene sync response to the edge gateway.
The processing module 22 is further configured to obtain additional scene configuration information, where the additional scene configuration information includes at least a scene type of the additional scene, a home gateway number, and a home number to which the additional scene belongs; assigning a scene number to the newly added scene; and storing the scene number, the scene type, the information of the host gateway and the home number of the newly added scene.
The scene information at least comprises a scene type, a home gateway number and a home number of a scene, and the processing module 22 is further configured to generate a scene execution script of the scene according to the scene type, the home gateway number and the home number of the scene; and sending the scene execution script to a host gateway corresponding to the host gateway number of the scene.
Referring to fig. 11, 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 remote control of a 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 which, when executed, cause a computer executable instruction to be executed by a processor for implementing the method of scene information synchronization provided by any of the embodiments above, or for performing the method of remote control gateway provided by any of the embodiments above.
The 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 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 the purpose of description, and do not represent the 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 (e.g. ROM/RAM, magnetic disk, optical disk) comprising 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 application, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (9)

1. A method for synchronizing scene information, applied to an edge gateway, the method comprising:
a scene synchronization request is sent to a cloud server, 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, the scene information comprises a scene number of each scene and a host gateway number, and the host gateway number is used for defining a host gateway;
Updating a locally stored scene information list corresponding to the family number according to the scene synchronization response;
Responding to a scene execution operation, when a host gateway of a scene appointed by the scene execution operation is a second gateway, sending a scene execution command to the second gateway, and if execution script information of a scene to be executed is stored in the second gateway, controlling equipment appointed by the execution script information to run;
When the host gateway of the scene designated by the scene execution operation is the edge gateway, a first scene execution script issuing request is sent to the cloud server, wherein the first scene execution script issuing request carries a scene number of a first scene;
Acquiring a first scene execution script response sent by the cloud server, wherein the first scene execution script response at least comprises execution logic information of the first scene, and the execution logic information at least comprises execution equipment information;
When the first scene execution script response is not acquired, a first scene execution script issuing request is sent to the at least one edge gateway, so that the at least one edge gateway forwards the first scene execution script issuing request to the cloud server; the cloud server is used for sending a response of the first scene execution script to the host gateway after receiving the request for issuing the first scene execution script;
When the scene synchronization response is not acquired, acquiring the time when M edge gateways in the families corresponding to the family numbers update a locally stored scene information list, and acquiring M update time, wherein M is an integer greater than 1;
Screening out a reference edge gateway corresponding to the largest update time in M update times;
acquiring scene information currently stored by the reference edge gateway;
And updating the locally stored scene information list according to the scene information currently stored by the reference edge gateway.
2. The method of claim 1, wherein each edge gateway in the home corresponding to the home number simultaneously sends the scene synchronization request to the cloud server.
3. The scene information synchronization method is characterized by being applied to a cloud server and comprising the following steps of:
Receiving a scene synchronization request sent by an edge gateway, wherein the scene synchronization request carries a family number;
Acquiring scene information of each scene under a household corresponding to the household number according to the household number, and generating a scene synchronous response, wherein the scene information comprises the scene number of each scene and a host gateway number, and the host gateway number is used for defining a host gateway;
Sending the scene synchronization response to the edge gateway; the edge gateway is used for responding to a scene execution operation, when a host gateway of a scene appointed by the scene execution operation is a second gateway, a scene execution command is sent to the second gateway, and if execution script information of the scene to be executed is stored in the second gateway, equipment appointed by the execution script information is controlled to run; when the host gateway of the scene designated by the scene execution operation is the edge gateway, a first scene execution script issuing request is sent to the cloud server, wherein the first scene execution script issuing request carries a scene number of a first scene; acquiring a first scene execution script response sent by the cloud server, wherein the first scene execution script response at least comprises execution logic information of the first scene, and the execution logic information at least comprises execution equipment information; when the first scene execution script response is not acquired, a first scene execution script issuing request is sent to the at least one edge gateway, so that the at least one edge gateway forwards the first scene execution script issuing request to the cloud server; when the scene synchronization response is not acquired, acquiring the moments of updating the locally stored scene information list by M edge gateways in the families corresponding to the family numbers, and acquiring M updating moments, wherein M is an integer larger than 1; screening out a reference edge gateway corresponding to the largest update time in M update times; acquiring scene information currently stored by the reference edge gateway; updating the locally stored scene information list according to the scene information currently stored by the reference edge gateway;
And receiving the first scene execution script issuing request sent by the host gateway, and sending the scene execution script of the first scene to the host gateway.
4. A method according to claim 3, characterized in that the method further comprises:
Acquiring newly-added scene configuration information, wherein the newly-added scene configuration information at least comprises a scene type of a newly-added scene, a host gateway number and a home number to which the newly-added scene belongs;
Assigning a scene number to the newly added scene;
And storing the scene number, the scene type, the information of the host gateway and the home number of the newly added scene.
5. The method of claim 4, wherein the scene information further includes a family number to which the scene belongs, the method further comprising:
And generating a scene execution script of the first scene according to the scene type, the host gateway number and the home number of the first scene.
6. A scene information synchronization device, applied to an edge gateway, comprising:
The communication module is used for sending a scene synchronization request to the cloud server, wherein the scene synchronization request carries a family number;
The acquisition module is used for 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, the scene information comprises a scene number of each scene and a host gateway number, and the host gateway number is used for defining a host gateway;
The storage module is used for updating a scene information list which is stored locally and corresponds to the family number according to the scene synchronization response;
The communication module is further configured to respond to a scenario execution operation, when a host gateway of a scenario specified by the scenario execution operation is a second gateway, send a scenario execution command to the second gateway, and if execution script information of a scenario to be executed is stored in the second gateway, control equipment specified by the execution script information to run;
When the host gateway of the scene designated by the scene execution operation is the edge gateway, a first scene execution script issuing request is sent to the cloud server, wherein the first scene execution script issuing request carries a scene number of a first scene;
The acquisition module is further configured to acquire a first scenario execution script response sent by the cloud server, where the first scenario execution script response includes at least execution logic information of the first scenario, and the execution logic information includes at least execution device information;
the communication module is further configured to send a first scenario execution script issuing request to the at least one edge gateway when the first scenario execution script response is not acquired, so that the at least one edge gateway forwards the first scenario execution script issuing request to the cloud server; the cloud server is used for sending a response of the first scene execution script to the host gateway after receiving the request for issuing the first scene execution script;
The acquisition module is further configured to acquire, when the scene synchronization response is not acquired, moments when M edge gateways in the family corresponding to the family number update a locally stored scene information list, so as to obtain M update moments, where M is an integer greater than 1;
Screening out a reference edge gateway corresponding to the largest update time in M update times;
acquiring scene information currently stored by the reference edge gateway;
The storage module is further configured to update the locally stored scene information list according to the scene information currently stored by the reference edge gateway.
7. A scene information synchronizing device, which is applied to a cloud server, comprising:
The communication module is used for receiving a scene synchronization request sent by the edge gateway, wherein the scene synchronization request carries a family number;
The processing module is used for acquiring scene information of each scene under the home corresponding to the home number according to the home number and generating a scene synchronous response, wherein the scene information comprises the scene number of each scene and a host gateway number, and the host gateway number is used for defining a host gateway;
the communication module is further used for sending the scene synchronization response to the edge gateway;
The edge gateway is used for responding to a scene execution operation, when a host gateway of a scene appointed by the scene execution operation is a second gateway, a scene execution command is sent to the second gateway, and if execution script information of the scene to be executed is stored in the second gateway, equipment appointed by the execution script information is controlled to run; when the host gateway of the scene designated by the scene execution operation is the edge gateway, a first scene execution script issuing request is sent to the cloud server, wherein the first scene execution script issuing request carries a scene number of a first scene; acquiring a first scene execution script response sent by the cloud server, wherein the first scene execution script response at least comprises execution logic information of the first scene, and the execution logic information at least comprises execution equipment information; when the first scene execution script response is not acquired, a first scene execution script issuing request is sent to the at least one edge gateway, so that the at least one edge gateway forwards the first scene execution script issuing request to the cloud server; when the scene synchronization response is not acquired, acquiring the moments of updating the locally stored scene information list by M edge gateways in the families corresponding to the family numbers, and acquiring M updating moments, wherein M is an integer larger than 1; screening out a reference edge gateway corresponding to the largest update time in M update times; acquiring scene information currently stored by the reference edge gateway; updating the locally stored scene information list according to the scene information currently stored by the reference edge gateway;
The communication module is further configured to receive the first scenario execution script issuing request sent by the hosting gateway, and send the scenario execution script of the first scenario to the hosting gateway.
8. 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 2, or performs the scene information synchronization method of any one of claims 3 to 5.
9. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to perform the scene information synchronization method of any of claims 1 to 2 or to perform the scene information synchronization method of any of claims 3 to 5 by means of the computer program.
CN202210597444.2A 2022-05-30 2022-05-30 Scene information synchronization method and device, storage medium and electronic device Active CN115174295B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210597444.2A CN115174295B (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
CN202210597444.2A CN115174295B (en) 2022-05-30 2022-05-30 Scene information synchronization method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN115174295A CN115174295A (en) 2022-10-11
CN115174295B true CN115174295B (en) 2024-05-24

Family

ID=83482725

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210597444.2A Active CN115174295B (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) CN115174295B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400777A (en) * 2019-11-14 2020-07-10 杭州海康威视***技术有限公司 Network storage system, user authentication method, device and equipment
CN111885136A (en) * 2020-07-15 2020-11-03 北京时代凌宇科技股份有限公司 Edge computing gateway cluster operation method and system based on edge cloud cooperation
CN112995348A (en) * 2021-05-12 2021-06-18 北京金山云网络技术有限公司 Control method, device and system of Internet of things equipment
CN113992675A (en) * 2021-10-26 2022-01-28 云知声(上海)智能科技有限公司 IOT cloud platform and edge gateway cooperative work method, system and storage medium
CN114500554A (en) * 2022-02-09 2022-05-13 南京戎光软件科技有限公司 Internet of things system management method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11108849B2 (en) * 2018-12-03 2021-08-31 At&T Intellectual Property I, L.P. Global internet of things (IOT) quality of service (QOS) realization through collaborative edge gateways

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400777A (en) * 2019-11-14 2020-07-10 杭州海康威视***技术有限公司 Network storage system, user authentication method, device and equipment
CN111885136A (en) * 2020-07-15 2020-11-03 北京时代凌宇科技股份有限公司 Edge computing gateway cluster operation method and system based on edge cloud cooperation
CN112995348A (en) * 2021-05-12 2021-06-18 北京金山云网络技术有限公司 Control method, device and system of Internet of things equipment
CN113992675A (en) * 2021-10-26 2022-01-28 云知声(上海)智能科技有限公司 IOT cloud platform and edge gateway cooperative work method, system and storage medium
CN114500554A (en) * 2022-02-09 2022-05-13 南京戎光软件科技有限公司 Internet of things system management method

Also Published As

Publication number Publication date
CN115174295A (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
CN110687811B (en) Method and device for scene configuration of smart home offline voice equipment
CN103605531A (en) Household appliance control method and device and mobile terminal
JP2017502623A (en) Smart device control method, control apparatus, program and recording medium based on set scene mode
CN113225744B (en) Intelligent device ad hoc network method, intelligent networking system and storage medium
CN108039990B (en) Household appliance operation method and system, household appliance and computer readable storage medium
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
CN114024948A (en) Intelligent building integration management system
CN115174295B (en) Scene information synchronization method and device, storage medium and electronic device
CN115174293B (en) Scene information synchronization method and device, storage medium and electronic device
CN115174294B (en) Cross-gateway scene processing method and device, storage medium and electronic device
CN113992698B (en) Intelligent device management method, gateway and computer readable storage medium
CN115167160A (en) Device control method and apparatus, device control system, and storage medium
CN114637216A (en) Scene configuration method and device, control method and device, intelligent equipment and medium
CN106899598B (en) Internet of things user management method and device and air conditioner
WO2023202029A1 (en) Tag data adjustment method and apparatus, and storage medium
CN115297128A (en) Edge execution information processing method and device, storage medium and electronic device
CN115297463B (en) Equipment binding method and device, storage medium and electronic device
CN115643122A (en) Equipment control method
CN112230554B (en) Linkage control method and system, terminal, computer device and storage medium
CN116107222A (en) Control method of equipment, control device of equipment, readable storage medium and equipment
CN118192814A (en) Information input method, storage medium and electronic device
CN115766427A (en) Visual configuration system, project creation method and device and electronic device

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