Smart home scene deployment method and system, electronic equipment and storage medium

CN121925820APending Publication Date: 2026-04-24HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2024-06-05
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

When there are too many scenarios deployed on the host in a smart home network, it will cause the host performance bottleneck, slow response speed or even downtime.

Method used

By obtaining the architectural information of the smart home network, the target scenario is deployed in the target node, which includes the host, the extension and the gateway. Use historical load information to determine the nodes of the deployment scenario to balance the load of each node.

Benefits of technology

It effectively improves the execution performance of the scenario and avoids performance reduction and downtime problems caused by excessive load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121925820A_ABST
    Figure CN121925820A_ABST
Patent Text Reader

Abstract

The invention provides a deployment method and system of a smart home scene, electronic equipment and a storage medium. The method comprises the following steps: acquiring architecture information of a target scene and a smart home network; deploying the target scene at the target node based on the architecture information of the smart home network; wherein the target node comprises a first node and / or a second node, the first node is a host in the smart home network, and the second node comprises an extension and / or a gateway in the smart home network. According to the method provided by the invention, the execution performance of the scene can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Smart home scene deployment method, system, electronic device and storage medium

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on September 8, 2023, with application number 202311164590.7 and application name “Deployment method, system, electronic device and storage medium for smart home scenes”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of smart homes, and in particular to a deployment method, system, electronic device, and storage medium for smart home scenarios. Background Art

[0003] In a smart home network, users can create scenarios to connect various smart home devices in their home, enabling them to control these devices in real-time. For example, when the temperature reaches a certain level, the air conditioner can be automatically turned on; or when the outdoor wind speed reaches a certain level, the windows can be automatically closed.

[0004] Scenes are typically deployed in host computers throughout the home, with the host's scene engine driving the corresponding scenes. Scene rules are typically based on the smart home platform, combining conditions such as the status and time of smart home devices with the actions that can be performed by smart home devices to form intelligent rules. Scene rules can be divided into automatic scene rules and manual scene rules based on whether they contain conditions.

[0005] Manual scene rules refer to users manually combining the actions of smart home devices and setting buttons on the smart home platform to achieve one-click control of multiple smart home devices. Automatic scene rules refer to combining conditions (such as time, weather conditions, location information, device status, device events, etc.) with device actions according to user needs to form a rule that executes the corresponding action when the preset conditions are met.

[0006] However, when too many scenarios are deployed on a host, it will affect the host's load, causing performance bottlenecks, slow response speeds, or even downtime.

[0007] Summary of the Invention

[0008] This application provides a deployment method, system, electronic device and storage medium for a smart home scenario, which helps to improve the execution performance of the scenario.

[0009] In a first aspect, the present application provides a smart home scene deployment method, which is applied to a first node, including: obtaining the target scene and the architecture information of the smart home network; deploying the target scene on the target node based on the architecture information of the smart home network; wherein the target node includes the first node and / or the second node, the first node is the host in the smart home network, and the second node includes the extension and / or gateway in the smart home network.

[0010] The method provided in this application helps to improve the execution performance of the scene.

[0011] In one possible implementation, deploying the target scenario on the target node based on the architecture information of the smart home network includes: obtaining historical load information of the first node and / or historical load information of the second node; deploying the target scenario on the target node based on the historical load information of the first node and / or historical load information of the second node and the architecture information of the smart home network.

[0012] In this application, the load information of each node in the smart home network is used as a reference condition for scene deployment, which can help balance the load of each node and avoid the scene execution performance degradation or even downtime due to excessive load on a certain node.

[0013] In one possible implementation, the target scenario includes an effective time, the historical load information of the first node includes the load information in the first node corresponding to the effective time, and the historical load information of the second node includes the load information in the second node corresponding to the effective time.

[0014] In one possible implementation, the target scene includes multiple information including event information, condition information and action information, and deploying the target scene on the target node based on the architecture information of the smart home network includes: obtaining multiple fragments based on the target scene, wherein any one of the multiple fragments includes an event fragment, a condition fragment or an action fragment in the target scene; and deploying the multiple fragments on the target node based on the architecture information of the smart home network.

[0015] In this application, by deploying multiple segments of a scene on different nodes, the flexibility of scene deployment can be improved and the load of each node in the smart home network can be balanced.

[0016] In one possible implementation, the target node includes an event node and an action node, the event segment of the target scene is deployed in the event node, and the action segment of the target scene is deployed in the action node. The method also includes: the event node monitors events; in response to the monitored events, the event node sends first information to the action node, so that the action node executes the action corresponding to the action segment of the target scene based on the first information; wherein, the first information is used to indicate that the monitored event has satisfied the rules corresponding to the event segment of the target scene.

[0017] In this application, through information interaction between nodes, scenarios where multiple fragments are deployed on different nodes can be effectively executed.

[0018] In one possible implementation, the target node includes an event node, a condition node and an action node, the event segment of the target scene is deployed in the event node, the condition segment of the target scene is deployed in the condition node, and the action segment of the target scene is deployed in the action node. The method also includes: the event node monitors events; in response to the monitored event, the event node sends first information to the condition node, so that the condition node determines whether the condition satisfies the rule corresponding to the condition segment of the target scene based on the first information, and after the condition satisfies the rule corresponding to the condition segment of the target scene, the condition node sends second information to the action node, so that the action node executes the action corresponding to the action segment of the target scene based on the second information; wherein, the first information is used to indicate that the monitored event has satisfied the rule corresponding to the event segment of the target scene, and the second information is used to indicate that the condition has satisfied the rule corresponding to the condition segment of the target scene.

[0019] In this application, through information interaction between nodes, scenarios where multiple fragments are deployed on different nodes can be effectively executed.

[0020] In one possible implementation, the event includes a state change event of a target smart home device, and the target smart home device is a smart home device controlled by the event node in the target scene.

[0021] In one possible implementation, the method further includes: obtaining scene information deployed in the first node; and deploying the target scene in the target node based on the scene information deployed in the first node and the architecture information of the smart home network.

[0022] In this application, by using the deployed scenario information as a reference factor when deploying the scenario, it can help avoid the degradation of scenario execution performance caused by too many deployed scenarios.

[0023] In one possible implementation, deploying the target scene in the target node based on the scene information deployed in the first node and the architecture information of the smart home network includes: obtaining scenes with the same effective time as the target scene from the deployed scenes in the first node; if the number of scenes with the same effective time as the target scene is greater than or equal to a first concurrency threshold, not deploying the target scene in the first node.

[0024] In one possible implementation, the target node is a node that supports the capabilities required by the multiple fragments, and the capabilities required by the multiple fragments at least include a delayed execution capability of the fragments and / or a cyclic execution capability of the fragments.

[0025] In one possible implementation manner, the number of scenes in the target node that have the same effective time as the target scene is less than a second concurrency threshold.

[0026] In one possible implementation, key segments among the multiple segments are deployed in the same target node, and the key segments include one or more of key event segments, key condition segments, and key action segments. The key segments are used to represent whether a scene is successfully executed.

[0027] In one possible implementation manner, the distance between the target node and the smart home device controlled by the target node is the shortest.

[0028] In one possible implementation manner, obtaining the target scenario includes: obtaining the target scenario in response to a request to create a scenario; or obtaining the target scenario in response to a version upgrade request of the first node.

[0029] In a second aspect, the present application provides a deployment system for a smart home scene, comprising a first node and a second node, wherein the first node is used to obtain the target scene and the architecture information of the smart home network; the target scene is deployed on the target node based on the architecture information of the smart home network; wherein the target node includes the first node and / or the second node, the first node is the host in the smart home network, and the second node includes the extension and / or gateway in the smart home network.

