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

By balancing the load of each node in the smart home network and deploying the scenario on the most suitable node, the performance bottleneck caused by excessive host load is solved, and the execution performance and system stability of the scenario are improved.

CN118264498BActive Publication Date: 2025-03-11PETAL CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311164590.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-08
Publication Date
2025-03-11
Estimated Expiration
2043-09-08

AI Technical Summary

Technical Problem

When there are too many host deployment scenarios in smart home networks, it will lead to a bottleneck in the performance of the host, slow response speed or even downtime.

Method used

By obtaining the architectural information of the smart home network and the historical load information of each node, the target scenario is deployed on the most suitable node to balance the load of each node, and avoiding the degradation of the scene execution performance of a certain node due to excessive load.

Benefits of technology

It improves the execution performance of smart home scenarios, avoids downtime caused by excessive host load, and ensures the stable operation of smart home systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118264498B_ABST
    Figure CN118264498B_ABST
Patent Text Reader

Abstract

The present application provides a deployment method, system, electronic device and storage medium for a smart home scene, the method comprising: obtaining architecture information of a target scene and a smart home network; deploying the target scene on a 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 being a host in the smart home network, and the second node comprising an extension and / or a gateway in the smart home network. The method provided by the present application helps to improve the execution performance of the scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In a smart home network, users can create scenes to link various smart home devices at home and realize their linkage control needs for smart home devices. For example, when the temperature reaches a certain condition, the air conditioner at home can be automatically turned on; or when the outdoor wind speed reaches a certain condition, the windows at home can be automatically closed, etc.

[0003] Scenes are usually deployed in the host throughout the house, and the scene engine of the host drives the corresponding scene. Among them, the rules of the scene are usually based on the smart home platform, combining the status, time and other conditions of the smart home device with the executable actions of the smart home device to form an intelligent rule. Depending on whether the scene rules contain conditions, the scene rules can be divided into automatic scene rules and manual scene rules.

[0004] Manual scene rules refer to the user manually combining the actions of smart home devices and setting buttons on the smart home platform to achieve the function of 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.) and device actions according to user needs to form a rule that executes the corresponding action when the preset conditions are met.

[0005] 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. Summary of the invention

[0006] The present application provides a deployment method, system, electronic device and storage medium for a smart home scene, which helps to improve the execution performance of the scene.

[0007] In a first aspect, the present application provides a smart home scene deployment method, which is applied to a first node, and includes: obtaining architecture information of a target scene and a smart home network; deploying the target scene on a target node based on the architecture information of the smart home network; wherein the target node includes the first node and / or a 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.

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

[0009] 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.

[0010] In this application, using the load information of each node in the smart home network as a reference condition for scene deployment can help balance the load of each node and avoid a certain node from causing the scene's execution performance to degrade or even crash due to excessive load.

[0011] 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.

[0012] 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.

[0013] In the present 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.

[0014] In one possible implementation, the target node includes an event node and an action node, the event node is used to deploy the event fragment of the target scene, and the action node is used to deploy the action fragment of the target scene. 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 fragment 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 fragment of the target scene.

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

[0016] In one possible implementation, the target node includes an event node, a condition node and an action node, the event node deploys the event fragment of the target scene, the condition node deploys the condition fragment of the target scene, and the action node deploys the action fragment of the target scene. The method also includes: the event node monitors events; in response to the monitored events, 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 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 second information to the action node, so that the action node executes the action corresponding to the action fragment 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 fragment of the target scene, and the second information is used to indicate that the condition has satisfied the rule corresponding to the condition fragment of the target scene.

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

[0018] 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.

[0019] In one possible implementation, the method further includes: acquiring 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.

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

[0021] In one possible implementation, the deploying of 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: acquiring 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, the target scene is not deployed in the first node.

[0022] In one possible implementation manner, 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.

[0023] 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.

[0024] 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, and the key segments are used to characterize whether a scene is successfully executed.

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

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

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

[0028] 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; 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.

[0029] In one possible implementation, the target scene includes multiple information including event information, condition information and action information, and 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.

[0030] In one possible implementation, the target node includes an event node and an action node, wherein the event node deploys the event fragment of the target scene, and the action node deploys the action fragment of the target scene, 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; wherein the first information is used to indicate that the monitored event has satisfied the rule corresponding to the event fragment of the target scene.

