CN115296947B - Control command response method and device, storage medium and electronic device - Google Patents

Control command response method and device, storage medium and electronic device Download PDF

Info

Publication number
CN115296947B
CN115296947B CN202210742811.3A CN202210742811A CN115296947B CN 115296947 B CN115296947 B CN 115296947B CN 202210742811 A CN202210742811 A CN 202210742811A CN 115296947 B CN115296947 B CN 115296947B
Authority
CN
China
Prior art keywords
scene
information
execution script
control command
target
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
CN202210742811.3A
Other languages
Chinese (zh)
Other versions
CN115296947A (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 CN202210742811.3A priority Critical patent/CN115296947B/en
Publication of CN115296947A publication Critical patent/CN115296947A/en
Application granted granted Critical
Publication of CN115296947B publication Critical patent/CN115296947B/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
    • H04L12/2814Exchanging control software or macros for controlling 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application discloses a control command response method and device, a storage medium and an electronic device, and relates to the technical field of smart families, wherein the control command response method comprises the following steps: receiving a first control command for executing a target scene, and determining whether first scene information of the target scene and a first execution script corresponding to the target scene are stored in a local database; under the condition that first scene information of a target scene and a first execution script corresponding to the target scene are stored in a local database, determining first updating time of the first execution script; under the condition that the first updating time is inconsistent with the second updating time of the second execution script of the target scene stored in the cloud server, sending first request information to the cloud server, and obtaining second scene information and the second execution script sent by the cloud server based on the first request information; and responding to the first control command according to the second scene information and the second execution script.

Description

Control command response method and device, storage medium and electronic device
Technical Field
The present invention relates to the field of communications, and in particular, to a method and apparatus for responding to a control command, a storage medium, and an electronic apparatus.
Background
The technology has penetrated to the aspects of our life, the intelligent home appliance also becomes the development direction of the home appliance, and along with the development of network technology, particularly the development of wireless network, the multiple functions and means of the networked intelligent home system make the life more comfortable, convenient and safe.
In order to uniformly allocate a plurality of intelligent home appliances, scene information needs to be established, and under the condition of executing the scene information through control, the plurality of intelligent home appliances are uniformly controlled, and in the prior art, when a scene is executed through a gateway, error control equipment is caused due to the fact that the gateway is not synchronous with the scene information stored in a cloud server.
In the related art, since there is a problem that the gateway is not synchronized with the scene information stored in the cloud server, an error control device is caused, and an effective solution has not been proposed.
Disclosure of Invention
The embodiment of the application provides a response method and device of a control command, a storage medium and an electronic device, which at least solve the problem that in the related art, because the gateway is not synchronous with scene information stored in a cloud server, error control equipment and the like are caused.
According to an embodiment of the present application, there is provided a response method of a control command, including: receiving a first control command for executing a target scene, and determining whether first scene information of the target scene and a first execution script corresponding to the target scene are stored in a local database; under the condition that first scene information of the target scene and a first execution script corresponding to the target scene are stored in the local database, determining first updating time of the first execution script; when the first updating time is inconsistent with the second updating time of the second execution script of the target scene stored in the cloud server, sending first request information to the cloud server, and acquiring second scene information and the second execution script, which are sent by the cloud server based on the first request information; and responding to the first control command according to the second scene information and the second execution script.
In an exemplary embodiment, after obtaining the second scenario information and the second execution script sent by the cloud server based on the first request information, the method further includes: determining a plurality of first home appliances in the target scene according to the second scene information, and gateway devices respectively corresponding to the first home appliances, wherein the gateway devices comprise: the master gateway device is a gateway device in which execution control of the target scene is located; and sending the second scene information to the slave gateway equipment so that the slave gateway equipment stores the second scene information.
In an exemplary embodiment, responding to the first control command according to the second scene information and the second execution script includes: analyzing the second scene information through the second execution script to determine an operation to be executed of the main gateway device, wherein the operation to be executed is used for indicating a second control command to be sent to a first home appliance device by the main gateway device, and the first home appliance device at least comprises: the second home device; sending the second control command to the first home appliance according to the operation to be executed, and sending the first control command to a slave gateway device in the second scenario information, wherein the first control command comprises: and the scene identification of the target scene is analyzed by the slave gateway equipment based on the first control command, and the operation to be executed corresponding to the slave gateway equipment is determined according to the second scene information corresponding to the scene identification.
In an exemplary embodiment, after determining whether to store the first scene information of the target scene and the first execution script corresponding to the target scene in the local database, the method further includes: sending second request information to the cloud server under the condition that the first scene information of the target scene and the first execution script corresponding to the target scene are not stored in the local database; and receiving the first scene information and the first execution script sent by the cloud server based on the second request information, and responding to the first control command according to the first scene information and the first execution script.
In an exemplary embodiment, after obtaining the second scenario information and the second execution script sent by the cloud server based on the first request information, the method further includes: comparing the first scene information with the second scene information to determine a third home device newly added in the second scene information and/or a fourth home device deleted in the second scene information; and sending a subscription request to the third household appliance and/or sending an unsubscribe request to the fourth household appliance.
In an exemplary embodiment, the method further comprises: under the condition that a first scene list stored in the cloud server is updated, acquiring an updated first scene list, wherein the first scene list is used for indicating scene identifications of one or more first scenes corresponding to a target area stored in the cloud server; acquiring a second scene list from the local database, wherein the second scene list is used for indicating scene identifications of one or more scenes corresponding to the target area stored in the local database; determining whether the first scene list and the second scene list are consistent; and updating a second scene list stored in the local database according to the first scene list under the condition that the first scene list and the second scene list are inconsistent.
In an exemplary embodiment, updating the second scene list stored in the local database according to the first scene list includes: determining a third scene of the second scene more than the first scene and deleting scene information and execution scripts of the third scene under the condition that the second scene is more than the first scene; and under the condition that the second scene is less than the first scene, determining that the second scene is less than a fourth scene of the first scene, and sending third request information to the cloud server, wherein the third request information is used for acquiring scene information of the fourth scene and executing scripts.
According to another embodiment of the present application, there is also provided a response device for a control command, including: the receiving module is used for receiving a first control command for executing a target scene and determining whether first scene information of the target scene and a first execution script corresponding to the target scene are stored in a local database; the determining module is used for determining first updating time of the first execution script under the condition that the first scene information of the target scene and the first execution script corresponding to the target scene are stored in the local database; the sending module is used for sending first request information to the cloud server and obtaining second scene information and the second execution script, which are sent by the cloud server based on the first request information, when the first update time is inconsistent with the second update time of the second execution script of the target scene stored in the cloud server; and the response module is used for responding to the first control command according to the second scene information and the second execution script.
According to yet another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to execute the response method of the control command described above when running.
According to still another aspect of the embodiments of the present application, there is further provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the response method of the control command by the computer program.
In the embodiment of the application, a first control command for executing a target scene is received, and whether first scene information of the target scene and a first execution script corresponding to the target scene are stored in a local database is determined; under the condition that first scene information of the target scene and a first execution script corresponding to the target scene are stored in the local database, determining first updating time of the first execution script; when the first updating time is inconsistent with the second updating time of the second execution script of the target scene stored in the cloud server, sending first request information to the cloud server, and acquiring second scene information and the second execution script, which are sent by the cloud server based on the first request information; responding to the first control command according to the second scene information and the second execution script; by adopting the technical scheme, the problem that the error control equipment and the like are caused because the gateway and the scene information stored in the cloud server are not synchronous is solved, and further in the embodiment of the application, before the target scene is executed, whether the first updating time of the locally stored first executing script is consistent with the second updating time of the second executing script of the target scene stored in the cloud server is confirmed, and under the condition that the first updating time is inconsistent with the second updating time of the second executing script of the target scene, the second scene information and the second executing script are acquired in the cloud server, and then the control command is executed according to the second scene information and the second executing script, so that the error rate is reduced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a hardware environment of a control command response method according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of responding to control commands according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a method of responding to control commands according to an embodiment of the present application;
FIG. 4 is a timing diagram of a method of responding to control commands according to an embodiment of the present application;
fig. 5 is a block diagram of a response device to a control command according to an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one aspect of the embodiments of the present application, a method for responding to a control command is provided. The response method of the control command is widely applied to full-house intelligent digital control application scenes such as Smart Home (Smart Home), intelligent Home equipment ecology, intelligent Home (intelligent house) ecology and the like. Alternatively, in the present embodiment, the above-described response method of the control command may be applied to a hardware environment constituted by the terminal device 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be used to provide services (such as application services and the like) for a terminal or a client installed on the terminal, a database may be set on the server or independent of the server, for providing data storage services for the server 104, and cloud computing and/or edge computing services may be configured on the server or independent of the server, for providing data computing services for the server 104.
The network may include, but is not limited to, at least one of: wired network, wireless network. The wired network may include, but is not limited to, at least one of: a wide area network, a metropolitan area network, a local area network, and the wireless network may include, but is not limited to, at least one of: WIFI (Wireless Fidelity ), bluetooth. The terminal device 102 may not be limited to a PC, a mobile phone, a tablet computer, an intelligent air conditioner, an intelligent smoke machine, an intelligent refrigerator, an intelligent oven, an intelligent cooking range, an intelligent washing machine, an intelligent water heater, an intelligent washing device, an intelligent dish washer, an intelligent projection device, an intelligent television, an intelligent clothes hanger, an intelligent curtain, an intelligent video, an intelligent socket, an intelligent sound box, an intelligent fresh air device, an intelligent kitchen and toilet device, an intelligent bathroom device, an intelligent sweeping robot, an intelligent window cleaning robot, an intelligent mopping robot, an intelligent air purifying device, an intelligent steam box, an intelligent microwave oven, an intelligent kitchen appliance, an intelligent purifier, an intelligent water dispenser, an intelligent door lock, and the like.
In this embodiment, a response method of a control command is provided and applied to a gateway where a target scene is located, and fig. 2 is a flowchart of a response method of a control command according to an embodiment of the present application, where the flowchart includes the following steps:
Step S202, a first control command for executing a target scene is received, and whether first scene information of the target scene and a first execution script corresponding to the target scene are stored in a local database is determined;
step S204, determining a first update time of a first execution script under the condition that first scene information of the target scene and the first execution script corresponding to the target scene are stored in the local database;
step S206, when the first update time is inconsistent with the second update time of the second execution script of the target scene stored in the cloud server, sending first request information to the cloud server, and obtaining second scene information and the second execution script sent by the cloud server based on the first request information;
after the cloud server obtains the second scene information and the second execution script, which are sent based on the first request information, the first scene information and the first execution script stored in the main gateway device are deleted, and the second scene information and the second execution script are saved.
Step S208, responding to the first control command according to the second scene information and the second execution script.
Through the steps, a first control command for executing a target scene is received, and whether first scene information of the target scene and a first execution script corresponding to the target scene are stored in a local database is determined; under the condition that first scene information of the target scene and a first execution script corresponding to the target scene are stored in the local database, determining first updating time of the first execution script; when the first updating time is inconsistent with the second updating time of the second execution script of the target scene stored in the cloud server, sending first request information to the cloud server, and acquiring second scene information and the second execution script, which are sent by the cloud server based on the first request information; according to the second scene information and the second execution script, the first control command is responded, the problem that in the related art, due to the fact that the gateway is not synchronous with the scene information stored in the cloud server, error control equipment and the like are caused is solved, and further in the embodiment of the application, before a target scene is executed, whether the first update time of the locally stored first execution script is consistent with the second update time of the second execution script of the target scene stored in the cloud server is confirmed, and under the condition that the first update time is inconsistent with the second update time of the second execution script of the target scene, the second scene information and the second execution script are acquired in the cloud server, and then the control command is executed according to the second scene information and the second execution script, so that error rate is reduced.
In an exemplary embodiment, after obtaining the second scene information and the second execution script sent by the cloud server based on the first request information, the method further includes:
step 1: determining a plurality of first home appliances in the target scene according to the second scene information, and gateway devices respectively corresponding to the first home appliances, wherein the gateway devices comprise: the master gateway device is a gateway device in which execution control of the target scene is located;
step 2: and sending the second scene information to the slave gateway equipment so that the slave gateway equipment stores the second scene information.
As can be seen from the above steps 1 and 2, the master gateway device determines a first home appliance in the target scene and a master gateway device or a slave gateway device corresponding to the first home appliance according to the second scene information, and sends the second scene information to the slave gateway device.
The master gateway device may be understood as a gateway device connected to both the cloud server and the device, and the slave gateway device may be understood as a gateway device connected to the home appliance.
For example, in the case where the scene information is located on the gateway 1, the gateway 1 determines that the scene includes: device 1, device 2, device 3; and the device 1 is directly connected with the gateway 1, the device 2 is directly connected with the gateway 2, and the device 3 is directly connected with the gateway 3, at this time, the gateway 1 needs to send scene information and execution scripts to the gateway 2 and the gateway 3.
In an exemplary embodiment, responding to the first control command according to the second scene information and the second execution script includes: analyzing the second scene information through the second execution script to determine an operation to be executed of the main gateway device, wherein the operation to be executed is used for indicating a second control command to be sent to a second home appliance by the main gateway device, and the first home appliance at least comprises: the second home device; sending the second control command to the second home appliance according to the operation to be executed, and sending the first control command to the slave gateway device, so that the slave gateway device analyzes a scene identifier based on the first control command, and determines the operation to be executed corresponding to the slave gateway device according to second scene information corresponding to the scene identifier, wherein the first control command comprises: and the scene identification of the target scene.
That is, the master gateway device forwards the first control command to the slave gateway device according to the second control command to be sent to the second home appliance device by the second execution script, so that the slave gateway device determines second scene information according to the scene identifier in the first control command, and executes the corresponding operation to be executed according to the second scene information.
It should be noted that the scene information includes, but is not limited to: scene name, scene code, devices to be controlled in the scene, and operations to be performed that the devices to be controlled need to perform.
In an exemplary embodiment, after determining whether to store the first scene information of the target scene and the first execution script corresponding to the target scene in the local database, the method further includes: sending second request information to the cloud server under the condition that the first scene information of the target scene and the first execution script corresponding to the target scene are not stored in the local database; and receiving the first scene information and the first execution script sent by the cloud server based on the second request information, and responding to the first control command according to the first scene information and the first execution script.
That is, in the case where the first scene information of the target scene and the first execution script corresponding to the target scene are not stored in the local database, the master gateway is required to actively pull the first scene information and the first execution script from the cloud device.
In an exemplary embodiment, after obtaining the second scenario information and the second execution script sent by the cloud server based on the first request information, the method includes: comparing the first scene information with the second scene information to determine a third home device newly added in the second scene information and/or a fourth home device deleted in the second scene information; and sending a subscription request to the third household appliance and/or sending an unsubscribe request to the fourth household appliance.
It should be noted that, before the gateway control device, the subscription device is required, so, in the case that the first scene information is updated to the second scene information, it is required to determine that the second scene information is compared with the second home device newly added in the first scene information, and the second scene information is compared with the third home device deleted in the first scene information, for the second home device, the main gateway device sends a subscription request to the second home device; for a third home device, the primary gateway device sends an unsubscribe request to the second home device.
Optionally, under the condition that the device needing to be unsubscribed is determined, the device is placed in the fixed storage area and timed, after a specified time (for example, 24 hours) is exceeded, and the device is not used by a scene, the device is unsubscribed, and therefore the probability of misunderstanding of the device is reduced.
In one exemplary embodiment, further comprising: under the condition that a first scene list stored in the cloud server is updated, acquiring an updated first scene list, wherein the first scene list is used for indicating scene identifications of one or more first scenes corresponding to a target area stored in the cloud server; acquiring a second scene list from the local database, wherein the second scene list is used for indicating scene identifications of one or more scenes corresponding to the target area stored in the local database; determining whether the first scene list and the second scene list are consistent; and updating a second scene list stored in the local database according to the first scene list under the condition that the first scene list and the second scene list are inconsistent.
That is, in the case that the cloud updates the scene list, the cloud may actively send the updated scene list to the primary gateway device, and in the case that the primary gateway device receives the first scene list, the cloud compares the updated scene list according to a second scene list locally stored in the primary gateway device, so as to add or delete the scenes in the second scene list.
In an exemplary embodiment, updating the second scene list stored in the local database according to the first scene list includes: determining a third scene of the second scene more than the first scene and deleting scene information and execution scripts of the third scene under the condition that the second scene is more than the first scene; and under the condition that the second scene is less than the first scene, determining that the second scene is less than a fourth scene of the first scene, and sending third request information to the cloud server, wherein the third request information is used for acquiring scene information of the fourth scene and executing scripts.
Under the condition that a third scene in the second scene needs to be deleted, deleting the scene information of the third scene and the execution script together; and under the condition that a fourth scene in the first scene needs to be added in the second scene, acquiring scene information of the fourth scene and executing a script from the cloud server.
In order to better understand the process of the response method of the control command, the following description is given with reference to the implementation method flow of the response of the control command in the alternative embodiment, but the implementation method flow is not limited to the technical solution of the embodiment of the present application.
In this embodiment, a method for responding to a control command is provided, and fig. 3 is a schematic diagram of a method for responding to a control command according to an embodiment of the present application, as shown in fig. 3, specifically including the following steps:
step S301: after the initialization of the scene SDK is finished, synchronizing the scenes;
step S302: pulling an edge gateway list under the home from the cloud and storing the edge gateway list locally;
step S303: pulling all scene lists and gateways corresponding to the scenes of the family from the cloud;
step S304: comparing the scene list synchronously pulled from the cloud with the scene list stored in the local database, if the local database exists but the cloud does not exist, deleting local scene information, script information of the scene, subscribing equipment of the scene, and deleting the last execution time of the scene; adding scene information of a cloud, script information of a scene, equipment subscribed by the scene, and recording execution time of the scene;
step S305: the cloud scene updating time is later than the local scene updating time, and the scene script information is pulled and stored;
step S306: analyzing and storing the equipment in each scene;
step S307: subscribing devices in the scene in batches;
step S308: registering a scene gateway;
Step S309: broadcasting a changing scene in a small cycle;
step S310: setting a timer, and performing scene synchronization flow once every preset time length.
After the scene is changed, the device to be unsubscribed after the scene is changed is firstly put into the map, and is timed, and after a specified time (for example, 24 h) is timed out, and the device is not used by the scene, the device is unsubscribed.
Optionally, in this embodiment, a method for responding to a control command is provided, and fig. 4 is a timing chart of a method for responding to a control command according to an embodiment of the present application, as shown in fig. 4, specifically including the following steps:
1: the terminal equipment sends request information for starting a target scene to the cloud scene management module;
1.1: the cloud scene management module checks whether a gateway in the target scene is online or not;
1.2: under the condition that the gateway is not online, the cloud scene management module sends feedback information for directly returning the gateway to the terminal equipment;
1.3: the cloud scene management module issues a control command for starting a target scene to the equipment center;
1.3.1: the equipment center transmits a control request for starting a target scene to the SmartDevice;
1.3.2: the SmartDevice sends response information to the equipment center, wherein the response information is used for indicating the SmartDevice to receive the control request;
1.4: the response equipment center sends response information to the cloud scene management;
1.5: the cloud scene management sends response information to the terminal equipment;
1.3.3: the SmartDevice sends a control command for starting a target scene to the edge scene management module;
1.3.3.1: the edge scene management module inquires whether the storage time length of the target scene is out of date or not, wherein the storage time length is used for indicating the time length from the last updating time to the current time;
1.3.3.2: judging whether script information of the target scene exists locally or not by the edge scene management module under the condition that the storage duration of the target scene is not expired;
in the case where script information of the target scene does not exist locally, performing the steps of:
1.3.3.3: the edge scene management module requests the cloud scene management module to pull the target scene script information [ familyld, sceneld ];
1.3.3.4: the cloud scene management module sends script information of the target scene to the edge scene management module;
1.3.3.5: saving scene script information to the local;
1.3.3.6: the edge scene management module requests the cloud scene management module to inquire scene basic information [ sceneld ];
1.3.3.7: the cloud scene management module sends scene basic information to the edge scene management module;
1.3.3.8: saving the scene basic information to a database.
When the script information of the target scene exists locally, but the updating time of the script information is inconsistent with the updating time of the script information of the cloud, executing the following steps:
1.3.3.9: the edge scene management module inquires script information of a local target scene;
1.3.3.10: the edge scene management module judges whether the updating time of the script information is consistent with the updating time of the script information of the cloud;
1.3.3.11: the edge scene management module requests the cloud scene management module to pull the target scene script information [ sceneld ];
1.3.3.12: the cloud scene management module sends script information of the target scene to the edge scene management module;
1.3.3.13: updating script information of a target scene;
1.3.3.14: the edge scene management module requests the cloud scene management module to inquire scene basic information [ sceneld ];
1.3.3.15: the cloud scene management module sends scene basic information to the edge scene management module;
1.3.3.16: the edge scene management module updates scene basic information;
1.3.3.17: the edge scene management module stores scene update time;
1.3.3.18: the component service stores the scene and the device relation;
1.3.3.18.1: the component service stores scene ids and device relationships to a database;
1.3.3.18.2: the component service requests to register scene conditions and devices in the scene in the USDK;
1.3.3.18.3: the component service triggers scene execution through an engine domain;
1.3.3.19: the edge scene management module judges whether a gateway to which a scene belongs needs to initiate cross-panel broadcasting;
1.3.3.20: the edge scene management module broadcasts across panel small-cycle scene list changes;
1.3.3.21: the edge scene management module reports a cloud scene management control command processing result;
1.3.3.22: the cloud scenario manages the response.
The invention provides a method for synchronizing a scene list and a script equipment side scene SDK every 2 hours after the scene synchronization is successfully initialized, pulling an edge gateway list under a family and storing the local, then pulling all the scene lists under the family and gateways corresponding to the scenes, comparing the scene list and the local scene list which are synchronously pulled from a cloud side, deleting the scene information, deleting a scene script, deleting equipment subscribed by the scene, deleting the last execution time of the scene, sequentially traversing the scene list pulled from the cloud side, pulling the scene script information, storing the equipment and timing of each scene analyzed by the scene SDK, and storing the scene changed through small-cycle broadcasting after the scene SDK is subjected to batch equipment subscription and scene gateway registration.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also 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, or a network device, etc.) to perform the method of the embodiments of the present application.
FIG. 5 is a block diagram of a control command responding device according to an embodiment of the present application; as shown in FIG. 5, comprises
The receiving module 52 is configured to receive a first control command for executing a target scene, and determine whether first scene information of the target scene and a first execution script corresponding to the target scene are stored in a local database;
a determining module 54, configured to determine a first update time of a first execution script corresponding to the target scene, where the first scene information of the target scene and the first execution script are stored in the local database;
A sending module 56, configured to send first request information to the cloud server and obtain second scene information and the second execution script sent by the cloud server based on the first request information, where the first update time is inconsistent with a second update time of a second execution script of the target scene stored in the cloud server;
and a response module 58, configured to respond to the first control command according to the second scene information and the second execution script.
Through the device, a first control command for executing the target scene is received, and whether first scene information of the target scene and a first execution script corresponding to the target scene are stored in a local database or not is determined; under the condition that first scene information of the target scene and a first execution script corresponding to the target scene are stored in the local database, determining first updating time of the first execution script; when the first updating time is inconsistent with the second updating time of the second execution script of the target scene stored in the cloud server, sending first request information to the cloud server, and acquiring second scene information and the second execution script, which are sent by the cloud server based on the first request information; according to the second scene information and the second execution script, the first control command is responded, the problem that in the related art, due to the fact that the gateway is not synchronous with the scene information stored in the cloud server, error control equipment and the like are caused is solved, and further in the embodiment of the application, before a target scene is executed, whether the first update time of the locally stored first execution script is consistent with the second update time of the second execution script of the target scene stored in the cloud server is confirmed, and under the condition that the first update time is inconsistent with the second update time of the second execution script of the target scene, the second scene information and the second execution script are acquired in the cloud server, and then the control command is executed according to the second scene information and the second execution script, so that error rate is reduced.
In an exemplary embodiment, a sending module is configured to determine, according to the second scenario information, a plurality of first home devices in the target scenario, and gateway devices corresponding to the first home devices respectively, where the gateway devices include: the master gateway device is a gateway device in which execution control of the target scene is located; and sending the second scene information and the second execution script to the slave gateway device so that the slave gateway device stores the second scene information and the second execution script.
In an exemplary embodiment, the response module 58 is configured to parse the second scene information through the second execution script to determine an operation to be performed by the primary gateway device, where the operation to be performed is configured to instruct the primary gateway device to send a second control command to a second home device, and the first home device includes at least: the second home device; sending the second control command to the second home appliance according to the operation to be executed, and sending the first control command to the slave gateway device, so that the slave gateway device analyzes a scene identifier based on the first control command and determines the operation to be executed corresponding to the slave gateway device according to second scene information corresponding to the scene identifier, wherein the first control command comprises: and the scene identification of the target scene.
In an exemplary embodiment, the response module 58 is configured to send second request information to the cloud server if the first scenario information of the target scenario and the first execution script corresponding to the target scenario are not stored in the local database; and receiving the first scene information and the first execution script sent by the cloud server based on the second request information, and responding to the first control command according to the first scene information and the first execution script.
In an exemplary embodiment, a sending module is configured to compare the first scene information and the second scene information to determine a third home device that is newly added in the second scene information, and/or a fourth home device that is deleted in the second scene information; and sending a subscription request to the third household appliance and/or sending an unsubscribe request to the fourth household appliance.
In an exemplary embodiment, a receiving module is configured to obtain an updated first scene list when the first scene list stored in the cloud server is updated, where the first scene list is used to indicate scene identifiers of one or more first scenes corresponding to a target area stored in the cloud server; acquiring a second scene list from the local database, wherein the second scene list is used for indicating scene identifications of one or more scenes corresponding to the target area stored in the local database; determining whether the first scene list and the second scene list are consistent; and updating a second scene list stored in the local database according to the first scene list under the condition that the first scene list and the second scene list are inconsistent.
In an exemplary embodiment, the receiving module is configured to determine, in a case where the second scene is more than the first scene, that a third scene is more than the first scene, and delete scene information and an execution script of the third scene; and under the condition that the second scene is less than the first scene, determining that the second scene is less than a fourth scene of the first scene, and sending third request information to the cloud server, wherein the third request information is used for acquiring scene information of the fourth scene and executing scripts.
Embodiments of the present application also provide a storage medium including a stored program, wherein the program performs the method of any one of the above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store program code for performing the steps of:
s1, receiving a first control command for executing a target scene, and determining whether first scene information of the target scene and a first execution script corresponding to the target scene are stored in a local database;
s2, under the condition that first scene information of the target scene and a first execution script corresponding to the target scene are stored in the local database, determining first updating time of the first execution script;
Responding to the first control command according to the second scene information and the second execution script;
s3, when the first updating time is inconsistent with the second updating time of the second execution script of the target scene stored in the cloud server, sending first request information to the cloud server, and obtaining second scene information and the second execution script, which are sent by the cloud server based on the first request information;
and S4, responding to the first control command according to the second scene information and the second execution script.
Embodiments of the present application also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
S1, receiving a first control command for executing a target scene, and determining whether first scene information of the target scene and a first execution script corresponding to the target scene are stored in a local database;
s2, under the condition that first scene information of the target scene and a first execution script corresponding to the target scene are stored in the local database, determining first updating time of the first execution script;
responding to the first control command according to the second scene information and the second execution script;
s3, when the first updating time is inconsistent with the second updating time of the second execution script of the target scene stored in the cloud server, sending first request information to the cloud server, and obtaining second scene information and the second execution script, which are sent by the cloud server based on the first request information;
and S4, responding to the first control command according to the second scene information and the second execution script.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be centralized on a single computing device, or distributed across a network of computing devices, or they may alternatively be implemented in program code executable by computing devices, such that they may be stored in a memory device for execution by the computing devices and, in some cases, the steps shown or described may be performed in a different order than what is shown or described, or they may be implemented as individual integrated circuit modules, or as individual integrated circuit modules. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application and are intended to be comprehended within the scope of the present application.

