A smart home device control method, apparatus, device, and storage medium

CN116679578BActive Publication Date: 2026-08-18GUANGZHOU HEDONG TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310907435.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-21
Publication Date
2026-08-18
Estimated Expiration
2043-07-21

AI Technical Summary

Technical Problem

[0005]本申请实施例提供一种智能家居设备控制方法、装置、设备及存储介质,能够解决多网关场景控制下的响应同步性较差的问题,提升智能家居设备的响应同步性,提高智能家居设备的响应效率

Benefits of technology

[0065]This application embodiment receives scene messages sent by terminal devices via the cloud. When a scene message meets a first preset condition, it is split into a first scene message according to the gateway corresponding to the execution action. The first scene message is then triggered and marked in the cloud to obtain a second scene message, which is then sent to the corresponding gateway. The cloud confirms the trigger condition based on the scene message. When the status information of the smart home device meets the trigger condition, it sends a trigger execution to the corresponding gateway, allowing the gateway to execute the corresponding action in the second scene message. By using the above technical means, the scene message can be split and marked in the cloud according to the gateway corresponding to the execution action, resulting in a second scene message for each gateway. This avoids the problem of asynchronous response under multi-gateway scene control. By splitting the scene message, each gateway executes its corresponding second scene message, improving the response synchronization of smart home devices. Furthermore, when an action requires at least two gateways, a cloud-triggered flag is used to send a trigger command to the corresponding gateway after the cloud determines the trigger conditions. Each gateway then executes the corresponding second scenario message according to the trigger command, avoiding communication delays caused by sending execution commands one by one through the cloud, thereby improving the response efficiency of smart home devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116679578B_ABST
    Figure CN116679578B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a smart home device control method and device, equipment and storage medium, which receive a scene message sent by a terminal device through a cloud; when the scene message meets a first preset condition, the scene message is split and processed according to a gateway corresponding to an execution action to obtain a first scene message, each first scene message corresponds to a gateway, and the first preset condition is that the execution action in the scene message needs at least two gateways to execute; the first scene message is marked for cloud triggering to obtain a second scene message, and the second scene message is sent to a corresponding gateway; a triggering condition is confirmed according to the scene message, when state information of a smart home device obtained meets the triggering condition, a triggering instruction is sent to the corresponding gateway, so that the gateway executes an execution action in the corresponding second scene message according to the triggering instruction, which can solve the problem of poor response synchronization of multi-gateway scene control, and improve the response synchronization and response efficiency of the smart home device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of smart home devices, and in particular, to a method, device, equipment, and storage medium for controlling smart home devices. Background Art

[0002] The functions of the elbow pipes in smart homes include information collection, input and output, as well as centralized, remote, and linkage control, etc. However, the number of smart devices in a single gateway is limited. When the number of devices is too large, multiple gateways need to be introduced. For example, in large-area smart home application sites, such as villas, due to the overly large and complex house structure, there will be problems with incomplete network coverage, and multiple gateways need to be configured to achieve whole-house intelligent connection.

[0003] In the scenario of multiple gateways, when cross-gateway scenario control occurs, currently, instructions are usually sent to the corresponding gateways one by one through the cloud, so as to achieve multi-gateway scenario control.

[0004] In the existing multi-gateway scenario control, regardless of whether the controlled smart home devices are in the same gateway, instructions are sent to the corresponding gateways one by one through the cloud. Due to network latency, the response synchronization of smart home devices will be reduced. Summary of the Invention

[0005] The embodiments of the present application provide a method, device, equipment, and storage medium for controlling smart home devices, which can solve the problem of poor response synchronization in the multi-gateway scenario control, improve the response synchronization of smart home devices, and enhance the response efficiency of smart home devices.

[0006] In a first aspect, the embodiments of the present application provide a method for controlling smart home devices for the cloud, including:

[0007] Receiving a scenario message sent by a terminal device, where the scenario message includes the control requirements of smart home devices;

[0008] When the scenario message meets a first preset condition, splitting the scenario message according to the gateways corresponding to the execution actions to obtain first scenario messages, each first scenario message corresponding to a gateway, and the first preset condition is that the execution actions in the scenario message require at least two gateways to execute;

[0009] Performing a cloud trigger marking on the first scenario message to obtain a second scenario message, and sending the second scenario message to the corresponding gateway;

[0010] Based on the scenario message confirmation of the triggering condition, when the obtained status information of the smart home device meets the triggering condition, a triggering instruction is sent to the corresponding gateway, so that the gateway can execute the execution action in the corresponding second scenario message according to the triggering instruction.

[0011] Furthermore, the scene message sent by the receiving terminal device, after including the control requirements of the smart home device, also includes:

[0012] When the scenario message does not meet the first preset condition, it is detected whether the corresponding trigger condition in the scenario message belongs to cross-gateway;

[0013] When the triggering condition is cross-gateway, the triggering condition in the scenario message is marked as cloud-triggered, and the corresponding execution action is assigned to the corresponding gateway tag to obtain the third scenario message;

[0014] Send the third scenario message to the corresponding gateway;

[0015] According to the third scenario message confirmation trigger condition, when the obtained status information of the smart home device meets the trigger condition, a trigger instruction is sent to the corresponding gateway, so that the gateway can execute the corresponding execution action marked in the corresponding third scenario message according to the trigger instruction.

[0016] Furthermore, after receiving the scenario message sent by the receiving terminal device, the method further includes:

[0017] The scenario message is repeatedly evaluated. When the scenario message meets the preset loop condition, it is determined whether the scenario message meets the first preset condition.

[0018] Furthermore, when the scenario message does not meet the first preset condition, after detecting whether the corresponding triggering condition in the scenario message belongs to cross-gateway operation, the method further includes:

[0019] When the triggering condition does not belong to cross-gateway, the triggering condition in the scenario message is marked as gateway-triggered, and the corresponding execution action is assigned to the corresponding gateway mark to obtain the fourth scenario message;

[0020] The fourth scenario message is sent to the corresponding gateway, so that the corresponding gateway can determine the trigger condition based on the gateway trigger in the fourth scenario message and execute the corresponding action based on the corresponding gateway mark.

[0021] Furthermore, before sending the fourth scenario message to the corresponding gateway, the process further includes:

[0022] Determine whether the fourth scenario message meets the second preset condition. The second preset condition is that the time type message in the message meets the preset time interval condition, the device type message meets the execution action condition, and / or the automation type message meets the automation scenario condition.

[0023] If the fourth scenario message meets the preset second condition, then the fourth scenario message is saved and sent to the corresponding gateway.

[0024] Furthermore, the step of saving the fourth scenario message and sending it to the corresponding gateway if the fourth scenario message meets the preset second condition includes:

[0025] The time-type message in the fourth scenario message is judged by interval. When the time interval corresponding to the time-type message meets the preset interval range, the fourth scenario message is saved and sent to the corresponding gateway.

[0026] When the time interval corresponding to the time type message does not meet the preset interval range, an error is reported.

[0027] Furthermore, the step of saving the fourth scenario message and sending it to the corresponding gateway if the fourth scenario message meets the preset second condition includes:

[0028] The device type message in the fourth scenario message is subjected to attribute judgment. When the attribute of the device type message is to perform an action, the fourth scenario message is saved and sent to the corresponding gateway.

[0029] If the attribute of the device type message is not an action to be performed, an error will be reported.