[0031] In one possible implementation, the target node includes an event node, a condition node and an action node, wherein the event node deploys the event segment of the target scene, the condition node deploys the condition segment of the target scene, and the action node deploys the action segment of the target scene, 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 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; the action node is used to execute 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.

[0032] 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.

[0033] In a fourth aspect, the present application provides an electronic device comprising: 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 of the smart home scenario as described in the first aspect.

[0034] 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.

[0035] 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, the electronic device executes the deployment method of the smart home scene as described in the first aspect.

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

[0037] Figure 1 A schematic diagram of a smart home network structure in the prior art;

[0038] Figure 2 A schematic diagram of the system architecture provided for an embodiment of the present application;

[0039] Figure 3 A flowchart of an embodiment of a method for deploying a smart home scene provided in this application;

[0040] Figure 4 A flowchart of another embodiment of the method for deploying a smart home scene provided by the present application;

[0041] Figure 5 A schematic diagram of an embodiment of a method for determining a shared node provided in the present application;

[0042] Figure 6 A schematic diagram of another embodiment of the shared node determination method provided by the present application;

[0043] Figure 7 A schematic diagram of another embodiment of the method for determining a shared node provided by the present application;

[0044] Figure 8 A schematic diagram of an embodiment of a target node determination method provided by the present application;

[0045] Fig. 9 A schematic diagram of another embodiment of the target node determination method provided by the present application;

[0046] Fig.10 A schematic diagram of another embodiment of the target node determination method provided by the present application;

[0047] Fig.11 A schematic diagram of another embodiment of the target node determination method provided by the present application;

[0048] Fig.12 A flowchart of another embodiment of the method for deploying a smart home scene provided in the present application;

[0049] Fig.13 A flowchart of another embodiment of the method for deploying a smart home scene provided in the present application;

[0050] Fig.14A schematic diagram of the structure of an embodiment of a deployment device for a smart home scenario provided by the present application;

[0051] Fig.15 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] In the embodiments of the present application, unless otherwise specified, the character " / " indicates that the objects before and after the association are in an or relationship. For example, A / B can represent A or B. "And / or" describes the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone.

[0053] It should be pointed out that the words "first", "second", etc. involved in the embodiments of the present application are only used to distinguish the description purpose, 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.

[0054] 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 may 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 may be an element itself, or a set containing one or more elements.

[0055] In the embodiments of the present application, "exemplary", "in some embodiments", "in another embodiment", etc. are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present concepts in a concrete way.

[0056] In the embodiments of the present application, "of", "corresponding", and "corresponding" can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings to be expressed are consistent. In the embodiments of the present application, communication and transmission can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings to be expressed are consistent. For example, transmission can include sending and / or receiving, which can be a noun or a verb.

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

[0058] In a smart home network, users can create scenes to link various smart home devices at home and realize their linkage control needs for smart home devices. For example, when the temperature reaches a certain condition, the air conditioner at home can be automatically turned on; or when the outdoor wind speed reaches a certain condition, the windows at home can be automatically closed, etc.

[0059] Scenes are usually deployed in the host throughout the house, and the scene engine of the host drives the corresponding scene. Among them, the rules of the scene are usually based on the smart home platform, combining the status, time and other conditions of the smart home device with the executable actions of the smart home device to form an intelligent rule. Depending on whether the scene rules contain conditions, the scene rules can be divided into automatic scene rules and manual scene rules.

[0060] Manual scene rules refer to the user manually combining the actions of smart home devices and setting buttons on the smart home platform to achieve the function of 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.) and device actions according to user needs to form a rule that executes the corresponding action when the preset conditions are met.

[0061] 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.

[0062] Figure 1 The conventional smart home network architecture is shown as an example. 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 may control device 1, gateway 1, gateway 2 and extensions.

[0063] 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 the present application do not make any special limitations on this.

[0064] It is understandable that although Figure 1 Not shown, the cloud can also realize 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.

[0065] 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.

[0066] 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.

[0067] 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.

[0068] Now combined Figure 2-Figure 13 The smart home scene deployment method provided in the embodiment of the present application is described.