Claims (9)

1. A method of responding to a control command, comprising:
receiving a first control command for executing a target scene, and determining whether first scene information of the target scene and a first execution script corresponding to the target scene are stored in a local database;
under the condition that first scene information of the target scene and a first execution script corresponding to the target scene are stored in the local database, determining first updating time of the first execution script;
when the first updating time is inconsistent with the second updating time of the second execution script of the target scene stored in the cloud server, sending first request information to the cloud server, and acquiring second scene information and the second execution script, which are sent by the cloud server based on the first request information;
responding to the first control command according to the second scene information and the second execution script;
after obtaining the second scene information and the second execution script, which are sent by the cloud server based on the first request information, the method further includes: comparing the first scene information with the second scene information to determine a third home device newly added in the second scene information and/or a fourth home device deleted in the second scene information; sending a subscription request to the third home device and/or sending an unsubscribe request to the fourth home device;
Wherein sending an unsubscribe request to the fourth home device includes: and placing the equipment information of the fourth household electrical equipment into a fixed storage area, timing, and sending a subscription-releasing request to the fourth household electrical equipment when the time length of placing the equipment information of the fourth household electrical equipment into the fixed storage area exceeds the designated time and the fourth household electrical equipment is not used by the scene corresponding to the second scene information.
2. The method according to claim 1, wherein after obtaining the second scenario information and the second execution script that are sent by the cloud server based on the first request information, the method further comprises:
determining a plurality of first home appliances in the target scene according to the second scene information, and gateway devices respectively corresponding to the first home appliances, wherein the gateway devices comprise: the master gateway device is a gateway device in which execution control of the target scene is located;
and sending the second scene information to the slave gateway equipment so that the slave gateway equipment stores the second scene information.
3. The method according to claim 2, wherein responding to the first control command according to the second scene information and the second execution script, comprises:
Analyzing the second scene information through the second execution script to determine an operation to be executed of the main gateway device, wherein the operation to be executed is used for indicating a second control command to be sent to a second home appliance by the main gateway device, and the first home appliance at least comprises: the second home device; sending the second control command to the second home appliance according to the operation to be executed, and sending the first control command to the slave gateway device, so that the slave gateway device analyzes a scene identifier based on the first control command and determines the operation to be executed corresponding to the slave gateway device according to second scene information corresponding to the scene identifier, wherein the first control command comprises: and the scene identification of the target scene.
4. The method according to claim 1, wherein after determining whether to store the first scene information of the target scene and the first execution script corresponding to the target scene in the local database, the method further comprises:
sending second request information to the cloud server under the condition that the first scene information of the target scene and the first execution script corresponding to the target scene are not stored in the local database;
And receiving the first scene information and the first execution script sent by the cloud server based on the second request information, and responding to the first control command according to the first scene information and the first execution script.
5. The method of responding to a control command according to claim 1, characterized in that the method further comprises: under the condition that a first scene list stored in the cloud server is updated, acquiring an updated first scene list, wherein the first scene list is used for indicating scene identifications of one or more first scenes corresponding to a target area stored in the cloud server;
acquiring a second scene list from the local database, wherein the second scene list is used for indicating scene identifications of one or more scenes corresponding to the target area stored in the local database; determining whether the first scene list and the second scene list are consistent;
and updating a second scene list stored in the local database according to the first scene list under the condition that the first scene list and the second scene list are inconsistent.
6. The method according to claim 5, wherein updating the second scene list stored in the local database according to the first scene list, comprises:
Determining a third scene of the second scene more than the first scene and deleting scene information and execution scripts of the third scene under the condition that the second scene is more than the first scene;
and under the condition that the second scene is less than the first scene, determining that the second scene is less than a fourth scene of the first scene, and sending third request information to the cloud server, wherein the third request information is used for acquiring scene information of the fourth scene and executing scripts.
7. A control command responding apparatus, comprising:
the receiving module is used for receiving a first control command for executing a target scene and determining whether first scene information of the target scene and a first execution script corresponding to the target scene are stored in a local database;
the determining module is used for determining first updating time of the first execution script under the condition that the first scene information of the target scene and the first execution script corresponding to the target scene are stored in the local database;
the sending module is used for sending first request information to the cloud server and obtaining second scene information and the second execution script, which are sent by the cloud server based on the first request information, when the first update time is inconsistent with the second update time of the second execution script of the target scene stored in the cloud server;
The response module is used for responding to the first control command according to the second scene information and the second execution script;
the sending module is further configured to compare the first scene information with the second scene information to determine a third home device newly added in the second scene information and/or a fourth home device deleted in the second scene information; sending a subscription request to the third home device and/or sending an unsubscribe request to the fourth home device;
the sending module is further configured to place the device information of the fourth home device in a fixed storage area, time, and send an unsubscribe request to the fourth home device when the duration of placing in the fixed storage area exceeds a specified time and the fourth home device is not used by a scene corresponding to the second scene information.
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 method of any of the preceding claims 1 to 6.
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 execute the method according to any of the claims 1 to 6 by means of the computer program.
CN202210742811.3A 2022-06-28 2022-06-28 Control command response method and device, storage medium and electronic device Active CN115296947B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210742811.3A CN115296947B (en) 2022-06-28 2022-06-28 Control command response method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210742811.3A CN115296947B (en) 2022-06-28 2022-06-28 Control command response method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN115296947A CN115296947A (en) 2022-11-04
CN115296947B true CN115296947B (en) 2024-01-26