[0030] In one possible implementation, the first node is also used to obtain historical load information of the first node and / or historical load information of the second node; and deploy the target scenario on the target node based on the historical load information of the first node and / or the historical load information of the second node and the architecture information of the smart home network.

[0031] In one possible implementation, the target scene includes multiple information including event information, condition information and action information, and the first node is further used to obtain multiple fragments based on the target scene, wherein any one of the multiple fragments includes an event fragment, a condition fragment or an action fragment in the target scene; and the multiple fragments are deployed on the target node based on the historical load information of the first node and the architecture information of the smart home network.

[0032] In one possible implementation, the target node includes an event node and an action node, wherein the event segment of the target scenario is deployed in the event node, and the action segment of the target scenario is deployed in the action node, wherein the event node is used to monitor events; in response to the monitored event, the event node sends first information to the action node; the action node is used to execute the action corresponding to the action segment of the target scenario based on the first information; wherein the first information is used to indicate that the monitored event has satisfied the rule corresponding to the event segment of the target scenario.

[0033] In one possible implementation, the target node includes an event node, a condition node and an action node, wherein the event segment of the target scenario is deployed in the event node, the condition segment of the target scenario is deployed in the condition node, and the action segment of the target scenario is deployed in the action node, wherein the event node is used to monitor events; in response to the monitored event, the event node sends first information to the condition node; the condition node is used to determine whether the condition satisfies the rule corresponding to the condition segment of the target scenario based on the first information, and after the condition satisfies the rule corresponding to the condition segment of the target scenario, the condition node sends second information to the action node; the action node is used to execute the action corresponding to the action segment of the target scenario based on the second information; wherein the first information is used to indicate that the monitored event has satisfied the rule corresponding to the event segment of the target scenario, and the second information is used to indicate that the condition has satisfied the rule corresponding to the condition segment of the target scenario.

[0034] In a third aspect, the present application provides a deployment device for a smart home scene, comprising one or more functional modules, wherein the one or more functional modules are used to implement the deployment method for the smart home scene as described in the first aspect.

[0035] In a fourth aspect, the present application provides an electronic device comprising: a processor and a memory, wherein the memory is used to store a computer program; and the processor is used to run the computer program to implement the deployment method of the smart home scenario as described in the first aspect.

[0036] In a fifth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer-readable storage medium is run on a computer, the computer implements the deployment method of the smart home scene as described in the first aspect.

[0037] In a sixth aspect, the present application provides a computer program. When the above-mentioned computer program runs on a processor of an electronic device, it enables the electronic device to execute the deployment method of the smart home scene as described in the first aspect.

[0038] In one possible design, the program in the sixth aspect may be stored in whole or in part on a storage medium packaged with the processor, or may be stored in whole or in part on a memory not packaged with the processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] FIG1 is a schematic diagram of a smart home network structure in the prior art;

[0040] FIG2 is a schematic diagram of a system architecture provided in an embodiment of the present application;

[0041] FIG3 is a flow chart of an embodiment of a method for deploying a smart home scenario provided by this application;

[0042] FIG4 is a flow chart of another embodiment of a method for deploying a smart home scenario provided by the present application;

[0043] FIG5 is a schematic diagram of an embodiment of a method for determining a shared node provided by the present application;

[0044] FIG6 is a schematic diagram of another embodiment of a method for determining a shared node provided by the present application;

[0045] FIG7 is a schematic diagram of another embodiment of a method for determining a shared node provided in the present application;

[0046] FIG8 is a schematic diagram of an embodiment of a method for determining a target node provided by the present application;

[0047] FIG9 is a schematic diagram of another embodiment of a target node determination method provided by the present application;

[0048] FIG10 is a schematic diagram of another embodiment of a target node determination method provided by the present application;

[0049] FIG11 is a schematic diagram of another embodiment of a target node determination method provided by the present application;

[0050] FIG12 is a flow chart of another embodiment of a method for deploying a smart home scene provided by the present application;

[0051] FIG13 is a flow chart of another embodiment of a method for deploying a smart home scenario provided by the present application;

[0052] FIG14 is a schematic structural diagram of an embodiment of a deployment device for a smart home scenario provided by this application;

[0053] FIG15 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] In the embodiments of this application, unless otherwise specified, the character " / " indicates that the associated objects are in an "or" relationship. For example, A / B can represent A or B. "And / or" describes the relationship between the associated objects, indicating that three relationships can exist. For example, "A and / or B" can represent: A exists alone, A and B exists simultaneously, or B exists alone.

[0055] It should be pointed out that the words "first", "second", etc. involved in the embodiments of this application are only used for distinguishing description purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated, nor can they be understood as indicating or implying order.

[0056] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. In addition, "at least one of the following" or similar expressions refers to any combination of these items, which may include any combination of single items or plural items. For example, at least one of A, B, or C can represent: A, B, C, A and B, A and C, B and C, or A, B and C. Among them, each of A, B, and C can be an element itself, or a set containing one or more elements.

[0057] In the embodiments of this application, the terms "exemplary," "in some embodiments," and "in another embodiment" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" in this application should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of the word "exemplary" is intended to present concepts in a concrete manner.

[0058] In the embodiments of this application, the terms "of," "corresponding," and "relevant" may sometimes be used interchangeably. It should be noted that, when the distinction between them is not emphasized, the meanings they convey are the same. In the embodiments of this application, the terms "communication" and "transmission" may sometimes be used interchangeably. It should be noted that, when the distinction between them is not emphasized, the meanings they convey are the same. For example, "transmission" may include "sending" and / or "receiving," and may be either a noun or a verb.

[0059] In the embodiments of this application, "equal to" can be used in conjunction with "greater than" and is applicable to the technical solution adopted when "greater than" is used, and can also be used in conjunction with "less than" and is applicable to the technical solution adopted when "less than" is used. It should be noted that when "equal to" is used in conjunction with "greater than", it cannot be used in conjunction with "less than"; and when "equal to" is used in conjunction with "less than", it cannot be used in conjunction with "greater than".

[0060] In a smart home network, users can create scenarios to connect various smart home devices in their home, enabling them to control these devices in real-time. For example, when the temperature reaches a certain level, the air conditioner can be automatically turned on; or when the outdoor wind speed reaches a certain level, the windows can be automatically closed.

[0061] Scenes are typically deployed in host computers throughout the home, with the host's scene engine driving the corresponding scenes. Scene rules are typically based on the smart home platform, combining conditions such as the status and time of smart home devices with the actions that can be performed by smart home devices to form intelligent rules. Scene rules can be divided into automatic scene rules and manual scene rules based on whether they contain conditions.

[0062] Manual scene rules refer to users manually combining the actions of smart home devices and setting buttons on the smart home platform to achieve one-click control of multiple smart home devices. Automatic scene rules refer to combining conditions (such as time, weather conditions, location information, device status, device events, etc.) with device actions according to user needs to form a rule that executes the corresponding action when the preset conditions are met.

[0063] However, when too many scenarios are deployed on a host, it will affect the host's load, causing performance bottlenecks, slow response speeds, or even downtime.

[0064] Figure 1 illustrates a typical smart home network architecture. Referring to Figure 1 , a smart home network may include a host, one or more smart home devices (e.g., Device 1-Device 7), one or more gateways (e.g., Gateway 1-Gateway 4), and one or more extensions. The host can control Device 1, Gateway 1, Gateway 2, and the extensions.

[0065] Among them, the smart home network can also be called a whole-house network, the host can also be called a whole-house host, and the extension can also be called a whole-house extension. The embodiments of this application do not make special limitations on this.