[0030] Furthermore, the step of saving the fourth scenario message and sending it to the corresponding gateway if the fourth scenario message meets the preset second condition includes:

[0031] The automation type message in the fourth scenario message is supported. If the automation type message is supported, the fourth scenario message is saved and sent to the corresponding gateway.

[0032] If the automation type message is not supported, an error will be reported.

[0033] In a second aspect, embodiments of this application provide a smart home device control device for cloud computing, comprising:

[0034] The message receiving module is used to receive scene messages sent by the terminal device, the scene messages including the control requirements of the smart home device;

[0035] The scene splitting module is used to split the scene message according to the gateway corresponding to the execution action when the scene message meets the first preset condition, to obtain the first scene message. Each first scene message corresponds to one gateway. The first preset condition is that the execution action in the scene message needs to be executed by at least two gateways.

[0036] The first triggering and marking module is used to trigger and mark the first scenario message in the cloud to obtain the second scenario message, and send the second scenario message to the corresponding gateway;

[0037] The first sending module is used to confirm the triggering condition based on the scenario message. When the obtained status information of the smart home device meets the triggering condition, it sends a triggering instruction to the corresponding gateway so that the gateway can execute the execution action in the corresponding second scenario message according to the triggering instruction.

[0038] Furthermore, the device also includes a cross-gateway detection module, a second trigger flag module, a second sending module, and a third sending module;

[0039] The cross-gateway detection module is used to detect whether the triggering condition in the scenario message belongs to cross-gateway when the scenario message does not meet the first preset condition.

[0040] The second triggering marking module is used to mark the triggering condition in the scenario message as cloud-triggered when the triggering condition is cross-gateway, and to assign the corresponding execution action to the corresponding gateway mark to obtain the third scenario message;

[0041] The second sending module is used to send the third scenario message to the corresponding gateway;

[0042] The third sending module is used to confirm the triggering condition based on the third scenario message. When the obtained status information of the smart home device meets the triggering condition, it sends a triggering instruction to the corresponding gateway so that the gateway can execute the corresponding execution action marked in the corresponding third scenario message according to the triggering instruction.

[0043] Furthermore, the device also includes a loop judgment module;

[0044] The loop judgment module is used to perform loop judgment on the scene message. When the scene message meets the preset loop condition, it determines whether the scene message meets the first preset condition.

[0045] Furthermore, the device also includes a third trigger marker module and a fourth sending module;

[0046] The third triggering marking module is used to mark the triggering condition in the scenario message as gateway triggering when the triggering condition does not belong to cross-gateway, and to assign the corresponding execution action to the corresponding gateway mark to obtain the fourth scenario message;

[0047] The fourth sending module is used to send the fourth scenario message to the corresponding gateway, so that the corresponding gateway can determine the trigger condition based on the gateway trigger in the fourth scenario message and execute the corresponding execution action based on the corresponding gateway mark.

[0048] Furthermore, the device also includes a processing condition judgment module and a fifth sending module;

[0049] The processing condition judgment module is used to determine whether the fourth scenario message meets the second preset condition. The second preset condition is that the time type message in the message meets the preset time interval condition, the device type message meets the execution action condition, and / or the automation type message meets the automation scenario condition.

[0050] The fifth sending module is used to save the fourth scenario message and send the fourth scenario message to the corresponding gateway if the fourth scenario message meets the preset second condition.

[0051] Furthermore, the fifth sending module includes a first sending unit and a first error reporting unit;

[0052] The first unit is used to perform interval judgment on the time type message in the fourth scenario message. When the time interval corresponding to the time type message meets the preset interval range, the fourth scenario message is saved and the fourth scenario message is sent to the corresponding gateway.

[0053] The first error reporting unit is used to perform error reporting when the time interval corresponding to the time type message does not meet the preset interval range.

[0054] Furthermore, the fifth sending module includes a second sending unit and a second error reporting unit;

[0055] The second sending unit is used to determine the attributes of the device type message in the fourth scenario message. When the attribute of the device type message is to perform an action, the fourth scenario message is saved and sent to the corresponding gateway.

[0056] The second error reporting unit is used to perform error reporting if the attribute of the device type message is not an action to be performed.

[0057] Furthermore, the fifth sending module includes a third sending unit and a third error reporting unit;

[0058] The third sending unit is used to determine the support of automation type messages in the fourth scenario message. When the automation type message is supported, the fourth scenario message is saved and sent to the corresponding gateway.

[0059] The third error reporting unit is used to perform error reporting if the automation type message does not support automation type.

[0060] In a third aspect, embodiments of this application provide a smart home device control device, comprising:

[0061] Memory and one or more processors;

[0062] The memory is used to store one or more programs;

[0063] When the one or more programs are executed by the one or more processors, the one or more processors implement the smart home device control method as described in the first aspect.

[0064] In a fourth aspect, embodiments of this application provide a storage medium for storing computer-executable instructions, which, when executed by a computer processor, are used to perform the smart home device control method as described in the first aspect.

[0065] This application embodiment receives scene messages sent by terminal devices via the cloud. When a scene message meets a first preset condition, it is split into a first scene message according to the gateway corresponding to the execution action. The first scene message is then triggered and marked in the cloud to obtain a second scene message, which is then sent to the corresponding gateway. The cloud confirms the trigger condition based on the scene message. When the status information of the smart home device meets the trigger condition, it sends a trigger execution to the corresponding gateway, allowing the gateway to execute the corresponding action in the second scene message. By using the above technical means, the scene message can be split and marked in the cloud according to the gateway corresponding to the execution action, resulting in a second scene message for each gateway. This avoids the problem of asynchronous response under multi-gateway scene control. By splitting the scene message, each gateway executes its corresponding second scene message, improving the response synchronization of smart home devices. Furthermore, when an action requires at least two gateways, a cloud-triggered flag is used to send a trigger command to the corresponding gateway after the cloud determines the trigger conditions. Each gateway then executes the corresponding second scenario message according to the trigger command, avoiding communication delays caused by sending execution commands one by one through the cloud, thereby improving the response efficiency of smart home devices. Attached Figure Description

[0066] Figure 1 This is a flowchart of a smart home device control method provided in an embodiment of this application;

[0067] Figure 2 This is a schematic diagram of a connection between the cloud and a gateway provided in an embodiment of this application;

[0068] Figure 3 This is a flowchart of another smart home device control method provided in the embodiments of this application;

[0069] Figure 4 This is a flowchart of a scene processing and judgment method provided in an embodiment of this application;

[0070] Figure 5 This is a flowchart of another scene processing and judgment method provided in the embodiments of this application;

[0071] Figure 6 This is a flowchart of another scene processing and judgment method provided in the embodiments of this application;

[0072] Figure 7 This is a schematic diagram of the structure of a smart home device control device provided in an embodiment of this application;

[0073] Figure 8 This is a schematic diagram of the structure of a smart home device control device provided in an embodiment of this application. Detailed Implementation