[0069] Figure 2 This is a diagram of the whole-house network architecture for the smart home scenario deployment provided by the embodiment of this application. Figure 2 The smart home network of the embodiment of the present application may include a host, one or more extensions, one or more gateways (for example, gateway 1 and gateway 2) and one or more smart home devices (for the convenience of explanation, the smart home devices are referred to as devices in this document). For example, the smart home devices may be devices 1-device 7, etc.

[0070] 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.

[0071] It is understandable that the host, extension, gateway and smart home device can be understood as network elements or nodes in the smart home network. For illustration, the host is referred to as the first node, and the extension and gateway are referred to as the second node, wherein the first node and the second node are nodes for executing the scenario. The second node may include one or more extensions and / or one or more gateways. Figure 2 Taking the smart home network shown as an example, the host is the first node, and gateway 1, gateway 2, gateway 3, gateway 4 and the extension are the second nodes.

[0072] The host has a host engine, the extension has an extension engine, and the gateway has a gateway engine. The engine is used to drive the execution of the scene. It is understandable that the engine can also be called a scene engine or a scene driver. The scene can be deployed on one or more of the above-mentioned host engine, extension engine, and gateway engine, so that the load of the host can be shared by the gateway and extension, the performance of the scene execution can be improved, and the host load can be prevented from being overloaded due to too many scenes being deployed on the host, which affects the performance of the scene execution.

[0073] It can be understood that a scene may include three types of clips: event, condition, and action.

[0074] Among them, the event refers to the way to trigger the scene, which can be detecting a change in the state of the smart home device or responding to a certain operation. For example, taking the air conditioner as an example, turning on the switch is the event of turning on the air conditioner. The condition is the judgment basis for the execution of the scene, which can be distance, time, temperature, state, etc. For example, still taking the air conditioner as an example, the air conditioner can only be turned on when the temperature condition is met. The action is the action performed by the device when the condition is met. For example, still taking the air conditioner as an example, the device performs the action of turning on the air conditioner when the condition is met.

[0075] like Figure 3 The figure is a flow chart of an embodiment of the smart home scene deployment method provided by the present application, which specifically includes the following steps:

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

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

[0078] Trigger mode 1

[0079] The user may perform operations 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.

[0080] Trigger method 2

[0081] 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, that is, multiple existing scenes can be updated in sequence, and for any scene being updated, the scene is the target scene.

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

[0083] Table 1 exemplarily shows the corresponding relationship between scenarios and effective times.

[0084] Table 1

[0085] Scenario Effective time Scenario 1 8:00 Scenario 2 15:00 Scene 3 18:00

[0086] 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, wherein 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.

[0087] After obtaining the target scene, the architecture information of the smart home network can also be obtained.

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

[0089] For example, Figure 2 Taking the smart home network as an example, Table 2 shows the architecture information of the smart home network.

[0090]

[0091]

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

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

[0094] Exemplarily, the load information may be represented by the utilization rate of the central processing unit (CPU) and the memory utilization rate.

[0095] It is understandable 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.

[0096] The acquisition method of the historical load information of the first node and the historical load information of the second node can be: 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 length, 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 length. 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 of 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 of the historical load information of the second node changing with time can be obtained.

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

[0098] Among them, ECA refers to at least two types of segments among events, conditions, and actions. For example, a scene may include two types of segments, namely, events and actions; or a scene may include three types of segments, namely, events, conditions, and actions.

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

[0100] In some optional embodiments, the ECA information in the scene may further include non-critical ECA, wherein the non-critical ECA is used to characterize the optional ECA.

[0101] It is understandable that a critical ECA may include one or more ECAs, and a non-critical ECA may include one or more ECAs. A critical ECA is an ECA that must be executed during the execution of a scenario, that is, the scenario can be considered to be successfully executed only if all ECAs in the critical ECAs in a scenario are successfully executed. As long as any ECA in the critical ECAs in the scenario fails to execute, the scenario is considered to have failed to execute. Whether a non-critical ECA is executed successfully or not, it does not affect the execution success or failure of the scenario.

[0102] For example, take the movie watching scene as an example, in which the event in the scene may be turning on the movie watching switch, and the actions may include: closing the curtains, adjusting the main lights, turning on the TV, and broadcasting on the speaker, etc. It can be seen that dimming the main lights and turning on the TV in the scene will affect the user's movie watching, so dimming the main lights and turning on the TV can be set as critical ECA; while closing the curtains and broadcasting on the speaker do not affect the user's movie watching, so closing the curtains and broadcasting on the speaker can be set as non-critical ECA.