[0066] It is understandable that, although not shown in FIG1 , the cloud can also implement the functions of the host. In addition, the host can also control multiple extensions, and / or the host can also control multiple smart home devices.

[0067] Gateway 1 can control device 2 and device 3, gateway 2 can control device 4, the extension can control gateway 3, gateway 4 and device 7, gateway 3 can control device 5, and gateway 4 can control device 6.

[0068] However, when too many scenarios are deployed on a host, it will affect the host's load, causing performance bottlenecks, slow response speeds, or even downtime.

[0069] In order to solve the above problems, an embodiment of the present application provides a smart home scene deployment method, which can improve the execution performance of the scene.

[0070] The smart home scene deployment method provided in the embodiment of the present application is now described with reference to Figures 2 to 13.

[0071] Figure 2 is a diagram of the whole-home network architecture for a smart home scenario deployment provided by an embodiment of the present application. Referring to Figure 2, the smart home network of an embodiment of the present application may include a host, one or more extensions, one or more gateways (e.g., Gateway 1 and Gateway 2), and one or more smart home devices (for ease of explanation, smart home devices are referred to herein as devices). For example, smart home devices may include devices 1 through 7.

[0072] Among them, smart home devices may include but are not limited to smart Wireless Fidelity (Power Line Communication, Wi-Fi) devices, smart Bluetooth devices, and smart Power Line Communication (Power Line Communication, PLC) devices.

[0073] It is understood that the host, extensions, gateways, and smart home devices can be understood as network elements or nodes in a smart home network. For illustration, the host is referred to as the first node, and the extensions and gateways are referred to as second nodes. The first node and the second node are nodes used to execute scenarios. The second node can include one or more extensions and / or one or more gateways. For example, using the smart home network shown in Figure 2 as an example, the host is the first node, and Gateways 1, Gateway 2, Gateway 3, Gateway 4, and the extensions are second nodes.

[0074] The host has a host engine, the extension has an extension engine, and the gateway has a gateway engine. These engines are used to drive scenario execution. It is understood that the engine can also be referred to as a scenario engine or scenario driver. Scenarios can be deployed on one or more of the host engine, extension engine, and gateway engine. This allows the gateway and extension to share the host's load, improving scenario execution performance and avoiding excessive host load caused by deploying too many scenarios, which could impact scenario execution performance.

[0075] It is understandable that a scene may include three types of segments: event, condition, and action.

[0076] Among them, events refer to the way to trigger a scene. The way to trigger a scene can be to detect a change in the status of a smart home device or in response to a certain operation. For example, taking the example of turning on the air conditioner, turning on the switch is the event of turning on the air conditioner. Conditions are the judgment basis for the execution of the scene. The judgment basis can be distance, time, temperature, status, etc. For example, still taking the example of turning on the air conditioner, the air conditioner can only be turned on when the temperature condition is met. Actions are the actions performed by the device when the conditions are met. For example, still taking the example of turning on the air conditioner, the device performs the action of turning on the air conditioner when the conditions are met.

[0077] FIG3 is a flow chart of an embodiment of the smart home scene deployment method provided by this application, which specifically includes the following steps:

[0078] Step 301: The first node obtains the target scene and the architecture information of the smart home network.

[0079] Specifically, the triggering mode for the first node to obtain the target scene may include the following two:

[0080] Trigger method 1

[0081] The user may operate on the first node to create a new scene (hereinafter referred to as a target scene). In response to a request to create a scene, the first node may obtain the target scene.

[0082] Trigger method 2

[0083] The user can perform a version upgrade on the first node to update the existing scene in the first node (hereinafter referred to as the target scene). In response to the version upgrade request of the first node, the first node can obtain the target scene. It is understandable that there may be multiple existing scenes in the first node, and for any existing scene, the scene can be the target scene. In other words, multiple existing scenes can be updated in sequence, and for any scene being updated, the scene is the target scene.

[0084] Among them, the target scenario can include the effective moment of the target scenario, and the effective moment of the target scenario refers to the moment when the above-mentioned target scenario is executed. It can be understood that at the effective moment of the target scenario, the node deploying the target scenario can judge events and conditions, and execute actions corresponding to the target scenario after the events and conditions meet the corresponding rules.

[0085] Table 1 exemplarily shows the correspondence between scenarios and effective times.

[0086] Table 1

[0087] Referring to Table 1, it is assumed that three scenarios have been created in the first node, namely Scenario 1, Scenario 2 and Scenario 3, where the effective time of Scenario 1 is 8:00, that is, Scenario 1 can be executed at 8:00 every day or at 8:00 on a certain day, the effective time of Scenario 2 is 15:00, that is, Scenario 2 can be executed at 15:00 every day or at 15:00 on a certain day, and the effective time of Scenario 3 is 18:00, that is, Scenario 3 can be executed at 18:00 every day or at 18:00 on a certain day.

[0088] After obtaining the target scene, you can also obtain the architecture information of the smart home network.

[0089] The architecture information of the smart home network may include associations between nodes and smart home devices, and between nodes in the smart home network. The associations may include connection relationships and control relationships. In some embodiments, the associations may also include other relationships, which are not specifically limited in the embodiments of the present application. It is understood that the architecture information of the smart home network may be expressed in the form of a network topology diagram, or the architecture information of the smart home network may also be expressed in the form of a routing table, which is not specifically limited in the embodiments of the present application.

[0090] Exemplarily, taking the smart home network of FIG. 2 as an example, Table 2 shows the architecture information of the smart home network.

[0091] Referring to Table 2, device 1, gateway 1, gateway 2, and the extension are connected to the host and controlled by the host. Therefore, the adjacent nodes to the host are device 1, gateway 1, gateway 2, and the extension. Device 2 and device 3 are connected to gateway 1 and controlled by gateway 1. Therefore, the adjacent nodes to gateway 1 are device 2 and device 3. Device 4 is connected to gateway 2 and controlled by gateway 2. Therefore, the adjacent node to gateway 2 is device 2. Device 7, gateway 3, and gateway 4 are connected to the extension and controlled by the extension. Therefore, the adjacent nodes to the extension are device 7, gateway 3, and gateway 4. Device 5 is connected to gateway 3 and controlled by gateway 3. Therefore, the adjacent node to gateway 3 is device 5. Device 6 is connected to gateway 4 and controlled by gateway 4. Therefore, the adjacent node to gateway 4 is device 6.

[0092] In some optional embodiments, after obtaining the target scenario and smart home network architecture information, historical load information of the first node and / or historical load information of the second node may also be obtained. The historical load information of the first node may include the load information of the first node within a first historical duration, and the historical load information of the second node may include the load information of the second node within a second historical duration. The first historical duration and the second historical duration may be the same or different, and this is not specifically limited in the embodiments of the present application.

[0093] For example, the load information may be represented by the usage rate of the central processing unit (CPU) and the memory usage rate.

[0094] It will be understood that the above-mentioned CPU usage and memory usage are merely exemplary and do not constitute a limitation on the embodiments of the present application. In some embodiments, the load information of the host may also be characterized by other parameters.

[0095] The historical load information of the first node and the historical load information of the second node can be obtained in the following manner: the historical load information of the first node can be obtained by collecting statistics on the load information of the first node within the first historical time period, or the historical load information of the second node can be obtained by collecting statistics on the load information of the first node within the second historical time period. The historical load information of the first node and the historical load information of the second node can be obtained periodically. For example, taking the load information as CPU and memory usage as an example, the first node can record the CPU usage and memory usage every second within a day, and then by collecting the load data of the first node within a day, a curve showing the historical load information of the first node changing with time can be obtained; or the second node can record the CPU usage and memory usage every second within a day, and then by collecting the load data of the second node within a day, a curve showing the historical load information of the second node changing with time can be obtained.