[0074] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0075] The smart home device control method, apparatus, device, and storage medium provided in this application aim to improve the responsiveness and synchronization of smart home devices when controlling smart home devices through multiple gateways. This is achieved by splitting scene messages in the cloud according to the gateway corresponding to the execution action, resulting in a second scene message for each gateway. Each gateway then executes its corresponding second scene message, improving the responsiveness and synchronization of smart home devices. Furthermore, when an action requires at least two gateways, the second scene message is triggered and marked in the cloud. The cloud then determines the trigger conditions and sends trigger commands to the corresponding gateways. Each gateway executes its corresponding second scene message according to the trigger command, avoiding communication delays caused by sending execution commands one by one from the cloud, thus improving the responsiveness and efficiency of smart home devices. This contrasts with traditional multi-gateway smart home device control methods, which typically send commands one by one from the cloud to the corresponding gateways to achieve scene control. Existing multi-gateway scene control methods, regardless of whether the controlled smart home devices belong to the same gateway, send commands one by one from the cloud. Due to network latency, this reduces the responsiveness and synchronization of smart home devices. Based on this, a smart home device control method according to embodiments of this application is provided to solve the problem of poor response synchronization in existing multi-gateway scenario control.

[0076] Figure 1 A flowchart of a smart home device control method provided in this application embodiment is given. The smart home device control method provided in this embodiment can be executed by a smart home device control device, which can be implemented by software and / or hardware. The smart home device control device can consist of two or more physical entities, or it can consist of a single physical entity. Generally, the smart home device control device can be a cloud platform or a gateway, etc.

[0077] The following description uses the cloud as the primary method for controlling smart home devices. (Refer to...) Figure 1 This smart home device control method, used in the cloud, specifically includes:

[0078] S101. Receive a scenario message sent by the terminal device. The scenario message includes the control requirements of the smart home device.

[0079] In the Internet of Things (IoT), a scenario can be understood as the interaction between different devices. A scenario consists of two parts: a triggering condition and an execution action. Within a scenario, the execution action can only be triggered when the triggering condition is met. For example, in a scenario where a device automatically starts and stops based on room temperature, the triggering condition is that a temperature sensor detects that the indoor temperature has reached a preset temperature (e.g., 28°C), and the corresponding execution action is to start the air conditioning unit.

[0080] Terminal devices can be devices from which users send control requests for smart home devices, such as computers, mobile phones, or tablets. It's important to note that smart home devices are end devices in the Internet of Things (IoT), such as air conditioners, lights, and fans. Users input control requests for corresponding smart home devices through their terminal devices. The terminal devices then generate corresponding scene messages based on these requests and send them to the cloud. It's worth noting that the scene message includes the triggering conditions and execution actions for the scene.

[0081] The cloud receives a scene message from the terminal device. This scene message includes information such as the control requirements, triggering conditions, and execution actions of the smart home device. After receiving the scene message, the cloud performs a loop check on the control logic within the scene message, determining whether the scene control loop is feasible. When the scene message meets a preset loop condition (i.e., the scene control loop is feasible), the cloud proceeds to step S102, which checks whether the scene message meets a first preset condition. The first preset condition is that the execution action in the scene message requires execution by at least two gateways. If the first preset condition is met, the scene message is a multi-gateway scene; if it is not met, the scene message is a single-gateway scene.

[0082] It should be noted that when a scene message does not meet the preset loop conditions, meaning the scene control loop in the scene message is not feasible (e.g., there is a logical problem preventing the next step from proceeding), an error will be reported. Error reporting may involve sending an error message to the corresponding terminal device and not performing any further control processing.

[0083] As described above, after receiving the scene message sent by the terminal device through the cloud, it performs a loop judgment process. Only after the scene message meets the preset loop conditions will subsequent control be carried out. This provides an initial judgment for the subsequent control method, thereby improving the overall efficiency of smart home device control.

[0084] S102. When the scenario message meets the first preset condition, the scenario message is split and processed according to the gateway corresponding to the execution action to obtain the first scenario message. Each first scenario message corresponds to one gateway. The first preset condition is that the execution action in the scenario message needs to be executed by at least two gateways.

[0085] When a scene message meets a preset loop condition, a step is taken to determine whether the scene message meets a first preset condition. The first preset condition is that the action in the scene message requires execution by at least two gateways. When a scene message meets the first preset condition, it is split according to the gateway corresponding to the action, resulting in a first scene message. Each first scene message corresponds to one gateway; that is, the scene message is split according to the action of each gateway, resulting in a first scene message corresponding to the action executed by each gateway. It should be noted that the first scene message includes the triggering condition corresponding to the action.

[0086] It should be noted that when the cloud processes the data in a split manner, it assigns the corresponding gateway tag to the execution action in each first scenario message.

[0087] Figure 2 This is a schematic diagram of a connection between the cloud and a gateway provided in an embodiment of this application, referred to... Figure 2In a smart home device control scenario, cloud 1 communicates with multiple gateways, and each gateway communicates with a corresponding smart home device. For example, cloud 1 communicates with first gateway 11, second gateway 12, and third gateway 13. First gateway 11 is connected to first device 111, second device 112, and third device 113; second gateway 12 is connected to fourth device 121 and fifth device 122; and third gateway 13 is connected to sixth device 131, seventh device 132, and eighth device 133. A first preset condition is that the action in the scenario message requires execution by at least two gateways. For example, if the action corresponding to a scenario message is to start and stop first device 111 and fourth device 121, then the action requires execution by two gateways, thus satisfying the first preset condition. Scenario message A is split according to the gateway corresponding to the action, resulting in two first scenario messages: first scenario message A1 and first scenario message B1. The execution action in the first scenario message A1 is the execution action corresponding to the first gateway 11, that is, the execution action is to control the start and stop of the first device 111; the execution action in the first scenario message B1 is the execution action corresponding to the second gateway 12, that is, the execution action is to control the start of the fourth device 121.

[0088] In one embodiment, the cloud assigns a corresponding gateway tag to the execution action in the complete scene message during the split processing. For example, in the complete scene message, the execution action corresponding to the first gateway 11 is tagged with the gateway tag corresponding to the first gateway 11 (e.g., W11), the execution action corresponding to the second gateway 12 is tagged with the gateway tag corresponding to the second gateway 12 (e.g., W12), and the execution action corresponding to the third gateway 13 in the first scene message is tagged with the gateway tag corresponding to the third gateway 13 (e.g., W13).

[0089] As described above, when a scene message meets the first preset condition—that is, when the action in the scene message requires execution by at least two gateways—the scene message is split according to the gateway corresponding to the action, resulting in a first scene message for each gateway. Each gateway can then perform its corresponding execution based on its own first scene message, avoiding the latency caused by sending corresponding scene messages or scene execution instructions from the cloud, thus improving the efficiency of gateways in executing scenes. Furthermore, by splitting the scene message, each gateway can perform its corresponding action based on its own first scene message, improving the response synchronization between different gateways and enhancing the response synchronization of smart home devices.

[0090] S103. The first scenario message is triggered and marked in the cloud to obtain the second scenario message, and the second scenario message is sent to the corresponding gateway.

[0091] When a scenario message meets the first preset condition, it is split according to the gateway corresponding to the execution action to obtain the first scenario message. Based on the first preset condition that the execution action is performed by at least two gateways, to further improve the linkage between scenario executions across different gateways, the first scenario message can be marked with a cloud trigger to obtain the second scenario message. It should be noted that each second scenario message corresponds to one gateway. The second scenario message is sent to the corresponding gateway. By splitting the scenario message according to the gateway performing the execution action, the first scenario message is marked with a cloud trigger. When a subsequent gateway receives the second scenario message, it can determine the trigger condition in the second scenario message based on the cloud trigger mark. The judgment is made by the cloud, and the gateway only needs to execute the execution action in the second scenario message after receiving the corresponding trigger. The above-mentioned method splits the scenario message executed across gateways to obtain the first scenario message and marks the first scenario message with a cloud trigger, so that the trigger conditions of all split scenario messages (i.e., the second scenario message) are uniformly judged by the cloud. This improves the scenario linkage of cross-gateway execution, and also improves the response synchronization of smart home devices corresponding to each gateway when executing across gateways, thereby improving the overall working efficiency of smart home device control.

