Home control system, method, apparatus, electronic device, and storage medium
By sending initial transmission data to the main gateway device through sensing devices, and processing control commands locally, the control problem of home control systems when the network is down is solved, and normal operation and security are improved under network downtime conditions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN QIANYAN TECH LTD
- Filing Date
- 2022-12-20
- Publication Date
- 2026-06-02
AI Technical Summary
When the home control system is offline or unable to connect to the external network, the server cannot control home devices, resulting in a degraded user experience and potential security risks.
The system uses sensing devices from multiple home appliances to acquire environmental data and sends initial transmission data to the main gateway device via short-range communication. The main gateway device determines device information and control commands according to preset control rules and processes the gateway control commands locally to achieve local control.
It improves the anti-interference capability of the home control system, ensuring that it can still work normally when the network is down or unable to connect to the external network, thus enhancing the user experience and security.
Smart Images

Figure CN115955495B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart homes, and more specifically, to home control systems, methods, devices, electronic devices, and storage media. Background Technology
[0002] In related technologies, it is becoming increasingly common to control home control systems through servers. However, the server can only control the home control system if there are devices in the home control system that can communicate with the server. Therefore, when the home control system is offline or it is inconvenient to connect to the external network, the server cannot control the home control system, which not only reduces the user experience but also brings security risks. Summary of the Invention
[0003] In view of the above problems, this application proposes a home control system, method, device, electronic device and storage medium to improve the above problems.
[0004] In a first aspect, embodiments of this application provide a home control system, which includes: multiple home devices; wherein at least one of the multiple home devices is a sensing type and a controlled type; at least one of the multiple home devices serves as a main gateway device; the sensing type home device is used to acquire environmental data and determine initial transmission data based on the environmental data; and is used to send the initial transmission data to the main gateway device; the main gateway device is used to receive the initial transmission data and determine first device information and gateway control instructions based on the initial transmission data and preset control rules; wherein the first device information is the device information of a target controlled device, and the target controlled device is a controlled type home device; and the main gateway device is also used to acquire its own device information as second device information, compare the second device information with the first device information, and process the gateway control instructions based on the comparison result.
[0005] Secondly, embodiments of this application also provide a home control method, applied to a main gateway device in a home control system as described in the first aspect. The method includes: receiving initial transmission data, and determining first device information and gateway control instructions based on the initial transmission data and preset control rules; wherein the first device information is device information of a target control device, and the target control device belongs to a controlled type of home device; obtaining the device information of the main gateway as second device information; comparing the second device information with the first device information, and processing the gateway control instructions based on the comparison result.
[0006] Thirdly, this application also provides another home control method, applied to the home control system as described in the first aspect. The method includes: a sensing type home device acquiring environmental data, and the sensing type home device determining initial transmission data based on the environmental data; the sensing type home device sending the initial transmission data to a main gateway device; the main gateway device receiving the initial transmission data, and the main gateway device determining first device information and gateway control instructions based on the initial transmission data and preset control rules; and the main gateway device acquiring its own device information as second device information, comparing the second device information with the first device information, and processing the gateway control instructions based on the comparison result.
[0007] Fourthly, embodiments of this application also provide a home control device, which is applied to a main gateway device in a home control system as described in the first aspect. The device includes: a receiving unit, configured to receive initial transmission data and determine first device information and gateway control instructions based on the initial transmission data and preset control rules; wherein the first device information is device information of a target control device, and the target control device belongs to a controlled type of home device; an acquiring unit, configured to acquire the device information of the main gateway as second device information; and a processing unit, configured to compare the second device information with the first device information and process the gateway control instructions based on the comparison result.
[0008] Fifthly, embodiments of this application also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the home control method as described in the second aspect.
[0009] In a sixth aspect, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions for enabling an electronic device to perform the home control method as described in the second aspect.
[0010] This application provides a home control system, method, apparatus, electronic device, and storage medium. The system includes: multiple home devices; wherein at least one of the multiple home devices is a sensing type and a controlled type; at least one of the multiple home devices serves as a main gateway device; the sensing type home device is used to acquire environmental data and determine initial transmission data based on the environmental data; and is used to send the initial transmission data to the main gateway device; the main gateway device is used to receive the initial transmission data and determine first device information and gateway control instructions based on the initial transmission data and preset control rules; wherein the first device information is the device information of a target controlled device, and the target controlled device is a controlled type home device; and the main gateway device is also used to acquire its own device information as second device information, compare the second device information with the first device information, and process the gateway control instructions based on the comparison result. In this application, the main gateway device can execute gateway control instructions and broadcast control data to cause sub-gateway devices to execute gateway control instructions, thereby completing the control of the home control system locally and improving the anti-interference capability of the home control system. Attached Figure Description
[0011] 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 drawings described below are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments and drawings obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0012] Figure 1 This is a schematic diagram of the structure of a home control system provided in an embodiment of this application.
[0013] Figure 2 This is a schematic diagram of the encryption process provided in the embodiments of this application.
[0014] Figure 3 This is another structural schematic diagram of a home control system provided in the embodiments of this application.
[0015] Figure 4 This is a schematic flowchart of a home control method provided in an embodiment of this application.
[0016] Figure 5 This is another schematic diagram of a home control method provided in an embodiment of this application.
[0017] Figure 6 This is a schematic diagram of the decryption process provided in the embodiments of this application.
[0018] Figure 7 This is a flowchart illustrating another home control method provided in an embodiment of this application.
[0019] Figure 8 This is a schematic diagram of the structure of a home control device provided in an embodiment of this application.
[0020] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0021] Figure 10 This is a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, 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 the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] In related technologies, controlling home control systems via servers is becoming increasingly common. However, the prerequisite for using servers for control is that the home control system needs to have devices that can receive commands sent by the server. For example, a home control system can have a smart home gateway, which connects the home's intranet and extranet. The smart home gateway manages all home devices through the intranet and receives commands sent by the server through the extranet to achieve remote control of the home control system.
[0024] When the home control system is offline or has difficulty connecting to the external network, the server cannot control the home control system, which not only reduces the user experience but also brings security risks.
[0025] To address the aforementioned problems, the inventors have proposed a home control system, method, apparatus, electronic device, and storage medium. The system includes: multiple home devices; at least one of these devices is a sensing type and a controlled type; at least one of the home devices serves as a main gateway device; the sensing type home device acquires environmental data and determines initial transmission data based on the environmental data; and sends the initial transmission data to the main gateway device; the main gateway device receives the initial transmission data and determines first device information and gateway control instructions based on the initial transmission data and preset control rules; wherein the first device information is the device information of a target controlled device, and the target controlled device is a controlled type home device; the main gateway device also acquires its own device information as second device information, compares the second device information with the first device information, and processes the gateway control instructions based on the comparison result. In this application, the main gateway device can process the gateway control instructions locally based on the comparison result, improving the anti-interference capability of the home control system.
[0026] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0027] Please see Figure 1 , Figure 1 This is a schematic diagram of the structure of a home control system provided in an embodiment of this application. Figure 1 As shown, Figure 1 The home control system 100 includes: multiple home devices 110.
[0028] In some implementations, at least one of the multiple home devices 110 is a sensing type; and at least one of the multiple home devices 110 is a controlled type; and at least one of the multiple home devices 110 serves as a main gateway device 112.
[0029] In some implementations, a sensing-type home device 111 is used to acquire environmental data and determine initial transmission data based on the environmental data; and to send the initial transmission data to the main gateway device 112.
[0030] In some implementations, the environmental data is home environment information acquired by the sensing type home device 111, such as humidity information in the home environment.
[0031] In other implementations, environmental data can also be used to obtain working environment information for the sensing type home device 111, such as whether the working environment is abnormal or whether the workflow is malfunctioning.
[0032] In some implementations, the sensing type home device 111 sends initial transmission data to the main gateway device 112 via near-field communication.
[0033] For example, short-range communication methods include ZigBee, Bluetooth, NFC, etc. Optionally, this embodiment of the application uses the example of a sensing-type home device 111 sending initial transmission data to a gateway device 112 via Bluetooth communication to illustrate the process.
[0034] Furthermore, when the sensing type home device 111 sends initial transmission data to the gateway device 112 via Bluetooth communication, the sensing type home device 111 can perform Bluetooth broadcasting at a high frequency in a short period of time, that is, perform rapid broadcasting. For example, the sensing type home device 211 can broadcast 200 times in 1.5 seconds.
[0035] Understandably, many applications of the device have strict requirements for power consumption and require the device to be in broadcast mode at all times. In this case, the broadcast frequency needs to be reduced to reduce power consumption, which can be called the device broadcasting slowly.
[0036] The faster the broadcast frequency, the better the connection. Therefore, in order to quickly discover and connect, the sensing type home device 111 can preferably use fast broadcasting to improve the anti-interference capability of the broadcast.
[0037] In some implementations, the sensing-type home device 111 is also used to: determine initial transmission data based on environmental data, protocol identifier, and initial device information when environmental data meets preset transmission conditions.
[0038] In some implementations, a protocol identifier is used to identify the data type of the initial transmitted data. For example, a sensing type home device 111 may also send data to the main gateway device 112 when it is connected to the home control system 100, such as when the sensing type home device 111 and the main gateway device 112 are paired and connected. However, the protocol identifier of this data is different from the protocol identifier of the initial transmitted data.
[0039] Optionally, the protocol identifier is defined as a specific number of two bytes.
[0040] In some implementations, the device information includes one or more of the following: a Universally Unique Identifier (UUID) of the home device 110, a Media Access Control (MAC) address, and the device's runtime.
[0041] In some implementations, the initial device information is the device information of a sensing type home device 111.
[0042] Optionally, the byte length of the UUID is less than the byte length of the device runtime, which is less than the byte length of the MAC address. For example, the UUID is two bytes long, the device runtime is four bytes long, and the MAC address is six bytes long, thereby reducing the byte length occupied during Bluetooth broadcasting.
[0043] In some implementations, the environmental data in the initial transmitted data is encrypted data. In this case, the sensing type home device 111 is also used to acquire the initial environmental data and encrypt the initial environmental data according to the device's operating time to obtain the environmental data.
[0044] For example, the sensing-type home device 111 can encrypt the initial environmental data using the Advanced Encryption Standard (AES) symmetric encryption algorithm. In AES, the same key is used for both encryption and decryption, and the key length can be 128, 192, or 256 bits. AES includes: codebook mode, cipher block chain mode, calculator mode, cipher feedback mode, and output feedback mode.
[0045] In some implementations, device runtime is used as the AES key. Since device runtime changes in real time, the key also changes in real time, which improves encryption security. Furthermore, the byte length of device runtime is much smaller than the required byte length of the key, while the byte length of Bluetooth broadcast is limited, for example, mostly 37 bytes. Therefore, using device runtime as the AES key also saves data space for Bluetooth broadcast, allowing Bluetooth broadcast to carry more information.
[0046] Furthermore, if the length of the device runtime in bytes is insufficient, zeros can be added after the device runtime until the length meets the encryption or encryption requirements.
[0047] Please refer to the following: Figure 2 , Figure 2 This is a schematic diagram of the encryption process provided in an embodiment of this application. For example... Figure 2 As shown, Figure 2 Taking the use of the codebook mode for encryption as an example, the encryption process 200 includes: plaintext block 210, key 220, encryptor 230 and ciphertext block 240.
[0048] Specifically, plaintext block 210 includes initial environment data. In some embodiments, plaintext block 210 may also include a Cyclic Redundancy Check (CRC) code corresponding to the initial environment data. Key 220 is the device runtime. Encryptor 230 is used to encrypt plaintext block 210 according to key 220 to obtain ciphertext block 240. It is understood that ciphertext block 240 may include encrypted initial environment data, i.e., environment data, or may include environment data and encrypted CRC check code.
[0049] Furthermore, when the ciphertext block 240 includes environmental data and an encrypted CRC checksum, the sensing type home device is also used to determine the initial transmission data based on the environmental data, protocol identifier, initial device information, and the encrypted CRC checksum.
[0050] In some implementations, the main gateway device 112 is used to receive initial transmission data and to determine first device information and gateway control instructions based on the initial transmission data and preset control rules; the main gateway device is also used to obtain its own device information as second device information, and to compare the second device information with the first device information, and to process the gateway control instructions based on the comparison result, thereby realizing the processing of gateway control instructions locally and improving the interference capability of the home control system.
[0051] In some implementations, the comparison result includes the second device information being the same as the first device information. Then, the main gateway device 112 executes a gateway control command when the second device information is the same as the first device information. The first device information is the device information of the target control device 114, which is a controlled type of home appliance.
[0052] In some implementations, the comparison result includes the second device information being different from the first device information. Therefore, when the second device information is different from the first device information, the main gateway device 112 is also used to determine control data based on the gateway control command and the first device information, and broadcast the control data; wherein, the control data includes the first device information and the gateway control command.
[0053] In some implementations, the gateway device includes a main gateway device 112 and a sub-gateway device 113. A home appliance capable of receiving initial transmission data can serve as the main gateway device 112, and users can also freely configure a gateway device as either the main gateway device 112 or the sub-gateway device 113 through the terminal device 130.
[0054] In some implementations, at least one home device other than the main gateway device is used as a sub-gateway device 113 among a plurality of home devices.
[0055] In some implementations, the sub-gateway device 113 is used to receive control data and determine first device information and gateway control instructions based on the control data; and the sub-gateway device is used to obtain its own device information as sub-device information, and execute gateway control instructions when the sub-device information is the same as the first device information.
[0056] It is understandable that when the first device information and the second device information are the same, the main gateway device 112 is the target control device 114.
[0057] Therefore, although Figure 1 The target control device 114 is described as a separate module, but the target control device 114 may actually be one or more of the main gateway device 112 and the sub-gateway device 113.
[0058] In some implementations, the target control device 114 may receive multiple control data, for example, when the target control device 114 is within the broadcast range of multiple master gateway devices 112.
[0059] To prevent the target control device from repeatedly responding to the same control data, in some implementations, the control data may also include a message identifier. The target control device is used to: determine the message identifier based on the control data; determine whether the message identifier is the same as a cached message identifier; and execute a gateway control command when the message identifier is different from the cached message identifier.
[0060] In some implementations, message identifiers can be used to distinguish different gateway control commands, that is, to differentiate gateway control commands determined based on different initial transmission data corresponding to different sensing types of home devices. When multiple master gateway devices receive the same initial transmission data, they will each determine their own gateway control commands. Since the initial transmission data is the same, the gateway control commands determined by the multiple master gateway devices are identical.
[0061] The target gateway device may be within the broadcast range of multiple master gateway devices at the same time. Therefore, the target gateway device may receive multiple identical gateway control commands determined by multiple master gateway devices based on the same initial transmission data. In this case, the target gateway device can filter out the identical gateway control commands by using message identifiers.
[0062] Optionally, the message identifier can be determined based on the device information of the home device of the sensing type corresponding to the initial transmitted data. Preferably, the message identifier includes at least the device operating time.
[0063] It is understood that the message identifier can also be any other unique identifier, and this application does not limit the specific content of the message identifier.
[0064] In some implementations, each sub-gateway device 113 is within the broadcast range of the main gateway device 112.
[0065] In some implementations, there are multiple main gateway devices 112, and each sub-gateway device 113 is located within a broadcast area composed of the main gateway devices 112.
[0066] Optionally, in order to improve the anti-interference capability of the home control system, the home control system 100 also includes a server 120.
[0067] The main gateway device 112 is also used to send target transmission data to the server 120 based on the initial transmission data.
[0068] Server 120 is used to receive target transmission data. Server 120 is also used to determine target control device 114 and target control instructions based on target transmission data and preset control rules. Server 120 is also used to send target control instructions to target control device 114 so that target control device 114 executes target control instructions.
[0069] In some implementations, when the server 120 sends a target control command to the target control device 114, it also sends a message identifier to the target control device 114. The message identifier can be used to distinguish different target control commands, that is, to distinguish target control commands determined according to different initial transmission data corresponding to different types of home devices.
[0070] In some implementations, the target control device 114 may receive both target control commands and gateway control commands.
[0071] Therefore, the target control device 114 can further filter control instructions with the same message identifier based on the message identifier. The control instructions include target control instructions and gateway control instructions. That is, if the message identifier of target control instruction A is the same as the identifier of gateway control instruction B, then the two are the same control instructions. The target control device will filter the same control instructions to avoid responding to the same control instructions repeatedly.
[0072] In some implementations, server 120 can send control commands to target control device 114 via Internet of Things (IoT) protocols. Optionally, IoT protocols include Message Queuing Telemetry Transport (MQTT), Transmission Control Protocol (TCP), etc.
[0073] For example, taking the MQTT protocol as an example of the Internet of Things (IoT) protocol, MQTT is a "lightweight" communication protocol based on the publish / subscribe model. During communication, the MQTT protocol has three roles: publisher, broker, and subscriber.
[0074] In one embodiment of this application, both the publisher and subscriber are home devices, and the publisher can also be a subscriber. The broker is a server. MQTT messages are divided into two parts: a topic and a payload. The topic is the type of message; after a subscriber subscribes, they will receive messages on that topic. The payload is the content of the message, containing a certain amount of data.
[0075] Furthermore, the target control device 114 will subscribe to a unique topic, which can be issued by the server 120 when configuring the network for the target control device 114. When the server 120 issues a control command to the topic, the target control device that has subscribed to the topic will receive the control command and perform the corresponding operation.
[0076] By sending the initial transmission data to the server 120, the home control system 100 can improve its anti-interference capability when the main gateway device 112 can communicate with the server 120. Even if the gateway control command sent by the main gateway device is lost, the server 120 can still send the target control command to the target control device 114.
[0077] Based on this, when the home control system includes server 120, the sensing type home devices are also used to send initial transmission data to sub-gateway device 113.
[0078] In some implementations, the sub-gateway device 113 is also configured to determine the target transmission data based on the received initial transmission data and to send the target transmission data to the server.
[0079] In some implementations, the step of determining the target transmission data based on the received initial transmission data includes: determining the target transmission data based on environmental data, protocol identifiers, and initial device information.
[0080] Specifically, after receiving the initial transmission data, the sub-gateway device 113 determines the environmental data, protocol identifier, and initial device information based on the initial transmission data, and then processes the environmental data, protocol identifier, and initial device information according to the target communication protocol used by it to communicate with the server to generate the target transmission data.
[0081] In some implementations, the initial transmission data includes a protocol identifier and initial device information. The step of the sub-gateway device 113 determining the target transmission data based on the received initial transmission data includes the following steps.
[0082] (1) When the protocol identifier belongs to the preset identifier, determine whether the initial device information is the same as the cached device information.
[0083] (2) When the initial device information is different from the cached device information, the target transmission data is determined based on the initial transmission data.
[0084] In some implementations, the initial device information includes a device identifier and device uptime; the step of determining whether the initial device information is the same as the cached device information includes the following steps.
[0085] (1.1) If the device identifier of the cached device information in the sub-gateway device 113 is the same as the device identifier of the initial device information, and the device running time of the cached device information is the same as the running time of the initial device information, then it is determined that the initial device information is the same as the cached device information.
[0086] (1.2) Otherwise, it is determined that the initial device information is different from the cached device information.
[0087] In some implementations, when the protocol identifier is not a preset identifier, it indicates that the initial transmission data is not sent because of a change in the home environment, that is, the environmental data meets the preset transmission conditions. In this case, the sub-gateway device 113 directly filters the initial transmission data.
[0088] In some implementations, when initial transmission data is received, it can be determined whether the same initial transmission data has been received before based on whether the initial device information is the same as the cached device information. It is understood that sensing type home devices will broadcast multiple times within a period of time, so the sub-gateway device 113 will receive multiple identical initial transmission data. Therefore, the above method can be used to filter identical initial transmission data and improve data transmission efficiency.
[0089] In some implementations, after receiving data, the sub-gateway device 113 stores the data in a cache pool for a period of time. The data in the cache pool is referred to as cached data. The storage time of the cached data in the cache pool can be set as needed, and this application does not impose any restrictions. Therefore, if the cache pool of the sub-gateway device 113 contains cached data with the same device identifier and device runtime as the initial transmitted data, that is, if the initial device information is the same as the device information of the cached data, it indicates that the sub-gateway device 113 has already received and sent the same data to the server. In this case, the duplicate initial transmitted data can be filtered out.
[0090] The above method allows the server to receive target transmitted data and participate in the control of the home control system 100, thereby improving the anti-interference capability of the home control system.
[0091] Optionally, to enable users to set or control the home control system 100, the home control system 100 also includes a terminal device 130.
[0092] Terminal device 130 is used to send configuration information to server 120.
[0093] Server 120 is used to determine the corresponding main gateway device 112 based on the configuration information; and to send the configuration information to the main gateway device 112 and the sub-gateway devices 113 within the broadcast range of the main gateway device.
[0094] In some implementations, the configuration information includes device information of the main gateway device 112, such as the MAC address, address type, product type and UUID of the main gateway device 112. After receiving the configuration information, the sub-gateway device 113 can add the main gateway device 112 to the whitelist.
[0095] When the sub-gateway device 113 receives control data, it can determine the device information of the main gateway device 112 that sent the control data based on the control data. If the main gateway device 112 corresponding to the device information is not the main gateway device 112 in the whitelist, the control data can be filtered and not processed.
[0096] In some implementations, the configuration information includes device information of multiple main gateway devices 112. After receiving the configuration information, a main gateway device 112 can add the other main gateway devices 112 included in the configuration information to the whitelist.
[0097] When the main gateway device 112 receives control data sent by other main gateway devices, it can determine the device information of the main gateway device 112 that sent the control data based on the control data. If the main gateway device 112 corresponding to the device information is not a main gateway device 112 in the whitelist, the control data can be filtered and not processed.
[0098] In some implementations, after the main gateway device 112 and the sub-gateway device 113 receive the configuration information, the user can also send a configuration detection command to the server 120 through the terminal device 130, and the server 120 forwards the configuration detection command to the main gateway device 112 that has received the configuration information.
[0099] When the main gateway device 112 receives the configuration detection command, it sends a success message to the server 120 and broadcasts a detection signal. After receiving the detection signal, the sub-gateway device 113 sends a success message to the server 120.
[0100] Server 120 is used to determine whether the configuration was successful based on the received success message and the setup success message.
[0101] For example, when the server 120 determines that the main gateway device 112 that sent the successful reception information is the same as the main gateway device 112 in the configuration information and the sub-gateway device 113 that sent the successful setup information is the same as the sub-gateway device 113 in the configuration information, the server 120 determines that the configuration is successful and can send feedback information to the terminal device 130 so that the terminal device displays the feedback information and notifies the user that the configuration is successful.
[0102] If the server does not receive a successful reception message and / or a successful setup message within a preset time, or determines that the main gateway device 112 that sent the successful reception message is different from the main gateway device 112 in the configuration information, or determines that the sub-gateway device 113 that sent the successful setup message is different from the sub-gateway device 113 in the configuration information, then the configuration is determined to have failed, and feedback information can be sent to the terminal device 130 so that the terminal device can display the feedback information and notify the user of the configuration failure.
[0103] In some implementations, after successful configuration, the main gateway device 112 and the sub-gateway device 113 first read the configuration information from their memory after power-on, then add the main gateway device 112 in the configuration information to the whitelist, and then start Bluetooth scanning to begin receiving initial transmission data and / or control data in the home space.
[0104] In some implementations, when the main gateway device 112 or the sub-gateway device 113 recovers from a disconnected state to a connected state, the main gateway device 112 and / or the sub-gateway device 113 will request the latest configuration information from the server 120. The main gateway device 112 will also request the latest preset control rules set by the user from the server.
[0105] Furthermore, if the main gateway device 112 or the sub-gateway device 113 discovers that the latest configuration information on the server 120 differs from the local data stored in its memory, it updates the locally stored configuration information according to the latest configuration information on the server 120, resets the whitelist, and restarts Bluetooth scanning. If the latest configuration information on the server 120 is the same as the configuration information stored in the memory of the main gateway device 112 or the sub-gateway device 113, no further processing is required.
[0106] Please refer to the following: Figure 3 , Figure 3 This is another structural schematic diagram of a home control system provided in an embodiment of this application. For example... Figure 3 As shown, Figure 3The home control system includes main gateway device A, main gateway device B, sub-gateway device A, sub-gateway device B, sub-gateway device C, and sensing-type home devices.
[0107] Specifically, sensing-type home devices can send initial transmission data to the main gateway device A. After receiving the initial transmission data, the main gateway device A determines the first device information and the gateway control command; wherein, the first device information is the device information of the target controlled device. Figure 3 The following explanation uses the target control device as the sub-gateway device C as an example.
[0108] Because the secondary device information of the main gateway device A is different from the device information of the target control device, the main gateway device A can send control data to the sub-gateway device A, sub-gateway device B and the main gateway device B within its corresponding broadcast range.
[0109] After receiving the control data, sub-gateway device A and sub-gateway device B obtain their respective sub-device information. Since the sub-device information of both devices is different from the device information of the target control device, neither device executes the gateway control command.
[0110] After receiving the control data, the main gateway device B does not execute the gateway control command because its second device information is also different from the target control device's device information. Instead, the main gateway device B sends the control data to the sub-gateway device C within its corresponding broadcast range.
[0111] After receiving the control data, sub-gateway device C obtains its sub-device information. Since its sub-device information is the same as the device information of the target control device, sub-gateway device C executes the gateway control command.
[0112] Through the above-described home control system structure, the main gateway devices transmit control commands between home devices by sending control data to each other and broadcasting the control data to the sub-gateway devices within their broadcast range. Even if the home control system loses its connection to the external network, such as losing its connection to the server, the home control system can still work normally.
[0113] Please refer to the following: Figure 4 , Figure 4 This is a flowchart illustrating a home control method provided in an embodiment of this application, applied to the main gateway device in a home control system. For example... Figure 4 As shown, the method 300 includes steps 310 to 340.
[0114] Step 310: Receive initial transmission data, and determine the first device information and gateway control instructions based on the initial transmission data and preset control rules; wherein, the first device information is the device information of the target control device, and the target control device belongs to the controlled type of home device.
[0115] Optionally, the main gateway device stores preset control rules in its memory.
[0116] Optionally, the main gateway device can also obtain preset control rules from the server.
[0117] Specifically, when the initial transmitted data meets the preset control conditions corresponding to the preset control rules, the first device information and gateway control instructions corresponding to the target control device are determined.
[0118] In some implementations, gateway control commands are used to cause the target control device to perform operations corresponding to the initial transmitted data.
[0119] For example, when the sensing type home device has temperature sensing function, the target control device can be a heater, and the gateway control command can be a heating command; when the sensing type home device is various switches in the home, the target control device can be a home device linked to the switch, for example, if the switch is a light switch, then the target control device can be the light fixture controlled by the switch, and the gateway control command can be a light-on command; when the sensing type home device is a door sensor, the target control device can be a home device that is working in the area corresponding to the door sensor, and the gateway control command can be a stop-work command; when the sensing type home device has human body sensing function, the target control device can be a Bluetooth speaker, and the gateway control command can be a music-playing command.
[0120] In some implementations, the initial transmission data includes a protocol identifier and initial device information; step 310 includes the following steps.
[0121] (1) When the protocol identifier belongs to the preset identifier, determine whether the initial device information is the same as the cached device information.
[0122] (2) When the initial device information is different from the cached device information, the first device information and the gateway control instruction are determined according to the initial transmission data and the preset control rules.
[0123] In some implementations, the initial device information includes a device identifier and device uptime; the step of determining whether the initial device information is the same as the cached device information includes the following steps.
[0124] (1.1) If the device identifier of the cached device information in the main gateway device is the same as the device identifier of the initial device information, and the device running time of the cached device information is the same as the running time of the initial device information, then it is determined that the initial device information is the same as the cached device information.
[0125] (1.2) Otherwise, it is determined that the initial device information is different from the cached device information.
[0126] In some implementations, when the protocol identifier is not a preset identifier, it indicates that the initial transmission data is not sent because of a change in the home environment, that is, the environmental data meets the preset transmission conditions. In this case, the main gateway device directly filters the initial transmission data.
[0127] In some implementations, when initial transmission data is received, it can be determined whether the same initial transmission data has been received before by comparing the initial device information with the cached device information. It is understood that sensing-type home devices will broadcast multiple times within a period of time, so the main gateway device will receive multiple identical initial transmission data. The above method can be used to filter identical initial transmission data and improve data transmission efficiency.
[0128] In some implementations, after receiving data, the main gateway device stores the data in a cache pool for a period of time. The data in the cache pool is called cached data. The storage time of cached data in the cache pool can be set as needed, and this application does not impose any restrictions. Therefore, if the cache pool of the main gateway device contains cached data with the same device identifier and device runtime as the initial transmission data, that is, if the initial device information is the same as the device information of the cached data, it indicates that the main gateway device has already received the same initial transmission data. In this case, the duplicate initial transmission data can be filtered out.
[0129] Step 320: Obtain the device information of the main gateway as the second device information.
[0130] Step 330: Compare the second device information with the first device information, and process the gateway control command based on the comparison result.
[0131] In some implementations, step 330 includes: executing a gateway control command when the second device information is the same as the first device information.
[0132] Specifically, when the information of the second device is the same as that of the first device, the main gateway device is the target control device, and therefore the main gateway device executes the gateway control command.
[0133] In some implementations, the second device information is the same as the first device information in that the MAC address of the main gateway device is the same as the MAC address of the target control device, and the UUID of the main gateway device is the same as the UUID of the target control device.
[0134] In some implementations, step 330 includes the following steps.
[0135] (1) When the second device information is different from the first device information, control data is generated based on the first device information and the gateway control instructions.
[0136] (2) Broadcast control data, wherein at least one other main gateway device is within the broadcast range of the main gateway device.
[0137] In some implementations, after receiving control data, the sub-gateway device and the main gateway device can filter out previously received control data based on message identifiers. For example, after receiving control data, the sub-gateway device and the main gateway device can save the message identifier corresponding to the control data within a preset time. If the message identifier of the new control data is the same as the saved message identifier after receiving new control data, the new control data will not be processed.
[0138] Optionally, the main gateway device can broadcast the control data via a wireless communication module such as Bluetooth.
[0139] Furthermore, at least one other master gateway device exists within the broadcast range of each master gateway device, and control data can be transmitted from one master gateway device to any other master gateway device, so that even if the home control system loses connection with the external network, such as losing connection with the server, the home control system can still work normally.
[0140] In some implementations, please refer to [further details]. Figure 5 , Figure 5 This is another schematic flowchart of a home control method provided in an embodiment of this application. For example... Figure 5 As shown, the method 400 includes steps 410 to 480.
[0141] Step 410: Receive initial transmission data, and determine the first device information and gateway control instructions based on the initial transmission data and preset control rules; wherein, the first device information is the device information of the target control device, and the target control device belongs to the controlled type of home device.
[0142] Step 420: Obtain the device information of the main gateway as the second device information.
[0143] Step 430: Compare the second device information with the first device information, and process the gateway control command based on the comparison result.
[0144] Specifically, the specific steps of steps 410 to 430 can be referred to steps 310 to 330, and will not be repeated here.
[0145] Step 440: Upon receiving control data from other main gateway devices, determine the first device information and gateway control instructions based on the control data.
[0146] Step 450: Obtain the device information of the main gateway device as the third device information.
[0147] Step 460: When the information of the first device is the same as that of the third device, execute the gateway control command.
[0148] Step 470: Broadcast control data when the information of the first device differs from that of the third device.
[0149] Specifically, when a primary gateway device receives control data sent by other primary gateway devices, the primary gateway device obtains its own device information as third device information. If the first device information is the same as the third device information, then the primary gateway device is the target control device and executes the gateway control command; if the first device information is different from the third device information, then the primary gateway device is not the target control device and broadcasts the control data.
[0150] In some implementations, step 450 includes:
[0151] (1.1) When receiving control data sent by other main gateway devices, determine whether the control data is the same as the cached control data.
[0152] (1.2) When the control data is different from the cached control data, the first device information and the gateway control command are determined based on the control data.
[0153] In some implementations, after receiving control data from other master gateway devices, the master gateway device saves the control data in a cache pool, which is called cached data. When the master gateway device receives new control data, it compares the new control data with the cached data saved in the cache pool to determine whether the new control data is the same as the cached control data.
[0154] In some implementations, the initial transmission data includes a protocol identifier and initial device information; determining the first device information and gateway control instructions based on the initial transmission data and preset control rules includes:
[0155] (1) When the protocol identifier belongs to the preset identifier, determine whether the initial device information is the same as the cached device information.
[0156] (2) When the initial device information is different from the cached device information, the first device information and gateway control instructions corresponding to the target control device are determined according to the initial transmission data and preset control rules.
[0157] In some implementations, the initial device information includes a device identifier and device uptime; the step of determining whether the initial device information is the same as cached device information includes:
[0158] (1.1) If the device identifier of the cached device information is the same as the device identifier of the initial device information, and the device runtime of the cached device information is the same as the runtime of the initial device information, then it is determined that the initial device information is the same as the cached device information.
[0159] (1.2) Otherwise, it is determined that the initial device information is different from the cached device information.
[0160] Optionally, the device identifier of the initial device information includes the MAC address and UU ID of the sensing type home device that sent the initial transmission data. For details, please refer to the above section of the instruction manual, which will not be repeated here.
[0161] Optionally, the device runtime is the system time of the sensing type home device that sent the initial transmission data.
[0162] In some implementations, when the protocol identifier is not a preset identifier, it indicates that the initial transmission data is not sent because of a change in the home environment, that is, the environmental data meets the preset transmission conditions. In this case, the main gateway device directly filters the initial transmission data.
[0163] In some implementations, when initial transmission data is received, it can be determined whether the same initial transmission data has been received before by comparing the initial device information with the cached device information. It is understood that sensing-type home devices will broadcast multiple times within a period of time, so the main gateway device will receive multiple identical initial transmission data. Therefore, the above method can be used to filter identical initial transmission data and improve data transmission efficiency.
[0164] In some implementations, after receiving data, the main gateway device stores the data in a cache pool for a period of time. The data in the cache pool is called cached data. The storage time of cached data in the cache pool can be set as needed, and this application does not impose any restrictions. Therefore, if the cache pool of the main gateway device contains cached data with the same device identifier and device runtime as the initial transmitted data, that is, if the initial device information is the same as the device information of the cached data, it indicates that the main gateway device has already received the same data, and the duplicate initial transmitted data can be filtered out.
[0165] The above methods can help the main gateway device filter out identical initial transmission data, thereby improving data processing efficiency.
[0166] In some implementations, the initial device information includes the device runtime; determining the first device information corresponding to the target control device and the gateway control instructions based on the initial transmission data and preset control rules includes:
[0167] (1) Determine environmental data based on initial transmission data.
[0168] (2) Decrypt the environmental data based on the equipment running time and determine the decrypted environmental data.
[0169] (3) Determine the target control device and gateway control instructions based on the decrypted environmental data and preset control rules.
[0170] Please refer to the following: Figure 6 , Figure 6 This is a schematic diagram of the decryption process provided in an embodiment of this application. For example... Figure 6 As shown, Figure 6 Taking the decryption process using the codebook mode as an example, the decryption process 500 includes: ciphertext block 510, key 520, decryptor 530, and plaintext block 540.
[0171] Specifically, the ciphertext block 510 includes environmental data, i.e., encrypted initial environmental data. In some embodiments, the ciphertext block 510 may also include a Cyclic Redundancy Check (CRC) code corresponding to the encrypted initial environmental data; the key 520 is the device runtime; and the decryptor 530 is used to decrypt the ciphertext block 510 according to the key 520 to obtain the plaintext block 540.
[0172] Furthermore, when plaintext block 540 includes a CRC checksum and initial environment data (i.e., decrypted environment data), the server also uses the CRC checksum to determine whether the initial environment data is complete. If the initial environment data is complete, the server then executes steps to determine the target control device and gateway control command based on the decrypted environment data and preset control rules. This is to prevent the main gateway device from broadcasting incorrect gateway control commands or determining the wrong target control device when data loss occurs during the transmission of the initial environment data, which could lead to danger.
[0173] Please refer to the following: Figure 7 , Figure 7 This is a flowchart illustrating another home control method provided in an embodiment of this application. Figure 7 As shown, the method 600 includes steps 610 to 630.
[0174] Step 610: Home devices of the sensing type acquire environmental data, and determine the initial transmission data based on the environmental data; and send the initial transmission data to the main gateway device.
[0175] Step 620: The main gateway device receives the initial transmission data, and the main gateway device determines the first device information and gateway control instructions based on the initial transmission data and preset control rules;
[0176] Step 630: The main gateway device obtains its own device information as the second device information, compares the second device information with the first device information, and processes the gateway control command according to the comparison result.
[0177] For details of steps 610 to 630, please refer to the above-mentioned sections of the instruction manual, which will not be repeated here.
[0178] This application provides a home control system, method, apparatus, electronic device, and storage medium. The system includes: multiple home devices; wherein at least one of the multiple home devices is a sensing type and a controlled type; at least one of the multiple home devices serves as a main gateway device; the sensing type home device is used to acquire environmental data and determine initial transmission data based on the environmental data; and is used to send the initial transmission data to the main gateway device; the main gateway device is used to receive the initial transmission data and determine first device information and gateway control instructions based on the initial transmission data and preset control rules; wherein the first device information is the device information of a target controlled device, and the target controlled device is a controlled type home device; and the main gateway device is also used to acquire its own device information as second device information, compare the second device information with the first device information, and process the gateway control instructions based on the comparison result. In this application, the main gateway device can execute gateway control instructions and broadcast control data to cause sub-gateway devices to execute gateway control instructions, thereby completing the control of the home control system locally and improving the anti-interference capability of the home control system.
[0179] Please refer to the following: Figure 8 , Figure 8 This is a schematic diagram of the structure of a home control device provided in an embodiment of this application. Figure 8 As shown, the home control device 700 includes a receiving unit 710, an acquisition unit 720, and a processing unit 730.
[0180] The receiving unit 710 is used to receive initial transmission data and to determine first device information and gateway control instructions based on the initial transmission data and preset control rules; wherein, the first device information is the device information of the target control device, and the target control device belongs to the controlled type of home appliance.
[0181] The acquisition unit 720 is used to acquire the device information of the main gateway as the second device information.
[0182] The processing unit 730 is used to compare the second device information with the first device information and process the gateway control command according to the comparison result.
[0183] It should be noted that, for the device-type embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and relevant details can be found in the descriptions of the method embodiments. Any processing method described in the method embodiments can be implemented in the device embodiments through corresponding processing modules, and will not be elaborated upon further in the device embodiments.
[0184] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0185] Please refer to Figure 9 , Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. For example... Figure 9 As shown, the electronic device 800 includes: one or more processors 810 and a memory 820. Figure 9 Take the 810 processor as an example.
[0186] The processor 810 and the memory 820 can be connected via a bus or other means. Figure 9 Taking the example of a connection between China and Israel via a bus.
[0187] The processor 810 is configured to receive initial transmission data and determine first device information and gateway control instructions based on the initial transmission data and preset control rules; wherein, the first device information is the device information of the target control device, and the target control device belongs to the controlled type of home appliance; acquire the device information of the main gateway as the second device information; when the second device information is the same as the first device information, execute the gateway control instructions; when the second device information is different from the first device information, generate control data based on the first device information and the gateway control instructions; and broadcast the control data; wherein, at least one other main gateway device exists within the broadcast range of the main gateway device.
[0188] The memory 820, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules of the home control method in the embodiments of this application. The processor 810 executes various functional applications and data processing of the electronic device by running the non-volatile software programs, instructions, and modules stored in the memory 820, thereby implementing the home control method of the above-described method embodiments.
[0189] The memory 820 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device. Furthermore, the memory 820 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 non-volatile solid-state storage device. In some embodiments, the memory 820 may optionally include memory remotely located relative to the processor 810, and these remote memories may be connected to the controller via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0190] One or more modules are stored in memory 820, and when executed by one or more processors 810, they perform the home control method in any of the above method embodiments, for example, the method described above. Figure 4 Steps 310 to 340 of the method.
[0191] Please refer to Figure 10 , Figure 10 This is a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable storage medium 900 stores program code 910, which can be called by a processor to execute the home control method described in the above method embodiments.
[0192] The computer-readable storage medium 900 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium includes a non-volatile computer-readable storage medium. The computer-readable storage medium 900 has storage space for program code that performs any of the method steps of the above-described home control method. This program code can be read from or written to one or more computer program products. The program code may, for example, be compressed in a suitable form.
[0193] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; under the concept of the present invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the present invention as described above. For the sake of brevity, they are not provided in detail; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention. Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Those skilled in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
Claims
1. A home control system, characterized in that, The system includes: multiple home appliances; Among these, at least one of the multiple home devices is a sensing type, and at least one of the multiple home devices is a controlled type; at least one of the multiple home devices serves as a main gateway device. Home devices belonging to the aforementioned sensing type are used to acquire environmental data, and to determine initial transmission data based on the environmental data; and to send the initial transmission data to the main gateway device; The main gateway device is used to receive the initial transmission data and, when disconnected from the server, to determine first device information and gateway control instructions based on the initial transmission data and preset control rules; wherein, the first device information is the device information of the target control device, and the target control device belongs to the home appliance of the controlled type; wherein, the memory of the main gateway device stores the preset control rules; Furthermore, the main gateway device is also used to obtain its own device information as second device information, and to compare the second device information with the first device information, and to process the gateway control command according to the comparison result; The comparison result includes the second device information being different from the first device information. The main gateway device is used to determine control data based on the gateway control command and the first device information when the second device information is different from the first device information. The main gateway device is also used to broadcast the control data. At least one of the multiple home devices, other than the main gateway device, serves as a sub-gateway device. The sub-gateway device is used to receive the control data and to determine the first device information and the gateway control instruction based on the control data; the sub-gateway device is used to obtain its own device information as sub-device information and to execute the gateway control instruction when the sub-device information is the same as the first device information.
2. The system according to claim 1, characterized in that, The comparison result includes the second device information being the same as the first device information. The main gateway device is used to execute the gateway control command when the second device information is the same as the first device information.
3. The system according to claim 1, characterized in that, The sensing type home device is also used to send initial transmission data to the sub-gateway device; The sub-gateway device is used to determine the target transmission data based on the received initial transmission data; and is used to send the target transmission data to the server.
4. The system according to claim 1, characterized in that, The control data includes a message identifier, and the target control device is used for: The message identifier is determined based on the control data; Determine whether the message identifier is the same as the cached message identifier; When the message identifier differs from the cached message identifier, the gateway control instruction is executed.
5. The system according to any one of claims 1 to 4, characterized in that, The system also includes: a server, wherein, The main gateway device is also used to send target transmission data to the server based on the initial transmission data; The server is used to receive the target transmission data, and the server is also used to determine the target control device and the target control instruction based on the target transmission data and preset control rules; the server is also used to send the target control instruction to the target control device so that the target control device executes the target control instruction.
6. The system according to claim 5, characterized in that, The system also includes: a terminal device, wherein... The terminal device is used to send configuration information to the server; The server is used to determine the corresponding main gateway device based on the configuration information; and to send the configuration information to the main gateway device and the sub-gateway devices within the broadcast range of the main gateway device.
7. A home control method, characterized in that, The method, applied to a main gateway device in a home control system as described in any one of claims 1 to 6, comprises: The system receives the initial transmission data and determines the first device information and gateway control instructions based on the initial transmission data and preset control rules; wherein, the first device information is the device information of the target control device, and the target control device belongs to the home appliance of the controlled type. Obtain the device information of the main gateway as the second device information; The second device information is compared with the first device information, and the gateway control command is processed according to the comparison result.
8. The method according to claim 7, characterized in that, The step of processing the gateway control command based on the comparison result includes: When the second device information is the same as the first device information, the gateway control command is executed.
9. The method according to claim 7, characterized in that, The step of processing the gateway control command based on the comparison result includes: When the second device information differs from the first device information, control data is generated based on the first device information and the gateway control command. The control data is broadcast; wherein at least one other main gateway device exists within the broadcast range of the main gateway device.
10. The method according to claim 7, characterized in that, The method further includes: Upon receiving control data from other main gateway devices, the first device information and gateway control instructions are determined based on the control data. Obtain the device information of the main gateway device as the third device information; When the first device information is the same as the third device information, the gateway control command is executed; When the first device information differs from the third device information, the control data is broadcast.
11. The method according to claim 10, characterized in that, Upon receiving control data from other main gateway devices, determining the first device information and gateway control instructions based on the control data includes: Upon receiving control data from other main gateway devices, determine whether the control data is the same as the cached control data; When the control data differs from the cached control data, the first device information and gateway control instructions are determined based on the control data.
12. The method according to claim 7, characterized in that, The initial transmission data includes a protocol identifier and initial device information; the step of determining the first device information and gateway control instructions based on the initial transmission data and preset control rules includes: When the protocol identifier belongs to a preset identifier, determine whether the initial device information is the same as the cached device information; When the initial device information differs from the cached device information, the first device information and gateway control instructions are determined based on the initial transmission data and preset control rules.
13. The method according to claim 12, characterized in that, The initial device information includes a device identifier and device uptime; determining whether the initial device information is the same as the cached device information includes: If the device identifier of the cached device information is the same as the device identifier of the initial device information, and the device runtime of the cached device information is the same as the runtime of the initial device information, then it is determined that the initial device information and the cached device information are the same. Otherwise, it is determined that the initial device information is different from the cached device information.
14. The method according to claim 12, characterized in that, The initial device information includes the device operating time; the step of determining the first device information corresponding to the target control device and the gateway control command based on the initial transmission data and preset control rules includes: Determine environmental data based on the initial transmission data; The environmental data is decrypted based on the device's operating time to determine the decrypted environmental data. The target control device and gateway control commands are determined based on the decrypted environmental data and preset control rules.
15. A home control method, characterized in that, Applied to the home control system as described in any one of claims 1-6, characterized in that the method comprises: Home devices of the sensing type acquire environmental data, and the home devices of the sensing type determine initial transmission data based on the environmental data; and the home devices of the sensing type send the initial transmission data to the main gateway device; The main gateway device receives the initial transmission data, and the main gateway device determines the first device information and gateway control instructions based on the initial transmission data and preset control rules. Furthermore, the main gateway device obtains its own device information as the second device information, compares the second device information with the first device information, and processes the gateway control command according to the comparison result.
16. A home control device, characterized in that, The device is used as a main gateway device in a home control system as described in any one of claims 1 to 6, the device comprising: A receiving unit is configured to receive the initial transmission data and determine first device information and gateway control instructions based on the initial transmission data and preset control rules; wherein, the first device information is the device information of the target control device, and the target control device belongs to the type of home appliance being controlled; The acquisition unit is used to acquire the device information of the main gateway as the second device information; The processing unit is configured to compare the second device information with the first device information and process the gateway control command based on the comparison result.
17. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed, enables the at least one processor to perform the home control method according to any one of claims 7-15.
18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for enabling an electronic device to perform the home control method according to any one of claims 7-15.