Family

ID=83820861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210742811.3A Active CN115296947B (en) 2022-06-28 2022-06-28 Control command response method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115296947B (en)

Citations (14)

* 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
WO2018099400A1 (en) * 2016-11-29 2018-06-07 苏州宝时得电动工具有限公司 Augmented reality-based interior design system and method
CN109684054A (en) * 2018-11-07 2019-04-26 北京慧流科技有限公司 Information processing method and device, electronic equipment and memory
CN112073471A (en) * 2020-08-17 2020-12-11 青岛海尔科技有限公司 Device control method and apparatus, storage medium, and electronic apparatus
CN112199623A (en) * 2020-09-29 2021-01-08 上海博泰悦臻电子设备制造有限公司 Script execution method and device, electronic equipment and storage medium
CN112202651A (en) * 2020-09-08 2021-01-08 杭州涂鸦信息技术有限公司 Method and system for controlling intelligent household scene linkage
CN112417255A (en) * 2020-11-19 2021-02-26 青岛海尔科技有限公司 Method and device for receiving online state, storage medium and electronic device
CN113504766A (en) * 2021-07-02 2021-10-15 海尔(深圳)研发有限责任公司 Method, system, apparatus, server and storage medium for scheduling a scene task
CN113534676A (en) * 2021-07-30 2021-10-22 青岛海尔智能技术研发有限公司 Intelligent household appliance control method and device, computer equipment and storage medium
CN113572669A (en) * 2021-06-29 2021-10-29 青岛海尔科技有限公司 Scene processing method and device, intelligent gateway and processor
CN113645084A (en) * 2021-10-14 2021-11-12 杭州控客信息技术有限公司 Method for realizing off-line control in local area network in whole-house intelligent system
CN113934524A (en) * 2021-09-30 2022-01-14 青岛海尔科技有限公司 Asynchronous processing method and device of task, storage medium and electronic device
CN114007235A (en) * 2021-10-29 2022-02-01 上海庆科信息技术有限公司 Scene rule writing method and device, storage medium, processor and electronic equipment
WO2022083464A1 (en) * 2020-10-19 2022-04-28 中兴通讯股份有限公司 Data processing method, apparatus and system, computer device and computer-readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110262261B (en) * 2019-05-31 2022-01-11 华为技术有限公司 Method for controlling equipment service, cloud server and intelligent home system