[0092] It should be noted that the cloud also performs cloud triggering marking in the complete scenario message.

[0093] For example, refer to Figure 2 Cloud 1 performs cloud trigger marking processing on trigger condition 'a' in the first scenario message A1 to obtain the second scenario message A2; Cloud 1 performs cloud trigger marking processing on trigger condition 'b' in the first scenario message B1 to obtain the second scenario message B2. The second scenario message A2 is sent to the first gateway 11, and the second scenario message B2 is sent to the second gateway 12. Cloud 1 performs cloud trigger marking processing on both trigger conditions 'a' and 'b' in the complete scenario message to indicate that trigger conditions 'a' and 'b' are determined and triggered by Cloud 1.

[0094] It should be noted that when the cloud detects that a scene message meets the first preset condition, it splits the scene message according to the gateway corresponding to the execution action, and then performs cloud-triggered marking on all trigger conditions in the complete scene message.

[0095] S104. Confirm the triggering conditions based on the scenario message. When the obtained status information of the smart home device meets the triggering conditions, send a triggering instruction to the corresponding gateway so that the gateway can execute the corresponding second scenario message according to the triggering instruction.

[0096] After the second scenario message is sent to the corresponding gateway, the gateway parses and processes the second scenario message. Based on the cloud trigger identifier in the second scenario message, the gateway can know that the trigger condition of the scenario is determined by the cloud, and the gateway itself waits to receive the trigger instruction.

[0097] Based on the cloud, cloud triggering is also performed in the complete scene message. After the cloud sends the second scene message to the corresponding gateway, the cloud confirms the triggering conditions according to the marked complete scene message. When the obtained status information of the smart home device meets the triggering conditions, the cloud sends a triggering command to the corresponding gateway so that the corresponding gateway can execute the corresponding action in the second scene message according to the triggering command.

[0098] It's important to note that all status changes of smart home devices are pushed to the cloud. The cloud stores snapshot information of these smart home devices, which includes the current state and values ​​of all their attributes. Whenever an attribute of an automation scenario changes, the cloud checks the snapshot information of the smart home devices.

[0099] The cloud platform determines whether the trigger conditions are met based on snapshot information from smart home devices and the trigger conditions themselves. If the corresponding trigger conditions are met, a trigger command is generated and sent to the corresponding gateway. Upon receiving the trigger command, the gateway executes the corresponding action based on the second scene message stored locally.

[0100] For example, refer to Figure 2 After receiving the second scenario message A2, the first gateway 11 waits to receive a trigger command because of the cloud trigger flag corresponding to trigger condition 'a' in the second scenario message A2. The cloud 1 confirms the trigger condition based on the complete scenario message after the flag. Assuming trigger condition 'a' is confirmed, when the obtained status information of the smart home device meets trigger condition 'a', it sends a trigger command to the first gateway 11. After receiving the trigger command, the first gateway 11 begins to execute the action in the second scenario message A2.

[0101] It should be noted that each second scenario message may have multiple triggering conditions and multiple execution actions. Each triggering condition corresponds to a trigger command. The gateway, based on the received trigger command, determines the corresponding execution action based on the scenario identifier corresponding to the trigger command. The cloud, based on the gateway identifier corresponding to the execution action for each triggering condition, determines which gateway to send the trigger command to.

[0102] As described above, by determining whether the status information (or snapshot information) of smart home devices meets the triggering conditions through the cloud, and sending the trigger to the corresponding gateway when the triggering conditions are met, the scenario linkage of cross-gateway execution is improved, and the response synchronization of smart home devices corresponding to each gateway is improved when cross-gateway execution is performed, thereby improving the overall working efficiency of smart home device control.

[0103] Figure 3 This is a flowchart of another smart home device control method provided in the embodiments of this application, referred to... Figure 3 This smart home device control method, used in the cloud, specifically includes:

[0104] S201. When the scenario message does not meet the first preset condition, check whether the corresponding trigger condition in the scenario message belongs to cross-gateway.

[0105] If a scene message does not meet the first preset condition, i.e., the action in the scene message is executed through a single gateway, then it is checked whether the triggering condition in the scene message is cross-gateway. When the action is executed through a single gateway, the triggering condition may be cross-gateway. In order to further improve the linkage and response synchronization of smart home device control, the cloud needs to further determine whether the triggering condition in the scene message is cross-gateway, so as to facilitate the triggering of the scene message.

[0106] For example, refer to Figure 2 For example, if the execution action corresponding to a certain scenario message is to start and stop the first device 111 and the second device 112, meaning the execution action only requires the first gateway 11 to execute, then the first preset condition is not met. In this case, the cloud 1 also needs to check whether the triggering condition in the scenario message belongs to cross-gateway. A triggering condition belonging to cross-gateway can be understood as the smart home devices in the triggering condition being devices from different gateways. For example, the triggering condition is that the first device 111 is turned on (i.e., the action is executed) only when the third device 113 and the fifth device 122 are in an on state. Since the third device 113 is a device connected to the first gateway 11 and the fifth device 122 is a device connected to the second gateway 12, then the triggering condition "the third device 113 and the fifth device 122 are in an on state" belongs to cross-gateway.

[0107] S202. When the triggering condition is cross-gateway, mark the triggering condition in the scenario message as cloud-triggered, and assign the corresponding execution action to the corresponding gateway mark to obtain the third scenario message.

[0108] When the action is performed through a single gateway, the triggering condition may be cross-gateway. If the triggering condition is determined through the gateway, control errors may occur due to asynchronous state information of the smart home devices across the gateways. For example, suppose the first gateway 11 determines the triggering condition as follows: the third device 113 and the fifth device 122 are both enabled, and the first device 111 is turned on. When the first gateway 11 receives information that the fifth device 122 is enabled, it may actually be disabled. The first gateway 11 is unaware that the fifth device 122 is disabled and proceeds to turn on the first device 111, resulting in a scene control error. Therefore, to further improve the linkage and response synchronization of smart home device control, the cloud determines whether the triggering condition in the scene message is cross-gateway. When a cross-gateway triggering condition is detected, the triggering condition in the complete scene message is marked as cloud-triggered, and the corresponding execution action is assigned to the corresponding gateway, resulting in the third scene message.

[0109] For example, when the cloud detects that the triggering condition is cross-gateway, it marks the triggering condition in scenario message A as cloud-triggered, assigns the corresponding execution action to the corresponding gateway mark, and obtains the third message A3.

[0110] It should be noted that a scenario message may contain multiple triggering conditions and multiple execution actions. Each triggering condition corresponds to a triggering instruction. The cloud determines which gateway to send the triggering instruction to based on the gateway identifier corresponding to the execution action of each triggering condition.

[0111] As mentioned above, when the triggering condition is cross-gateway, the triggering condition in the scene message is marked as cloud-triggered by the cloud. Based on the snapshot information of smart home devices stored in the cloud, the triggering condition is marked as cloud-triggered. Subsequently, the cloud makes a judgment on the corresponding triggering condition. During the judgment, the state of the corresponding cross-gateway smart home devices is synchronized, which can improve the accuracy of smart home scene control and improve the response synchronization of smart home device control.