[0103] The spatial attribute information in the scene is used to characterize which space the equipment used in the scene comes from or which space is the main action area of ​​the scene.

[0104] 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 porch light, and turning on the porch light. Among them, although the porch light and the porch light are not in the living room, the spatial attribute of the guest scene is still the living room.

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

[0106] Step 302: The first node deploys the target scene on the target node based on the architecture information of the smart home network.

[0107] Specifically, after the first node obtains the target scene 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.

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

[0109] It should be noted that the deployment referred to in the embodiments of the present application can also be called distribution or configuration, that is, after the first node determines the target node, the target scene can be distributed or configured 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.

[0110] 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.

[0111] Exemplarily, the load value corresponding to the effective time of the target scenario can be predicted through the historical load information of the first node. If the load value corresponding to the effective time of the target scenario in the first node is high, it means that at the effective time 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 time 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 time of the target scenario can be predicted through the historical load information of the second node. If the load value corresponding to the effective time of any node in the second node is high, it means that at the effective time 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.

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

[0113] It is understandable that as the scenes in the first node are continuously deployed, there will be some scenes that have been deployed. For the first node, if more scenes are executed at the same time, some scenes may be suspended due to preemption or some scenes may fail to execute, affecting the user experience. Therefore, the first node can also deploy the target scene based on the scenes that have been deployed in the first node.

[0114] Exemplarily, a concurrency upper limit may be set in advance for the first node, wherein the concurrency upper limit is used to characterize the threshold of the number of scenarios that can be executed by the host at the same time, for example, the threshold may be the 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 may be deployed at 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 may be deployed at the first node.

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

[0116] It should be noted that the embodiments of the present application are illustratively described 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.

[0117] The above Figure 3 The deployment of the entire scene is illustrated. It is understandable that since a scene usually includes at least two types of segments in ECA, for example, a scene includes an event and an action, or a scene includes an event, a condition, and an action. Therefore, in order to balance the load of the first node and the second node in the whole house, the scene can also be segmented to obtain multiple segments, and the multiple segments obtained by segmentation can be deployed in the first node and / or the second node.

[0118] Figure 4 This 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:

[0119] Step 401: The first node divides the target scene into multiple segments.

[0120] 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 a plurality of segments.

[0121] 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.

[0122] For example, assuming that 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 fragment, and the combination of A1, A2, and A3 can be used as an action fragment.

[0123] For another example, assuming that 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 the event E1 or E2 can be used as an event fragment alone, and the combination of A1, A2, and A3 can be used as an action fragment.

[0124] For another example, assuming that the event is E, the condition is C1 or C2, and the actions are A1, A2, and A3, where the devices that execute 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.

[0125] For another example, assuming that the event is E, the conditions are C1 and C2, and the actions are A1, A2, and A3, where the devices that perform 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.

[0126] For another example, assuming that the event is E, and the actions include A1, A2, and A3, where the actions A1, A2, and A3 are dependent on each other such as sequential execution, loop execution, conditional branching, or input-output, then the event E can be used as an event fragment, and the combination of A1, A2, and A3 can be used as an action fragment.

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

[0128] 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.

[0129] Therein, the number of target nodes may be one or more, and the target node may be a first node and / or a second node, thereby multiple fragments of a scene may be dispersed into the first node and / or the second node.

[0130] 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.

[0131] In some optional embodiments, the target node may 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 may be found, wherein the shared nodes are used to characterize the nodes of the devices corresponding to the multiple segments of the target scene that can be controlled. It is understandable that the shared nodes may also be referred to as common nodes.

[0132] For example, Figure 2 Take the network topology shown as an example. Figure 5 The schematic diagram of an embodiment of a shared node is shown as an example. Assuming 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 3. Since both device 2 and device 3 are controlled by gateway 1, the shared node corresponding to the event segment and the action segment can be gateway 1, that is, gateway 1 can be the shared node of the scene.

[0133] In some optional embodiments, Figure 5 Taking the embodiment shown 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 for event segments and action segments, that is, the host can also be a shared node for the scene.

[0134] In some optional embodiments, Figure 5 Taking the illustrated embodiment as an example, the extension can also control device 2 and device 3 by 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.