[0096] In some optional embodiments, the first node may also obtain ECA information and spatial attribute information corresponding to the target scene.

[0097] ECA refers to at least two types of segments: event, condition, and action. For example, a scene can include two types of segments: event and action; or a scene can include three types of segments: event, condition, and action.

[0098] The ECA information in a scenario may include key ECAs, which are used to indicate whether a scenario is successfully executed.

[0099] In some optional embodiments, the ECA information in the scene may further include non-critical ECAs, where the non-critical ECAs are used to represent optional ECAs.

[0100] It is understood that key ECAs can include one or more ECAs, and non-key ECAs can include one or more ECAs. A key ECA is an ECA that must be executed during a scenario. That is, a scenario is considered successful only if all key ECAs in the scenario execute successfully. If any key ECA in the scenario fails to execute, the scenario is considered a failure. The success or failure of non-key ECAs does not affect the success or failure of the scenario.

[0101] For example, consider a movie-watching scenario. The event in the scenario might be turning on the movie switch, and the actions might include closing the curtains, dimming the main lights, turning on the TV, or making an announcement on the speaker. As can be seen, dimming the main lights and turning on the TV in the scenario will affect the user's viewing experience. Therefore, these two actions can be set as critical ECAs. However, closing the curtains and making an announcement on the speaker do not affect the user's viewing experience. Therefore, these actions can be set as non-critical ECAs.

[0102] The spatial attribute information in the scene is used to represent which space the devices used in the scene come from or which space is the main action area of ​​the scene.

[0103] For example, taking the guest scene as an example, the actions in the guest scene may include turning on the living room light, turning on the hallway light, and turning on the porch light. Among them, although the hallway light and the porch light are not in the living room, the spatial attribute of the guest scene is still the living room.

[0104] In some optional embodiments, the user may also create a scene through a cloud host, which is not specifically limited in the present embodiment. The cloud host may be a host on the cloud side.

[0105] In step 302 , the first node deploys the target scenario on the target node based on the architecture information of the smart home network.

[0106] Specifically, after the first node obtains the target scenario and the architecture information of the smart home network, the target node can be deployed on the target node based on the architecture information of the smart home network.

[0107] The target node may be the first node and / or the second node. As mentioned above, the second node may include one or more extensions and / or one or more gateways.

[0108] It should be noted that the deployment referred to in the embodiments of the present application can also be referred to as distribution or configuration, that is, after the first node determines the target node, it can distribute or configure the target scene to the target node. The deployment does not mean the execution of the target scene, that is, at the moment of target scene deployment, the target scene is not executed, and the target scene is executed at the effective time indicated by the scene information.

[0109] In some optional embodiments, the first node may also deploy the target node at the target node based on the historical load information of the first node and / or the historical load information of the second node and the architecture information of the smart home network.

[0110] For example, the load value corresponding to the effective moment of the target scenario can be predicted through the historical load information of the first node. If the load value corresponding to the effective moment of the target scenario in the first node is high, it means that at the effective moment of the target scenario, the load of the first node is too heavy and more scenarios cannot be deployed. The target scenario can be deployed on the second node, thereby reducing the burden on the first node; or, if the load value corresponding to the effective moment of the target scenario in the first node is low, the target scenario can be deployed on the first node. Alternatively, the load value corresponding to the effective moment of the target scenario can be predicted through the historical load information of the second node. If the load value corresponding to the effective moment of the target scenario for any node in the second node is high, it means that at the effective moment of the target scenario, the load of the node is too heavy and the scenario cannot be deployed. The target scenario can be deployed on other nodes in the second node, thereby balancing the load.

[0111] In some optional embodiments, the target scenario may also be deployed according to the scenario already deployed in the first node.

[0112] It is understandable that as scenarios are continuously deployed in the first node, some already deployed scenarios may exist. For the first node, if many scenarios are executed at the same time, some scenarios may be suspended due to preemption or some scenarios may fail to execute, affecting the user experience. Therefore, the first node can also deploy the target scenario based on the scenarios already deployed in the first node.

[0113] Exemplarily, a concurrency upper limit can be pre-set for the first node, where the concurrency upper limit is used to represent the threshold of the number of scenarios that can be executed by the host at the same time. For example, the threshold can be a first concurrency threshold. If, when deploying the target scenario, the number of scenarios executed at the same execution time as the target scenario in the first node reaches the concurrency upper limit, for example, greater than or equal to the first concurrency threshold, the target scenario can be deployed on the second node; or, if, when deploying the target scenario, the number of scenarios executed at the same execution time as the target scenario in the first node does not reach the concurrency upper limit, for example, less than the first concurrency threshold, the target scenario can be deployed on the first node.

[0114] In the embodiments of the present application, deploying the target scenario based on the smart home network architecture can help improve the execution performance of the scenario.

[0115] It should be noted that the embodiments of the present application are illustrated using a host in a smart home network as an example, but this does not constitute a limitation on the embodiments of the present application. In some embodiments, a cloud host can also implement the above method.

[0116] Figure 3 above illustrates the deployment of an entire scenario. It's understood that a scenario typically includes at least two types of segments in an ECA—for example, an event and an action, or an event, a condition, and an action. Therefore, to balance the load on the first and second nodes throughout the house, the scenario can be segmented into multiple segments, and these segments can be deployed on the first and / or second nodes.

[0117] FIG4 is a flow chart of another embodiment of the smart home scene deployment method provided by the present application. The above step 302 specifically includes the following steps:

[0118] In step 401 , the first node divides the target scene into segments to obtain multiple segments.

[0119] Specifically, since the target scene may include at least two types of segments, namely, events, conditions, and actions, the scene may be segmented based on events, conditions, and actions to obtain multiple segments.

[0120] One or more events may serve as an event segment, or one or more conditions may serve as a condition segment, or one or more actions may serve as an action segment.

[0121] For example, assuming the event is E, and the actions include A1, A2, and A3, where the devices executing actions A1, A2, and A3 are controlled by the same gateway, then event E can be used as an event segment, and the combination of A1, A2, and A3 can be used as an action segment.

[0122] For another example, assuming the event is E1 or E2, and the actions include A1, A2, and A3, where the devices executing actions A1, A2, and A3 are controlled by the same gateway, then event E1 or E2 can be used as an event segment alone, and the combination of A1, A2, and A3 can be used as an action segment.

[0123] For another example, assuming the event is E, the condition is C1 or C2, and the actions are A1, A2, and A3, where the devices executing actions A1, A2, and A3 are controlled by the same gateway, then event E can be used as an event fragment, condition C1 or C2 can be used as a condition fragment alone, and the combination of A1, A2, and A3 can be used as an action fragment.

[0124] For another example, assuming the event is E, the conditions are C1 and C2, and the actions are A1, A2, and A3, where the devices executing actions A1, A2, and A3 are controlled by the same gateway, then event E can be used as an event fragment, the combination of conditions C1 and C2 can be used as a condition fragment, and the combination of A1, A2, and A3 can be used as an action fragment.

[0125] For another example, suppose the event is E, and the actions include A1, A2, and A3. Among them, the actions A1, A2, and A3 have dependencies such as sequential execution, loop execution, conditional branching, or input and output. Then event E can be regarded as an event fragment, and the combination of A1, A2, and A3 can be regarded as an action fragment.

[0126] Step 402: The first node determines a target node.

[0127] Specifically, after the first node obtains the multiple fragments, it can determine the target node based on the architecture information of the smart home network, so as to deploy the multiple fragments in the target node.

[0128] There may be one or more target nodes, and the target nodes may be the first node and / or the second node, thereby allowing multiple segments of a scene to be dispersed into the first node and / or the second node.

