Device control method and apparatus, electronic device, and computer storage medium
Patent Information
- Application Number
- CN202211603348.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-13
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2042-12-13
AI Technical Summary
[0004]本申请实施例提供一种设备控制方法、装置、设备、存储介质及程序产品,可以解决服务器的并发性能较低的技术问题
[0020]In this embodiment, attribute status data reported by multiple first IoT devices is obtained. If the attribute status data meets a preset triggering condition, the attribute status data is sent to a preset message queue. Multiple consumer threads of the preset message queue are obtained, and the consumer threads obtain the target preset scene associated with the first IoT device and the current device shadow of the second IoT device corresponding to the target preset scene based on the attribute status data. If the current device shadow matches the preset device shadow corresponding to the second IoT device in the target preset scene, the consumer threads generate an action execution instruction for the second IoT device based on the target preset scene. The consumer threads send the action execution instruction to the second IoT device to control the second IoT device to perform the operation corresponding to the action execution instruction. This realizes that multiple consumer threads of the preset message queue determine whether the target preset scene is triggered, speeding up the triggering of the target preset scene and improving the server's concurrency performance.
Smart Images

Figure CN117135192B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, specifically to a device control method, apparatus, electronic device, and computer storage medium. Background Technology
[0002] With the development of science and technology, IoT devices are becoming increasingly popular among users, and more and more IoT devices are being controlled by the same user.
[0003] To facilitate user control of IoT devices, each IoT device is associated with a specific scenario. The server then determines whether a scenario has been triggered based on the status data of the IoT devices, and consequently, whether to trigger the IoT devices associated with that scenario. However, due to the large amount of status data collected, determining whether a scenario has been triggered takes a long time, resulting in low server concurrency performance. Summary of the Invention
[0004] This application provides a device control method, apparatus, device, storage medium, and program product that can solve the technical problem of low concurrent performance of servers.
[0005] This application provides a device control method, including:
[0006] Obtain attribute status data reported by multiple first IoT devices;
[0007] If the above attribute status data meets the preset triggering conditions, the above attribute status data will be sent to the preset message queue.
[0008] Multiple consumer threads of the aforementioned preset message queue are obtained, and the target preset scene associated with the aforementioned first IoT device and the current device shadow of the second IoT device corresponding to the aforementioned target preset scene are obtained through the aforementioned consumer threads based on the aforementioned attribute status data.
[0009] If the current device shadow matches the preset device shadow of the second IoT device in the target preset scenario, then the consumer thread generates the action execution instruction of the second IoT device according to the target preset scenario.
[0010] The aforementioned consumer thread sends the aforementioned action execution instruction to the aforementioned second IoT device to control the aforementioned second IoT device to execute the operation corresponding to the aforementioned action execution instruction.
[0011] Accordingly, embodiments of this application provide a device control apparatus, including:
[0012] The data acquisition module is used to acquire attribute status data reported by multiple first IoT devices;
[0013] The data sending module is used to send the aforementioned attribute status data to a preset message queue if the aforementioned attribute status data meets the preset triggering conditions.
[0014] The thread acquisition module is used to acquire multiple consumer threads of the aforementioned preset message queue, and through the aforementioned consumer threads, based on the aforementioned attribute status data, acquire the target preset scene associated with the aforementioned first IoT device and the current device shadow of the second IoT device corresponding to the aforementioned target preset scene.
[0015] The instruction generation module is used to generate an action execution instruction for the second IoT device based on the target preset scenario if the current device shadow matches the preset device shadow corresponding to the second IoT device in the target preset scenario.
[0016] The instruction sending module is used to send the action execution instruction to the second IoT device through the consumer thread, so as to control the second IoT device to perform the operation corresponding to the action execution instruction.
[0017] Furthermore, this application also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to implement the device control method provided in this application.
[0018] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a computer program adapted for loading by a processor to execute any of the device control methods provided in embodiments of this application.
[0019] Furthermore, this application also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the device control methods provided in this application.
[0020] In this embodiment, attribute status data reported by multiple first IoT devices is obtained. If the attribute status data meets a preset triggering condition, the attribute status data is sent to a preset message queue. Multiple consumer threads of the preset message queue are obtained, and the consumer threads obtain the target preset scene associated with the first IoT device and the current device shadow of the second IoT device corresponding to the target preset scene based on the attribute status data. If the current device shadow matches the preset device shadow corresponding to the second IoT device in the target preset scene, the consumer threads generate an action execution instruction for the second IoT device based on the target preset scene. The consumer threads send the action execution instruction to the second IoT device to control the second IoT device to perform the operation corresponding to the action execution instruction. This realizes that multiple consumer threads of the preset message queue determine whether the target preset scene is triggered, speeding up the triggering of the target preset scene and improving the server's concurrency performance. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a schematic flowchart of the device control method provided in the embodiments of this application;
[0023] Figure 2 This is a schematic diagram of the shadow set provided in the embodiments of this application;
[0024] Figure 3 This is a schematic diagram of another device control method provided in an embodiment of this application;
[0025] Figure 4 This is a schematic diagram of another device control method provided in an embodiment of this application;
[0026] Figure 5 This is a schematic diagram of another device control method provided in an embodiment of this application;
[0027] Figure 6 This is a schematic diagram of the structure of the device control apparatus provided in the embodiments of this application;
[0028] Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0030] This application provides a device control method, apparatus, electronic device, and computer storage medium. The device control apparatus can be integrated into an electronic device, which may be a server, a gateway, or other similar device.
[0031] The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.
[0032] Gateways and servers can be connected directly or indirectly via wired or wireless communication, and this application does not impose any restrictions on this.
[0033] Furthermore, in the embodiments of this application, "multiple" refers to two or more. The terms "first" and "second," etc., in the embodiments of this application are used for distinguishing descriptions and should not be construed as implying relative importance.
[0034] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.
[0035] In this embodiment, the description will be from the perspective of the device control device. In order to facilitate the explanation of the device control method of this application, the following will describe the device control device integrated into the server in detail, that is, the server will be used as the execution subject in the detailed description.
[0036] Please see Figure 1 , Figure 1 This is a schematic flowchart of a device control method provided in an embodiment of this application. The device control method may include:
[0037] S101. Obtain attribute status data reported by multiple first IoT devices.
[0038] The first IoT device can be a triggering device for various preset scenarios, that is, it can be a trigger for various preset scenarios to determine whether to trigger the preset scenario. For example, the first IoT device can be various sensors, or the first IoT device can be a terminal containing sensors.
[0039] It should be understood that the first IoT devices in different preset scenarios can be the same or different. When the first IoT devices in different preset scenarios are the same and the preset triggering conditions met by the first IoT devices in different preset scenarios are also the same, it can be understood that when the attribute status data of the first IoT device meets the preset triggering conditions, different preset scenarios are triggered simultaneously.
[0040] Attribute state data refers to data that indicates the nature of the first IoT device. The nature of the first IoT device can refer to its static properties or its dynamic properties. For example, attribute state data can refer to the device identifier of the first IoT device, which is a static property. Alternatively, attribute state data can refer to the state data of the first IoT device, which is a dynamic property.
[0041] Status data can refer to the data collected in real time by the first IoT device. For example, when the first IoT device is an infrared sensor, the status data can be the data collected by the infrared sensor. The data collected by the infrared sensor can indicate two states: one is that someone is there, and the other is that no one is there.
[0042] The first IoT device can periodically collect attribute status data and then periodically send the attribute status data to the server, thereby allowing the server to obtain attribute status data reported by multiple first IoT devices. Alternatively, the first IoT device can also collect attribute status data according to a collection instruction upon receiving the instruction, and then send the attribute status data to the server, thereby allowing the server to obtain the attribute status data reported by the first IoT devices.
[0043] The method by which the server obtains the attribute status data reported by the first IoT device can be selected according to the actual situation, and this embodiment does not limit it.
[0044] S102. If the attribute status data meets the preset triggering conditions, the attribute status data will be sent to the preset message queue.
[0045] It should be understood that the server can determine whether the attribute status data meets the preset trigger conditions, or the first IoT device can determine whether the preset trigger conditions are met. If the preset trigger conditions are met, the first IoT device will send the attribute status data and the attribute status data to the server, and the server will then send the attribute status data to the preset message queue.
[0046] A preset message queue refers to a container for storing messages. The type of preset message queue can be selected according to the actual situation. For example, the preset message queue can be an MQ message queue, an ActiveMQ message queue, a RabbitMQ message queue, or a ZeroMQ message queue, etc. This embodiment does not limit it.
[0047] Optionally, the server can input the attribute identifier and status data from the attribute status data into the trigger tree so that the trigger tree can determine whether the attribute identifier and status data meet the preset trigger conditions.
[0048] The trigger tree refers to a tree structure that can match strings. That is, the strings that meet the preset trigger conditions can be stored in the trigger tree first. Then, the attribute identifier and status data in the attribute status data are input into the trigger tree for matching. If there is a string in the trigger tree that matches the attribute identifier and status data in the attribute status data, then it is determined that the attribute identifier and status data meet the preset trigger conditions.
[0049] For example, inputting (P1:V1) into the trigger tree will result in either true or false, where P1 represents the attribute identifier, V1 represents the state data, true indicates that the preset trigger condition is met, and false indicates that the preset trigger condition is not met.
[0050] S103. Obtain multiple consumer threads from a preset message queue, and obtain the target preset scene associated with the first IoT device and the current device shadow of the second IoT device corresponding to the target preset scene based on the attribute status data through the consumer threads.
[0051] Consumer threads refer to a collection of programs that process attribute state data. A device shadow can refer to a document used to store the state of a device, allowing the device's state to be known regardless of whether the device is online or offline, thus decoupling the device's state from the device itself.
[0052] The current device shadow can refer to a document that includes the current state of the second IoT device. The second IoT device can refer to an IoT device controlled within a target preset scenario. For example, if the target preset scenario is a homecoming scenario, then the first IoT device could be a time sensor, and the second IoT device could be an air conditioner, a light, or a water heater, etc.
[0053] The target preset scenario associated with the first IoT device can be multiple, and each target preset scenario can be associated with multiple second IoT devices.
[0054] The server can use a consumer thread to determine the first IoT device corresponding to the device identifier in the attribute status data, and then obtain the target preset scene associated with the first IoT device and the current device shadow of the second IoT device corresponding to the target preset scene.
[0055] For example, the first IoT device is an infrared sensor, and the device identifier of the first IoT device is d1. The device identifier in the attribute status data is d1. The target preset scene associated with the first IoT device is s1. The second IoT device corresponding to the target preset scene is an air conditioner, and the device identifier of the air conditioner is d2. The server can first determine the infrared sensor corresponding to d1, then determine s1 corresponding to d1, then determine d2 corresponding to s1, and finally, the server obtains the current device shadow of d2.
[0056] S104. If the current device shadow matches the preset device shadow of the second IoT device in the target preset scenario, then the consumer thread generates the action execution instruction of the second IoT device according to the target preset scenario.
[0057] The preset device shadow refers to a document that includes the target state of the second IoT device. The current device shadow matches the preset device shadow corresponding to the second IoT device in the target preset scenario. This can be understood as the state in the current device shadow matching the state in the preset device shadow.
[0058] For example, the target preset scenario is "coming home," and the second IoT devices are a light, a water heater, and an air conditioner. In the target preset scenario, the light, water heater, and air conditioner are all in the off state in the preset device shadow. The action execution command for the light is to turn on, the action execution command for the water heater is to turn on and adjust the temperature to 42°, and the action execution command for the air conditioner is to turn on and adjust the temperature to 23°. If the light, water heater, and air conditioner are also in the off state in the current device shadow, then through the consumer thread, the "turn on" action execution command for the light, the "turn on and adjust the temperature to 42°" action execution command for the water heater, and the "turn on and adjust the temperature to 23°" action execution command for the air conditioner are generated according to the target preset scenario.
[0059] In this embodiment, multiple consumer threads determine whether a target preset scenario is triggered, thereby improving the server's concurrency performance. Furthermore, the attribute state data is first stored in a preset message queue, and then multiple consumer threads consume the attribute state data from the preset message queue. This prevents the creation of consumer threads indefinitely when the amount of attribute state data is large, thus avoiding server crashes. The preset message queue is used to smooth out peaks and valleys in the state attribute data, thereby improving the server's concurrency performance.
[0060] S105. The action execution instruction is sent to the second IoT device through the consumer thread to control the second IoT device to perform the operation corresponding to the action execution instruction.
[0061] After receiving the action execution instruction, the server sends the instruction to the second IoT device through the consumer thread, and the second IoT device then executes the operation corresponding to the instruction.
[0062] As described above, in this embodiment, attribute status data reported by multiple first IoT devices is obtained; if the attribute status data meets a preset triggering condition, the attribute status data is sent to a preset message queue; multiple consumer threads of the preset message queue are obtained, and the consumer threads obtain the target preset scene associated with the first IoT device and the current device shadow of the second IoT device corresponding to the target preset scene based on the attribute status data; if the current device shadow matches the preset device shadow corresponding to the second IoT device in the target preset scene, the consumer threads generate an action execution instruction for the second IoT device based on the target preset scene; the consumer threads send the action execution instruction to the second IoT device to control the second IoT device to perform the operation corresponding to the action execution instruction, thereby realizing the determination of whether to trigger the target preset scene through multiple consumer threads of the preset message queue, accelerating the triggering speed of the target preset scene, and improving the concurrency performance of the server.
[0063] In some embodiments, the attribute status data includes the device identifier and attribute identifier of the first IoT device. Obtaining attribute status data reported by multiple first IoT devices includes:
[0064] Acquire initial attribute status data reported by multiple first IoT devices;
[0065] Based on the device identifier and attribute identifier in the initial attribute status data, determine the scene status corresponding to the first IoT device;
[0066] If the scene state corresponding to the first IoT device is the target scene state, then the initial attribute state data of the first IoT device will be used as the attribute state data reported by the first IoT device.
[0067] The attribute identifier refers to the field corresponding to the status data in the attribute status data. For example, when the first IoT device is an infrared sensor, the status data is a numerical value, and the attribute identifier can be the radiation level.
[0068] When the scene state is the target scene state, it means that the first IoT device has a corresponding target preset scene. That is, it means that the first IoT device is a trigger for a certain preset scene. In this embodiment, before judging whether the attribute state data meets the preset triggering conditions, the first IoT device that does not have a corresponding target preset scene is filtered out, thereby reducing the amount of calculation in judging whether the attribute state data meets the preset triggering conditions, further speeding up the triggering of the target preset scene, so as to further improve the server's concurrency performance.
[0069] In other embodiments, if the scene state corresponding to the first IoT device is the target scene state, then the initial attribute state data of the first IoT device is used as the attribute state data reported by the first IoT device, including:
[0070] If the scene state corresponding to the first IoT device is the target scene state, then the target preset scene corresponding to the first IoT device is selected from the preset scenes;
[0071] Get the acquisition time corresponding to the initial attribute state data;
[0072] If the effective time of the target preset scenario matches the acquisition time, then the initial attribute status data of the first IoT device will be used as the attribute status data reported by the first IoT device.
[0073] When the first IoT device has a corresponding target preset scenario, if the acquisition time of the initial attribute status data is not within the effective time of the target preset scenario, even if the attribute status data meets the preset triggering conditions, there is no need to execute the target preset scenario. Therefore, in this embodiment, when it is determined that the first IoT device has a corresponding target preset scenario, it is first determined whether the acquisition time of the initial attribute status data is within the effective time of the target preset scenario. If it is within the effective time of the target preset scenario, the initial attribute status data of the first IoT device is then used as the attribute status data reported by the first IoT device, thereby reducing the amount of calculation in determining whether the attribute status data meets the preset triggering conditions, further accelerating the speed of triggering the target preset scenario, so as to further improve the concurrent performance of the server.
[0074] In other embodiments, the scene state corresponding to the first IoT device is determined based on the device identifier and attribute identifier in the initial attribute state data, including:
[0075] Get the array corresponding to the preset scene. The array includes the mapping values of the device identifier and attribute identifier corresponding to the preset scene.
[0076] The device identifier and attribute identifier in the initial attribute status data are mapped to obtain the current mapped value;
[0077] If there is a mapping value in the array that matches the current mapping value, then the scene state of the first IoT device is determined as the target scene state.
[0078] The server can concatenate the device identifier and the attribute identifier to obtain a concatenated identifier, and then perform a hash mapping on the concatenated identifier to obtain the current mapping value. Alternatively, the server can also perform mapping processing on the device identifier and the attribute identifier in the initial attribute state data to obtain a first current mapping value corresponding to the device identifier and a second current mapping value corresponding to the attribute identifier in the initial attribute state data. Then, the current mapping value is determined based on the first current mapping value and the second current mapping value.
[0079] After obtaining the current mapping value, the server matches the current mapping value with the mapping values in the array. If there is a mapping value in the array that matches the current mapping value, the scene state of the first IoT device is determined as the target scene state.
[0080] When the current mapping value is obtained by concatenating the identifier, the current mapping value can be directly matched with the mapping value in the numerical value. When the attribute identifier and device identifier are mapped separately, the first mapping value can be matched with the mapping value in the array, and the second mapping value can be matched with the mapping value in the array. At this time, if there is a mapping value in the array that matches the first mapping value and a mapping value that matches the second mapping value, the scene state of the first IoT device is determined as the target scene state.
[0081] In some embodiments, if there exists a mapping value in the array that matches the current mapping value, the process of determining the scene state of the first IoT device as the target scene state can be as follows:
[0082] Determine the difference between the current mapping value and each mapping value in the array. If the difference meets the preset difference condition, then the mapping value that meets the preset difference condition is used as the mapping value that matches the current mapping value.
[0083] To more quickly determine whether a mapping value matching the current mapping value exists, in some embodiments, the mapping value corresponds to the target value in an array. If a mapping value matching the current mapping value exists in the array, the process of determining the scene state of the first IoT device as the target scene state can also be as follows:
[0084] Determine the current position in the array that matches the current mapped value;
[0085] If the value at the current location is the target value, then the scene state of the first IoT device is determined as the target scene state.
[0086] In this embodiment, the mapping value represents the position in the array. For example, after mapping the device identifier and the attribute identifier, the resulting mapping value is 13, so the target value is stored at the 13th position in the array. After obtaining the current mapping value, if the value at the current position in the array is the target value, it indicates that the first IoT device exists in the corresponding target preset scenario.
[0087] The target value can be set according to the actual situation. For example, the target value can be set to 1 or 2. This embodiment does not limit it.
[0088] It should be understood that the server can also map the device identifier and attribute identifier simultaneously using multiple different hash functions to obtain multiple current mapping values corresponding to the device identifier and attribute identifier. Then, when the value at the current position corresponding to each current mapping value is the target value, the scene state of the first IoT device is determined as the target scene state. At this time, the scene state corresponding to the first IoT device can be determined by a Bloom filter.
[0089] In this embodiment, the current mapping value and the mapping value represent the position in the array. Then, it is checked whether the value at the position is the target value to determine whether the first IoT device has a corresponding target preset scene, so that the scene state of the first IoT device can be obtained more quickly.
[0090] Since the server may acquire attribute status data from many IoT devices simultaneously, it would be slow for the server to check whether each attribute status data meets the preset trigger conditions one by one. Therefore, in order to determine whether the attribute status data meets the preset trigger conditions more quickly, in some embodiments, if the attribute status data meets the preset trigger conditions, the process of sending the attribute status data to a preset message queue can be as follows:
[0091] A thread pool is created based on attribute status data, and the thread pool includes multiple decision threads.
[0092] By judging the thread, it can be determined whether the attribute status data meets the preset triggering conditions.
[0093] In this embodiment, multiple judgment threads determine whether the attribute status data meets the preset triggering conditions, thereby speeding up the sending of the attribute status data to the preset message queue. This allows the target preset scenario to be triggered more quickly, thereby further improving the server's concurrency performance.
[0094] In other embodiments, the attribute state data also includes the user identifier that triggered the first IoT device. A judgment thread is used to determine whether the attribute state data meets preset triggering conditions, including:
[0095] The triggering permissions of the user identifier are verified by judging the thread;
[0096] If the permission verification passes, the thread will determine whether the attribute status data meets the preset trigger conditions.
[0097] In this embodiment, the triggering permission of the user who triggers the first IoT device is verified. Only when a user with the triggering permission of the first IoT device triggers the first IoT device is the attribute status data judged by the judgment thread to determine whether it meets the preset triggering conditions, thereby ensuring security.
[0098] In other embodiments, if the current device shadow matches the preset device shadow corresponding to the second IoT device in the target preset scenario, then through the consumer thread, an action execution instruction for the second IoT device is generated according to the target preset scenario, including:
[0099] If the current device shadow matches the preset device shadow corresponding to the second IoT device in the target preset scenario, then the action permission verification is performed on the second IoT device.
[0100] If the action permission verification of the second IoT device passes, the action execution instruction of the second IoT device is generated according to the target preset scenario.
[0101] Verifying the action permissions of a second IoT device can refer to verifying the home identifier corresponding to the second IoT device against the home identifier corresponding to the target preset scenario. For example, if the home identifier corresponding to the second IoT device is the same as the home identifier corresponding to the target preset scenario, it means that the home to which the second IoT device belongs is the same as the home to which the target preset scenario belongs, and the action permission verification for the second IoT device passes.
[0102] It should be understood that the permission verification for different types of second IoT devices may differ. For example, when the second IoT device is a Wi-Fi device, it can be determined whether the household to which the second IoT device belongs is the same as the household to which the target preset scenario belongs. If they are the same, the permission verification for the second IoT device passes. As another example, when the second IoT device is a light fixture, it can be determined whether the household identifier corresponding to the user to which the light fixture belongs is the same as the household identifier to which the target preset scenario belongs. If they are the same, the permission verification for the second IoT device passes.
[0103] In this embodiment, when the shadow of the current device matches the shadow of the second IoT device in the target preset scene, the action permission of the second IoT device is verified. When the action permission of the second IoT device passes the verification, the action execution command of the second IoT device is generated according to the target preset scene, thereby improving the correctness of the action execution command.
[0104] In other embodiments, before the current device shadow matches the preset device shadow corresponding to the second IoT device in the target preset scenario, the method further includes:
[0105] Obtain the set of shadows generated based on the preset device shadows corresponding to the second IoT device in the target preset scene;
[0106] Select the target second IoT device from the second IoT devices, and select the target shadow set containing the target preset device shadow from the shadow set. The target preset device shadow is the preset device shadow that matches the current device shadow of the target second IoT device.
[0107] Based on the target shadow set, determine the matching result of the second IoT device;
[0108] If the matching result is the first result, then it is determined that the current device shadow matches the preset device shadow corresponding to the second IoT device in the target preset scenario.
[0109] Since a second IoT device may correspond to multiple target preset scenarios, the preset device shadows corresponding to each target preset scenario may be the same or different. Therefore, all preset device shadows corresponding to the target preset scenario containing the same preset device shadow can be placed in the same shadow set. Then, the target shadow set containing the target preset device shadow that matches the current device shadow of the target second IoT device can be filtered out from the shadow set. This allows the matching result of the second IoT device to be determined more quickly based on the target shadow set.
[0110] For example, if the target second IoT device is IoT device A, and the preset device shadow corresponding to IoT device A in the target preset scenario c1 is 1, the preset device shadow corresponding to IoT device A in the target preset scenario c2 is also 1, and the preset device shadow corresponding to IoT device A in the target preset scenario c3 is 2, then the preset device shadows of the target preset scenario c1 and the target preset scenario c2 can be placed in the shadow set g1, and the preset device shadow of the target preset scenario c3 can be placed in the shadow set g2. If the current device shadow of IoT device A is 1, then the shadow set g1 is used as the target shadow set.
[0111] It should be noted that the shadow set may include the preset device shadows of multiple second IoT devices. For example, the target shadow set includes not only the preset device shadow of the target second IoT device, but also the preset device shadows of the initial second IoT devices other than the target second IoT device.
[0112] Alternatively, the shadow set can include only a preset device shadow of a second IoT device. In this case, the shadow set can be understood as a node in a matching tree. That is, the matching tree is first constructed using each shadow set as a node. Then, based on the target shadow set, the matching result of the second IoT device is determined, including:
[0113] Find the sub-shadow set corresponding to the target shadow set from the shadow set;
[0114] The matching result of the second IoT device is obtained by matching the current device shadow of the initial second IoT device with the preset device shadow in the lower shadow set.
[0115] If there are multiple initial second IoT devices, the current device shadow of each initial second IoT device is matched with the set of subordinate shadows corresponding to the initial second IoT device until the current device shadow of each initial second IoT device is matched.
[0116] The lower-level shadow set can be understood as the child nodes of the target shadow set. For example, ... Figure 2 As shown, the second IoT device includes IoT device A, IoT device B, and IoT device C. IoT device A is the target second IoT device, and IoT devices B and C are the initial second IoT devices. The current device shadow of IoT device A is 1, the current device shadow of IoT device B is 1, and the current device shadow of IoT device C is 0.
[0117] The target shadow set corresponds to node n1, where node n1 indicates that the preset device shadow is 1. The lower-level shadow set corresponding to the target shadow set can be node n2 or node n4, where node n2 indicates that the preset device shadow is 1, node n3 indicates that the preset device shadow is 0, node n4 indicates that the preset device shadow is 0, and node n5 indicates that the preset device shadow is 1.
[0118] Since the current device shadow of IoT device B is 1, the shadow set matched by the current device shadow of IoT device B is node n2. Because IoT device C also exists, IoT device C is matched with the lower-level shadow set node n3 of node n2. If node n3 is the end node, then the matching result of the second IoT device is determined as the first result.
[0119] In this embodiment, a matching tree is constructed using the shadows of each preset device as nodes. The same preset device shadows for the same second IoT device in different target preset scenarios are used as the same node in the matching tree. Then, the current device shadow is input into the matching tree for traversal, reducing the number of nodes traversed, thereby improving the matching speed.
[0120] The following reference Figure 3 , Figure 4 as well as Figure 5 The device control method provided in the embodiments of this application will be further described.
[0121] like Figure 3 As shown, the first IoT device sends initial attribute status data to the server's access gateway. The access gateway converts the initial attribute status data into an MQ message according to the MQTT protocol and sends the MQ message to the message queue Kafka.
[0122] The server retrieves MQ messages from the Kafka message queue and uses a Bloom filter to determine whether the first IoT device has a corresponding target preset scenario based on the device identifier and attribute identifier in the MQ message. If no corresponding target preset scenario exists, an interceptor is triggered to intercept the MQ message. If a corresponding target preset scenario exists, the acquisition time corresponding to the initial attribute status data is obtained. If the effective time of the target preset scenario does not match the acquisition time, the target preset scenario is removed. If the effective time of the target preset scenario matches the acquisition time, the MQ message is used as the attribute status data.
[0123] The server creates a thread pool based on the attribute status data. This thread pool includes multiple decision threads. These decision threads verify the trigger permissions of the user identifier within the attribute status data. If the trigger permission verification passes, the decision threads then determine whether the attribute status data meets preset trigger conditions. If the attribute status data meets the preset trigger conditions, it is sent to a preset message queue.
[0124] The server consumes attribute status data from a pre-defined message queue through multiple consumer threads. For example... Figure 4 As shown, the server, through a consumer thread, obtains the target preset scene associated with the first IoT device and the current device shadow of the second IoT device corresponding to the target preset scene based on attribute status data. The current device shadow is input into a matching tree for traversal. If the traversal result is the first result, the consumer thread determines whether the action execution instruction corresponding to the target preset scene has been executed. If it has, the consumer thread starts an action execution interceptor to intercept the action execution instructions of the target preset scene.
[0125] If the action execution instruction corresponding to the target preset scenario is not executed, the action permission verifier is started through the consumer thread. The action permission verifier verifies the action permission of the second IoT device. If the verification of the second IoT device passes, the delayed executor in the consumer thread determines whether the target preset scenario is a delayed execution scenario. If it is a delayed execution scenario, a delayed task is created so that the target preset scenario is executed when the delay time is reached.
[0126] If it is not a delayed execution scenario, the offline verifier in the consumer thread determines whether the second IoT device is offline. If the second IoT device is online, the action executor in the consumer thread generates an action execution instruction based on the target preset scenario.
[0127] The action executor in the consumer thread converts action execution instructions into control commands according to the MQTT protocol and sends the control commands to the control server. The control server then sends the control commands to the gateway corresponding to the second IoT device, and the gateway corresponding to the second IoT device sends the control commands to the second IoT device.
[0128] In this embodiment, by synchronously intercepting the initial attribute state data of target preset scenarios that do not have a corresponding target preset scenario or are not within the effective time period, attribute state data is obtained, thereby reducing the amount of attribute state data and speeding up the determination speed of whether the attribute state data meets the preset trigger conditions, thus improving the server's concurrency performance. For example, Figure 5 As shown.
[0129] By using multiple decision threads in a thread pool to asynchronously determine whether attribute state data meets preset trigger conditions, the speed at which these conditions are met is further accelerated, thereby improving server concurrency performance. For example, ... Figure 5 As shown.
[0130] By using multiple consumer threads in a pre-defined message queue, the system determines whether a target preset scenario is triggered, thereby improving server concurrency performance. Furthermore, attribute state data is first stored in the pre-defined message queue, and then consumed from it by multiple consumer threads. This prevents the unlimited creation of consumer threads when the amount of attribute state data is large, thus smoothing out peak and valley loads, preventing server crashes, and further improving server concurrency performance. For example, ... Figure 5 As shown.
[0131] The improved concurrency performance of the embodiments of this application will be described below.
[0132] When a preset trigger condition corresponds to multiple preset scenarios, the execution time of the second IoT device can be shown in Table 1:
[0133]
[0134] Table 1
[0135] As can be seen from Table 1, when a preset trigger condition corresponds to multiple preset scenarios, the execution time is reduced from 632ms to 301ms, a reduction of 52.37%.
[0136] When a preset scenario corresponds to multiple second IoT devices, the execution time of the second IoT devices can be shown in Table 2:
[0137]
[0138] Table 2
[0139] As can be seen from Table 2, when a preset scenario corresponds to multiple second IoT devices, the execution time is reduced from 1244ms to 527ms, a reduction of 57.64%.
[0140] The Kafka backlog data can be seen in Table 3:
[0141]
[0142] Table 3
[0143] As shown in Table 3, the peak / average Kafka backlog decreased from 394,976 to 309, CPU Max consumption decreased from 200.88% to 78.7%, and average memory consumption decreased from 85.11% to 65.19%.
[0144] The stress test results for the preset scenario are shown in Table 4:
[0145]
[0146] Table 4
[0147] As shown in Table 4, in the stress test results of the preset scenario, the CPU Max consumption decreased from 97.2% to 57.6%, and the average memory consumption decreased from 92.42% to 65.56%.
[0148] To facilitate better implementation of the device control method provided in the embodiments of this application, the embodiments of this application also provide an apparatus based on the above-described device control method. The meanings of the terms used are the same as in the above-described device control method, and specific implementation details can be found in the descriptions in the method embodiments.
[0149] For example, such as Figure 6 As shown, the device control unit may include:
[0150] The data acquisition module 601 is used to acquire attribute status data reported by multiple first IoT devices.
[0151] The data sending module 602 is used to send the attribute status data to a preset message queue if the attribute status data meets the preset triggering conditions.
[0152] The thread acquisition module 603 is used to acquire multiple consumer threads of a preset message queue, and to acquire the target preset scene associated with the first IoT device and the current device shadow of the second IoT device corresponding to the target preset scene based on the attribute status data through the consumer threads.
[0153] The instruction generation module 604 is used to generate an action execution instruction for the second IoT device based on the target preset scenario through the consumer thread if the shadow of the current device matches the preset device shadow of the second IoT device in the target preset scenario.
[0154] The instruction sending module 605 is used to send an action execution instruction to the second IoT device through a consumer thread, so as to control the second IoT device to perform the operation corresponding to the action execution instruction.
[0155] Optionally, the instruction generation module 604 is specifically used to execute:
[0156] If the current device shadow matches the preset device shadow corresponding to the second IoT device in the target preset scenario, then the action permission verification is performed on the second IoT device.
[0157] If the action permission verification of the second IoT device passes, the action execution instruction of the second IoT device is generated according to the target preset scenario.
[0158] Optionally, the device control unit further includes:
[0159] The shadow matching module is used to perform:
[0160] Obtain the set of shadows generated based on the preset device shadows corresponding to the second IoT device in the target preset scene;
[0161] Select the target second IoT device from the second IoT devices, and select the target shadow set containing the target preset device shadow from the shadow set. The target preset device shadow is the preset device shadow that matches the current device shadow of the target second IoT device.
[0162] Based on the target shadow set, determine the matching result of the second IoT device;
[0163] If the matching result is the first result, then it is determined that the current device shadow matches the preset device shadow corresponding to the second IoT device in the target preset scenario.
[0164] Optionally, the shadow matching module is specifically used to perform:
[0165] Find the sub-shadow set corresponding to the target shadow set from the shadow set;
[0166] The matching result of the second IoT device is obtained by matching the current device shadow of the initial second IoT device with the preset device shadow in the lower shadow set.
[0167] Optionally, the attribute status data includes the device identifier and attribute identifier of the first IoT device. Accordingly, the data acquisition module 601 is specifically used to perform:
[0168] Acquire initial attribute status data reported by multiple first IoT devices;
[0169] Based on the device identifier and attribute identifier in the initial attribute status data, determine the scene status corresponding to the first IoT device;
[0170] If the scene state corresponding to the first IoT device is the target scene state, then the initial attribute state data of the first IoT device will be used as the attribute state data reported by the first IoT device.
[0171] Optionally, the data acquisition module 601 is specifically used to perform:
[0172] If the scene state corresponding to the first IoT device is the target scene state, then the target preset scene corresponding to the first IoT device is selected from the preset scenes;
[0173] Get the acquisition time corresponding to the initial attribute state data;
[0174] If the effective time of the target preset scenario matches the acquisition time, then the initial attribute status data of the first IoT device will be used as the attribute status data reported by the first IoT device.
[0175] Optionally, the data acquisition module 601 is specifically used to perform:
[0176] Get the array corresponding to the preset scene. The array includes the mapping values of the device identifier and attribute identifier corresponding to the preset scene.
[0177] The device identifier and attribute identifier in the initial attribute status data are mapped to obtain the current mapped value;
[0178] If there is a mapping value in the array that matches the current mapping value, then the scene state of the first IoT device is determined as the target scene state.
[0179] Optionally, the data acquisition module 601 is specifically used to perform:
[0180] Determine the current position in the array that matches the current mapped value;
[0181] If the value at the current location is the target value, then the scene state of the first IoT device is determined as the target scene state.
[0182] Optionally, the data acquisition module 601 is specifically used to perform:
[0183] The device identifier and attribute identifier in the initial attribute status data are mapped to obtain the first current mapping value corresponding to the device identifier and the second current mapping value corresponding to the attribute identifier in the initial attribute status data.
[0184] The current mapping value is determined based on the first current mapping value and the second current mapping value.
[0185] Optionally, the device control unit also includes:
[0186] The data judgment module is used to perform:
[0187] A thread pool is created based on attribute status data, and the thread pool includes multiple decision threads.
[0188] By judging the thread, it can be determined whether the attribute status data meets the preset triggering conditions.
[0189] Optionally, the attribute status data also includes the user identifier that triggered the first IoT device; correspondingly, the data judgment module is specifically used to perform:
[0190] The triggering permissions of the user identifier are verified by judging the thread.
[0191] If the permission verification passes, the thread will determine whether the attribute status data meets the preset trigger conditions.
[0192] In practice, each of the above modules can be implemented as an independent entity or can be combined arbitrarily to be implemented as the same or several entities. For the specific implementation methods and corresponding beneficial effects of each of the above modules, please refer to the previous method embodiments, which will not be repeated here.
[0193] This application also provides an electronic device, which may be a server or a terminal, etc. Figure 7 As shown, it illustrates a structural schematic diagram of the electronic device involved in the embodiments of this application, specifically:
[0194] The electronic device may include components such as a processor 701 with one or more processing cores, a memory 702 with one or more computer-readable storage media, a power supply 703, and an input unit 704. Those skilled in the art will understand that... Figure 7 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0195] The processor 701 is the control center of the electronic device, connecting various parts of the device via various interfaces and lines. It executes computer programs and / or modules stored in the memory 702, and calls data stored in the memory 702 to perform various functions and process data. Optionally, the processor 701 may include one or more processing cores; preferably, the processor 701 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 701.
[0196] The memory 702 can be used to store computer programs and modules. The processor 701 executes various functional applications and data processing by running the computer programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, computer programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 702 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 702 may also include a memory controller to provide the processor 701 with access to the memory 702.
[0197] The electronic device also includes a power supply 703 that supplies power to the various components. Preferably, the power supply 703 can be logically connected to the processor 701 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 703 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0198] The electronic device may also include an input unit 704, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0199] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 701 in the electronic device loads the executable files corresponding to the processes of one or more computer programs into the memory 702 according to the following instructions, and the processor 701 runs the computer programs stored in the memory 702 to realize various functions, such as:
[0200] Obtain attribute status data reported by multiple first IoT devices;
[0201] If the attribute status data meets the preset triggering conditions, the attribute status data will be sent to the preset message queue.
[0202] Get multiple consumer threads from a preset message queue, and use the consumer threads to obtain the target preset scene associated with the first IoT device and the current device shadow of the second IoT device corresponding to the target preset scene based on the attribute status data.
[0203] If the current device shadow matches the preset device shadow of the second IoT device in the target preset scenario, then the consumer thread generates the action execution instruction for the second IoT device according to the target preset scenario.
[0204] The consumer thread sends the action execution command to the second IoT device to control the second IoT device to perform the operation corresponding to the action execution command.
[0205] For details on the specific implementation methods and corresponding beneficial effects of the above operations, please refer to the detailed description of the equipment control method above, which will not be repeated here.
[0206] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by a computer program, or by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0207] Therefore, embodiments of this application provide a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps of any of the device control methods provided in embodiments of this application. For example, the computer program can execute the following steps:
[0208] Obtain attribute status data reported by multiple first IoT devices;
[0209] If the attribute status data meets the preset triggering conditions, the attribute status data will be sent to the preset message queue.
[0210] Get multiple consumer threads from a preset message queue, and use the consumer threads to obtain the target preset scene associated with the first IoT device and the current device shadow of the second IoT device corresponding to the target preset scene based on the attribute status data.
[0211] If the current device shadow matches the preset device shadow of the second IoT device in the target preset scenario, then the consumer thread generates the action execution instruction for the second IoT device according to the target preset scenario.
[0212] The consumer thread sends the action execution command to the second IoT device to control the second IoT device to perform the operation corresponding to the action execution command.
[0213] For details on the specific implementation methods and corresponding beneficial effects of the above operations, please refer to the previous embodiments, which will not be repeated here.
[0214] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0215] Since the computer program stored in the computer-readable storage medium can execute the steps of any of the device control methods provided in the embodiments of this application, the beneficial effects that any of the device control methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0216] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the aforementioned device control method.
[0217] The above provides a detailed description of a device control method, apparatus, electronic device, and computer storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A device control method characterized by, include: Obtain attribute status data reported by multiple first IoT devices; If the attribute status data meets the preset triggering conditions, the attribute status data will be sent to the preset message queue. Multiple consumer threads of the preset message queue are obtained, and the consumer threads obtain the target preset scene associated with the first IoT device and the current device shadow of the second IoT device corresponding to the target preset scene based on the attribute status data. The current device shadow refers to a document including the current status of the second IoT device. Obtain a set of shadows generated based on the preset device shadows corresponding to the second IoT device in the target preset scene; Target second IoT devices are selected from the second IoT devices, and a target shadow set containing target preset device shadows is selected from the shadow set. The target preset device shadows are preset device shadows that match the current device shadow of the target second IoT device. Based on the target shadow set, the matching result of the second IoT device is determined. If the matching result is a first result, it is determined that the current device shadow matches the preset device shadow corresponding to the second IoT device in the target preset scenario. The preset device shadow refers to a document that includes the target state of the second IoT device. If the current device shadow matches the preset device shadow corresponding to the second IoT device in the target preset scenario, then the consumer thread generates an action execution instruction for the second IoT device based on the target preset scenario. The consumer thread sends the action execution instruction to the second IoT device to control the second IoT device to perform the operation corresponding to the action execution instruction.
2. The equipment control method according to claim 1, characterized in that, If the current device shadow matches the preset device shadow corresponding to the second IoT device in the target preset scenario, then the consumer thread generates an action execution instruction for the second IoT device based on the target preset scenario, including: If the current device shadow matches the preset device shadow corresponding to the second IoT device in the target preset scenario, then the action permission verification is performed on the second IoT device; If the action permission verification of the second IoT device passes, then the action execution instruction of the second IoT device is generated according to the target preset scenario.
3. The equipment control method according to claim 1, characterized in that, The step of determining the matching result of the second IoT device based on the target shadow set includes: Find the lower-level shadow set corresponding to the target shadow set from the shadow set; The current device shadow of the initial second IoT device in the second IoT device is matched with the preset device shadow in the lower-level shadow set to obtain the matching result of the second IoT device.
4. The equipment control method according to claim 1, characterized in that, The attribute status data includes the device identifier and attribute identifier of the first IoT device. Obtaining the attribute status data reported by multiple first IoT devices includes: Acquire initial attribute status data reported by multiple first IoT devices; Based on the device identifier and attribute identifier in the initial attribute state data, the scene state corresponding to the first IoT device is determined; If the scene state corresponding to the first IoT device is the target scene state, then the initial attribute state data of the first IoT device will be used as the attribute state data reported by the first IoT device.
5. The equipment control method according to claim 4, characterized in that, If the scene state corresponding to the first IoT device is the target scene state, then the initial attribute state data of the first IoT device is used as the attribute state data reported by the first IoT device, including: If the scene state corresponding to the first IoT device is the target scene state, then the target preset scene corresponding to the first IoT device is selected from the preset scenes; Obtain the acquisition time corresponding to the initial attribute state data; If the effective time of the target preset scenario matches the acquisition time, then the initial attribute status data of the first IoT device is used as the attribute status data reported by the first IoT device.
6. The equipment control method according to claim 4, characterized in that, The step of determining the scene state corresponding to the first IoT device based on the device identifier and attribute identifier in the initial attribute state data includes: Obtain an array corresponding to a preset scenario, the array including the mapping values of device identifiers and attribute identifiers corresponding to the preset scenario; The device identifier and attribute identifier in the initial attribute status data are mapped to obtain the current mapping value; If there is a mapping value in the array that matches the current mapping value, then the scene state of the first IoT device is determined as the target scene state.
7. The equipment control method according to claim 6, characterized in that, The mapping value corresponds to the target value in the array. If there is a mapping value in the array that matches the current mapping value, then the scene state of the first IoT device is determined as the target scene state, including: Determine the current position in the array that matches the current mapping value; If the value at the current location is the target value, then the scene state of the first IoT device is determined as the target scene state.
8. The equipment control method according to claim 6, characterized in that, The step of mapping the device identifier and attribute identifier in the initial attribute state data to obtain the current mapping value includes: The device identifier and attribute identifier in the initial attribute state data are mapped to obtain a first current mapping value corresponding to the device identifier and a second current mapping value corresponding to the attribute identifier in the initial attribute state data. The current mapping value is determined based on the first current mapping value and the second current mapping value.
9. The equipment control method according to any one of claims 1-8, characterized in that, Before sending the attribute status data to the preset message queue if the attribute status data meets the preset triggering condition, the method further includes: A thread pool is created based on the attribute status data, and the thread pool includes multiple judgment threads; The judgment thread determines whether the attribute status data meets the preset triggering conditions.
10. The equipment control method according to claim 9, characterized in that, The attribute status data also includes the user identifier that triggered the first IoT device. The step of judging whether the attribute status data meets the preset triggering conditions through the judgment thread includes: The triggering permissions of the user identifier are verified through the judgment thread; If the trigger permission verification passes, the judgment thread will determine whether the attribute status data meets the preset trigger conditions.
11. A device control apparatus, characterized in that, include: The data acquisition module is used to acquire attribute status data reported by multiple first IoT devices; The data sending module is used to send the attribute status data to a preset message queue if the attribute status data meets the preset triggering conditions. The thread acquisition module is used to acquire multiple consumer threads of the preset message queue, and through the consumer threads, acquire the target preset scene associated with the first IoT device and the current device shadow of the second IoT device corresponding to the target preset scene based on the attribute status data. The current device shadow refers to a document including the current state of the second IoT device. The instruction generation module is used to obtain a set of shadows generated based on the preset device shadows corresponding to the second IoT device in the target preset scenario; Target second IoT devices are selected from the second IoT devices, and a target shadow set containing target preset device shadows is selected from the shadow set. The target preset device shadows are preset device shadows that match the current device shadow of the target second IoT device. Based on the target shadow set, the matching result of the second IoT device is determined. If the matching result is a first result, it is determined that the current device shadow matches the preset device shadow corresponding to the second IoT device in the target preset scenario. The preset device shadow refers to a document that includes the target state of the second IoT device. If the current device shadow matches the preset device shadow corresponding to the second IoT device in the target preset scenario, then the consumer thread generates an action execution instruction for the second IoT device based on the target preset scenario. The instruction sending module is used to send the action execution instruction to the second IoT device through the consumer thread, so as to control the second IoT device to execute the operation corresponding to the action execution instruction.
12. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a computer program, and the processor running the computer program in the memory to perform the device control method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to execute the device control method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Smart home control method and device, terminal and computer readable storage medium
CN110687817A
Equipment message processing method and device based on Internet of Things, and medium
CN111930530A
Home automatic control method and device based on complex event processing
CN114880134A