[0135] For example, Figure 2 Take the network topology shown as an example. Figure 6A schematic diagram of another embodiment of a shared node is shown as an example. 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 event segments and action segments, 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 event segments and action segments can be the host or extension, that is, the shared node for the scene can be the host or extension.

[0136] 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 a plurality of nodes.

[0137] For example, Figure 6 Taking the embodiment shown as an example, Figure 7 The schematic diagram of another embodiment of a shared node is shown as an example. Although gateway 1 or gateway 2 cannot be used as a shared node for event segments and action segments, by forming gateway 1 and gateway 2 into a shared node group, the control of device 2 and device 4 can be achieved through the shared node group, that is, the shared node group can also be the shared node of the scene. For example, shared node group = {gateway 1, gateway 2}.

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

[0139] Among them, the determination principle of 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 specifically limit this.

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

[0141] The service capabilities required by the fragment may include but are not limited to the delay, loop execution, timing and other capabilities of the fragment. It is understandable that some nodes have strong capabilities and support the service capabilities required by the fragment, and nodes that support the required service capabilities can be preferentially selected as target nodes; however, some nodes have weak capabilities and may not support the service capabilities required by the fragment, and nodes that do not support the required service capabilities may not be selected as target nodes.

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

[0143] One or more scenes may have been deployed in a node, and each scene has a corresponding execution time. Due to the limited concurrency capability of the node, for example, when one scene is being executed, the execution requests of other scenes with the same execution time may be rejected, which will affect the execution effect of the scene 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 nodes. For example, the number of scenes in the target node that have the same execution time as the target scene is less than the second concurrency threshold, and the second concurrency threshold can be the concurrency upper limit of the target node.

[0144] Method three: prioritize deploying all fragments containing key ECAs in the target scenario in the same target node.

[0145] It is understandable that if multiple fragments containing key ECAs are deployed in multiple nodes, some key ECAs may be executed successfully while others fail to execute, which may cause the entire scenario to fail and affect the user experience. In order to ensure that all key ECAs are executed successfully, that is, to ensure the integrity and atomicity of the scenario, all fragments containing key ECAs in the target scenario can be deployed in the same target node first.

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

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

[0148] 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 scene in the node to be selected is low, for example, the load value corresponding to the effective time of the target scene is less than the load threshold, the node with the load value less than the load threshold can be preferentially used as the target node; if the load value corresponding to the effective time of the target scene in the node to be selected is high, for example, the load value corresponding to the effective time of the target scene is greater than or equal to the load threshold, the node with the load value greater than or equal to the load threshold may not be used as the target node.

[0149] For example, if the target scene is a scene when waking 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.

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

[0151] As mentioned above, the closer the target node is to the device controlled by the target scene, the shorter the delay, the higher the execution efficiency, and the better the user experience. Therefore, the target node closer to the device controlled by the target scene can be preferentially selected from the shared nodes. The specific calculation method of the distance between the target node and the device can refer to the relevant description in the above embodiment, which will not be repeated here.

[0152] Exemplarily, the smart home network topology and its spatial location information can be stored in the first node in advance. When deploying the target scene, the distances of the device controlled by the target scene from the first node and the second node can be calculated, so that the target scene can be deployed at a node closer to the device controlled by the target scene. For example, if the gateway is closer to the device controlled by the target scene, the target scene can be deployed at the gateway, or if the extension is closer to the device controlled by the target scene, the target scene can be deployed at the extension.

[0153] Next, Figure 2 The network topology shown is taken as an example to illustrate the determination of the target node.

[0154] For example, refer to Figure 8 , Assume that a scene includes an event segment and an action segment, wherein 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 controlled by gateway 1, the shared nodes corresponding to the event segment and the action segment can be gateway 1, host or extension, that is, the shared nodes of the scene can be gateway 1, host or extension.

[0155] Assume that gateway 1 meets the principles of the above-mentioned methods 1 to 5. 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 service capabilities such as delay and loop, and no other scenarios are deployed in gateway 1. The load corresponding to the effective time 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.

[0156] For example, refer to Fig. 9 , assuming 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.

[0157] 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 to the present 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 the extension is used as the target node. In the present embodiment, assuming that the host satisfies the principles of the above-mentioned methods one to 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.