[0112] S203. Determine whether the third scenario message meets the second preset condition.

[0113] Upon receiving the third scenario message, it is determined whether the message meets the second preset condition. The second preset condition specifies that time-type messages meet a preset time interval condition, device-type messages meet an action execution condition, and / or automation-type messages meet an automation scenario condition. If the third scenario message meets the second preset condition, step S204 is executed. If the third scenario message does not meet the second preset condition, an error is reported, and the message is not sent to the gateway. By using the cloud to determine the second preset condition for the third scenario message, runtime errors caused by sending messages that do not meet the second preset condition to the gateway are avoided, thus reducing the probability of abnormal smart home device control and improving the accuracy of smart home device control.

[0114] S204. Send the third scenario message to the corresponding gateway.

[0115] The cloud sends the aforementioned third-scenario message to the corresponding gateway, i.e., the gateway that performs the action. The gateway waits to receive the trigger instruction based on the cloud trigger flag of the trigger condition in the received third-scenario message.

[0116] S205. Confirm the triggering conditions according to the third scenario message. When the obtained status information of the smart home device meets the triggering conditions, send a triggering instruction to the corresponding gateway so that the gateway can execute the corresponding execution action marked in the corresponding third scenario message according to the triggering instruction.

[0117] Based on the trigger conditions in the third-scenario message, a cloud-based trigger marker is added. After sending the third-scenario message to the corresponding gateway, the cloud confirms the trigger conditions according to the message. When the obtained status information of the smart home device meets the trigger conditions, a trigger command is sent to the corresponding gateway. The gateway then executes the corresponding action based on the gateway identifier in the third-scenario message. It should be noted that the third-scenario message can also be understood as a complete scenario message, except that the original scenario message has a cloud-based trigger marker added to the trigger conditions and a corresponding gateway identifier added to the actions. Therefore, after receiving the third-scenario message, the gateway determines which actions it needs to perform based on the gateway identifiers of the actions within the message. When the gateway receives a trigger command, it executes the action corresponding to its own gateway identifier in the third-scenario message.

[0118] It should be noted that there is a correspondence between each triggering condition and its corresponding execution action, and also between each triggering condition and its corresponding triggering instruction. Therefore, there is a correspondence between each triggering instruction and its corresponding execution action. Each triggering instruction includes identification information for the corresponding execution action, which may include information such as the corresponding gateway identifier.

[0119] It's important to note that all status changes of smart home devices are pushed to the cloud. The cloud stores snapshot information of these smart home devices, which includes the current state and values ​​of all their attributes. Whenever an attribute of an automation scenario changes, the cloud checks the snapshot information of the smart home devices.

[0120] The cloud platform determines whether the trigger conditions are met based on snapshot information of smart home devices and the trigger conditions themselves. If the corresponding trigger conditions are met, a trigger command is generated and sent to the corresponding gateway. After receiving the trigger command, the gateway executes the corresponding action based on the third-scene message stored locally.

[0121] For example, refer to Figure 2 Assuming the gateway corresponding to the execution action of the third scenario message is the first gateway 11, after receiving the third scenario message A3, the first gateway 11 waits to receive a trigger command because the trigger condition 'a' in the third scenario message A3 corresponds to the cloud trigger flag. The cloud 1 confirms the trigger condition 'a' based on the third scenario message. When the obtained status information of the smart home device meets the trigger condition 'a', it sends a trigger command to the first gateway 11. After receiving the trigger command, the first gateway 11 begins to execute the execution action corresponding to the gateway identifier in the third scenario message A3.

[0122] As described above, by determining whether the status information (or snapshot information) of smart home devices meets the triggering conditions through the cloud, and sending the trigger to the corresponding gateway when the triggering conditions are met, the scenario linkage of cross-gateway execution is improved, and the response synchronization of smart home devices corresponding to each gateway is improved when cross-gateway execution is performed, thereby improving the overall working efficiency of smart home device control.

[0123] S206. When the triggering condition does not belong to cross-gateway, mark the triggering condition in the scene message as gateway trigger, and assign the corresponding execution action to the corresponding gateway mark to obtain the fourth scene message.

[0124] When the triggering condition is not detected to be cross-gateway, the triggering condition in the complete scenario message is marked as gateway-triggered, and the corresponding execution action is assigned to the corresponding gateway mark to obtain the fourth scenario message.

[0125] For example, when the cloud detects that the triggering condition does not belong to cross-gateway, it marks the triggering condition in scenario message A as gateway-triggered, assigns the corresponding execution action to the corresponding gateway mark, and obtains the fourth message A4.

[0126] As mentioned above, when the triggering condition is not cross-gateway, that is, when the triggering condition is based on the status information of the smart home device corresponding to a single gateway, the triggering condition in the scene message is marked as gateway-triggered by the cloud. Since the triggering condition is not cross-gateway, the triggering condition judgment by the gateway will not cause the smart home device status to be out of sync. Subsequently, the gateway makes the corresponding triggering condition judgment, which can ensure that the status of the corresponding smart home device is synchronized when the judgment is made. This can improve the accuracy of smart home scene control and the responsiveness and synchronization of smart home device control.

[0127] S207. Determine whether the fourth scenario message meets the second preset condition.

[0128] Upon receiving the fourth scenario message, it is determined whether the message meets the second preset condition. The second preset condition specifies that time-type messages meet a preset time interval condition, device-type messages meet an action execution condition, and / or automation-type messages meet an automation scenario condition. If the fourth scenario message meets the second preset condition, step S208 is executed. If the fourth scenario message does not meet the second preset condition, an error is reported, and the message is not sent to the gateway. By using the cloud to determine the second preset condition for the fourth scenario message, runtime errors caused by sending messages that do not meet the second preset condition to the gateway are avoided, thus reducing the probability of abnormal smart home device control and improving the accuracy of smart home device control.

[0129] S208. Send the fourth scenario message to the corresponding gateway so that the corresponding gateway can determine the triggering condition based on the gateway trigger in the fourth scenario message and execute the corresponding execution action according to the corresponding gateway mark.

[0130] The cloud sends the aforementioned fourth scenario message to the corresponding gateway, i.e., the gateway corresponding to the action being executed. It should be noted that the scenario message may contain multiple triggering conditions and multiple execution actions. Each triggering condition corresponds to a trigger instruction. The cloud determines which gateway to send the trigger instruction to based on the gateway identifier corresponding to the execution action for each triggering condition.

[0131] Based on the trigger conditions in the fourth scenario message set by the cloud, the gateway triggers a flag. After receiving the fourth scenario message, the gateway confirms the trigger conditions according to the message. When the obtained status information of the smart home device meets the trigger conditions, it executes the corresponding action based on the corresponding gateway flag. It should be noted that the fourth scenario message can also be understood as a complete scenario message, except that the original scenario message has a gateway trigger flag added to the trigger conditions and a corresponding gateway identifier added to the actions. Therefore, after receiving the fourth scenario message, the gateway determines which actions it needs to execute based on the gateway identifiers of the actions within the message. When the status information of the smart home device obtained by the gateway meets the trigger conditions, it executes the action corresponding to the gateway identifier in the fourth scenario message.