[0129] For example, one or more segments in the target scene may be deployed in the first node, and / or one or more segments in the target scene may be deployed in the second node, thereby reducing the burden on the first node and improving system performance.

[0130] In some optional embodiments, the target node can be determined by selecting a shared node from one or more shared nodes as the target node. That is, before determining the target node, the shared nodes corresponding to the multiple segments of the target scene can be found. The shared nodes represent nodes that can control the devices corresponding to the multiple segments of the target scene. It is understood that the shared nodes can also be referred to as common nodes.

[0131] For example, using the network topology shown in Figure 2 as an example, Figure 5 illustrates a schematic diagram of an embodiment of a shared node. Assume a scenario contains two segments: an event segment and an action segment. The event segment includes event E, and the device corresponding to event E is device 2. The action segment includes action A, and the device corresponding to action A is device 3. Since both devices 2 and 3 are controlled by gateway 1, the shared node corresponding to the event segment and action segment can be gateway 1. That is, gateway 1 can be the shared node of this scenario.

[0132] In some optional embodiments, taking the embodiment shown in FIG5 as an example, since the host is the upper-level node of gateway 1 and can also control device 2 and device 3, the host can also be a shared node of the event segment and the action segment, that is, the host can also be a shared node of the scene.

[0133] In some optional embodiments, taking the embodiment shown in FIG. 5 as an example, the extension can also control device 2 and device 3 through routing. For example, the extension can indirectly control device 2 and device 3 through gateway 1. Therefore, the extension can also serve as a shared node of the action segment.

[0134] For another example, still taking the network topology shown in Figure 2 as an example, Figure 6 exemplarily shows a schematic diagram of another embodiment of a shared node. Assume that a scene contains two segments, namely an event segment and an action segment, wherein the event segment includes event E, and the device corresponding to event E is device 2, and the action segment includes action A, and the device corresponding to action A is device 4. Since device 2 is controlled by gateway 1, and device 4 is controlled by gateway 2, gateway 1 cannot control device 4, and gateway 2 cannot control device 2. Therefore, gateway 1 or gateway 2 cannot serve as a shared node for the event segment and the action segment, that is, gateway 1 or gateway 2 cannot serve as a shared node for the scene. Since the host or extension can control device 2 and device 4, the shared node for the event segment and the action segment can be the host or extension, that is, the shared node for the scene can be the host or extension.

[0135] In some optional embodiments, the shared node may also be represented in the form of a shared node group. For example, the shared node may be a shared node group including multiple nodes.

[0136] For example, using the embodiment shown in Figure 6 as an example, Figure 7 illustrates another exemplary embodiment of a shared node. Although Gateway 1 or Gateway 2 cannot serve as a shared node for event and action segments, by combining Gateway 1 and Gateway 2 into a shared node group, control of Device 2 and Device 4 can be achieved through the shared node group. In other words, the shared node group can also serve as the shared node for this scenario. For example, Shared Node Group = {Gateway 1, Gateway 2}.

[0137] After the shared nodes are determined, the target nodes can be determined based on the shared nodes.

[0138] Among them, the principles for determining the target node may include one or more of the following methods. In practical applications, the following methods may be used in any combination, and the embodiments of the present application do not impose any special restrictions on this.

[0139] Method 1: Prioritize the target nodes that support the business capabilities required by the fragments in the target scenario among the shared nodes.

[0140] The service capabilities required by a segment may include, but are not limited to, delay, loop execution, and timing capabilities. It is understood that some nodes may have strong capabilities and support the service capabilities required by the segment, and nodes that support the required service capabilities may be preferentially selected as target nodes. However, some nodes may have weaker capabilities and may not support the service capabilities required by the segment, and nodes that do not support the required service capabilities may not be selected as target nodes.

[0141] Method 2: Prioritize target nodes whose concurrency limit meets the preset conditions among shared nodes.

[0142] One or more scenarios may have been deployed in a node, and each scenario has a corresponding execution time. Due to the limited concurrency capability of the node, for example, when a scenario is being executed, the execution requests of other scenarios with the same execution time may be rejected, thereby affecting the execution effect of the scenario and the user experience. Among them, the trigger conditions may include but are not limited to the same temperature, the same time, the same weather, etc. Therefore, when selecting the target node, the node whose concurrency upper limit meets the preset conditions can be preferentially selected as the target node in the shared node. For example, the number of scenes in the target node that have the same execution time as the target scenario is less than the second concurrency threshold, and the second concurrency threshold can be the concurrency upper limit of the target node.

[0143] Method 3: Prioritize deploying all fragments containing key ECAs in the target scenario in the same target node.

[0144] Understandably, if multiple fragments containing critical ECAs are deployed on multiple nodes, some critical ECAs may succeed while others fail, causing the entire scenario to fail and impacting the user experience. To ensure the successful execution of all critical ECAs, and thus the integrity and atomicity of the scenario, prioritize deploying all fragments containing critical ECAs in the target scenario on the same target node.

[0145] Method 4: Prioritize target nodes with low load among shared nodes.

[0146] It is understandable that each node in the to-be-selected nodes has its historical load information. The specific method for obtaining the historical load information of the to-be-selected nodes can refer to the description of the historical load information of the first node and the second node in the above embodiment, which will not be repeated here.

[0147] The load value corresponding to the effective time can be obtained through historical load information. If the load value corresponding to the effective time of the target scenario in the node to be selected is low, for example, the load value corresponding to the effective time of the target scenario is less than the load threshold, the node with the load value less than the load threshold can be preferentially selected as the target node; if the load value corresponding to the effective time of the target scenario in the node to be selected is high, for example, the load value corresponding to the effective time of the target scenario is greater than or equal to the load threshold, the node with the load value greater than or equal to the load threshold can be not selected as the target node.

[0148] For example, if the target scene is a scene when getting up in the morning, however, the node to be selected may need to perform a large number of tasks in the morning and has a heavy load, then the target scene is not suitable for deployment in the heavily loaded node to be selected.

[0149] Method 5: Prioritize the target node that is closer to the device controlled by the target scene among the shared nodes.

[0150] As previously mentioned, the closer the target node is to the device controlled by the target scenario, the shorter the delay, the higher the execution efficiency, and the better the user experience. Therefore, the target node that is closer to the device controlled by the target scenario can be preferentially selected from the shared nodes. The specific method for calculating the distance between the target node and the device can be referred to the relevant description in the above embodiment and will not be repeated here.

[0151] For example, the smart home network topology and its spatial location information can be pre-stored in the first node. When deploying a target scenario, the distances of the devices controlled by the target scenario from the first node and the second node can be calculated, respectively. Thus, the target scenario can be deployed on a node that is closer to the devices controlled by the target scenario. For example, if the gateway is closer to the devices controlled by the target scenario, the target scenario can be deployed on the gateway. Alternatively, if the extension is closer to the devices controlled by the target scenario, the target scenario can be deployed on the extension.

[0152] Next, taking the network topology shown in FIG2 as an example, the determination of the target node is explained by way of example.

[0153] For example, referring to Figure 8 , assume a scenario includes an event segment and an action segment, where the event segment includes event E, which is to turn on device 2, and the action segment includes action A, which is to turn on device 3. Since device 2 corresponding to event E is controlled by gateway 1, and device 3 corresponding to action A is also controlled by gateway 1, the shared nodes corresponding to the event segment and action segment can be gateway 1, the host, or an extension. That is, the shared nodes of this scenario can be gateway 1, the host, or an extension.