Patent Citations (14)

* 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
WO2018099400A1 (en) * 2016-11-29 2018-06-07 苏州宝时得电动工具有限公司 Augmented reality-based interior design system and method
CN109684054A (en) * 2018-11-07 2019-04-26 北京慧流科技有限公司 Information processing method and device, electronic equipment and memory
CN112073471A (en) * 2020-08-17 2020-12-11 青岛海尔科技有限公司 Device control method and apparatus, storage medium, and electronic apparatus
CN112202651A (en) * 2020-09-08 2021-01-08 杭州涂鸦信息技术有限公司 Method and system for controlling intelligent household scene linkage
CN112199623A (en) * 2020-09-29 2021-01-08 上海博泰悦臻电子设备制造有限公司 Script execution method and device, electronic equipment and storage medium
WO2022083464A1 (en) * 2020-10-19 2022-04-28 中兴通讯股份有限公司 Data processing method, apparatus and system, computer device and computer-readable storage medium
CN112417255A (en) * 2020-11-19 2021-02-26 青岛海尔科技有限公司 Method and device for receiving online state, storage medium and electronic device
CN113572669A (en) * 2021-06-29 2021-10-29 青岛海尔科技有限公司 Scene processing method and device, intelligent gateway and processor
CN113504766A (en) * 2021-07-02 2021-10-15 海尔(深圳)研发有限责任公司 Method, system, apparatus, server and storage medium for scheduling a scene task
CN113534676A (en) * 2021-07-30 2021-10-22 青岛海尔智能技术研发有限公司 Intelligent household appliance control method and device, computer equipment and storage medium
CN113934524A (en) * 2021-09-30 2022-01-14 青岛海尔科技有限公司 Asynchronous processing method and device of task, storage medium and electronic device
CN113645084A (en) * 2021-10-14 2021-11-12 杭州控客信息技术有限公司 Method for realizing off-line control in local area network in whole-house intelligent system
CN114007235A (en) * 2021-10-29 2022-02-01 上海庆科信息技术有限公司 Scene rule writing method and device, storage medium, processor and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
智能家居App动态监测技术研究;张宇辉;西安电子科技大学;5-30 *