[0132] It should be noted that the gateway can obtain real-time snapshot information of the corresponding connected smart home devices. This snapshot information includes the current state and values ​​of all attributes of the smart home devices. Therefore, when both the action and the triggering condition belong to a single gateway (i.e., not cross-gateway), the gateway can determine the triggering condition, reducing latency caused by communication with the cloud and improving the efficiency of smart home device control.

[0133] For example, refer to Figure 2 Assuming the gateway corresponding to the execution action of the fourth scenario message is the first gateway 11, and assuming trigger condition a is that the first device 111 and the second device 112 are in the "on" state, the third device 113 is turned on. After receiving the fourth scenario message A4, the first gateway 11 confirms the trigger condition a through the fourth scenario message A4 because of the gateway trigger flag corresponding to trigger condition a in the third scenario message A4. When the obtained status information of the smart home devices connected to the first gateway 11 meets the trigger condition a, that is, when the first device 111 and the second device 112 are in the "on" state, the first gateway 11 executes the execution action corresponding to the gateway identifier in the fourth scenario message A4, that is, sends an "on" command to the first device 111 to turn on the first device 111.

[0134] Figure 4 This is a flowchart of a scene processing and judgment method provided in an embodiment of this application, referred to as follows. Figure 4 After receiving the third or fourth scenario message, determine whether the third or fourth scenario message meets the second preset condition. That is, perform corresponding scenario processing judgment on the scenario message (third or fourth scenario message). The specific scenario processing judgment methods include:

[0135] S301. Does the time-type message meet the preset time interval conditions?

[0136] For time-type messages in the third or fourth scenario messages, a time interval judgment is performed to determine whether the time-type message meets the preset time interval condition, that is, whether the time interval corresponding to the time-type message is within the preset range. The preset range can be set according to the actual situation, for example, set to 24 hours. That is, the control time duration in the scene message controlled by the corresponding smart home device cannot exceed 24 hours. If it exceeds 24 hours, the preset time interval condition is not met, that is, the time interval corresponding to the time-type message is not within the preset range.

[0137] S302. Save the scenario message and send it.

[0138] If the time-type message in the third or fourth scenario message meets the preset time interval condition, that is, the time interval corresponding to the time-type message is within the preset interval range, then the third or fourth scenario message is saved and sent to the corresponding gateway.

[0139] If the time-type message in the third or fourth scenario message meets the preset time interval condition, then execute S204 or S208.

[0140] S302, Error Handling.

[0141] If the time-type message in the third or fourth scenario message does not meet the preset time interval condition (i.e., the time interval corresponding to the time-type message is not within the preset range), an error will be reported, and the corresponding third or fourth scenario message will not be sent to the corresponding gateway. Error reporting can involve sending a corresponding error message to the corresponding terminal device.

[0142] The above-mentioned method uses the cloud to perform time-type judgment on the third or fourth scenario messages in progress, avoiding sending third or fourth scenario messages that do not meet the preset time interval conditions to the gateway, which would cause timeouts and reduce the probability of abnormal control of smart home devices, thereby improving the effectiveness of smart home device control.

[0143] Figure 5 This is a flowchart of another scene processing and judgment method provided in the embodiments of this application, see below. Figure 5 After receiving the third or fourth scenario message, determine whether the third or fourth scenario message meets the second preset condition. That is, perform corresponding scenario processing judgment on the scenario message (third or fourth scenario message). The specific scenario processing judgment methods include:

[0144] S401. Does the device type message meet the conditions for executing the action?

[0145] The device type message in the third or fourth scenario message is evaluated for its attributes to determine whether the attribute of the device type message is an action to be executed. For example, if the attribute of the device type message is not an action to be executed, it does not belong to the execution steps of smart home device control, and the device type message is determined not to meet the conditions for an action to be executed.

[0146] S402. Save the scenario message and send it.

[0147] If the device type message in the third or fourth scenario message meets the execution action condition, that is, the attribute of the device type message is to execute an action, then the third or fourth scenario message is saved and sent to the corresponding gateway.

[0148] If the device type message in the third or fourth scenario message meets the execution action conditions, then execute S204 or S208.

[0149] S403, Error Handling.

[0150] If the device type message in the third or fourth scenario message does not meet the execution conditions (i.e., the attribute of the device type message is not an execution action), an error will be reported, and the corresponding third or fourth scenario message will not be sent to the corresponding gateway. Error reporting can involve sending a corresponding error message to the corresponding terminal device.

[0151] The above-mentioned method performs attribute judgment on the device type messages in the third or fourth scenario by cloud, avoiding sending third or fourth scenario messages that do not meet the conditions for execution to the gateway, which would lead to operational errors. This reduces the probability of abnormal control of smart home devices and improves the effectiveness of smart home device control.

[0152] Figure 6 This is a flowchart of another scene processing and judgment method provided in the embodiments of this application, referred to as follows. Figure 6 After receiving the third or fourth scenario message, determine whether the third or fourth scenario message meets the second preset condition. That is, perform corresponding scenario processing judgment on the scenario message (third or fourth scenario message). The specific scenario processing judgment methods include:

[0153] S501. Does the automation type message meet the automation scenario conditions?

[0154] For automation-type messages in the third or fourth scenario messages, a support determination is performed to determine whether the automation-type message supports automation. For example, if the automation-type message is not automation-type, such as if there is a manual operation component, then it does not belong to the automation scenario controlled by smart home devices, and the automation-type message is determined not to meet the automation scenario conditions.

[0155] S502. Save the scenario message and send it.

[0156] If the automatic type message in the third or fourth scenario message meets the automation scenario conditions, that is, the automatic type message supports the automation type, then the third or fourth scenario message is saved and sent to the corresponding gateway.

[0157] If the automation type message in the third or fourth scenario message meets the automation scenario conditions, then execute S204 or S208.

[0158] S503, Error Handling.

[0159] If the automation backup type message in the third or fourth scenario message does not meet the automation scenario conditions, i.e., the automation type message does not support automation, then an error will be reported, and the corresponding third or fourth scenario message will not be sent to the corresponding gateway. Error reporting can involve sending a corresponding error message to the corresponding terminal device.

[0160] The above-mentioned cloud-based support for judging the automation type messages in the third or fourth scenario is used to avoid sending third or fourth scenario messages that do not meet the automation scenario conditions to the gateway, which would lead to operational errors. This reduces the probability of abnormal control of smart home devices and improves the effectiveness of smart home device control.

[0161] As described above, after receiving the third or fourth scenario message, the system determines whether the time type message of the third or fourth scenario message meets the preset time interval condition, the device type message meets the execution action condition, and / or the automation type message meets the automation scenario condition before sending the third or fourth scenario message to the corresponding gateway. This avoids sending third or fourth scenario messages that do not meet the preset time interval condition, execution action condition, or automation scenario condition to the gateway, which could lead to operational errors. This reduces the probability of abnormal control of smart home devices and improves the effectiveness of smart home device control.

[0162] It should be noted that when there are time-type messages, device-type messages, and automation-type messages in the scenario message, the third or fourth scenario message will only be sent to the corresponding gateway if the time-type message meets the preset time interval condition, the device-type message meets the execution action condition, and the automation-type message meets the automation scenario condition. If any of the three types of messages does not meet the corresponding conditions, an error will be reported and the corresponding scenario message will not be sent to the corresponding gateway.