[0158] For example, refer to Fig.10 , assume that a scene includes an event segment and an action segment, wherein the event segment includes event E, event E is opening device 2, and the action segment includes action A1 and action A2, action A1 is opening device 3, and action A2 is opening device 4.

[0159] 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 nodes corresponding to the event fragment and the action fragment can be the host or the extension, or the shared nodes corresponding to the event fragment and the action fragment can be a shared node group composed of gateway 1 and the host, or the shared nodes corresponding to the event fragment and the action fragment can be a shared node group composed of gateway 1 and the extension.

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

[0161] Assuming that a shared node group consisting of gateway 1 and the 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,

[0162] 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.

[0163] For example, refer to Fig.11 , assume that a scene includes an event segment and an action segment, wherein the event segment includes event E, event E is opening device 2, and the action segment includes action A, action A is opening device 4.

[0164] 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 fragment and the action fragment 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 the above-mentioned methods 1 to 5, the shared node group can be used as the target node, so that the event fragment can be deployed on gateway 1, and the action fragment can be deployed on gateway 2.

[0165] 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.

[0166] Step 403: The first node deploys the multiple fragments in the target node.

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

[0168] The deployment method of multiple fragments of the target scene can be specifically referred to Figure 8-Figure 11 The relevant description in the illustrated embodiment will not be repeated here.

[0169] The above Figure 4-Figure 11 The segmentation deployment of the scene is illustrated in the following. Fig.12 and Fig.13 The execution of the scenario is illustrated by way of example.

[0170] Fig.12 A flow chart of another embodiment of the scene deployment method provided in this application, Fig.12 In the embodiment shown, a scene may include an event and an action. Since the fragments corresponding to the event and the fragments corresponding to the action of a scene may be deployed in different nodes, when an event occurs, the node where the fragment corresponding to the event is located (for the convenience of explanation, hereinafter referred to as the event node) may 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 (for the convenience of explanation, hereinafter referred to as the action node) may execute the corresponding action. Specifically, the following steps are included:

[0171] Step 1201, the event node monitors events.

[0172] 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 embodiments of the present application.

[0173] 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 a target scene.

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

[0175] One or more event segments can be deployed in an event node, and one event segment can include one or more events. The event node can monitor the occurrence of events. The definition of events can be specifically referred to the relevant description in the above embodiment, which will not be repeated here.

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

[0177] 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 embodiments of the present application.

[0178] 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.

[0179] It is understandable that a subscription relationship can be pre-established between the event node and the action node, so that the event node can send the first information to the subscribed action node after detecting the event. The first information is used to indicate that the detected event has satisfied the rules corresponding to the event segment of the target scene.

[0180] Exemplarily, taking the example of action node 1 and action node 2 subscribing to event node 1 and event node 2, when event node 1 detects an event, the first information can be sent to action node 1 and action node 2. Alternatively, when event node 2 detects an event, the first information can be sent to action node 1 and action node 2.

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

[0182] 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.

[0183] Fig.13 A flow chart of another embodiment of the scene deployment method provided in this application, Fig.13In the illustrated embodiment, a scene may include an event, a condition, and an action. Since the fragments corresponding to the event, the fragments corresponding to the condition, and the fragments corresponding to the action 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 requirement, the action node may be instructed to perform the corresponding action. Specifically, the following steps are included:

[0184] Step 1301, the event node monitors events.

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

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

[0187] 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 embodiments of the present application.

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

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

[0190] Exemplarily, 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.

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

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

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

[0194] Specifically, when the condition node determines that the condition meets the requirement, the second information may be sent 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 scene.

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

[0196] Exemplarily, taking the example of action node 1 and action node 2 subscribing to the condition node, 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, the second information may not be sent to action node 1 and action node 2.

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

[0198] 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.

[0199] 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,

[0200] If the judgment basis for the action node to execute the action is that any one of all the 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 the subscribed condition nodes.

[0201] 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 to receive 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, the corresponding action cannot be executed. Or,

[0202] 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.

[0203] Fig.14 This is a schematic diagram of the structure of an embodiment of a deployment device for a smart home scenario of the present application, such as Fig.14As shown, the above-mentioned smart home scene deployment device 1400 is applied to the first node, and the smart home scene deployment device 1400 may include: an acquisition module 1410 and a deployment module 1420; wherein,