Also Published As

Publication number Publication date
CN115296947A (en) 2022-11-04

Similar Documents

Publication Publication Date Title
CN114697150B (en) Command issuing method and device, storage medium and electronic device
CN115167164A (en) Method and device for determining equipment scene, storage medium and electronic device
CN114938365B (en) Function module updating method and device, storage medium and electronic device
CN116016002A (en) Intelligent household appliance network distribution method and device and electronic device
CN115309062B (en) Control method and device of equipment, storage medium and electronic device
CN115296947B (en) Control command response method and device, storage medium and electronic device
CN115296948B (en) Scene information updating method and device, storage medium and electronic device
CN115167160A (en) Device control method and apparatus, device control system, and storage medium
CN115167163B (en) Scene execution method and device, storage medium and electronic device
CN114697345B (en) Information updating method and device, storage medium and electronic device
CN115296958B (en) Distribution method and device of equipment control tasks, storage medium and electronic device
CN115314549B (en) Offline equipment management method, storage medium and electronic device
CN115296945B (en) Control method, system and device of equipment, storage medium and electronic device
CN115297128B (en) Edge execution information processing method and device, storage medium and electronic device
CN115001885B (en) Equipment control method and device, storage medium and electronic device
CN115296946B (en) Control request decomposition method and device, storage medium and electronic device
CN115277412B (en) Edge gateway upgrading method and device, storage medium and electronic device
CN117499472A (en) Intelligent terminal voice broadcasting method, system, storage medium and electronic device
CN117784631A (en) Method and device for sending scene execution instruction, storage medium and electronic device
CN115174382B (en) Equipment upgrading method, storage medium and electronic device
CN115174297A (en) Attribute information updating method and device, storage medium and electronic device
CN115694913A (en) Method and apparatus for transmitting device information, storage medium, and electronic apparatus
CN117768256A (en) Equipment control method, device, storage medium and electronic device
CN115766881A (en) Timing scheduling monitoring method, storage medium and electronic device
CN118112967A (en) Method and device for determining control result, storage medium 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