[0154] Assume that gateway 1 meets the principles of methods 1 to 5 above. For example, gateway 1 is the node closest to device 2 and device 3, and the execution of device 2 and device 3 does not require business capabilities such as delay and looping, and no other scenarios are deployed in gateway 1. The load corresponding to the effective moment of the target scenario is low. In this case, gateway 1 can be used as the target node, that is, the entire scenario can be deployed in gateway 1, that is, both the event fragment and the action fragment are deployed in gateway 1.

[0155] For another example, referring to Figure 9, assume that a scene includes a key event segment and a key action segment, wherein the key event segment includes a key event E, which is opening device 2, and the key action segment includes a key action A, which is opening device 4.

[0156] Since the device 2 corresponding to the key event E is controlled by the gateway 1, the device 4 corresponding to the key action A is controlled by the gateway 2. And since the key condition E and the key action A are both key ECAs, the key event fragment and the key action fragment cannot be deployed on different nodes. Specifically in this embodiment, the key event fragment cannot be deployed on the gateway 1 by means of a shared node group, and the key action fragment cannot be deployed on the gateway 2. In order to deploy the key event fragment and the key action fragment in the same node, the key event fragment and the key action fragment can be deployed on a shared node such as a host or an extension, that is, the host or extension is used as the target node. In this embodiment, assuming that the host meets the principles of the above-mentioned method one to method five, the key event fragment and the key action fragment can be deployed on the host, that is, the entire scene is deployed on the host.

[0157] For another example, referring to Figure 10, assume that a scene includes an event segment and an action segment, wherein the event segment includes event E, which is opening device 2, and the action segment includes action A1 and action A2, which is opening device 3 and action A2 is opening device 4.

[0158] Since device 2 corresponding to event E is controlled by gateway 1, and device 3 and device 4 corresponding to action A1 and action A2 are controlled by gateway 1 and gateway 2 respectively, the shared node corresponding to the event segment and the action segment can be the host or the extension, or the shared node corresponding to the event segment and the action segment can be a shared node group consisting of gateway 1 and the host, or the shared node corresponding to the event segment and the action segment can be a shared node group consisting of gateway 1 and the extension.

[0159] Assuming that the host or extension is selected as the target node, the event fragment and action fragment can be deployed on the host or extension, that is, the entire scene is deployed on the host or extension. Or,

[0160] Assuming that a shared node group consisting of gateway 1 and host is selected as the target node, the event fragment can be deployed on gateway 1 and the action fragment can be deployed on the host. Or,

[0161] Assuming that a shared node group consisting of gateway 1 and extension is selected as the target node, the event fragment can be deployed on gateway 1 and the action fragment can be deployed on the extension.

[0162] For another example, referring to FIG11 , it is assumed that a scene includes an event segment and an action segment, wherein the event segment includes event E, which is opening device 2 , and the action segment includes action A, which is opening device 4 .

[0163] Since device 2 corresponding to event E is controlled by gateway 1, and device 4 corresponding to action A is controlled by gateway 2, the shared nodes corresponding to the event and action segments can be a shared node group, a host, or an extension, where shared node group = {gateway 1, gateway 2}. Assuming that the shared node group meets the principles of methods 1-5 above, the shared node group can be used as the target node, thereby deploying the event segment on gateway 1 and the action segment on gateway 2.

[0164] It is understandable that the above embodiment is only described by taking the shared node group including 2 nodes as an example, but it does not constitute a limitation on the embodiments of the present application. In some embodiments, the number of nodes included in the shared node group may also be greater than 2.

[0165] Step 403: The first node deploys the multiple segments in the target node.

[0166] Specifically, after the target node is determined, multiple segments of the target scene can be deployed in the determined target node.

[0167] Among them, the specific deployment method of multiple fragments of the target scene can be referred to the relevant description in the embodiments shown in Figures 8 to 11, and will not be repeated here.

[0168] The above exemplary descriptions of the segmentation and deployment of the scenario are given in Figures 4 to 11. Next, the following exemplary descriptions of the execution of the scenario are given in Figures 12 and 13.

[0169] FIG12 is a flow chart of another embodiment of the scene deployment method provided by the present application. In the embodiment shown in FIG12 , a scene may include events and actions. Since the fragments corresponding to the events and the fragments corresponding to the actions of a scene may be deployed in different nodes, when an event occurs, the node where the fragment corresponding to the event is located (hereinafter referred to as the event node for ease of explanation) can notify the node where the fragment corresponding to the action is located of the event, so that the node where the fragment corresponding to the action is located (hereinafter referred to as the action node for ease of explanation) can execute the corresponding action. Specifically, the following steps are included:

[0170] Step 1201: The event node monitors events.

[0171] Specifically, the event node may include a first node, or the event node may include a second node, which is not particularly limited in the embodiment of the present application.

[0172] The event may include a state change event of a target smart home device. In some embodiments, the event may also include other types of events, which are not specifically limited in the embodiments of the present application. The target smart home device may be a smart home device controlled by an event node in the target scene.

[0173] The number of event nodes can be one or more, and this embodiment of the present application does not impose any special limitation on this.

[0174] An event node can be deployed with one or more event segments, and an event segment can include one or more events. An event node can monitor the occurrence of events. The definition of events can be found in the relevant descriptions in the above embodiments and will not be repeated here.

[0175] Step 1202: In response to a monitored event, the event node sends first information to the action node.

[0176] Specifically, the action node may include a first node, or the action node may include a second node, which is not particularly limited in the embodiment of the present application.

[0177] The number of action nodes can be one or more, and this embodiment of the present application does not impose any special limitation on this.

[0178] It is understood that a subscription relationship can be pre-established between the event node and the action node, so that after the event node detects an event, it can send the first information to the subscribed action node. The first information is used to indicate that the detected event has satisfied the rules corresponding to the event segment of the target scenario.

[0179] For example, taking action node 1 and action node 2 subscribing to event node 1 and event node 2 as an example, when event node 1 detects an event, it can send the first information to action node 1 and action node 2. Alternatively, when event node 2 detects an event, it can send the first information to action node 1 and action node 2.

[0180] Step 1203: In response to the received first information, the action node performs a corresponding action.

[0181] Specifically, the action node may receive the first information sent by the event node. In response to the received first information, the action node may execute an action corresponding to the target scenario.

[0182] FIG13 is a flow chart of another embodiment of the scene deployment method provided by the present application. In the embodiment shown in FIG13 , a scene may include events, conditions, and actions. Since the fragments corresponding to the events, conditions, and actions of a scene may be deployed in different nodes, when an event occurs in the event node, the event may be notified to the condition node. When the condition node determines that the condition meets the requirements, the action node may be instructed to perform the corresponding action. Specifically, the following steps are included:

[0183] Step 1301: The event node monitors events.

[0184] The specific implementation of step 1301 can refer to the relevant description of step 1201 in the above embodiment, which will not be repeated here.

[0185] Step 1302: In response to a monitored event, the event node sends first information to the condition node.

[0186] Specifically, the conditional node may include a first node, or the conditional node may include a second node, which is not particularly limited in the embodiment of the present application.

[0187] The number of conditional nodes can be one or more, and this embodiment of the present application does not impose any special limitation on this.

[0188] It is understandable that a subscription relationship may be pre-established between the event node and the condition node, so that the event node can send the first information to the condition node after detecting an event.

[0189] For example, taking the case where the condition node subscribes to event node 1 and event node 2, when event node 1 detects an event, the first information can be sent to condition node 1. Alternatively, when event node 2 detects an event, the first information can be sent to the condition node.

[0190] Step 1303: In response to the received first information, the condition node determines whether the condition meets the requirement.

[0191] Specifically, the condition node can receive the first information sent by the event node. In response to the received first information, the condition node can determine whether the condition meets the requirements, for example, whether the condition meets the rules set in the condition segment. The specific definition of the condition can be referred to the relevant description in the above embodiment and will not be repeated here.