[0163] As described above, by receiving scene messages sent by terminal devices through the cloud, when a scene message meets the first preset condition, the cloud splits the scene message according to the gateway corresponding to the execution action and marks it with a cloud trigger, resulting in a second scene message for each gateway. This avoids the problem of asynchronous responses under multi-gateway scene control. By splitting the scene message, each gateway executes its corresponding second scene message, improving the responsiveness of smart home devices. When an execution action requires at least two gateways, the cloud trigger mark allows the cloud to determine the trigger condition and send a trigger command to the corresponding gateway. Each gateway then executes its corresponding second scene message according to the trigger command, avoiding communication delays caused by sending execution action commands one by one through the cloud, thereby improving the response efficiency of smart home devices. Furthermore, when a scene message does not meet the first preset condition and the trigger condition is cross-gateway, the cloud marks the trigger condition in the scene message as a cloud trigger, allowing the cloud to determine the trigger condition and send a trigger command to the corresponding gateway. Each gateway then executes its corresponding third scene message according to the trigger command, avoiding communication delays caused by sending execution action commands one by one through the cloud, thereby improving the response efficiency of smart home devices. When a scene message does not meet the first preset condition and the triggering condition is not cross-gateway, the triggering condition in the scene message is marked as gateway-triggered by the cloud. Since the triggering condition is not cross-gateway, the gateway will not cause the smart home devices to be out of sync when judging the triggering condition. The gateway can judge the corresponding triggering condition, which can ensure that the state of the corresponding smart home devices is synchronized when the judgment is made. This can improve the accuracy of smart home scene control and the responsiveness of smart home device control.

[0164] Based on the above embodiments, Figure 7 This is a schematic diagram of a smart home device control device provided in an embodiment of this application. (Reference) Figure 7 The smart home device control device provided in this embodiment is used in the cloud and specifically includes: a message receiving module 21, a scene splitting module 22, a first trigger marker module 23, and a first sending module 24.

[0165] Among them, the message receiving module 21 is used to receive scene messages sent by the terminal device, and the scene messages include the control requirements of smart home devices;

[0166] The scene splitting module 22 is used to split the scene message according to the gateway corresponding to the execution action when the scene message meets the first preset condition, so as to obtain the first scene message. Each first scene message corresponds to one gateway. The first preset condition is that the execution action in the scene message needs to be executed by at least two gateways.

[0167] The first triggering and marking module 23 is used to trigger and mark the first scenario message in the cloud to obtain the second scenario message, and send the second scenario message to the corresponding gateway;

[0168] The first sending module 24 is used to confirm the triggering conditions based on the scene message. When the obtained status information of the smart home device meets the triggering conditions, it sends a triggering instruction to the corresponding gateway so that the gateway can execute the corresponding second scene message according to the triggering instruction.

[0169] Furthermore, the device also includes a cross-gateway detection module, a second trigger flag module, a second sending module, and a third sending module;

[0170] The cross-gateway detection module is used to detect whether the triggering condition in the scenario message belongs to cross-gateway when the scenario message does not meet the first preset condition.

[0171] The second triggering marking module is used to mark the triggering condition in the scene message as cloud-triggered when the triggering condition is cross-gateway, and to assign the corresponding execution action to the corresponding gateway mark to obtain the third scene message;

[0172] The second sending module is used to send the third scenario message to the corresponding gateway;

[0173] The third sending module is used to confirm the triggering conditions based on the third scenario message. When the obtained status information of the smart home device meets the triggering conditions, it sends a triggering instruction to the corresponding gateway so that the gateway can execute the corresponding execution action marked in the corresponding third scenario message according to the triggering instruction.

[0174] Furthermore, the device also includes a loop judgment module;

[0175] The loop judgment module is used to perform loop judgment on the scene message. When the scene message meets the preset loop condition, it determines whether the scene message meets the first preset condition.

[0176] Furthermore, the device also includes a third trigger marker module and a fourth transmission module;

[0177] The third triggering marking module is used to mark the triggering condition in the scene message as a gateway trigger when the triggering condition does not belong to cross-gateway, and to assign the corresponding execution action to the corresponding gateway mark to obtain the fourth scene message;

[0178] The fourth sending module is used to send the fourth scenario message to the corresponding gateway, so that the corresponding gateway can determine the trigger condition based on the gateway trigger in the fourth scenario message and execute the corresponding execution action according to the corresponding gateway mark.

[0179] Furthermore, the device also includes a processing condition judgment module and a fifth transmission module;

[0180] The processing condition judgment module is used to determine whether the fourth scenario message meets the second preset condition. The second preset condition is that the time type message in the message meets the preset time interval condition, the device type message meets the execution action condition, and / or the automation type message meets the automation scenario condition.

[0181] The fifth sending module is used to save the fourth scenario message and send it to the corresponding gateway if the fourth scenario message meets the preset second condition.

[0182] Furthermore, the fifth sending module includes a first sending unit and a first error reporting unit;

[0183] The first unit is used to perform interval judgment on the time type message in the fourth scenario message. When the time interval corresponding to the time type message meets the preset interval range, the fourth scenario message is saved and sent to the corresponding gateway.

[0184] The first error reporting unit is used to process errors when the time interval corresponding to a time-type message does not meet the preset interval range.

[0185] Furthermore, the fifth sending module includes a second sending unit and a second error reporting unit;

[0186] The second sending unit is used to determine the attributes of the device type message in the fourth scenario message. When the attribute of the device type message is to perform an action, the fourth scenario message is saved and sent to the corresponding gateway.

[0187] The second error reporting unit is used to process errors if the attribute of the device type message is not an action to be performed.

[0188] Furthermore, the fifth sending module includes a third sending unit and a third error reporting unit;

[0189] The third sending unit is used to determine the support for automation type messages in the fourth scenario message. When the automation type message is supported, the fourth scenario message is saved and sent to the corresponding gateway.

[0190] The third error reporting unit is used to process errors if the automation type message does not support automation type.

[0191] As described above, by receiving scene messages sent by terminal devices through the cloud, when a scene message meets a first preset condition, the scene message is split according to the gateway corresponding to the execution action to obtain a first scene message. The first scene message is then triggered and marked in the cloud to obtain a second scene message, which is then sent to the corresponding gateway. The cloud confirms the trigger condition based on the scene message. When the status information of the smart home device meets the trigger condition, it sends a trigger execution to the corresponding gateway, so that the corresponding gateway can execute the execution action in the corresponding second scene message according to the trigger execution. By using the above technical means, the scene message can be split and marked in the cloud according to the gateway corresponding to the execution action to obtain a second scene message for each gateway. This avoids the problem of asynchronous response under multi-gateway scene control. By splitting the scene message, each gateway executes its corresponding second scene message, improving the response synchronization of smart home devices. Furthermore, when an action requires at least two gateways, a cloud-triggered flag is used to send a trigger command to the corresponding gateway after the cloud determines the trigger conditions. Each gateway then executes the corresponding second scenario message according to the trigger command, avoiding communication delays caused by sending execution commands one by one through the cloud, thereby improving the response efficiency of smart home devices.

[0192] The smart home device control device provided in this application embodiment can be used to execute the smart home device control method provided in the above embodiment, and has corresponding functions and beneficial effects.

[0193] This application provides a smart home device control device, referring to... Figure 8 The smart home device control device includes: a processor 31, a memory 32, a communication module 33, an input device 34, and an output device 35. The number of processors and the number of memories in the smart home device control device can be one or more. The processor, memory, communication module, input device, and output device of the smart home device control device can be connected via a bus or other means.

