Internet of Things system and control method thereof
By using gateway device dynamic agents to execute distributed chain control processes in the Internet of Things system, the problem of low efficiency of chain control logic configuration in the Internet of Things system is solved, timely execution of automated control scenarios is achieved, and control stability is maintained in the event of equipment failure.
Patent Information
- Application Number
- CN202510288238.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-07-01
AI Technical Summary
In the Internet of Things system, how to improve the configuration efficiency of chain control logic, ensure the timely execution of automated control scenarios, and maintain the stability of automated control when gateway equipment or functional equipment fails.
The distributed chain control process is performed through the dynamic proxy of the gateway device, the chain control logic is deployed by the gateway device under control, and the target control logic is gradually deployed to the functional device, realizing the distributed deployment of the chain control logic.
It improves configuration efficiency, realizes the timely execution of automated control scenarios, and ensures that the automated control scenarios can be executed normally or partially when the gateway equipment or functional equipment fails, ensuring the automated execution experience.
Smart Images

Figure CN120238552A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of the Internet of Things, and more specifically, to an Internet of Things system and a control method thereof. Background Art
[0002] In an Internet of Things system, in order to achieve automatic control of each functional device, a chain control logic is usually adopted, that is, after a certain functional device is started and it is detected that corresponding conditions are met, another functional device is automatically controlled to start. For example, after a temperature sensor is started and it is detected that the temperature is higher than a certain value, the air conditioner is automatically controlled to turn on, etc., so as to improve the user's automatic control experience. In the Internet of Things system, how to ensure the effective execution of automatic control of the Internet of Things system and improve the configuration efficiency of the chain control logic is crucial. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide an Internet of Things system and a control method thereof, which can use a gateway device to dynamically proxy and execute a distributed chain control process. Without waiting for the configured chain control logic to be deployed to each functional device, the automatic control scenario in the system can be realized through the gateway device, improving the configuration efficiency. At the same time, a dynamic deployment scheme is used to distribute the control logic to each functional device. After the deployment is completed, the corresponding automatic control scenario can be realized without the gateway device. This also enables the corresponding automatic control scenario to still be normally executed or partially executed when the gateway device fails or some functional devices fail in some scenarios, ensuring the automatic execution experience.
[0004] In a first aspect, an embodiment of the present invention provides a control method for an Internet of Things system. The Internet of Things system includes a plurality of functional devices and at least one gateway device. The method includes:
[0005] The gateway device is controlled to deploy a chain control logic to control corresponding functional devices to perform corresponding target actions according to the chain control logic based on the received status information of each functional device. The chain control logic is used to represent the chain control relationship between the functional devices;
[0006] Each functional device is controlled to gradually deploy a corresponding target control logic, and the target control logic is a part of the logic in the chain control logic;
[0007] After the target control logic corresponding to each functional device is deployed, each functional device performs corresponding target actions based on the deployed target control logic and its own status information.
[0008] Second aspect, an embodiment of the present invention provides an Internet of Things system. The Internet of Things system includes multiple functional devices and at least one gateway device. The gateway device is pre-configured with the chain control logic corresponding to the multiple functional devices, so that the gateway device controls the corresponding functional device to perform corresponding target actions according to the chain control logic based on the received status information of each functional device. Each functional device is configured to be controlled to gradually deploy the corresponding target control logic, and the target control logic is part of the logic in the chain control logic;
[0009] Wherein, after the target control logic corresponding to each functional device is deployed, each functional device is configured to perform corresponding target actions based on the deployed target control logic and its own status information.
[0010] The Internet of Things system according to the embodiment of the present invention includes multiple functional devices and at least one gateway device. Among them, the gateway device is controlled to deploy the chain control logic to control the corresponding functional device to perform corresponding target actions according to the chain control logic based on the received status information of each functional device. Each functional device is controlled to gradually deploy the corresponding target control logic and, after deployment, perform corresponding target actions based on the deployed target control logic and its own status information. The chain control logic represents the chain control relationship between functional devices, and the target control logic is part of the logic in the chain control logic. Thus, the embodiment of the present invention can use the gateway device to dynamically proxy the execution of the distributed chain control process, and can implement the automated control scenario in the system through the gateway device without waiting for the configured chain control logic to be deployed to each functional device, improving the configuration efficiency. At the same time, the dynamic deployment scheme is used to distribute the control logic to each functional device. After deployment, the corresponding automated control scenario can be implemented without the gateway device, which also enables the corresponding automated control scenario to still be normally executed or partially executed when the gateway device fails or some functional devices fail in some scenarios, ensuring the automated execution experience. Description of the Drawings
[0011] Through the following description of the embodiments of the present invention with reference to the drawings, the above and other objects, features, and advantages of the present invention will become clearer. In the drawings:
[0012] Figure 1 is a schematic diagram of the Internet of Things system according to the embodiment of the present invention;
[0013] Figure 2 is a flowchart of the control method of the Internet of Things system according to the embodiment of the present invention;
[0014] Figure 3 is a flowchart of the gateway device executing the automated control scenario in a centralized manner according to the embodiment of the present invention;
[0015] Figure 4 It is a schematic diagram of a control process of the Internet of Things system according to an embodiment of the present invention;
[0016] Figure 5 It is a flowchart of the gateway device and the functional device in cooperation to execute an automatic control scenario according to an embodiment of the present invention;
[0017] Figure 6 It is another schematic diagram of a control process of the Internet of Things system according to an embodiment of the present invention;
[0018] Figure 7 It is yet another schematic diagram of a control process of the Internet of Things system according to an embodiment of the present invention;
[0019] Figure 8 It is a flowchart of each functional device distributedly executing an automatic control scenario according to an embodiment of the present invention;
[0020] Figure 9 It is yet another schematic diagram of a control process of the Internet of Things system according to an embodiment of the present invention. Detailed implementation manners
[0021] The following describes the present application based on embodiments, but the present application is not limited to these embodiments. In the following detailed description of the present application, some specific details are described in detail. Those skilled in the art can fully understand the present application without the description of these detail parts. In order to avoid obscuring the essence of the present application, well-known methods, processes, flows, elements and circuits are not described in detail.
[0022] In addition, those of ordinary skill in the art should understand that the attached drawings provided herein are for illustrative purposes only, and the drawings are not necessarily drawn to scale.
[0023] Unless the context clearly requires otherwise, words such as "including", "comprising" and the like in the entire application document should be construed in an inclusive sense rather than an exclusive or exhaustive sense; that is, it is the meaning of "including but not limited to".
[0024] In the description of the present application, it should be understood that terms such as "first", "second", etc. are only used for descriptive purposes and cannot be construed as indicating or implying relative importance. In addition, in the description of the present application, unless otherwise specified, the meaning of "a plurality" is two or more.
[0025] For the solutions described in this specification and the embodiments, if they involve the processing of personal information, they will be processed on the premise of having a legal basis (such as obtaining the consent of the personal information subject, or being necessary for performing a contract, etc.), and will only be processed within the specified or agreed scope. If the user refuses to process personal information other than the necessary information required for the basic functions, it will not affect the user's use of the basic functions.
[0026] In the Internet of Things (IoT) system, in order to achieve the automatic control of each functional device, a chain control logic is usually adopted. That is, after a certain functional device is started and it is detected that the corresponding conditions are met, another functional device is automatically controlled to start. For example, after the temperature sensor is started and it is detected that the temperature is higher than a certain value, the air conditioner is automatically controlled to turn on, etc., so as to improve the user's automatic control experience. In a related comparative IoT system, the chain control logic needs to be centrally deployed in the cloud or a local gateway device. This makes it impossible to normally execute the automatic control scenario deployed in the cloud or the local gateway device when the network between the local and the cloud is disconnected or the local gateway device fails. In another comparative example, in order to avoid the problems caused by centrally deploying the chain control logic in the cloud or the local gateway device, a distributed scenario linkage scheme is adopted, that is, the chain control logic is respectively configured on the corresponding functional devices, and then the linkage is realized through the corresponding interaction between the functional devices, so as to realize the execution of the automatic control scenario. However, when there are many functional devices involved in the chain control logic, the user needs to wait for a long time to complete the distribution of the configuration data (i.e., the corresponding control logic) of each functional device. During this period, the execution of the automatic control scenario cannot be performed, that is, the automatic control scenario configured by the user cannot be executed immediately after creation and requires a long time to wait for the configuration to be completed. Therefore, the embodiments of the present invention provide an IoT system and its control method, which can use a gateway device to dynamically proxy and execute the distributed chain control process, and can realize the automatic control scenario in the system through the gateway device without waiting for the configured chain control logic to be deployed to each functional device, improving the configuration efficiency. At the same time, the control logic is distributedly deployed to each functional device using a dynamic deployment scheme, and the corresponding automatic control scenario can be realized without the gateway device after the deployment is completed. This also makes the corresponding automatic control scenario still able to be normally executed or partially executed when the gateway device fails or some of the functional devices fail in some scenarios, ensuring the automatic execution experience.
[0027] Figure 1 It is a schematic diagram of the IoT system according to the embodiment of the present invention. Figure 2 It is a flowchart of the control method of the IoT system according to the embodiment of the present invention. As Figure 1 shown, the IoT system according to the embodiment of the present invention includes at least one gateway device 10 and N functional devices 11-1N, where N is greater than 1. It should be understood that the number of functional devices in the IoT system is not limited in this embodiment. In this IoT system, the N functional devices can be connected to the same gateway device 10. If there are multiple gateway devices 10, the functional devices can be connected to the corresponding one or more gateway devices 10 based on the actual situation (such as location, communication type, etc.). The communication connection method of each functional device in the IoT system is not limited in this embodiment and will not be elaborated one by one here.
[0028] In an embodiment of the present invention, by deploying a chain control logic for a gateway device in an Internet of Things system and gradually deploying corresponding target control logics for each functional device, the deployment of the chain control logic and the execution of corresponding automated control scenarios are realized. Among them, each automated control scenario has a corresponding chain control logic. Specifically, as Figure 2 shown, the control method of the Internet of Things system according to the embodiment of the present invention includes the following steps:
[0029] Step S110, the gateway device is controlled to deploy a chain control logic to control a corresponding functional device to perform a corresponding target action according to the chain control logic based on the status information of each functional device received. Among them, the chain control logic is used to represent the chain control relationship between the functional devices. Among them, if a certain functional device needs to perform a corresponding target action after another functional device meets a corresponding condition or performs a corresponding action, there is a chain control relationship between these two functional devices.
[0030] In an alternative implementation, the chain control logic of this embodiment can be implemented using the TCA (Trigger Condition Action) rule. Among them, Trigger represents a trigger event, Condition represents a condition, and Action represents an action. Further, in this embodiment, the functional devices can trigger the functional devices to perform corresponding actions by transmitting corresponding scenario codes. Among them, the scenario code is also the event code broadcast between the functional devices. The functional device performs the target action of the corresponding scenario after receiving the corresponding scenario code or performs the target action of the corresponding scenario after receiving the corresponding scenario code and meeting the corresponding conditions. Optionally, Trigger can be that the functional device has performed a corresponding function operation or received a corresponding scenario code, and Action can be sending a corresponding scenario code or the functional device performing a corresponding function operation. It should be understood that in the TCA corresponding to the functional device, the Condition therein may or may not exist, and whether to configure the corresponding condition can be determined according to the actual application scenario. For example, in the scenario of automatically turning on the air conditioner, if the air conditioner turn-on condition is not set, the chain control logic can be set as: after the door magnetic functional device is opened, turn on the air conditioner. If the control turn-on condition is set, the chain control logic can be set as: after the door magnetic functional device is opened, detect the temperature of the temperature sensor, and turn on the air conditioner when the temperature reaches the temperature threshold (condition).
[0031] Furthermore, the chain control logic of this embodiment is not limited to being implemented using the TCA rule. Any command setting format that can represent the chain control relationship of functional devices in the corresponding automated control scenario can be applied in this embodiment, as long as it can enable the functional devices involved in the corresponding automated control scenario to be controlled in a chained manner. This embodiment will not illustrate the format implementation methods of the chain control logic one by one here.
[0032] In this embodiment, after the user determines the configuration information of each functional device in the Internet of Things system in each automated control scenario, the corresponding chain control logic is formed and configured into the gateway device, so that the gateway device can control and implement the corresponding automated control scenario based on this chain control logic.
[0033] Figure 3 It is a flowchart of the centralized execution of the automated control scenario by the gateway device according to the embodiment of the present invention. As Figure 3 shown, the execution process of the automated control scenario of this embodiment includes the following steps:
[0034] Step S111, the gateway device receives the status information of each functional device. Among them, the status information of the functional device is a combination of one or more of the following: switch state, corresponding scenario code reception state, and detection result of the functional device. It should be understood that the status information of the functional device is not limited to the above information, and it can be configured according to the type of the functional device and the required information. The switch state of the functional device is used to indicate whether the functional device is in an open working state. For example, whether the air conditioner is in a cooling or heating working state. The scenario code reception state of the functional device is used to indicate whether the functional device has the scenario code generated by its corresponding previous functional device in the chain logic control relationship. Taking the scenario of automatically turning on the air conditioner as an example, the corresponding functional devices in this scenario include a door magnetic sensor, a temperature sensor, and an air conditioner. Among them, when the gateway device receives the status information of the door magnetic sensor indicating that the door magnetic is open (Trigger corresponding to the door magnetic sensor), it generates a scenario code c1 (Action corresponding to the door magnetic sensor). Then, when the gateway device determines that the scenario code 1 (Trigger corresponding to the temperature sensor) is generated, it determines that the current temperature is greater than the temperature threshold (Condition corresponding to the temperature sensor) based on the detection result reported by the temperature sensor, and generates a scenario code c2 (Action corresponding to the temperature sensor). Then, when the gateway device determines that the scenario code 2 (Trigger corresponding to the air conditioner) is generated, the gateway device controls the air conditioner to turn on (Action corresponding to the air conditioner). The detection result of the functional device is also the data generated during the working process of the functional device, such as the detection result of the door magnetic sensor detecting that the door magnetic is open, the detection result of the current temperature detected by the temperature sensor, etc.
[0035] In an alternative implementation, a control logic engine may be provided in the gateway device to parse the corresponding chain control logic and perform corresponding control operations based on the received status information. That is to say, a dedicated control logic engine may be provided in the gateway device to implement various automated control scenarios, such as the above-mentioned scenario of automatically turning on the air conditioner. Further optionally, the control logic engine may execute the control logic of each functional device in the corresponding automated control scenario through different processing modules or processing threads. Further, in the chain control logic, the processing module or processing thread corresponding to the function module in the front position generates a scenario code for the next function module and sends it to the processing module or processing thread of the next function module to trigger the execution of the control logic of the next function module. It should be understood that in this embodiment, a control logic engine may not be provided separately, and the control logic engine may also execute the corresponding automated control scenario in the same processing module or processing thread. This embodiment does not limit the manner of parsing and executing the corresponding chain control logic in the gateway device, as long as it can achieve parsing and control execution.
[0036] Step S112, the gateway device generates a scenario code corresponding to the target functional device in response to the status information of the current functional device in the corresponding chain control relationship satisfying the corresponding condition. Wherein, the current functional device is the first functional device or the intermediate functional device in the chain control relationship, and the target functional device is the next functional device of the current functional device in the chain control relationship. The scenario code is used to trigger the function execution of the target functional device.
[0037] Among them, if the current functional device is the first functional device in a certain automated control scenario (i.e., the first functional device in the chain control logic), when the gateway device detects that the status information of the first functional device satisfies the corresponding condition, it starts the corresponding automated control scenario and generates a scenario code for the target functional device. Among them, the status information of the first functional device satisfying the corresponding condition may be that the first functional device is started or the detection result detected by the first functional device satisfies the start condition of the corresponding automated control scenario. It should be understood that the corresponding conditions that the status information of each functional device needs to satisfy are determined based on the type of the functional device and the user's settings, and this embodiment does not limit this. For example, in the above-mentioned scenario of automatically turning on the air conditioner, the first functional device is a door magnetic sensor, and the status information of the door magnetic sensor satisfying the corresponding condition means that the door magnetic sensor detects that the door magnetic is opened.
[0038] Further, if the current functional device is an intermediate functional device in an automated control scenario, the status information of the intermediate functional device includes the scenario code reception status. The status information of the intermediate functional device meeting the corresponding conditions means that the intermediate functional device has the corresponding scenario code. That is to say, when the gateway device detects the scenario code corresponding to the intermediate functional device, it generates the scenario code corresponding to the target functional device. In other alternative implementation manners, if the intermediate functional device needs to meet other conditions to trigger the target functional device, after the intermediate functional device has the corresponding scenario code and meets other conditions, the scenario code corresponding to the target functional device is generated. Optionally, the status information of the intermediate functional device includes the scenario code reception status and the detection result of the functional device. For example, in the above-mentioned scenario of automatically turning on the air conditioner, the intermediate functional device is a temperature sensor. The status information of the temperature sensor meeting the corresponding conditions means that the temperature sensor has the corresponding scenario code from the previous functional device (i.e., the door magnetic sensor) and the detected temperature meets the preset temperature requirement (such as being greater than the first temperature threshold or less than the second temperature threshold, etc.). It should be understood that this embodiment does not limit the type of the status information of each functional device and the conditions it meets, and it can be dynamically configured according to the actual application situation.
[0039] Further optionally, when the gateway device detects that the status information of the current functional device meets the corresponding conditions, if the current functional device also needs to perform other target actions, the gateway device can also control the current functional device to perform the corresponding target actions.
[0040] Step S113, the gateway device responds to the status information of the target functional device meeting the corresponding conditions and performs the target action. Among them, the target action includes generating the scenario code of the next functional device in the chain control relationship for the target functional device and / or controlling the target functional device to start and execute.
[0041] In an alternative implementation, the target functional device can be an intermediate functional device or the last functional device in the current automated control scenario.
[0042] When the target functional device is an intermediate functional device in the current automated control scenario, its execution process is similar to that when the current functional device is an intermediate functional device. That is, the status information of the intermediate functional device includes the scenario code reception status, or includes the scenario code reception status or other information (such as the detection result of the intermediate functional device or the detection result of other functional devices, etc.). After the status information of the intermediate functional device meets the required conditions, the scenario code of its next functional device is generated. Further, when the gateway device detects that the status information of the intermediate functional device meets the corresponding conditions, if the intermediate functional device also needs to perform other target actions, the gateway device can also control the intermediate functional device to perform the corresponding target actions.
[0043] When the target functional device is the last functional device in the current automation control scenario, the status information of the last functional device meeting the corresponding conditions can be that the last functional device has the corresponding scenario code. It should be understood that the corresponding conditions that the status information of each functional device needs to meet are determined based on the type of the functional device and the user's settings, and this embodiment does not limit this. In this embodiment, when it is detected that the status information of the last functional device meets the corresponding conditions, the last functional device is controlled to perform the corresponding target action. For example, in the above-mentioned scenario where the air conditioner is automatically turned on, the last functional device is the air conditioner, and the status information of the air conditioner meeting the corresponding conditions means that the air conditioner has the corresponding scenario code from the previous functional device (i.e., the temperature sensor). When it is detected that the air conditioner has the corresponding scenario code, the air conditioner is controlled to turn on based on the corresponding mode. It should be understood that this embodiment does not limit the type of the status information of each functional device and the conditions it meets, and it can be dynamically configured according to the actual application situation.
[0044] Further optionally, if the execution of the control logics of different functional devices is implemented by different processing modules or processing threads in the gateway device, the processing module or processing thread corresponding to the current functional device in the gateway device generates and sends the scenario code corresponding to the target functional device to the processing module or processing thread corresponding to the target functional device in response to the status information of the current functional device in the corresponding chain control relationship meeting the corresponding conditions.
[0045] Figure 4 It is a schematic diagram of a control process of the Internet of Things system according to an embodiment of the present invention. This embodiment is described by taking the scenario of automatically turning on the air conditioner as an example. It should be understood that the automation control scenario in the Internet of Things system of this embodiment is not limited thereto, and it can be configured according to the type of functional devices in the system and the user's needs, and will not be exemplified one by one here. As Figure 4 shown, in this embodiment, the functional devices in the Internet of Things system include a door magnetic sensor 41, a temperature sensor 42, and an air conditioner 43, and the Internet of Things system also has a gateway device 44.
[0046] Further optionally, a control logic engine is provided in the gateway device 44 for parsing the corresponding chain control logic and performing corresponding control operations based on the received status information. The control logic engine has a corresponding memory 441 for storing the status information of each functional device. It should be understood that the present embodiment does not limit the type of memory for recording the status of each functional device, and it can be implemented based on existing storage types or storage forms that can store status information, and will not be specifically described herein. Further, the control logic engine parses the target control logic TCA of the door magnetic sensor 41, temperature sensor 42, and air conditioner 43 respectively based on the processing modules 442-444, and queries the corresponding status information from the memory 441 to perform corresponding control operations. It should be understood that the present embodiment does not limit how the gateway device 44 parses the corresponding chain control logic and how to process the control operations corresponding to each functional device, as long as the chain control process can be implemented. The form of the present embodiment is only exemplary, and the actual operation implementation process is not limited thereto.
[0047] As Figure 4 shown, the door magnetic sensor 41, temperature sensor 42, and air conditioner 43 respectively report their status information to the gateway device. Among them, the status information of the door magnetic sensor 41 may include the startup status of the door magnetic sensor, the opening and closing status of the door magnetic, etc. The status information of the temperature sensor 42 may include the startup status of the temperature sensor, the detected temperature value, etc. The status information of the air conditioner 43 may include the on / off status of the air conditioner, the current setting information of the air conditioner (such as cooling / heating, set target temperature value, etc.). It should be understood that the present embodiment does not limit the status information uploaded by various functional devices, and it can be configured based on actual application scenarios.
[0048] In the gateway device, the processing module 442 parses the TCA of the door magnetic sensor and obtains that the control logic corresponding to the door magnetic sensor is to generate and send the scenario code c1 to the processing module 443 when the door magnetic is opened. Optionally, the processing module 442 may periodically query the status information of the door magnetic sensor 41 in the memory 441 to determine whether it detects that the door magnetic is opened, and when it detects that the door magnetic is opened, generate and send the scenario code c1 to the processing module 443.
[0049] Further, the processing module 443 parses the temperature sensor TCA to obtain that when the scene code c1 is received and the queried temperature is greater than the temperature threshold, it generates and sends the scene code c2 to the processing module 444. In an alternative implementation, after receiving the scene code c1, the processing module 443 queries the status information of the temperature sensor 42 in the memory 441. If it is determined through the query that the current temperature is greater than the temperature threshold, it generates and sends the scene code c2 to the processing module 444. In another implementation, the processing module 443 can periodically query the status information of the temperature sensor 42 in the memory 441. After determining through the query that the current temperature is greater than the temperature threshold and receiving the scene code c1, it generates and sends the scene code c2 to the processing module 444.
[0050] Further, the processing module 444 parses the air conditioner TCA to obtain that when the scene code c2 is received, it controls the air conditioner 43 to turn on (that is, sends a turn-on instruction to the air conditioner 43). Optionally, after receiving the scene code c2, the processing module 444 sends a turn-on instruction to the air conditioner 43 to control the air conditioner 43 to turn on.
[0051] Thus, after the gateway device configures the chain control logic in the Internet of Things system of this embodiment, the gateway device can implement automated control scenarios such as automatically turning on the air conditioner scenario, which enables the implementation of the automated control scenarios in the system through the gateway device without waiting for the configured chain control logic to be deployed to each functional device, improving the configuration efficiency.
[0052] Step S120, each functional device is gradually controlled to deploy the corresponding target control logic. The target control logic is part of the chain control logic.
[0053] In an alternative implementation, in this embodiment, the gateway device can gradually send the target control logic corresponding to each functional device to each functional device, so that the functional device deploys its corresponding target control logic. Further, the gateway device can perform scenario compilation on the chain control logic to split a scenario including multiple functional devices centrally deployed in the gateway device into multiple distributed scenarios. That is, the gateway device can compile the chain control logic into the target control logic of each functional device in the corresponding scenario through scenario compilation, and send each target control logic to the corresponding functional device for deployment. In another implementation, in this embodiment, other functional devices capable of performing scenario compilation can also execute scenario compilation to obtain the target control logic corresponding to each functional device, and deploy the target control logic in the corresponding functional device. It should be understood that this embodiment does not limit the manner of implementing the deployment of the target control logic.
[0054] Among them, the target control logic deployed for each functional device is the condition satisfied by its corresponding status information and the target action to be executed after the condition is satisfied. Further, the target control logic of the functional device is used to characterize its relationship with the previous functional device and / or the subsequent functional device in the corresponding chain control logic. Further optionally, taking the implementation of the chain control logic using the TCA rule as an example, each functional device has its corresponding TCA rule. Taking the temperature sensor in the above air conditioner automatic opening scenario as an example, the specific TCA of the target control logic of the temperature sensor is: T - receiving the scenario code c1, C - the temperature is greater than the temperature threshold, A - sending the scenario code c2.
[0055] Further optionally, the deployment process of the target control logic of each functional device in this embodiment is executed asynchronously with the working process of the functional device and the gateway device in the IoT system based on the chain control relationship. That is to say, in this embodiment, by asynchronously executing the deployment process of the target control logic and the execution process of the automated control scenario in the IoT system, during the deployment process of the target control logic of the functional device, the execution process of the corresponding automated control scenario can still be realized, improving the user's automated execution experience.
[0056] Further, this embodiment does not limit the deployment order of the functional devices involved in the chain control logic. It can be deployed in the order of the chain control relationship, or can be deployed in a non-sequential or partially parallel manner based on the actual situation, as long as the reliability of the control logic deployment can be ensured.
[0057] Figure 5 It is a flowchart of the gateway device and the functional device in the embodiment of the present invention cooperating to execute the automatic control scenario. Further, during the deployment process of the target control logic corresponding to each functional device, based on the chain control logic deployed in the gateway device, the target control logic deployed by the already deployed functional devices, and the status information of each functional device received by the gateway device, the corresponding functional device is controlled to execute the corresponding target action. That is to say, during the deployment process of the target control logic corresponding to each functional device, since some functional devices are not yet configured, it is necessary for the gateway device and the already deployed functional devices to cooperate to realize the corresponding automated control scenario. Specifically, as Figure 5 shown, the execution process of the automated control scenario in this embodiment includes the following steps:
[0058] Step S141, the gateway device receives the status information of each functional device. Among them, the status information of the functional device is a combination of one or more of the following: switch state, corresponding scenario code reception state, detection result of the functional device. It should be understood that the status information of the functional device is not limited to the above information, and it can be configured according to the type of the functional device and the required information.
[0059] Step S142: The deployed functional device executes a target action according to its deployed target control logic and its own status information. Among them, the target action includes generating a scenario code for the next functional device in the corresponding chain control relationship and / or controlling the start of execution of the functional device itself.
[0060] That is to say, in this embodiment, since the deployed functional device has a target control logic, it can determine its own chain control relationship through parsing and execute the target action when its own status information meets the corresponding conditions. The process of the deployed functional device realizing its own control and receiving and sending scenario code and other information based on the target control logic is similar to the principle of implementing this part of the function in the gateway device, and will not be specifically described here.
[0061] Step S143: The gateway device controls the execution of the target actions required by the undeployed functional devices based on the status information of each functional device received. It should be understood that the process of the gateway device parsing and executing the control logic internally is similar to that in the above embodiment, and will not be specifically described here.
[0062] Furthermore, since this embodiment does not limit the deployment order of each functional device, the above steps S142 and S143 are executed sequentially, in reverse order, or crosswise based on the actual link relationship and the current actual deployment situation of the functional devices to complete the corresponding automated control scenario.
[0063] For example, if an automated control scenario is designed for functional devices f1 - f3, and the chain control relationship is functional device f1 - functional device f2 - functional device f3. Assume that functional device f1 has been deployed, and functional devices f2 and f3 have not been deployed. Then, when executing this automated control scenario, functional device f1 detects its own status information to determine whether the automated control scenario is started. If it is started, it generates and sends the scenario code corresponding to functional device f2 to the gateway device, so that after the gateway device receives the scenario code and detects other required conditions for functional device f2, it generates the scenario code corresponding to functional device f3 and controls functional device f3 to execute the corresponding target action.
[0064] Figure 6 It is another schematic diagram of the control process of the Internet of Things system according to the embodiment of the present invention. This embodiment is described by taking the scenario of automatically turning on the air conditioner as an example. It should be understood that the automated control scenarios in the Internet of Things system in this embodiment are not limited to this, and can be configured according to the types of functional devices in the system and user requirements, and will not be listed one by one here. Such as Figure 6As shown in the figure, in this embodiment, the functional devices in the Internet of Things system include a door magnetic sensor 61, a temperature sensor 62, and an air conditioner 63. The Internet of Things system also has a gateway device 64. Among them, the door magnetic sensor 61 is used as a trigger functional device to start the automatic opening scenario of the air conditioner to complete the deployment of the target control logic. The temperature sensor 62 for condition detection and the air conditioner 63 for operation execution have not completed the deployment of the target control logic.
[0065] As Figure 6 shown, the door magnetic sensor 61, the temperature sensor 62, and the air conditioner 63 respectively report their respective status information to the gateway device 64. Among them, the status information of the door magnetic sensor 61 may include the startup situation of the door magnetic sensor, the opening and closing situation of the door magnetic, etc. The status information of the temperature sensor 62 may include the startup situation of the temperature sensor, the detected temperature value, etc. The status information of the air conditioner 63 may include the on / off state of the air conditioner, the current setting information of the air conditioner (such as cooling / heating, set target temperature value, etc.). It should be understood that this embodiment does not limit the status information uploaded by various functional devices, and it can be configured based on the actual application situation. Further, it should be understood that the status information of the door magnetic sensor 61 may not be reported to the gateway device 64.
[0066] Further optionally, a corresponding target control logic (i.e., the door magnetic sensor TCA) is deployed inside the door magnetic sensor 61. A control logic engine is set in the gateway device 64 to parse the corresponding chain control logic and perform corresponding control operations based on the received status information. The control logic engine has a corresponding memory 641 for storing the status information of each functional device. It should be understood that this embodiment does not limit the type of the memory for recording the status of each functional device, and it can be implemented based on the existing storage types or storage forms that can store status information, and this embodiment will not be specifically described here. Further, the control logic engine parses the target control logic TCA of the temperature sensor 62 and the air conditioner 63 respectively based on the processing modules 642 - 643, and queries the corresponding status information from the memory 641 to perform corresponding control operations. It should be understood that this embodiment does not limit how the gateway device 64 parses the corresponding chain control logic and how to process the control operations corresponding to each functional device, as long as it can implement the chain control process. The form of this embodiment is only exemplary, and the actual operation implementation process is not limited thereto.
[0067] Further, the door magnetic sensor 61 parses the target control logic and obtains that the target control logic corresponding to the door magnetic sensor 61 is to generate and send a scenario code c1 to the processing module 642 when the door magnetic is opened. Further optionally, in response to the detection result of the door magnetic sensor 61 being that the door magnetic is opened, the door magnetic sensor 61 generates and sends a scenario code c1 to the processing module 642.
[0068] Further, the processing module 642 parses the temperature sensor TCA and obtains that when the scene code c1 is received and the queried temperature is greater than the temperature threshold, the scene code c2 is generated and sent to the processing module 643. In an alternative implementation, after receiving the scene code c1, the processing module 642 queries the status information of the temperature sensor 62 in the memory 641. If it is determined through the query that the current temperature is greater than the temperature threshold, the scene code c2 is generated and sent to the processing module 643. In another implementation, the processing module 642 can periodically query the status information of the temperature sensor 62 in the memory 641. After it is determined through the query that the current temperature is greater than the temperature threshold and the scene code c1 is received, the scene code c2 is generated and sent to the processing module 643.
[0069] Further, the processing module 643 parses the air conditioner TCA and obtains that when the scene code c2 is received, the air conditioner 63 is controlled to be turned on (that is, an on instruction is sent to the air conditioner 63). Optionally, after receiving the scene code c2, the processing module 643 sends an on instruction to the air conditioner 63 to control the air conditioner 63 to be turned on.
[0070] Figure 7 It is another schematic diagram of the control process of the Internet of Things system according to the embodiment of the present invention. Still taking the scenario of automatically turning on the air conditioner as an example for description, in this embodiment, the door magnetic sensor 61 as the trigger function device for starting the scenario of automatically turning on the air conditioner and the temperature sensor 62 as the function device for detecting the judgment condition have both completed the deployment of the corresponding target control logic, while the air conditioner 63 for performing the operation has not completed the deployment of the target control logic.
[0071] Such as Figure 7 shown, the door magnetic sensor 61, the temperature sensor 62, and the air conditioner 63 respectively report their respective status information to the gateway device 64. Among them, the status information of the door magnetic sensor 61 may include the startup situation of the door magnetic sensor, the opening and closing situation of the door magnetic, etc. The status information of the temperature sensor 62 may include the startup situation of the temperature sensor, the detected temperature value, etc. The status information of the air conditioner 63 may include the on / off state of the air conditioner, the current setting information of the air conditioner (such as cooling / heating, the set target temperature value, etc.). It should be understood that this embodiment does not limit the status information uploaded by various function devices, and it can be configured based on the actual application situation. Further, it should be understood that the status information of the door magnetic sensor 61 and the temperature sensor 62 may not be reported to the gateway device 64.
[0072] Further optionally, corresponding target control logic (i.e., door magnetic sensor TCA) is deployed inside the door magnetic sensor 61. Corresponding target control logic (i.e., temperature sensor TCA) is deployed inside the temperature sensor 62. A control logic engine is set in the gateway device 64 for parsing the corresponding chain control logic and performing corresponding control operations based on the received status information. The control logic engine has a corresponding memory 641 for storing the status information of each functional device. Further, the control logic engine parses the target control logic TCA of the air conditioner 63 based on the processing module 643 and queries the corresponding status information from the memory 641 to perform corresponding control operations. It should be understood that this embodiment does not limit how the gateway device 64 parses the corresponding chain control logic and how to process the control operations corresponding to each functional device, as long as it can implement the chain control process. The form of this embodiment is only exemplary, and the actual operation implementation process is not limited thereto.
[0073] Further, the door magnetic sensor 61 parses the target control logic and obtains that the target control logic corresponding to the door magnetic sensor 61 is to generate and send the scenario code c1 to the temperature sensor 62 when the door magnetic is opened. Further optionally, in response to the detection result of the door magnetic sensor 61 indicating that the door magnetic is opened, the door magnetic sensor 61 generates and sends the scenario code c1 to the temperature sensor 62.
[0074] The temperature sensor 62 parses the target control logic and obtains that when the scenario code c1 is received and the queried temperature is greater than the temperature threshold, it generates and sends the scenario code c2 to the processing module 643. Further, when the temperature sensor 62 receives the scenario code c1 and determines that the currently detected temperature is greater than the temperature threshold, it generates and sends the scenario code c2 to the processing module 643.
[0075] Further, the processing module 643 parses the air conditioner TCA and obtains that when the scenario code c2 is received, it controls the air conditioner 63 to turn on (i.e., sends an on instruction to the air conditioner 63). Optionally, after receiving the scenario code c2, the processing module 643 sends an on instruction to the air conditioner 63 to control the air conditioner 63 to turn on.
[0076] Thus, in this embodiment, after the gateway device in this embodiment configures the chain control logic and during the process that each functional module asynchronously deploys the corresponding target control logic, the gateway device and the functional devices with the deployed target control logic cooperate to execute the corresponding automated control scenario. This enables the execution process of the corresponding automated control scenario to still be achieved during the deployment process of the target control logic of the functional devices, improving the user's automated execution experience.
[0077] Step S130, after the target control logics corresponding to the respective functional devices are deployed, each functional device executes corresponding target actions based on its deployed target control logic and its own status information. In this embodiment, after the target control logics corresponding to the functional devices involved in a certain automation control scenario are deployed by adopting a smooth dynamic deployment method, the distributed deployment of the chain control logic on each functional device is realized. Thus, the functional devices with the target control logic distributedly deployed can be used to replace the gateway device to execute the automation control scenario, realizing the linkage of functional devices without relying on the gateway device, improving the experience of functional device linkage and the experience of automated execution. At the same time, when the gateway device fails or some of the functional devices fail in some scenarios, the corresponding automation control scenario can still be executed normally or partially, further ensuring the experience of automated execution.
[0078] Figure 8 It is a flowchart of the distributed execution of the automatic control scenario by each functional device in the embodiment of the present invention. As Figure 8 shown, the execution process of the automation control scenario in this embodiment includes the following steps:
[0079] Step S131, the current functional device in the corresponding chain control relationship sends a corresponding scenario code to the target functional device in response to its own status information satisfying the corresponding condition. Wherein, the current functional device is the first functional device or the intermediate functional device in the chain control relationship, the target functional device is the next functional device of the current functional device in the chain control relationship, and the scenario code is used to trigger the function execution of the target functional device.
[0080] Wherein, if the current functional device is the first functional device in a certain automation control scenario (i.e., the first functional device in the chain control logic), when the first functional device detects that its own status information satisfies the corresponding condition, it starts the corresponding automation control scenario, generates and sends a corresponding scenario code to the target functional device. Wherein, the status information of the first functional device satisfying the corresponding condition may be that the first functional device is started or the detection result detected by the first functional device satisfies the start condition of the corresponding automation control scenario. It should be understood that the corresponding conditions that the status information of each functional device needs to satisfy are determined based on the type of the functional device and the user's settings, and this embodiment does not limit this. For example, in the above scenario of automatically turning on the air conditioner, the first functional device is the door magnetic sensor, and the status information of the door magnetic sensor satisfying the corresponding condition means that the door magnetic sensor detects that the door magnetic is opened. When the door magnetic sensor detects that the door magnetic is opened, it generates and sends a corresponding scenario code to the temperature sensor.
[0081] Further, if the current functional device is an intermediate functional device in a certain automated control scenario, the status information of the intermediate functional device includes the scenario code reception status, or includes the scenario code reception status and other information (such as the detection result of the intermediate functional device or the detection result of other functional devices, etc.). After the status information of the intermediate functional device meets the required conditions, it generates and sends the corresponding scenario code to its next functional device. For example, in the above-mentioned scenario where the air conditioner is automatically turned on, the intermediate functional device is a temperature sensor. The status information of the temperature sensor meets the corresponding conditions, that is, the temperature sensor has the corresponding scenario code from the previous functional device (i.e., the door magnetic sensor), and the detected temperature meets the preset temperature requirement (such as greater than the first temperature threshold or less than the second temperature threshold, etc.). Further, when the temperature sensor receives the scenario code from the door magnetic sensor and detects that the current detected temperature meets the preset temperature requirement, it generates and sends the corresponding scenario code to the air conditioner.
[0082] It should be understood that this embodiment does not limit the type of the status information of each functional device and the conditions it meets, and it can be dynamically configured according to the actual application situation.
[0083] Further optionally, when each functional device detects that its status information meets the corresponding conditions, if the functional device also needs to perform other target actions, the functional device can also control itself to perform the corresponding target actions.
[0084] Step S132, the target functional device responds to the fact that its status information meets the corresponding conditions and performs the target action. Among them, the target action includes generating the scenario code of the next functional device in the chain control relationship of the target functional device and / or controlling the target functional device to start and execute.
[0085] In an alternative implementation, the target functional device can be an intermediate functional device or the last functional device in the current automated control scenario.
[0086] When the target functional device is an intermediate functional device in the current automated control scenario, its execution process is similar to that when the current functional device is an intermediate functional device, and will not be elaborated here.
[0087] When the target functional device is the last functional device in the current automated control scenario, the status information of the last functional device meeting the corresponding conditions can be that the last functional device receives the corresponding scenario code. It should be understood that the corresponding conditions that the status information of each functional device needs to meet are determined based on the type of the functional device and the user's settings, and this embodiment does not limit this. In this embodiment, when the last functional device detects that its status information meets the corresponding conditions, it controls itself to perform the corresponding target action. For example, in the above scenario of automatically turning on the air conditioner, the last functional device is the air conditioner. When the air conditioner receives the scenario code sent by the previous functional device (i.e., the temperature sensor), it controls itself to turn on based on the corresponding mode.
[0088] It should be understood that this embodiment does not limit the type of the status information of each functional device and the conditions it meets, and it can be dynamically configured according to the actual application situation.
[0089] Figure 9 It is another schematic diagram of the control process of the Internet of Things system according to an embodiment of the present invention. This embodiment is described by taking the scenario of automatically turning on the air conditioner as an example. It should be understood that the automated control scenarios in the Internet of Things system of this embodiment are not limited to this, and it can be configured according to the type of functional devices in the system and the user's needs, and will not be exemplified one by one here. As Figure 9 shown, in this embodiment, the functional devices in the Internet of Things system include a door magnetic sensor 91, a temperature sensor 92, and an air conditioner 93, and the Internet of Things system also has a gateway device 94.
[0090] In this embodiment, the door magnetic sensor 91 as the trigger functional device for starting the scenario of automatically turning on the air conditioner, the temperature sensor 92 as the functional device for detecting judgment conditions, and the air conditioner 93 as the functional device for performing operations have all completed the deployment of the corresponding target control logic.
[0091] As Figure 9 shown, the door magnetic sensor 91, the temperature sensor 92, and the air conditioner 93 respectively report their own status information to the gateway device 94. Among them, the status information of the door magnetic sensor 91 may include the startup situation of the door magnetic sensor, the opening and closing situation of the door magnetic, etc. The status information of the temperature sensor 92 may include the startup situation of the temperature sensor, the detected temperature value, etc. The status information of the air conditioner 93 may include the on / off state of the air conditioner, the current setting information of the air conditioner (such as cooling / heating, the set target temperature value, etc.). It should be understood that this embodiment does not limit the status information uploaded by various functional devices, and it can be configured based on the actual application situation. Further, it should be understood that the status information of the door magnetic sensor 91, the temperature sensor 92, and the air conditioner 93 may also not be reported to the gateway device 94.
[0092] Further optionally, corresponding target control logic (i.e., door magnetic sensor TCA) is deployed inside the door magnetic sensor 91. Corresponding target control logic (i.e., temperature sensor TCA) is deployed inside the temperature sensor 92. Corresponding target control logic (i.e., air conditioner TCA) is deployed inside the air conditioner 93. The control logic engine has a corresponding memory 941 for storing the status information of each functional device.
[0093] Further, the door magnetic sensor 91 parses the target control logic and obtains that the target control logic corresponding to the door magnetic sensor 91 is to generate and send the scenario code c1 to the temperature sensor 92 when the door magnetic is opened. Further optionally, in response to the detection result of the door magnetic sensor 91 being that the door magnetic is opened, the door magnetic sensor 91 generates and sends the scenario code c1 to the temperature sensor 92.
[0094] The temperature sensor 92 parses the target control logic and obtains that when receiving the scenario code c1 and the queried temperature is greater than the temperature threshold, it generates and sends the scenario code c2 to the air conditioner 93. Further, when the temperature sensor 92 receives the scenario code c1 and determines that the temperature it currently detects is greater than the temperature threshold, it generates and sends the scenario code c2 to the air conditioner 93.
[0095] Further, the air conditioner 93 parses the target control logic and obtains that when receiving the scenario code c2, it controls itself to turn on. Further, after receiving the scenario code c2, the air conditioner 93 controls itself to turn on.
[0096] Thus, after this embodiment completes the deployment of the target control logic corresponding to the functional devices involved in a certain automated control scenario by using a smooth dynamic deployment method, the distributed deployment of the chain control logic on each functional device is realized. This can replace the gateway device to execute this automated control scenario by distributing the functional devices with the target control logic, realizing the linkage of functional devices without relying on the gateway device, improving the linkage experience of functional devices and the automated execution experience. At the same time, when the gateway device fails or some functional devices fail in some scenarios, the corresponding automated control scenario can still be executed normally or partially, further ensuring the automated execution experience.
[0097] Further, after this embodiment distributes and deploys the chain control logic to each functional device involved, the gateway device can retain the configured and deployed chain control logic, or can stop configuring the chain control logic. This embodiment does not limit this.
[0098] Furthermore, in the above embodiments of the present invention, only a single-chain control logic is used for illustration. It should be understood that this embodiment can also be applied to more complex automated control scenarios. For example, a certain functional device needs to receive scenario codes from multiple functional devices and / or meet other multiple conditions to perform corresponding target actions, etc. The principle is similar to the above embodiments, and no detailed examples will be given here.
[0099] The Internet of Things system according to the embodiment of the present invention includes multiple functional devices and at least one gateway device. Among them, the gateway device is controlled to deploy a chain control logic to control the corresponding functional device to perform a corresponding target action according to the chain control logic based on the received status information of each functional device. Each functional device is controlled to gradually deploy the corresponding target control logic, and after the deployment is completed, it performs the corresponding target action based on the deployed target control logic and its own status information. The chain control logic represents the chain control relationship between the functional devices, and the target control logic is part of the chain control logic. Thus, the embodiment of the present invention can use the gateway device to dynamically proxy the execution of the distributed chain control process, and can realize the automated control scenario in the system through the gateway device without waiting for the configured chain control logic to be deployed to each functional device, improving the configuration efficiency. At the same time, the dynamic deployment scheme is used to distribute the control logic to each functional device. After the deployment is completed, the corresponding automated control scenario can be realized without the gateway device. This also enables the corresponding automated control scenario to still be executed normally or partially when the gateway device fails or some functional devices fail in some scenarios, ensuring the automated execution experience.
[0100] Furthermore, the functional device and the gateway device according to the embodiment of the present invention may each include at least one processor, a memory communicatively connected to the at least one processor, and a communication component. The communication component receives and transmits data under the control of the processor. Among them, the memory of the functional device stores instructions executable by at least one of the processors therein to implement the execution of the deployed target control logic. At least one memory of the gateway device stores or separately stores the received status information and instructions executable by at least one of the processors therein to implement the parsing and execution of all or part of the chain control logic. Thus, the Internet of Things system according to the embodiment of the present invention can cooperate with the functional device and the gateway device to execute various automated control scenarios.
[0101] The memory in various functional devices may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store an option list, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely set relative to the processor, and these remote memories can be connected to the corresponding external functional device or gateway device through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0102] One or more modules are stored in the memory and, when executed by one or more processors, execute the corresponding control logic parsing and execution.
[0103] The above product can execute the method provided by the embodiments of the present application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in this embodiment, reference can be made to the method provided by the embodiments of the present application.
[0104] The Internet of Things system according to the embodiments of the present invention includes a plurality of functional devices and at least one gateway device. Among them, the gateway device is controlled to deploy a chain control logic to control the corresponding functional device to perform a corresponding target action according to the chain control logic based on the received status information of each functional device. Each functional device is controlled to gradually deploy the corresponding target control logic, and after the deployment is completed, perform the corresponding target action based on the deployed target control logic and its own status information. The chain control logic represents the chain control relationship between functional devices, and the target control logic is a part of the chain control logic. Thus, the embodiments of the present invention can use the gateway device to dynamically proxy the execution of the distributed chain control process, and can realize the automated control scenario in the system through the gateway device without waiting for the configured chain control logic to be deployed to each functional device, improving the configuration efficiency. At the same time, the dynamic deployment scheme is used to distribute the control logic to each functional device, and the corresponding automated control scenario can be realized without the gateway device after the deployment is completed. This also enables the corresponding automated control scenario to still be normally executed or partially executed when the gateway device fails or some functional devices fail in some scenarios, ensuring the automated execution experience.
[0105] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program, and the computer-readable program is used for a computer to execute the above partial or all method embodiments.
[0106] That is, those skilled in the art can understand that all or part of the steps in the methods of the above embodiments can be completed by instructing relevant hardware through a program. The program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.
[0107] The foregoing are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, various modifications and changes can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.
Claims
1. A control method for an Internet of Things system, characterized in that: The Internet of Things system includes multiple functional devices and at least one gateway device, and the method includes: The gateway device is controlled to deploy a chain control logic to control the corresponding functional device to perform a corresponding target action according to the chain control logic based on the received state information of each functional device, and the chain control logic is used to characterize the chain control relationship between the functional devices; Each of the functional devices is controlled to gradually deploy a corresponding target control logic, and the target control logic is a part of the logic in the chain control logic; After the target control logic corresponding to each of the functional devices is deployed, each of the functional devices performs a corresponding target action based on the respectively deployed target control logic and its own state information.
2. The method according to claim 1, characterized in that The method further comprises: During the deployment process of the target control logic corresponding to each of the functional devices, the corresponding functional devices are controlled to perform corresponding target actions based on the chain control logic deployed in the gateway device, the target control logic deployed by the deployed functional devices, and the status information of each of the functional devices received by the gateway device.
3. The method according to claim 1, characterized in that The deployment process of the target control logic of each functional device is asynchronously executed with the working process of the functional devices and the gateway devices in the Internet of Things system based on the chain control relationship.
4. The method according to claim 1, characterized in that: The controlling the corresponding functional device to perform the corresponding target action according to the chain control logic based on the received status information of each functional device includes: The gateway device receives status information of each of the functional devices; The gateway device generates a scenario code corresponding to a target functional device in response to the state information of the current functional device in the corresponding chain control relationship satisfying the corresponding condition, wherein the current functional device is the first functional device or the intermediate functional device in the chain control relationship, and the target functional device is the next functional device of the current functional device in the chain control relationship, and the scenario code is used to trigger the function execution of the target functional device; The gateway device executes a target action in response to the state information of the target functional device satisfying a corresponding condition, wherein the target action includes generating a scene code for the next functional device of the target functional device in the chain control relationship and / or controlling the target functional device to start execution.
5. The method according to claim 1, characterized in that The function devices each performing a corresponding target action based on their deployed target control logic and their own state information includes: The current functional device in the corresponding chain control relationship sends a corresponding scenario code to the target functional device in response to its own state information satisfying the corresponding condition, the current functional device is the first functional device or the intermediate functional device in the chain control relationship, the target functional device is the next functional device of the current functional device in the chain control relationship, and the scenario code is used to trigger the function execution of the target functional device; The target functional device executes a target action in response to its own status information satisfying a corresponding condition, and the target action includes generating a scene code for the next functional device of the target functional device in the chain control relationship and / or controlling the target functional device to start execution.
6. The method according to claim 2, characterized in that The controlling of the corresponding functional device to perform the corresponding target action based on the chain control logic deployed in the gateway device, the target control logic deployed by the deployed functional device, and the status information of each functional device received by the gateway device includes: The gateway device receives status information of each of the functional devices; The deployed functional device performs a target action according to its deployed target control logic and its own state information, wherein the target action includes generating a scenario code for the next functional device in the corresponding chain control relationship and / or controlling its own functional device to start execution; The gateway device controls the execution of a target action required to be performed by an undeployed functional device based on the received status information of each functional device.
7. The method according to any one of claims 1 to 6, characterized in that The state information of the functional device may be one or more of the following combinations: switch state, corresponding scene code reception state, and detection result of the functional device.
8. An Internet of Things system, characterized in that: The Internet of Things system includes a plurality of functional devices and at least one gateway device, wherein the gateway device is pre-configured with chain control logics corresponding to the plurality of functional devices so that the gateway device controls the corresponding functional devices to perform corresponding target actions according to the chain control logic based on the received state information of each of the functional devices, and each of the functional devices is configured to be controlled to gradually deploy the corresponding target control logic, and the target control logic is a part of the logic in the chain control logic; After the target control logic corresponding to each of the functional devices is deployed, each of the functional devices is configured to perform a corresponding target action based on the respectively deployed target control logic and its own state information.
9. The Internet of Things system according to claim 8, characterized in that: During the deployment process of the target control logic corresponding to each of the functional devices, the gateway device and the deployed functional devices are configured to control the corresponding functional devices to perform corresponding target actions based on the chain control logic deployed in the gateway device, the target control logic deployed by the deployed functional devices, and the status information of each of the functional devices received by the gateway device.
10. The Internet of Things system according to claim 8, characterized in that: The deployment process of the target control logic of each functional device is asynchronously executed with the working process of the functional devices and the gateway devices in the Internet of Things system based on the chain control relationship.