[0204] The acquisition module 1410 is used to acquire the architecture information of the target scene and the smart home network;

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

[0206] 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.

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

[0208] 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.

[0209] 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.

[0210] 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 used 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;

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

[0212] 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, the action segment of the target scene is deployed in the action node, and the deployment device 1400 of the smart home scene also includes:

[0213] An execution module 1430 is used for the event node to monitor events;

[0214] 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;

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

[0216] In one possible implementation, the target node includes an event node, a condition node and an action node, the event node is used to deploy the event fragment of the target scene, the condition node is used to deploy the condition fragment of the target scene, the action node is used to deploy the action fragment of the target scene, and the execution module 1430 is also used for the event node to monitor events;

[0217] 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;

[0218] 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.

[0219] 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.

[0220] In one possible implementation, the deployment module 1420 is further used to obtain the scene information deployed in the first node;

[0221] 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.

[0222] Fig.14 The deployment device 1400 for the smart home scene provided in the illustrated embodiment can be used to execute the technical solution of the method embodiment shown in the present application. Its implementation principle and technical effects can be further referred to the relevant description in the method embodiment.

[0223] It should be understood that the above Fig.14The division of the various modules of the deployment device 1400 of the smart home scene shown is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling 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. In the implementation process, each step of the above method or each of the above modules can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0224] 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 (ASIC), or one or more microprocessors (DSP), or one or more field programmable gate arrays (FPGA). For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0225] Fig.15 A schematic structural diagram of an electronic device 1500 is shown as an example.

[0226] The electronic device 1500 may include: at least one processor; and at least one memory communicatively connected to the processor, wherein the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method provided in the embodiment shown in this document.

[0227] Fig.15 A block diagram of an exemplary electronic device 1500 suitable for implementing embodiments herein is shown. Fig.15 The electronic device 1500 shown is merely an example and should not limit the functionality and scope of use of the embodiments of this document.

[0228] like Fig.15As shown, the 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 .

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

[0230] 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.

[0231] The memory 1520 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The device may further include other removable / non-removable, volatile / non-volatile computer system storage media. Fig.15 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disc read only memory (CD-ROM), a digital versatile 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 configured to perform the functions of the embodiments herein.

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

[0233] The electronic device 1500 may also communicate with one or more external devices (e.g., 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., network card, modem, etc.). Such communication may be performed via the communication interface 1530. Furthermore, the electronic device 1500 may also communicate with the network adapter ( Fig.15 The network adapter can communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through the communication bus 1540. It should be understood that although Fig.15 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 1500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk arrays (Redundant Arrays of Independent Drives; hereinafter referred to as: RAID) systems, tape drives, and data backup storage systems.

[0234] 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.

[0235] It is understandable that the interface connection relationship between the modules illustrated in the embodiments 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.

[0236] 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 (Image Signal Processing; hereinafter referred to as: ISP). The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASIC, or one or more integrated circuits for controlling the execution of the program of the technical solution of the present 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.

[0237] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. 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.

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

[0239] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" 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 be represented by: 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.

[0240] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in 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. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0241] Those skilled in the art can 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.

[0242] In several embodiments provided in the present 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 the present 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, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present 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), disk or optical disk, and other media that can store program codes.

[0243] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope 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 target scene and smart home network architecture information, and determine the target node; Deploy the target scenario on the target node based on the architecture information of the smart home network; The target node includes the first node and 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; 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; deploying the plurality of segments on a target node based on the architecture information of the smart home network; 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.

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 claim 1, 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.

5. The method according to claim 1 or 4, 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.

6. The method according to any one of claims 1 to 4, 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.

7. The method according to claim 5, 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.

8. 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, and determine the target node; 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 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; 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; deploying the plurality of segments on a target node based on the architecture information of the smart home network; 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.

9. The system according to claim 8, 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.

10. The system according to claim 8 or 9, characterized in that The multiple segments are deployed on a target node based on historical load information of the first node and architecture information of the smart home network.

11. The system according to claim 8, 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.

12. 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 7.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program runs on a computer, the deployment method of the smart home scene as described in any one of claims 1-7 is implemented.

Citation Information

Patent Citations

  • Method, device and system for controlling smart home system, and storage medium

    CN115524985A

  • Scene rule issuing method and device for distributed scene linkage and electronic equipment

    CN116339157A