[0194] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the smart home device control method described in any embodiment of this application (e.g., message receiving module, scene splitting module, first trigger flag module, and first sending module in a smart home device control device). The memory may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the device, etc. Furthermore, the memory may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0195] The communication module 33 is used for data transmission.

[0196] The processor 31 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory, thereby realizing the above-mentioned smart home device control method.

[0197] Input device 34 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the device. Output device 35 may include display devices such as a display screen.

[0198] The smart home device control device provided above can be used to execute the smart home device control method provided in the above embodiments, and has corresponding functions and beneficial effects.

[0199] This application embodiment also provides a storage medium for storing computer-executable instructions. When executed by a computer processor, these computer-executable instructions are used to execute a smart home device control method. The smart home device control method includes: receiving a scene message sent by a terminal device, the scene message including control requirements of the smart home device; when the scene message meets a first preset condition, splitting the scene message according to the gateway corresponding to the execution action to obtain a first scene message, each first scene message corresponding to one gateway, the first preset condition being that the execution action in the scene message requires execution by at least two gateways; marking the first scene message with a cloud trigger to obtain a second scene message, and sending the second scene message to the corresponding gateway; confirming the trigger condition based on the scene message, and when the obtained status information of the smart home device meets the trigger condition, sending a trigger instruction to the corresponding gateway so that the gateway can execute the corresponding execution action in the second scene message according to the trigger instruction.

[0200] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROM, floppy disk, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. Storage medium may also include other types of memory or combinations thereof. Furthermore, storage medium may reside in a first computer system in which the program is executed, or it may reside in a different second computer system connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term “storage medium” can include two or more storage media residing in different locations (e.g., in different computer systems connected via a network). Storage medium may store program instructions (e.g., specifically implemented as a computer program) executable by one or more processors.

[0201] Of course, the storage medium for storing computer-executable instructions provided in the embodiments of this application is not limited to the smart home device control method described above, but can also execute related operations in the smart home device control method provided in any embodiment of this application.

[0202] The smart home device control device, storage medium, and smart home device control device provided in the above embodiments can execute the smart home device control method provided in any embodiment of this application. For technical details not described in detail in the above embodiments, please refer to the smart home device control method provided in any embodiment of this application.

[0203] The above description is merely a preferred embodiment and the technical principles employed in this application. This application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the claims.

Claims

1. A method for controlling smart home devices, characterized in that, Used in the cloud, including: Receive a scenario message sent by a terminal device, the scenario message including the control requirements of smart home devices; When the scenario message does not meet the first preset condition, it is detected whether the corresponding trigger condition in the scenario message belongs to cross-gateway; When the triggering condition is cross-gateway, the triggering condition in the scenario message is marked as cloud-triggered, and the corresponding execution action is assigned to the corresponding gateway mark to obtain a third scenario message. The third scenario message is sent to the corresponding gateway, and the triggering condition is confirmed according to the third scenario message. When the obtained status information of the smart home device meets the triggering condition, a triggering instruction is sent to the corresponding gateway so that the gateway can execute the execution action corresponding to the gateway mark in the corresponding third scenario message according to the triggering instruction. When the triggering condition does not belong to cross-gateway, the triggering condition in the scenario message is marked as gateway trigger, and the corresponding execution action is assigned to the corresponding gateway mark to obtain a fourth scenario message. The fourth scenario message is sent to the corresponding gateway so that the corresponding gateway can judge the triggering condition based on the gateway trigger in the fourth scenario message and execute the corresponding execution action based on the corresponding gateway mark. When the scenario message meets the first preset condition, the scenario message is split according to the gateway corresponding to the execution action to obtain the first scenario message. Each first scenario message corresponds to one gateway. The first preset condition is that the execution action in the scenario message needs to be executed by at least two gateways. The first scenario message is triggered and marked in the cloud to obtain the second scenario message, and the second scenario message is sent to the corresponding gateway; Based on the scenario message, the triggering condition is confirmed. When the obtained status information of the smart home device meets the triggering condition, a triggering instruction is sent to the corresponding gateway so that the gateway can execute the corresponding second scenario message according to the triggering instruction. Before sending the third scenario message or the fourth scenario message to the corresponding gateway, the method further includes: sending the third scenario message or the fourth scenario message to the corresponding gateway when the time type message of the third scenario message or the fourth scenario message meets the preset time interval condition, the device type message meets the action execution condition, and the automation type message meets the automation scenario condition; and performing error processing when any of the time type message, the device type message, or the automation type message does not meet the corresponding condition.

2. The method according to claim 1, characterized in that, After receiving the scenario message sent by the receiving terminal device, the method further includes: The scenario message is repeatedly evaluated. When the scenario message meets the preset loop condition, it is determined whether the scenario message meets the first preset condition.

3. A smart home device control device, characterized in that, Used in the cloud, including: The message receiving module is used to receive scene messages sent by the terminal device, the scene messages including the control requirements of the smart home device; The cross-gateway detection module is used to detect whether the triggering condition in the scenario message belongs to cross-gateway when the scenario message does not meet the first preset condition. The second triggering marking module is used to mark the triggering condition in the scenario message as cloud-triggered when the triggering condition is cross-gateway, and to assign the corresponding execution action to the corresponding gateway mark to obtain the third scenario message; The second sending module is used to send the third scenario message to the corresponding gateway; The third sending module is used to confirm the triggering condition according to the third scenario message. When the obtained status information of the smart home device meets the triggering condition, it sends a triggering instruction to the corresponding gateway so that the gateway can execute the corresponding execution action marked in the corresponding third scenario message according to the triggering instruction. The third triggering marking module is used to mark the triggering condition in the scenario message as gateway triggering when the triggering condition does not belong to cross-gateway, and to assign the corresponding execution action to the corresponding gateway mark to obtain the fourth scenario message; The fourth sending module is used to send the fourth scenario message to the corresponding gateway, so that the corresponding gateway can determine the trigger condition based on the gateway trigger in the fourth scenario message and execute the corresponding execution action based on the corresponding gateway mark; The scene splitting module is used to split the scene message according to the gateway corresponding to the execution action when the scene message meets the first preset condition, to obtain the first scene message. Each first scene message corresponds to one gateway. The first preset condition is that the execution action in the scene message needs to be executed by at least two gateways. The first triggering and marking module is used to trigger and mark the first scenario message in the cloud to obtain the second scenario message, and send the second scenario message to the corresponding gateway; The first sending module is used to confirm the triggering condition according to the scenario message. When the obtained status information of the smart home device meets the triggering condition, it sends a triggering instruction to the corresponding gateway so that the gateway can execute the execution action in the corresponding second scenario message according to the triggering instruction. The smart home device control device is further configured to: send the third scenario message or the fourth scenario message to the corresponding gateway when the time type message of the third scenario message or the fourth scenario message meets the preset time interval condition, the device type message meets the action execution condition, and the automation type message meets the automation scenario condition; and perform error processing when any of the time type message, the device type message, or the automation type message does not meet the corresponding condition.

4. A smart home device control device, characterized in that, include: Memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-2.

5. A storage medium for storing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a processor, are used to perform the method as described in any one of claims 1-2.

Citation Information

Patent Citations

  • Multi-gateway scene implementation method and system, electronic equipment and storage medium

    CN113037530A