[0192] Step 1304: In response to the judgment that the condition meets the requirement, the condition node sends the second information to the action node.

[0193] Specifically, after the condition node determines that the condition meets the requirement, it can send the second information to the action node, wherein the second information is used to indicate that the condition meets the rule corresponding to the condition segment of the target scenario.

[0194] It is understandable that if the condition node finds through judgment that the condition does not meet the requirements, the second information may not be sent to the action node.

[0195] For example, taking action node 1 and action node 2 subscribing to the condition node as an example, after the condition node receives the first information, it can determine whether the condition meets the requirements. If the condition node determines that the condition meets the requirements, it can send the second information to action node 1 and action node 2; or, if the condition node determines that the condition does not meet the requirements, it may not send the second information to action node 1 and action node 2.

[0196] Step 1305: In response to the received second information, the action node performs a corresponding action based on the second information.

[0197] Specifically, the action node may receive the second information sent by the condition node. In response to the received second information, the action node may perform a corresponding action based on the second information.

[0198] In some optional embodiments, the action node may receive the second information sent by multiple condition nodes. If the judgment basis for the action node to execute the action is that all subscribed condition nodes send the second information, the action node needs to receive the second information sent by all subscribed condition nodes before the action node can execute the corresponding action; or,

[0199] If the action node's judgment basis for executing the action is that any one of all subscribed condition nodes sends the second information, the action node can execute the corresponding action after receiving the second information sent by any one of all subscribed condition nodes.

[0200] For example, taking the action node subscribing to condition node 1 and condition node 2 as an example, assuming that the basis for executing the action fragment is that the action node needs to receive the second information of condition node 1 and condition node 2 before it can execute the corresponding action, the action node needs to wait for receiving the second information of condition node 1 and condition node 2. If the action node only receives the second information of condition node 1 or condition node 2, it cannot execute the corresponding action. Or,

[0201] Assuming that the basis for executing the action fragment is that the action node can execute the corresponding action after receiving the second information of condition node 1 or condition node 2, then the action node can execute the corresponding action after receiving the second information of condition node 1 or condition node 2, without waiting for the second information of condition node 1 and condition node 2 to be successfully received.

[0202] FIG14 is a schematic diagram of the structure of an embodiment of a deployment device for a smart home scene of the present application. As shown in FIG14 , the deployment device 1400 for the smart home scene is applied to a first node. The deployment device 1400 for the smart home scene may include: an acquisition module 1410 and a deployment module 1420; wherein,

[0203] An acquisition module 1410 is configured to acquire target scene and smart home network architecture information;

[0204] A deployment module 1420 is configured to deploy the target scenario on a target node based on the architecture information of the smart home network;

[0205] The target node includes the first node and / or the second node, the first node is a host in the smart home network, and the second node includes an extension and / or a gateway in the smart home network.

[0206] In one possible implementation, the deployment module 1420 is further configured to obtain historical load information of the first node and / or historical load information of the second node;

[0207] The target scenario is deployed on a target node based on the historical load information of the first node and / or the historical load information of the second node and the architecture information of the smart home network.

[0208] In one possible implementation, the target scenario includes an effective time, the historical load information of the first node includes the load information in the first node corresponding to the effective time, and the historical load information of the second node includes the load information in the second node corresponding to the effective time.

[0209] In one possible implementation, the target scene includes multiple information among event information, condition information, and action information, and the deployment module 1420 is further configured to obtain multiple segments based on the target scene, wherein any one of the multiple segments includes an event segment, a condition segment, or an action segment in the target scene;

[0210] The multiple segments are deployed on a target node based on the architecture information of the smart home network.

[0211] In one possible implementation, the target node includes an event node and an action node, the event segment of the target scenario is deployed in the event node, and the action segment of the target scenario is deployed in the action node. The smart home scenario deployment device 1400 further includes:

[0212] An execution module 1430 is configured to monitor events at the event node;

[0213] In response to a monitored event, the event node sends first information to the action node, so that the action node performs an action corresponding to the action fragment of the target scene based on the first information;

[0214] The first information is used to indicate that the monitored event has satisfied the rule corresponding to the event segment of the target scene.

[0215] In one possible implementation, the target node includes an event node, a condition node, and an action node. The event segment of the target scenario is deployed in the event node, the condition segment of the target scenario is deployed in the condition node, and the action segment of the target scenario is deployed in the action node. The execution module 1430 is further configured to monitor events at the event node.

[0216] In response to a monitored event, the event node sends first information to the condition node, so that the condition node determines whether a condition satisfies a rule corresponding to the condition segment of the target scenario based on the first information, and after the condition satisfies the rule corresponding to the condition segment of the target scenario, the condition node sends second information to the action node, so that the action node executes an action corresponding to the action segment of the target scenario based on the second information;

[0217] The first information is used to indicate that the monitored event has satisfied the rule corresponding to the event segment of the target scenario, and the second information is used to indicate that the condition has satisfied the rule corresponding to the condition segment of the target scenario.

[0218] In one possible implementation, the event includes a state change event of a target smart home device, and the target smart home device is a smart home device controlled by the event node in the target scene.

[0219] In one possible implementation, the deployment module 1420 is further configured to obtain the deployed scenario information in the first node;

[0220] The target scene is deployed on the target node based on the scene information deployed in the first node and the architecture information of the smart home network.

[0221] The smart home scene deployment device 1400 provided in the embodiment shown in Figure 14 can be used to implement the technical solution of the method embodiment shown in this application. Its implementation principle and technical effects can be further referred to the relevant description in the method embodiment.

[0222] It should be understood that the division of the various modules of the deployment device 1400 of the smart home scene shown in Figure 14 above is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or physically separated. And these modules can all be implemented in the form of software called through processing elements; they can also all be implemented in the form of hardware; some modules can also be implemented in the form of software called through processing elements, and some modules can be implemented in the form of hardware. For example, the detection module can be a separately established processing element, or it can be integrated in a chip of an electronic device. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. During the implementation process, each step of the above method or each module above can be completed by the hardware integrated logic circuit in the processor element or the instructions in the form of software.

[0223] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more microprocessors (DSPs), or one or more field programmable gate arrays (FPGAs). For another example, these modules may be integrated together to implement a system-on-a-chip (SOC).

[0224] FIG. 15 exemplarily shows a structural diagram of an electronic device 1500 .

[0225] The electronic device 1500 may include at least one processor and at least one memory connected to the processor, wherein the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the method provided in the embodiment shown in this document.

[0226] FIG15 shows a block diagram of an exemplary electronic device 1500 suitable for implementing the embodiments of this document. The electronic device 1500 shown in FIG15 is only an example and should not limit the functions and scope of use of the embodiments of this document.

[0227] As shown in FIG. 15 , components of the electronic device 1500 may include, but are not limited to, one or more processors 1510 , a memory 1520 , a communication bus 1540 connecting different system components (including the memory 1520 and the processor 1510 ), and a communication interface 1530 .

[0228] Communication bus 1540 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnection (PCI) bus.

[0229] The electronic device 1500 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the device, including volatile and non-volatile media, removable and non-removable media.

[0230] The memory 1520 may include a computer system readable medium in the form of a volatile memory, such as a random access memory (RAM) and / or a cache memory. The device may further include other removable / non-removable, volatile / non-volatile computer system storage media. Although not shown in FIG. 15 , a disk drive for reading and writing to a removable non-volatile disk (e.g., a “floppy disk”) and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a Compact Disc Read Only Memory (CD-ROM), a Digital Video Disc Read Only Memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to the communication bus 1540 via one or more data medium interfaces. The memory 1520 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments herein.

[0231] A program / utility having a set (at least one) of program modules may be stored in memory 1520. Such program modules include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. The program modules generally perform the functions and / or methods of the embodiments described herein.

[0232] Electronic device 1500 can also communicate with one or more external devices (e.g., a keyboard, pointing device, display, etc.), one or more devices that enable a user to interact with the device, and / or any device that enables the device to communicate with one or more other devices (e.g., a network card, a modem, etc.). Such communication can be performed via communication interface 1530. Furthermore, electronic device 1500 can also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter (not shown in FIG. 15 ). The network adapter can communicate with other modules of the device via communication bus 1540. It should be understood that, although not shown in FIG. 15 , other hardware and / or software modules can be used in conjunction with electronic device 1500, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0233] The processor 1510 executes various functional applications and data processing by running the programs stored in the memory 1520, such as implementing the methods provided in the embodiments of this document.

[0234] It is understood that the interface connection relationship between the modules shown in the embodiment of this invention is only for illustrative purposes and does not constitute a structural limitation on the electronic device 1500. In other embodiments of this invention, the electronic device 1500 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0235] In the above embodiments, the processor involved may include, for example, a CPU, a DSP, a microcontroller, or a digital signal processor, and may also include a GPU, an embedded neural network processor (Neural-network Process Units; hereinafter referred to as: NPU) and an image signal processor (hereinafter referred to as: ISP). The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASICs, or one or more integrated circuits for controlling the execution of the program of the technical solution of this application. In addition, the processor may have the function of operating one or more software programs, and the software programs may be stored in a storage medium.

[0236] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer-readable storage medium is run on a computer, the computer executes the method provided by the embodiment shown in the present application.

[0237] An embodiment of the present application also provides a computer program product, which includes a computer program. When the computer program product is run on a computer, it enables the computer to execute the method provided by the embodiment shown in the present application.

[0238] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can represent: a, b, c, a and b, a and c, b and c or a and b and c, where a, b, c can be single or multiple.

[0239] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented using a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0240] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0241] In the several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of this application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), magnetic disk or optical disk, and other media that can store program code.

[0242] The above description is merely a specific embodiment of the present application. Any person skilled in the art may easily conceive of variations or substitutions within the technical scope disclosed in this application, and such variations or substitutions shall be within the scope of protection of this application. The scope of protection of this application shall be subject to the scope of protection of the claims.

Claims

1. A method for deploying a smart home scene, characterized in that: Applied to the first node, the method comprises: Obtain the architecture information of the target scene and smart home network; Deploying the target scenario on a target node based on the architecture information of the smart home network; The target node includes the first node and / or the second node, the first node is a host in the smart home network, and the second node includes an extension and / or a gateway in the smart home network.

2. The method according to claim 1, characterized in that The step of deploying the target scenario on the target node based on the architecture information of the smart home network includes: Acquire historical load information of the first node and / or historical load information of the second node; The target scenario is deployed on a target node based on the historical load information of the first node and / or the historical load information of the second node and the architecture information of the smart home network.

3. The method according to claim 2, characterized in that The target scenario includes an effective time, the historical load information of the first node includes the load information in the first node corresponding to the effective time, and the historical load information of the second node includes the load information in the second node corresponding to the effective time.

4. The method according to any one of claims 1 to 3, characterized in that: The target scene includes multiple information of event information, condition information and action information, and the step of deploying the target scene on the target node based on the architecture information of the smart home network includes: Based on the target scene, a plurality of segments are obtained, wherein any one of the plurality of segments includes an event segment, a condition segment or an action segment in the target scene; The multiple segments are deployed on a target node based on the architecture information of the smart home network.

5. The method according to claim 4, characterized in that The target node includes an event node and an action node, the event segment of the target scene is deployed in the event node, and the action segment of the target scene is deployed in the action node. The method further includes: The event node monitors events; In response to the monitored event, the event node sends first information to the action node, so that the action node performs an action corresponding to the action fragment of the target scene based on the first information; The first information is used to indicate that the monitored event has satisfied the rule corresponding to the event segment of the target scene.

6. The method according to claim 4, characterized in that The target node includes an event node, a condition node and an action node, the event segment of the target scenario is deployed in the event node, the condition segment of the target scenario is deployed in the condition node, and the action segment of the target scenario is deployed in the action node. The method further includes: The event node monitors events; In response to a monitored event, the event node sends first information to the condition node, so that the condition node determines whether the condition satisfies the rule corresponding to the condition segment of the target scene based on the first information, and after the condition satisfies the rule corresponding to the condition segment of the target scene, the condition node sends second information to the action node, so that the action node executes the action corresponding to the action segment of the target scene based on the second information; The first information is used to indicate that the monitored event has satisfied the rule corresponding to the event segment of the target scene, and the second information is used to indicate that the condition has satisfied the rule corresponding to the condition segment of the target scene.

7. The method according to claim 5 or 6, characterized in that: The event includes a state change event of a target smart home device, and the target smart home device is a smart home device controlled by the event node in the target scene.

8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: Obtaining the scene information deployed in the first node; The target scene is deployed on the target node based on the scene information deployed in the first node and the architecture information of the smart home network.

9. A deployment system for a smart home scene, characterized in that: comprising a first node and a second node, wherein, The first node is used to obtain the target scene and the architecture information of the smart home network; the target scene is deployed on the target node based on the architecture information of the smart home network; wherein the target node includes the first node and / or the second node, the first node is the host in the smart home network, and the second node includes the extension in the smart home network and / or gateway.

10. The system according to claim 9, characterized in that The first node is also used to obtain historical load information of the first node and / or historical load information of the second node; based on the historical load information of the first node and / or the historical load information of the second node and the architecture information of the smart home network, the target scenario is deployed on the target node.

11. The system according to claim 9 or 10, characterized in that: The target scene includes multiple information including event information, condition information and action information. The first node is also used to obtain multiple fragments based on the target scene, wherein any one of the multiple fragments includes an event fragment, a condition fragment or an action fragment in the target scene; and the multiple fragments are deployed on the target node based on the historical load information of the first node and the architecture information of the smart home network.

12. The system according to claim 11, characterized in that The target node includes an event node and an action node, wherein the event segment of the target scene is deployed in the event node, and the action segment of the target scene is deployed in the action node, wherein: The event node is used to monitor events; in response to the monitored events, the event node sends first information to the action node; The action node is used to execute the action corresponding to the action fragment of the target scene based on the first information; The first information is used to indicate that the monitored event has satisfied the rule corresponding to the event segment of the target scene.

13. The system according to claim 11, characterized in that The target node includes an event node, a condition node and an action node, wherein the event segment of the target scene is deployed in the event node, the condition segment of the target scene is deployed in the condition node, and the action segment of the target scene is deployed in the action node, wherein: The event node is used to monitor an event; in response to the monitored event, the event node sends the first information to the condition node; The condition node is used to determine whether the condition satisfies the rule corresponding to the condition fragment of the target scene based on the first information, and after the condition satisfies the rule corresponding to the condition fragment of the target scene, the condition node sends the second information to the action node; The action node is used to execute the action corresponding to the action fragment of the target scene based on the second information; The first information is used to indicate that the monitored event has satisfied the rule corresponding to the event segment of the target scene, and the second information is used to indicate that the condition has satisfied the rule corresponding to the condition segment of the target scene.

14. An electronic device, characterized in that: include: A processor and a memory, the memory being used to store a computer program; the processor being used to run the computer program to implement the deployment method for a smart home scene as described in any one of claims 1 to 8.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on a computer, the method for deploying a smart home scene according to any one of claims 1 to 8 is implemented.