Home control system, method, electronic device and storage medium

By using home appliances as gateway devices in the home control system to generate and process transmitted data, the problem of high setup costs in existing technologies is solved, and more efficient data processing and resource utilization are achieved.

CN116074144BActive Publication Date: 2025-01-14SHENZHEN QIANYAN TECH LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211644361.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-20
Publication Date
2025-01-14
Estimated Expiration
2042-12-20

AI Technical Summary

Technical Problem

Existing home control systems rely on additional smart home gateways, resulting in high setup costs.

Method used

One of multiple home devices is used as the gateway device. Initial transmission data is generated by acquiring environmental data, and the main gateway device is determined according to the device identifier and mapping relationship. The server receives and processes the target transmission data to control the controlled device, reducing duplicate data transmission.

Benefits of technology

It saves the cost of setting up an additional smart gateway, reduces the amount of duplicate data received by the server, saves computing resources, reduces bandwidth usage, and improves data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116074144B_ABST
    Figure CN116074144B_ABST
Patent Text Reader

Abstract

The present application provides a home control system, method, electronic device and storage medium, the system includes: multiple home appliances and a server; home appliances belonging to the perception type are used to send initial transmission data to a gateway device; the gateway device is used to receive the initial transmission data, generate target transmission data according to the initial transmission data, and determine whether it is the main gateway device corresponding to the device identifier according to the device identifier and the device mapping relationship table, and process the target transmission data according to the determination result; the server is used to receive the target transmission data and send a control instruction to the target control device so that the target control device executes the control instruction. In the present application, the home appliance can be used as a gateway device to send the target transmission data to the server, saving the cost of setting up an additional smart gateway, and setting up the main gateway device to communicate with the server, reducing the number of duplicate data received by the server, saving computing resources, and improving the efficiency of data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart home, and more specifically, to a home control system, method, electronic device and storage medium. Background Art

[0002] In the related technologies, home control systems mostly rely on home smart gateways, which connect the home's intranet and extranet. All home appliances are connected to the home smart gateway via wired or wireless means, and all home appliances are centrally managed and decentralized controlled by the home smart gateway.

[0003] However, the above method requires the additional installation of a home smart gateway, and the installation cost of the home control system is relatively high. Summary of the invention

[0004] In view of the above problems, the present application proposes a home control system, method, electronic device and storage medium to improve the above problems.

[0005] In a first aspect, an embodiment of the present application provides a home control system, which includes: a plurality of home appliances and a server; wherein at least one of the plurality of home appliances is of a sensing type, and at least one of the plurality of home appliances is of a controlled type; and at least one of the plurality of home appliances serves as a gateway device; the home appliance of the sensing type is used to obtain environmental data, and determines initial transmission data according to the environmental data, and sends the initial transmission data to the gateway device; wherein the initial transmission data includes a device identifier of the home appliance of the sensing type; the gateway device is used to receive the initial transmission data, generate target transmission data according to the initial transmission data, determine the device identifier according to the initial transmission data, and determine whether it is a main gateway device corresponding to the device identifier according to the device identifier and a device mapping relationship, and process the target transmission data according to the determination result; wherein the device mapping relationship includes a mapping relationship between the device identifier and its corresponding main gateway device; the server is used to receive the target transmission data, and the server is also used to determine the target control device and the control instruction according to the target transmission data and a preset control rule; the server is also used to send the control instruction to the target control device so that the target control device executes the control instruction; wherein the target control device is a home appliance of the controlled type.

[0006] In a second aspect, an embodiment of the present application further provides a home control method, which is applied to a gateway device such as the first aspect, and the method includes: receiving initial transmission data; determining a device identifier based on the initial transmission data; generating target transmission data based on the initial transmission data; determining whether itself is a primary gateway device corresponding to the device identifier based on the device identifier and a device mapping relationship; wherein the device mapping relationship includes a mapping relationship between a device identifier and its corresponding primary gateway device; and processing the target transmission data based on the determination result.

[0007] In a third aspect, an embodiment of the present application further provides another home control method, which is applied to a system such as the first aspect, and the method includes: a home appliance of a perception type obtains environmental data, determines initial transmission data based on the environmental data, and sends the initial transmission data to a gateway device; wherein the initial transmission data includes a device identification of a home appliance of a perception type; the gateway device receives the initial transmission data, generates target transmission data based on the initial transmission data, determines the device identification based on the initial transmission data, and determines whether it is the main gateway device corresponding to the device identification based on the device identification and the device mapping relationship, and processes the target transmission data based on the determination result; wherein the device mapping relationship includes a mapping relationship between the device identification and its corresponding main gateway device; the server receives the target transmission data, determines the target control device and the control instruction based on the target transmission data and preset control rules; the server sends the control instruction to the target control device so that the target control device executes the control instruction; wherein the target control device belongs to a controlled type of home appliance.

[0008] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising: 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, and the instructions are executed by the at least one processor so that the at least one processor can execute a home control method such as the second aspect or the third aspect.

[0009] In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable an electronic device to execute a home control method such as the second aspect or the third aspect.

[0010] The present application provides a home control system, method, electronic device and storage medium, the system comprising: a plurality of home appliances and a server; wherein at least one of the plurality of home appliances is of a sensing type, and at least one of the plurality of home appliances is of a controlled type; and at least one of the plurality of home appliances serves as a gateway device; the home appliance of the sensing type is used to obtain environmental data, and to determine initial transmission data according to the environmental data, and to send the initial transmission data to the gateway device; wherein the initial transmission data comprises a device identifier of the home appliance of the sensing type; the gateway device is used to receive the initial transmission data, generate target transmission data according to the initial transmission data, and to determine the device identifier according to the initial transmission data, and to determine whether it is a main gateway device corresponding to the device identifier according to the device identifier and a device mapping relationship, and to process the target transmission data according to the determination result; wherein the device mapping relationship comprises a mapping relationship between the device identifier and its corresponding main gateway device; the server is used to receive the target transmission data, and the server is also used to determine the target control device and the control instruction according to the target transmission data and a preset control rule; the server is also used to send the control instruction to the target control device so that the target control device executes the control instruction; wherein the target control device is a home appliance of the controlled type. In this application, home appliances can act as gateway devices to send target transmission data to the server, saving the cost of setting up an additional smart gateway, and setting up a main gateway device to communicate with the server, reducing the amount of duplicate data received by the server, saving computing resources, reducing bandwidth occupancy, and greatly improving data processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application, not all embodiments. Based on the embodiments of the present application, all other embodiments and drawings obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0012] Figure 1 It is a structural diagram of a home control system provided in an embodiment of the present application.

[0013] Figure 2 It is a schematic diagram of the encryption process provided in an embodiment of the present application.

[0014] Figure 3 It is a schematic diagram of the decryption process provided in an embodiment of the present application.

[0015] Figure 4 This is another structural schematic diagram of a home control system provided in an embodiment of the present application.

[0016] Figure 5 It is a schematic diagram of a device mapping relationship provided in an embodiment of the present application.

[0017] Figure 6 This is another device mapping relationship diagram provided in an embodiment of the present application.

[0018] Figure 7 It is a flowchart of a home control method provided in an embodiment of the present application.

[0019] Figure 8 It is a flow chart of another home control method provided in an embodiment of the present application.

[0020] Fig. 9 It is a structural schematic diagram of a home control device provided in an embodiment of the present application.

[0021] Fig.10 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.

[0022] Fig.11 It is a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] Most of the existing home control systems rely on home smart gateways, which connect the home's intranet and extranet. All home appliances are connected to the home smart gateway via wired or wireless means. The home smart gateway centrally manages and decentralized controls all home appliances through the intranet, and users can remotely control and view information about home appliances through the extranet.

[0025] However, the above method requires the additional installation of a home smart gateway, and the installation cost of the home control system is relatively high.

[0026] In order to improve the above problems, the inventors have proposed a home control system, method, electronic device and storage medium, the system comprising: a plurality of home appliances and a server; wherein at least one of the plurality of home appliances is of a sensing type, and at least one of the plurality of home appliances is of a controlled type; and at least one of the plurality of home appliances serves as a gateway device; the home appliances of the sensing type are used to obtain environmental data, determine initial transmission data according to the environmental data, and send the initial transmission data to the gateway device; wherein the initial transmission data comprises a device identifier of the home appliances of the sensing type; the gateway device is used to receive the initial transmission data, generate target transmission data according to the initial transmission data, determine the device identifier according to the initial transmission data, determine whether it is the main gateway device corresponding to the device identifier according to the device identifier and the device mapping relationship, and process the target transmission data according to the determination result; wherein the device mapping relationship comprises a mapping relationship between the device identifier and the main gateway device corresponding to it; the server is used to receive the target transmission data, and the server is also used to determine the target control device and the control instruction according to the target transmission data and the preset control rule; the server is also used to send the control instruction to the target control device so that the target control device executes the control instruction; wherein the target control device is a home appliance of the controlled type. In this application, home appliances can act as gateway devices to send target transmission data to the server, saving the cost of setting up an additional smart gateway, and setting up a main gateway device to communicate with the server, reducing the amount of duplicate data received by the server, saving computing resources, reducing bandwidth occupancy, and greatly improving data processing efficiency.

[0027] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0028] See also Figure 1 , Figure 1 Schematic diagram of a home control system provided by an embodiment of the present application. Figure 1 As shown, Figure 1 The home control system 100 includes: multiple home devices 110 and a server 120.

[0029] In some embodiments, at least one of the multiple home devices 110 is of a sensing type; and at least one of the multiple home devices 110 is of a controlled type; and at least one of the multiple home devices 110 serves as a gateway device 112.

[0030] In some embodiments, the home device 111 of the sensing type is used to obtain environmental data, and to determine initial transmission data according to the environmental data; and to send the initial transmission data to the gateway device 112.

[0031] In some embodiments, the environmental data is home environment information acquired by the sensing type home device 111, such as humidity information and moisture information in the home environment.

[0032] In other implementations, the environmental data may also be working environment information acquired by the sensing type home device 111, such as whether the working environment is abnormal, whether there is a failure in the work process, etc.

[0033] In some implementations, the sensing type home device 111 sends initial transmission data to the gateway device 112 via short-range communication.

[0034] Exemplarily, the short-range communication method includes ZigBee, Bluetooth, NFC, etc. Optionally, in the embodiment of the present application, the example of the sensing type home device 111 sending initial transmission data to the gateway device 112 via Bluetooth communication is used for explanation.

[0035] Furthermore, when the perception-type home device 111 sends initial transmission data to the gateway device 112 via Bluetooth communication, the perception-type home device 111 can perform Bluetooth broadcast at a high frequency in a short period of time, that is, perform fast broadcast. For example, the perception-type home device 111 can broadcast 200 times within 1.5S.

[0036] It is understandable that many applications of the device have strict requirements on power consumption and require the device to be in broadcast mode all the time. In this case, the broadcast frequency must be reduced to reduce power consumption. At this time, the device can be called performing slow broadcasting.

[0037] The faster the broadcast frequency, the easier it is to connect. Therefore, in order to quickly discover and connect, preferably, the sensing type home device 111 can adopt fast broadcasting to improve the anti-interference ability of the broadcast.

[0038] In some embodiments, the sensing type home device 111 is further used to determine initial transmission data according to the environmental data, the protocol identifier and the device identifier when the environmental data meets the preset sending conditions.

[0039] The gateway device 112 is further configured to determine whether it is the primary gateway device corresponding to the device identifier according to the device identifier and the device mapping relationship when the protocol identifier is a preset identifier and the device identifier is different from the cached device identifier.

[0040] The gateway device 112 is further configured to filter the initial transmission data when the protocol identifier does not belong to a preset identifier or the device identifier is the same as a cached device identifier.

[0041] In some implementations, when the protocol identifier does not belong to a preset identifier, it indicates that the initial transmission data is not sent because the home environment changes, that is, the environmental data meets the preset sending conditions. At this time, the gateway device 112 directly filters the initial transmission data.

[0042] In some embodiments, when receiving the initial transmission data, the gateway device 112 can determine whether the same initial transmission data has been received based on whether the device identifier is the same as the cached device information. It can be understood that the perception-type home device 111 may broadcast multiple times within a period of time, so the gateway device 112 will receive multiple identical initial transmission data. Therefore, according to the above method, the same initial transmission data can be filtered to improve data transmission efficiency.

[0043] In some embodiments, after receiving the data, the gateway device 112 will store the data in the cache pool for a period of time. The data in the cache pool is called cache data. The time for storing the cache data in the cache pool can be set as needed, and this application does not limit it. Therefore, if there is cache data with the same device identifier as the initial transmission data in the cache pool of the gateway device 112, that is, the device identifier is the same as the device information of the cached cache data, it indicates that the gateway device 112 has received the same data, and the repeated initial transmission data can be filtered out at this time.

[0044] In some implementations, the protocol identifier is used to identify the data type of the initial transmission data.

[0045] Exemplarily, the perception-type home device 111 may also send data to the gateway device 112 when accessing the home control system 100, for example, when the perception-type home device 111 is paired with the gateway device 112, but at this time the protocol identifier of the data is different from the protocol identifier of the initially transmitted data.

[0046] Exemplarily, some functions of the gateway device 112 itself also require the use of data sent by the sensing type home device 111. This type of data does not need to be uploaded to the server, so the protocol identifier is different from the protocol identifier of the initial transmission data.

[0047] Optionally, the protocol identifier is defined as a two-byte specific number.

[0048] In some embodiments, the device identification includes one or more of a universally unique identifier (UUID) of the home device 110 , a media access control (MAC) address, and device operating time.

[0049] Optionally, the device running time is the system time of the perception type home device 111 that sends the initial transmission data.

[0050] Optionally, the byte length of the UUID is less than the byte length of the device running time and less than the byte length of the MAC address. Exemplarily, the length of the UUID is two bytes, the length of the device running time is four bytes, and the length of the MAC address is six bytes, thereby reducing the data space of the Bluetooth broadcast occupied by the device identification during broadcasting.

[0051] In some embodiments, the environmental data in the initial transmission data is encrypted data. In this case, the perception-type home device 111 is also used to obtain the initial environmental data, encrypt the initial environmental data according to the device running time, and obtain the environmental data.

[0052] For example, the sensing type home device 111 can encrypt the initial environment data by using the Advanced Encryption Standard (AES) in the symmetric encryption algorithm. The same key is used for encryption and decryption in AES, and the key length can be 128, 192 or 256 bits. AES includes: code book mode, cipher block chaining mode, calculator mode, cipher feedback mode, and output feedback mode.

[0053] In some implementations, the device running time is used as the AES key. Since the device running time changes in real time, the key also changes in real time, which improves the security of the encryption. In addition, the byte length of the device running time is much smaller than the required byte length of the key, while the byte length of the Bluetooth broadcast is limited, for example, most of them are 37 bytes. Therefore, using the device running time as the AES key also saves data space for the Bluetooth broadcast, allowing the Bluetooth broadcast to carry more information.

[0054] Furthermore, when the byte length of the device running time is insufficient, 0s may be added after the device running time until the length meets the encryption or decryption requirements.

[0055] Please refer to Figure 2 , Figure 2 This is a schematic diagram of the encryption process provided by the embodiment of the present application. Figure 2 As shown, Figure 2 The encryption process 200 is described by taking the codebook mode for example. The encryption process 200 includes: a plaintext block 210, a key 320, an encryptor 230 and a ciphertext block 240.

[0056] Specifically, the plaintext block 210 includes initial environment data. In some embodiments, the plaintext block 210 may also include a cyclic redundancy check (CRC) corresponding to the initial environment data; the key 320 is the device running time; the encryptor 230 is used to encrypt the plaintext block 210 according to the key 320 to obtain a ciphertext block 240. It can be understood that the ciphertext block 240 may include the encrypted initial environment data, that is, the environment data, and may also include the encrypted environment data and the encrypted CRC check code.

[0057] Furthermore, when the ciphertext block 240 includes encrypted environmental data and an encrypted CRC check code, the perception-type home device 111 is also used to determine the initial transmission data based on the encrypted environmental data, protocol identifier, device identifier and encrypted CRC check code.

[0058] In some embodiments, the gateway device 112 is used to receive initial transmission data, generate target transmission data based on the initial transmission data, determine the device identifier based on the initial transmission data, and determine whether it is the main gateway device 1121 corresponding to the device identifier based on the device identifier and the device mapping relationship, and process the target transmission data based on the determination result; wherein the device mapping relationship includes a mapping relationship between the device identifier and its corresponding main gateway device 1121.

[0059] In some implementations, a home appliance 110 capable of receiving initial transmission data may serve as a gateway device 112 , and a user may also freely set whether a qualified home appliance serves as a gateway device 112 through a terminal device 130 .

[0060] In some implementations, each gateway device 112 stores a device mapping relationship, and upon receiving initial transmission data, each gateway device 112 can determine whether it is the main gateway device 1121 corresponding to the perception type home device 111 based on the device mapping relationship.

[0061] Optionally, if the gateway device 112 is not the master gateway device 1121 corresponding to a home device 111 of a certain perception type, the gateway device 112 is the slave gateway device 1122 corresponding to the home device 111 of the perception type.

[0062] In some implementations, the gateway device 112 is further configured to send target transmission data to the server 130 when determining that it is the master gateway device 1121 corresponding to the device identifier according to the device identifier and the device mapping relationship.

[0063] Specifically, in the embodiments of the present application, all gateway devices 112 can generate target transmission data based on the initial transmission data and send the target transmission data to the server 130. However, if each gateway device 112 sends the target transmission data to the server 130 upon receiving the initial transmission data, then the server 130 will receive too much duplicate data, resulting in a shortage of computing resources of the server 130, and repeated data transmission will occupy bandwidth and affect the transmission of other valid data. Therefore, in the present application, one or more main gateway devices 1121 are determined according to the device mapping relationship, and only the main gateway device 1121 sends the target transmission data to the server, which reduces the amount of duplicate data received by the server 130, saves computing resources, reduces bandwidth occupancy, and greatly improves data processing efficiency.

[0064] Preferably, the number of the main gateway device 1121 is one.

[0065] In some implementations, the gateway device 112 is further configured to:

[0066] (1) When it is determined that the device itself is not the master gateway device 1121 corresponding to the device identifier according to the device identifier and the device mapping relationship, target transmission data is generated according to the initial transmission data, and the target transmission data is sent to the queue to be destroyed.

[0067] (2) If the success information sent by the master gateway device 1121 corresponding to the device identifier is not received within the first preset time period after the initial transmission data is received, the target transmission data is sent from the queue to be destroyed to the sending queue to send the target transmission data to the server 130.

[0068] (3) If a success message sent by the main gateway device 1121 corresponding to the device identifier is received within a first preset time from the receipt of the initial transmission data, the target transmission data is destroyed in the queue to be destroyed after a second preset time from the receipt of the initial transmission data; wherein the second preset time is greater than or equal to the first preset time.

[0069] In some embodiments, when the master gateway device 1121 corresponding to the device identifier sends target transmission data to the server 130, it also sends success information to the slave gateway device 1122 corresponding to the device identifier to notify the slave gateway device 1122 that the target transmission data has been sent successfully and does not need to be sent again.

[0070] Therefore, if the slave gateway device 1122 does not receive the success information sent by the main gateway device 1121 corresponding to the device identifier within the first preset time period after receiving the initial transmission data, it means that the main gateway device 1121 fails to send the target transmission data, and the slave gateway device 1122 needs to send the target transmission data to the server 130.

[0071] Optionally, the success information includes configuration information of the perception type home device 111 that sends the initial transmission data and valid data in the initial transmission data, so that the gateway device 1122 can determine whether it needs to send the target transmission data to the server 130 based on the success information.

[0072] Optionally, the configuration information of the sensing type home device 111 includes a MAC address and a device type of the sensing type home device 111 .

[0073] Optionally, the valid data in the initial transmission data includes at least environmental data.

[0074] In some embodiments, the server 120 is used to receive target transmission data, and the server 120 is also used to determine the target control device 113 and the control instruction based on the target transmission data and preset control rules; the server is also used to send the control instruction to the target control device 113 so that the target control device 113 executes the control instruction; wherein the target control device 113 is a controlled type of home appliance.

[0075] Furthermore, although Figure 1 The target control device 113 is described as a separate module, but the target control device 113 can also be a sensing type home device 111 or a gateway device 112.

[0076] In some implementations, the server 120 may send a control instruction to the target control device 113 via an Internet of Things protocol. Optionally, the Internet of Things protocol includes a message queuing telemetry transport protocol (MQTT), a transmission control protocol (TCP), and the like.

[0077] For example, the IoT protocol is MQTT protocol. MQTT is a "lightweight" communication protocol based on the publish / subscribe model. In the communication process, there are three identities in the MQTT protocol: publisher, broker, and subscriber.

[0078] In one embodiment of the present application, the publisher and subscriber are both home devices, the publisher can be a subscriber at the same time, and the proxy is a server. The message transmitted by MQTT is divided into two parts: topic and payload. The topic is the type of message. After the subscriber subscribes, he will receive the message of the topic; the payload is the content of the message. The message contains a certain payload.

[0079] Furthermore, the target control device 113 will subscribe to a unique topic, which can be issued by the server 120 when configuring the network for the target control device 113. When the server 120 publishes a control instruction to the topic, the target control device subscribed to the topic will receive the control instruction to perform the corresponding operation.

[0080] In some implementations, if the sensing type home device 110 encrypts the initial transmission data, the server 130 needs to decrypt the initial transmission data. In this case, the server 130 is further configured to:

[0081] (1) Determine environmental data and equipment operating time based on initial transmission data.

[0082] (2) Decrypting the environmental data based on the device operation time and determining the decrypted environmental data.

[0083] (3) Determine the target control device and control instructions based on the decrypted environmental data and preset control rules.

[0084] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the decryption process provided by the embodiment of the present application. Figure 3 As shown, Figure 3 The decryption process 200 is described by taking the codebook mode as an example. The decryption process 200 includes: a ciphertext block 310, a key 320, a decryptor 330 and a plaintext block 340.

[0085] Specifically, the ciphertext block 310 includes environmental data, that is, the encrypted initial environmental data. In some embodiments, the ciphertext block 310 may also include a cyclic redundancy check code (CRC) corresponding to the encrypted initial environmental data; the key 320 is the device running time; the decryptor 330 is used to decrypt the ciphertext block 310 according to the key 320 to obtain a plaintext block 340.

[0086] Furthermore, when the plaintext block 340 includes a CRC checksum and initial environmental data, i.e., decrypted environmental data, the server is also used to determine whether the initial environmental data is complete based on the CRC checksum. When the initial environmental data is complete, the server executes the steps to determine the target control device and control instructions based on the decrypted environmental data and preset control rules, thereby preventing the server from determining the wrong target control device when data is missing during the transmission of the initial environmental data, which may cause danger.

[0087] Exemplarily, when the perception-type home appliance has a temperature perception function, the target control device may be a heater and the control instruction may be a heating instruction; when the perception-type home appliance is each switch in the home, the target control device may be a home appliance linked to the switch, for example, if the switch is a lighting switch, the target control device may be the lighting controlled by the switch, and the control instruction may be a light-on instruction; when the perception-type home appliance is a door magnet, the target control device may be a home appliance that is working in the area corresponding to the door magnet, and the control instruction may be a stop working instruction; when the perception-type home appliance has a human perception function, the target control device may be a Bluetooth speaker, and the control instruction may be a music play instruction.

[0088] Optionally, in order to allow the user to set up or control the home control system 100 , the home control system 100 further includes a terminal device 130 .

[0089] The terminal device 130 is used to send offline information to the gateway device.

[0090] The gateway device 120 is further configured to send an offline notification to other gateway devices 120 when receiving offline information; wherein the offline notification includes a gateway identifier of the gateway device 120 .

[0091] The gateway device 120 that receives the offline notification is used to determine the gateway identifier according to the offline notification, and delete the gateway device 120 corresponding to the gateway identifier in the device mapping relationship, so as to update the device mapping relationship.

[0092] Optionally, the gateway identifier includes information such as a MAC address and a UUID of the gateway device 120 .

[0093] Optionally, the gateway device 120 may send an offline notification to other gateway devices 120 in a User Datagram Protocol (UDP) multicast manner.

[0094] Specifically, UDP multicast is a one-to-many communication mode between hosts, and is a technology that allows one or more multicast sources to send the same message to multiple receivers.

[0095] The multicast source in the UDP multicast communication mode sends a message to a specific multicast address. The multicast address does not belong to a specific host, but to a group of hosts. A multicast address represents a group. All receivers who need to receive the multicast message sent by the multicast source join this group, so that multiple receivers can receive the information sent by the multicast source.

[0096] In some implementations, the device mapping relationship includes multiple sub-device mapping relationships, the sub-device mapping relationship includes a device identifier and a gateway device corresponding to the device identifier, and the gateway devices corresponding to the device identifier are sorted in the sub-device mapping relationship according to a preset rule.

[0097] For example, see Figure 4 and Figure 5 , Figure 4 is another structural diagram of a home control system provided by an embodiment of the present application, Figure 5 It is a schematic diagram of a device mapping relationship provided in an embodiment of the present application.

[0098] In such Figure 4 In the home control system shown in the figure, the broadcast range of the sensing type home device A includes gateway device A, gateway device B, gateway device C, and gateway device D. That is, when the sensing type home device A performs Bluetooth broadcast, the above four gateway devices can receive the initial transmission data sent by the sensing type home device A, so Figure 5 In the device mapping relationship 400 shown, the sub-device mapping relationship 410 corresponding to the home device A of the perception type includes the above four gateway devices.

[0099] The broadcast range of the sensing type home device B includes gateway device D and gateway device E, that is, when the sensing type home device B performs Bluetooth broadcast, the above two gateway devices can receive the initial transmission data sent by the sensing type home device B, so Figure 5 In the device mapping relationship shown, the sub-device mapping relationship 420 corresponding to the perception type home device B includes the above two gateway devices.

[0100] Optionally, in the sub-device mapping relationship 410 and the sub-device mapping relationship 420 , the gateway devices are arranged in a top-to-bottom order according to the order of signal quality indicators from best to worst.

[0101] Therefore Figure 5 Among them, the gateway device with the best signal quality index corresponding to the perception type home device A is gateway device A, and gateway device A can be used as the main gateway device of the perception type home device A; the remaining gateway devices, namely gateway device B, gateway device C and gateway device D are all slave gateway devices of the perception type home device A.

[0102] The gateway device with the best signal quality index corresponding to the perception type home device B is gateway device E. Gateway device E can be used as the main gateway device of the perception type home device B, and gateway device D is the slave gateway device of the perception type home device B.

[0103] Understandably, Figure 5The sensing type household device A shown in the figure can be represented by the device identifier of the sensing type household device A. Figure 5 The gateway device A illustrated in FIG. 1 may be represented by the gateway identifier of the gateway device A, and so on.

[0104] Furthermore, if the terminal device controls the gateway device D to go offline, the gateway device D sends an offline notification to the remaining gateway devices via UDP multicast. The gateway device that receives the offline notification determines the gateway identifier of the gateway device D based on the offline notification, and deletes the gateway device corresponding to the gateway identifier in the device mapping relationship to update the device mapping relationship.

[0105] Finally, see Figure 6 , Figure 6 Schematic diagram of another device mapping relationship provided in an embodiment of the present application. Figure 6 As shown, when the gateway device D sends the offline notification, the device mapping relationship saved by each gateway device that receives the offline notification is as follows: Figure 6 As shown, Figure 6 In the device mapping relationship 500 shown, because the gateway device D is offline, the gateway device D is deleted from the sub-device mapping relationship 510 corresponding to the sensing type home device A and the sub-device mapping relationship 520 corresponding to the sensing type home device B.

[0106] In some implementations, the terminal device 130 is further configured to send online information to the gateway device 112 .

[0107] The gateway device 112 is further configured to send an online notification to other gateway devices 112 when receiving online information.

[0108] The master gateway device 1121 in the gateway device 112 that receives the online notification sends the sub-device mapping relationship to the gateway device that sends the online information, so that the gateway device that sends the online information determines the device mapping relationship according to all the sub-device mapping relationships.

[0109] For example, when Figure 4 When the gateway device D in the example is offline, it is assumed that the device mapping relationship stored in each gateway device 110 is as follows: Figure 5 As shown, when Figure 4 The gateway device D in the example changes from an offline state to an online state. The main gateway device corresponding to the perception type home device A, i.e., gateway device A, sends a sub-device mapping relationship 510 to gateway device D. The main gateway device corresponding to the perception type home device B, i.e., gateway device E, sends a sub-device mapping relationship 520 to gateway device D. Gateway device D obtains a device mapping relationship 500 based on the sub-device mapping relationship 410 and the sub-device mapping relationship 520.

[0110] Furthermore, according to the device mapping relationship, the device identifier of a perception-type home device will correspond to multiple gateway devices 112. Therefore, when the number of slave gateway devices 1122 is large and the master gateway device 1121 fails to send target transmission data to the server 130, multiple slave gateway devices 1122 all send target transmission data to the server 130, occupying a large amount of server resources.

[0111] In order to solve the above problem, in some implementations, the device mapping relationship also includes a mapping relationship between a device identifier and its corresponding target slave gateway device, and the gateway device 112 is further used to:

[0112] If the success information sent by the main gateway device 1121 corresponding to the perception type home device 111 is not received within the first preset time period from the receipt of the initial transmission data, and the gateway device 111 is the target slave gateway device corresponding to the device identifier, the target transmission data is sent from the queue to be destroyed to the sending queue to send the target transmission data to the server 130.

[0113] Specifically, the target slave gateway device is selected in the slave gateway device 1122 according to the preset selection rules. Only the target slave gateway device will send the target transmission data to the server 130 again when the master gateway device 1121 fails to send the target transmission data, so as to reduce the amount of duplicate data received by the server 130, reduce resource usage, and improve control efficiency.

[0114] Optionally, a gateway device 110 whose signal quality index sorting number is greater than a preset number can be determined as a master gateway device, and a gateway device 110 whose signal quality index sorting number is less than or equal to a first preset number and greater than or equal to a second preset number can be selected as a target slave gateway device; wherein the first preset number is less than or equal to the preset number.

[0115] Exemplarily, a gateway device 110 with a signal quality index ranking number greater than 2 may be determined as a master gateway device, and a gateway device 110 with a signal quality index ranking number less than or equal to 2 and greater than or equal to 3 may be selected as a target slave gateway device.

[0116] In Figure 5 In the device mapping relationship shown, the main gateway device corresponding to the perception type home device A is gateway device A, and the target slave gateway devices corresponding to the perception type home device A are gateway device D and gateway device B; the main gateway device corresponding to the perception type home device B is gateway device E, and the target slave gateway device corresponding to the perception type home device A is gateway device D.

[0117] Please refer to Figure 7 , Figure 7 Schematic diagram of a home control method provided by an embodiment of the present application. Figure 7 As shown, the method 600 includes: steps 610 to 650.

[0118] Step 610: Receive initial transmission data.

[0119] Optionally, the initial transmission output includes environmental data acquired by a sensing-type home device.

[0120] For example, when the sensing type home appliance has a temperature sensing function, the environmental data may be temperature data; when the sensing type home appliance is each switch in the home, the environmental data may be the switch status of each switch.

[0121] Step 620: Determine the device identification according to the initial transmission data.

[0122] Step 630: Generate target transmission data according to the initial transmission data.

[0123] In some embodiments, after receiving the initial transmission data, the gateway device determines the environmental data, protocol identifier and device identifier based on the initial transmission data, and then processes the environmental data, protocol identifier and device identifier according to the target communication protocol used by it to communicate with the server to generate target transmission data.

[0124] Optionally, the target communication protocol used by the gateway device to communicate with the server may be Hyper Text Transfer Protocol (HTTP) or MQTT protocol.

[0125] Step 640: Determine whether the device is the master gateway device corresponding to the device identifier according to the device identifier and the device mapping relationship; wherein the device mapping relationship includes a mapping relationship between the device identifier and its corresponding master gateway device.

[0126] Step 650: Process the target transmission data according to the determination result.

[0127] In some implementations, step 650 includes the following steps.

[0128] (1) When the device is determined to be the main gateway device corresponding to the device identifier according to the device identifier and the device mapping relationship, the target transmission data is sent to the server.

[0129] The specific details have been introduced in the above part of the specification and will not be repeated here.

[0130] In some implementations, step 650 includes the following steps.

[0131] (1) When it is determined that the device itself is not the master gateway device corresponding to the device identifier according to the device identifier and the device mapping relationship, target transmission data is generated according to the initial transmission data, and the target transmission data is sent to the queue to be destroyed.

[0132] (2) If no success information is received from the master gateway device corresponding to the device identifier within a first preset time period after receiving the initial transmission data, the target transmission data is sent from the queue to be destroyed to the sending queue to send the target transmission data to the server.

[0133] (3) If a success message is received from a main gateway device corresponding to a home device of the perception type within a first preset time from the receipt of the initial transmission data, the target transmission data is destroyed in the queue to be destroyed after a second preset time from the receipt of the initial transmission data; wherein the second preset time is greater than or equal to the first preset time.

[0134] The specific details have been introduced in the above part of the specification and will not be repeated here.

[0135] Optionally, the value range of the first preset time length is [8S, 12S], preferably 10S.

[0136] Optionally, the value range of the second preset time length is [18S, 22S], preferably 20S.

[0137] Furthermore, in some implementations, when receiving the initial transmission data, the gateway device will also perform an integrity check on the initial transmission data, and only when the check result shows that the data is complete, will it generate the target transmission data based on the initial transmission data.

[0138] Optionally, if the initial transmission data includes an encrypted CRC check code, the gateway device is further used to decrypt the initial transmission data to obtain the CRC check code, and verify the integrity of the initial transmission data according to the CRC check code to obtain a verification result.

[0139] Optionally, the gateway device may also perform integrity check on the initial transmission data by means of accumulation and verification.

[0140] Specifically, when a perception-type home device sends initial transmission data, it accumulates the initial transmission data to obtain a cumulative sum, i.e., a check value, and adds the check value to the end of the initial transmission data, and sends the initial transmission data with the check value added to the gateway device; after the gateway device receives the initial transmission data, it accumulates the initial transmission data again and checks whether the cumulative sum is equal to the check value at the end of the initial transmission data. If they are equal, it proves that the data is complete; if not, it proves that the data is incomplete.

[0141] Optionally, if the verification result shows that the data is incomplete, the gateway device may send the initial transmission data to a queue to be destroyed.

[0142] Furthermore, if the verification result is that the data is incomplete, the gateway device may not add the initial transmission data to the cache pool. The perception-type home device will broadcast multiple broadcasts with the same initial transmission data within the preset broadcast time. If the initial transmission data is added to the cache pool, then the broadcasts with the same initial transmission data received later will be filtered because they have the same protocol identifier and device identifier, but the initial transmission data received later may be complete. Therefore, the initial transmission data may not be added to the cache pool when the verification result is that the data is incomplete.

[0143] In some embodiments, the device mapping relationship includes multiple sub-device mapping relationships, the sub-device mapping relationship includes a device identifier and a gateway device corresponding to the device identifier, and the gateway devices corresponding to the device identifier are sorted in the sub-device mapping relationship according to preset rules. At this time, the home control method 600 provided in the embodiment of the present application also includes the following steps.

[0144] (1) It is defined that there are Q sensing types of home devices in the home control system, so the device mapping relationship includes Q sub-device mapping relationships, and the device identifier of the qth sensing type of home device corresponds to the qth sub-device mapping relationship; wherein Q is a positive integer, 1≤q≤Q.

[0145] (2) The gateway device whose sorting sequence number in the qth sub-device mapping relationship is greater than the preset sequence number is determined as the main gateway device corresponding to the home device of the qth perception type.

[0146] In some embodiments, the gateway devices corresponding to the perception type home devices in the sub-device mapping relationship are sorted according to the signal quality index, wherein the better the signal quality index, the higher the sorting number. At this time, the home control method 600 provided in the embodiment of the present application also includes the following steps.

[0147] (1) upon receiving initial transmission data, determining a current signal quality indicator of a broadcast with the same initial transmission data received within a preset time; wherein the initial transmission data is sent by a home appliance belonging to a perception type in a broadcast manner.

[0148] (2) If it is determined that the gateway device in the sub-device mapping relationship corresponding to the home device of the perception type that sends the initial transmission data is not a gateway device, and / or the difference between the signal quality index in the sub-device mapping relationship and the current signal quality index is greater than a preset difference.

[0149] (3) The sub-device mapping relationship is updated according to the current signal quality index and its own gateway identification.

[0150] (4) sending update information including the current signal quality indicator and the gateway identifier to the remaining gateway devices in the sub-device mapping relationship, so that the remaining gateway devices update the sub-device mapping relationship according to the update information.

[0151] For example, assuming Figure 4 The gateway device D in the example is not originally located in the broadcast range corresponding to the sensing type home device A, nor in the broadcast range corresponding to the sensing type home device B. Then the gateway device D does not belong to the gateway device in the sub-device mapping relationship of the sensing type home device A, nor does it belong to the gateway device in the sub-device mapping relationship of the sensing type home device B. However, the device mapping relationship saved by the gateway device D can be as follows: Figure 6 shown.

[0152] When the gateway device D moves to Figure 4 After the location shown, the gateway device D can receive the initial transmission data sent by the sensing type home device A and the sensing type home device B, so the gateway device D can determine the current signal quality index between it and the sensing type home device A and the sensing type home device B, and update the device mapping relationship saved by itself according to the current signal quality index. The updated device mapping relationship can be as shown in FIG. Figure 5 shown.

[0153] Furthermore, the signal quality indicator includes the current broadcast number and the current broadcast quality.

[0154] In some implementations, the current number of broadcasts is the number of broadcasts with the same initial transmission data received within a preset time.

[0155] It is understandable that a perception-type home device will broadcast multiple broadcasts with the same initial transmission data within a certain period of time. However, the number of broadcasts received by the gateway device is related to the distance between it and the perception-type home device and the environmental conditions between it and the perception-type home device. Therefore, the number of broadcasts received by each gateway device may be different.

[0156] Generally speaking, the closer the gateway device is to the perception-type home device, the better the signal is, and the more broadcasts are received; the better the environmental conditions between the gateway device and the perception-type home device, the more broadcasts are received. Among them, whether there are obstacles between the two and whether there will be co-frequency interference will affect the environmental conditions between the gateway device and the perception-type home device.

[0157] In some implementations, the current broadcast quality is an average broadcast quality of broadcasts with the same initial transmission data received within a preset time.

[0158] Optionally, the broadcast signal strength can be used to reflect the broadcast quality, and the average broadcast quality is the average broadcast strength.

[0159] In some implementations, the sorting priority of the current broadcast number is higher than the priority of the current broadcast quality, that is, the more the current broadcast number is, the higher the ranking is; when the current broadcast number is the same, the better the current broadcast quality is, the higher the ranking is.

[0160] In some embodiments, when the signal quality indicator includes the current number of broadcasts and the current broadcast quality, the difference between the signal quality indicator in the sub-device mapping relationship and the current signal quality indicator is greater than a preset difference, which means: the difference between the number of broadcasts in the sub-device mapping relationship and the current number of broadcasts is greater than the preset difference, or the difference between the broadcast quality in the sub-device mapping relationship and the current broadcast quality is greater than the preset difference, or the difference between the number of broadcasts in the sub-device mapping relationship and the current number of broadcasts is greater than the preset difference and the difference between the broadcast quality in the sub-device mapping relationship and the current broadcast quality is greater than the preset difference.

[0161] In some implementations, the master gateway device also needs to actively send heartbeat information to other gateway devices to maintain an online state.

[0162] It is defined that there are N sensing types of home devices in the home control system, and the heartbeat gateway device is the main gateway device in the sub-device mapping relationship of the p-th sensing type of home device, where N is a positive integer, 1≤p≤N. The home control method 600 provided in the embodiment of the present application also includes the following steps.

[0163] (1) If it is determined that it is a heartbeat gateway device, it sends heartbeat information to other gateway devices at a preset period; wherein the heartbeat information includes the sub-device mapping relationship of the home device of the pth perception type.

[0164] For example, in Figure 4 In the home control system shown in FIG. Figure 5 As shown in the device mapping relationship, the heartbeat gateway device corresponding to the sensing type home device A is gateway device A, and gateway device A will send sub-device mapping relationship 510 to gateway device B, gateway device C, gateway device D and gateway device E at a preset period.

[0165] And, in Figure 4 In the home control system shown in FIG. Figure 5 As shown in the device mapping relationship, the heartbeat gateway device corresponding to the sensing type home device B is gateway device E, and gateway device E will send sub-device mapping relationship 520 to gateway device A, gateway device B, gateway device C and gateway device D at a preset period.

[0166] In some embodiments, if it is determined that it does not belong to a heartbeat gateway device, then when receiving heartbeat information, the second sub-device mapping relationship of the p-th perception type home device stored in itself is updated according to the first sub-device mapping relationship of the p-th perception type home device.

[0167] Specifically, if the first sub-device mapping relationship in the heartbeat information is different from the second sub-device mapping relationship stored locally, the second sub-device mapping relationship stored locally is updated according to the heartbeat information.

[0168] For example, if the first sub-device mapping relationship in the heartbeat information is Figure 6 The first sub-device mapping relationship 510 in the system, and the second sub-device mapping relationship stored in the system is Figure 5 The first sub-device mapping relationship 410 in the updated second sub-device mapping relationship becomes Figure 6 The first sub-device mapping relationship 510 in.

[0169] In some implementations, the slave gateway device may also actively determine whether the master gateway device is offline. In this case, the home control method 600 provided in the embodiment of the present application also includes the following steps.

[0170] (1) If it is determined that it is not a heartbeat gateway device, the latest receiving time of the heartbeat information is recorded.

[0171] (2) If the heartbeat information sent by the heartbeat gateway device is not received again within a preset time interval from the latest receiving time, the heartbeat gateway device is deleted from the device mapping relationship saved by itself to update the preset device mapping relationship.

[0172] Specifically, the preset time interval is greater than a preset period for the main gateway device to send heartbeat information.

[0173] Optionally, the preset period value is [1min, 2min]

[0174] Through the above method, it can be prevented that when the main gateway device is suddenly offline, the main gateway device cannot be re-determined in time, resulting in the failure of the initial transmission data sending, thereby ensuring the safety of the home system.

[0175] Please refer to Figure 8 , Figure 8 FIG. 1 is a flow chart of another home control method provided by an embodiment of the present application. Figure 8 As shown, the home control method is applied to the above-mentioned home control system, and the home control method 700 includes: steps 710 to 730.

[0176] Step 710: The home appliance of the perception type obtains environmental data, determines initial transmission data according to the environmental data, and sends the initial transmission data to the gateway device; wherein the initial transmission data includes the device identification of the home appliance of the perception type.

[0177] Step 720: The gateway device receives the initial transmission data, generates target transmission data based on the initial transmission data, determines the device identifier based on the initial transmission data, determines whether it is the main gateway device corresponding to the device identifier based on the device identifier and the device mapping relationship, and processes the target transmission data based on the determination result; wherein the device mapping relationship includes the mapping relationship between the device identifier and its corresponding main gateway device.

[0178] Step 730: The server receives the target transmission data, and determines the target control device and the control instruction according to the target transmission data and the preset control rules; the server sends the control instruction to the target control device so that the target control device executes the control instruction; wherein the target control device is a home appliance of the controlled type.

[0179] The specific details of step 710 to step 730 have been introduced in the above part of the specification and will not be repeated here.

[0180] The present application provides a home control system, method, electronic device and storage medium, the system comprising: a plurality of home appliances and a server; wherein at least one of the plurality of home appliances is of a sensing type, and at least one of the plurality of home appliances is of a controlled type; and at least one of the plurality of home appliances serves as a gateway device; the home appliance of the sensing type is used to obtain environmental data, and to determine initial transmission data according to the environmental data, and to send the initial transmission data to the gateway device; wherein the initial transmission data comprises a device identifier of the home appliance of the sensing type; the gateway device is used to receive the initial transmission data, generate target transmission data according to the initial transmission data, and to determine the device identifier according to the initial transmission data, and to determine whether it is a main gateway device corresponding to the device identifier according to the device identifier and a device mapping relationship, and to process the target transmission data according to the determination result; wherein the device mapping relationship comprises a mapping relationship between the device identifier and its corresponding main gateway device; the server is used to receive the target transmission data, and the server is also used to determine the target control device and the control instruction according to the target transmission data and a preset control rule; the server is also used to send the control instruction to the target control device so that the target control device executes the control instruction; wherein the target control device is a home appliance of the controlled type. In this application, home appliances can act as gateway devices to send target transmission data to the server, saving the cost of setting up an additional smart gateway, and setting up a main gateway device to communicate with the server, reducing the amount of duplicate data received by the server, saving computing resources, reducing bandwidth occupancy, and greatly improving data processing efficiency.

[0181] Please refer to Fig. 9 , Fig. 9 Schematic diagram of the structure of a home control device provided by an embodiment of the present application. Fig. 9 As shown, the home control device is applied to the above-mentioned gateway device, and the home control device 800 includes: a receiving unit 810, a first determining unit 820, a generating unit 830, a second determining unit 840 and a processing unit 850.

[0182] The receiving unit 810 is configured to receive initial transmission data.

[0183] The first determining unit 820 is configured to determine a device identification according to the initial transmission data.

[0184] The generating unit 830 is configured to generate target transmission data according to the initial transmission data.

[0185] The second determining unit 840 is used to determine whether it is the primary gateway device corresponding to the device identifier according to the device identifier and the device mapping relationship; wherein the device mapping relationship includes a mapping relationship between the device identifier and its corresponding primary gateway device.

[0186] The processing unit 850 is used to process the target transmission data according to the determination result.

[0187] It should be noted that, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. Any processing method described in the method embodiment can be implemented by the corresponding processing module in the device embodiment, and will not be described one by one in the device embodiment.

[0188] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0189] Please refer to Fig.10 , Fig.10 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.10 As shown, the electronic device 900 includes: one or more processors 910 and a memory 920, Fig.10 A processor 910 is taken as an example.

[0190] The processor 910 and the memory 920 may be connected via a bus or other means. Fig.10 The example of connecting through bus is taken in the following.

[0191] Processor 910 is used to receive initial transmission data; determine the device identification according to the initial transmission data; generate target transmission data according to the initial transmission data; determine whether it is the main gateway device corresponding to the device identification according to the device identification and the device mapping relationship; wherein the device mapping relationship includes the mapping relationship between the device identification and its corresponding main gateway device; and process the target transmission data according to the determination result.

[0192] The memory 920 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules of the home control method in the embodiment of the present application. The processor 910 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 920, that is, implements the home control method of the above method embodiment.

[0193] The memory 920 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 920 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 920 may optionally include a memory remotely arranged relative to the processor 910, and these remote memories may be connected to the controller via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0194] One or more modules are stored in the memory 920, and when executed by one or more processors 910, the home control method in any of the above method embodiments is executed, for example, the home control method described above is executed. Figure 7 Method steps 610 to 650 in.

[0195] Please refer to Fig.11 , Fig.11 1 is a block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable storage medium 1000 stores a program code 1010, and the program code 1010 can be called by a processor to execute the home control method described in the above method embodiment.

[0196] The computer-readable storage medium 1000 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. Optionally, the computer-readable storage medium includes a non-transitory computer-readable storage medium. The computer-readable storage medium 1000 has a storage space for program codes for executing any method steps in the above-mentioned home control method. These program codes can be read from or written to one or more computer program products. The program code can be compressed, for example, in an appropriate form.

[0197] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; under the idea of ​​the present invention, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present invention as above, which are not provided in detail for the sake of simplicity; although the present invention is described in detail with reference to the above embodiments, ordinary technicians in this field should understand that it is still possible to modify the technical solutions recorded in the above embodiments, or to replace some of the technical features therein; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention. Through the description of the above embodiments, ordinary technicians in this field 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. Ordinary technicians in this field can understand that all or part of the processes in the above embodiment method can be completed by computer programs to instruct 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 may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

Claims

1. A home control system, characterized in that: The system includes: a plurality of household devices and a server; Wherein, at least one of the plurality of home appliances is of a sensing type, and at least one of the plurality of home appliances is of a controlled type; and at least one of the plurality of home appliances serves as a gateway device; The household device belonging to the perception type is used to obtain environmental data, determine initial transmission data according to the environmental data, and send the initial transmission data to the gateway device; wherein the initial transmission data includes a device identification of the household device belonging to the perception type; The gateway device is used to receive the initial transmission data, generate target transmission data according to the initial transmission data, determine the device identification according to the initial transmission data, determine whether it is the main gateway device corresponding to the device identification according to the device identification and the device mapping relationship, and process the target transmission data according to the determination result; wherein the device mapping relationship includes the mapping relationship between the device identification and the main gateway device corresponding to it; The server is used to receive the target transmission data, and is also used to determine the target control device and control instructions based on the target transmission data and preset control rules; the server is also used to send the control instructions to the target control device so that the target control device executes the control instructions; wherein the target control device belongs to the home appliance of the controlled type.

2. The system according to claim 1, characterized in that The gateway device is also used for: When it is determined that the device itself is the main gateway device corresponding to the device identification according to the device identification and the device mapping relationship, the target transmission data is sent to the server.

3. The system according to claim 1, characterized in that The gateway device is also used for: When it is determined according to the device identification and the device mapping relationship that the device itself is not the master gateway device corresponding to the device identification, generating target transmission data according to the initial transmission data, and sending the target transmission data to a queue to be destroyed; If no success information is received from the master gateway device corresponding to the device identifier within a first preset time period after receiving the initial transmission data, the target transmission data is sent from the queue to be destroyed to the sending queue to send the target transmission data to the server; If a success message sent by the main gateway device corresponding to the device identifier is received within the first preset time from the receipt of the initial transmission data, the target transmission data is destroyed in the queue to be destroyed after the second preset time from the receipt of the initial transmission data; wherein the second preset time is greater than or equal to the first preset time.

4. The system according to claim 3, characterized in that The device mapping relationship also includes a mapping relationship between the device identifier and its corresponding target slave gateway device, and the gateway device is further used to: If no success information is received from the main gateway device corresponding to the home device of the perception type within the first preset time period after receiving the initial transmission data, and the gateway device is the target slave gateway device corresponding to the device identifier, the target transmission data is sent from the queue to be destroyed to the sending queue to send the target transmission data to the server.

5. The system according to claim 1, characterized in that The sensing type home device is further used to determine initial transmission data according to the environmental data, the protocol identifier and the device identifier when the environmental data meets the preset transmission conditions; The gateway device is further used to determine whether it is the main gateway device corresponding to the device identifier according to the device identifier and the device mapping relationship when the protocol identifier belongs to a preset identifier and the device identifier is different from the cached device identifier; The gateway device is further configured to filter the initial transmission data when the protocol identifier does not belong to a preset identifier or the device identifier is the same as a cached device identifier.

6. The system according to any one of claims 1 to 5, characterized in that: The system further comprises a terminal device, wherein: The terminal device is used to send offline information to the gateway device; The gateway device is further configured to send an offline notification to other gateway devices upon receiving the offline information; wherein the offline notification includes a gateway identifier of the gateway device; The gateway device that receives the offline notification is used to determine the gateway identifier according to the offline notification, and delete the gateway device corresponding to the gateway identifier in the device mapping relationship to update the device mapping relationship.

7. The system according to claim 6, characterized in that The system further comprises a terminal device, wherein: The terminal device is used to send online information to the gateway device; The gateway device is further configured to send an online notification to other gateway devices upon receiving the online information; The master gateway device among the gateway devices that receive the online notification sends the sub-device mapping relationship to the gateway device that sends the online information, so that the gateway device that sends the online information determines the device mapping relationship according to all the sub-device mapping relationships.

8. A home control method, characterized in that: A gateway device applied to a home control system according to any one of claims 1 to 7, the method comprising: receiving the initial transmission data; determining a device identification according to the initial transmission data; generating target transmission data according to the initial transmission data; Determine whether the device is the master gateway device corresponding to the device identifier according to the device identifier and the device mapping relationship; wherein the device mapping relationship includes a mapping relationship between the device identifier and its corresponding master gateway device; The target transmission data is processed according to the determination result.

9. The method according to claim 8, characterized in that The processing of the target transmission data according to the determination result includes: When it is determined that the device itself is the main gateway device corresponding to the device identification according to the device identification and the device mapping relationship, the target transmission data is sent to the server.

10. The method according to claim 8, characterized in that The processing of the target transmission data according to the determination result includes: When it is determined according to the device identification and the device mapping relationship that the device itself is not the master gateway device corresponding to the device identification, generating target transmission data according to the initial transmission data, and sending the target transmission data to a queue to be destroyed; If no success information is received from the master gateway device corresponding to the device identifier within a first preset time period after receiving the initial transmission data, the target transmission data is sent from the queue to be destroyed to the sending queue to send the target transmission data to the server; If a success message sent by the main gateway device corresponding to the home device of the perception type is received within the first preset time from the receipt of the initial transmission data, the target transmission data is destroyed in the queue to be destroyed after the second preset time from the receipt of the initial transmission data; wherein the second preset time is greater than or equal to the first preset time.

11. The method according to claim 8, characterized in that The device mapping relationship includes a plurality of sub-device mapping relationships, the sub-device mapping relationship includes a device identifier and a gateway device corresponding to the device identifier, and the gateway devices corresponding to the device identifier are sorted in the sub-device mapping relationship according to a preset rule, and the method further includes: It is defined that there are Q sensing types of home devices in the home control system, so the device mapping relationship includes Q sub-device mapping relationships, and the device identifier of the qth sensing type of home device corresponds to the qth sub-device mapping relationship; wherein Q is a positive integer, 1≤q≤Q; The gateway device whose sorting sequence number in the qth sub-device mapping relationship is greater than the preset sequence number is determined as the main gateway device corresponding to the home device of the qth perception type.

12. The method according to claim 11, characterized in that In the sub-device mapping relationship, the gateway devices corresponding to the home devices of the perception type are sorted according to the signal quality index, wherein the better the signal quality index is, the higher the sorting sequence number is, and the method further includes: Upon receiving the initial transmission data, determining a current signal quality indicator of a broadcast with the same initial transmission data received within a preset time; wherein the initial transmission data is sent by a home device belonging to a perception type in a broadcast manner; If it is determined that it does not belong to the gateway device in the sub-device mapping relationship corresponding to the home device of the perception type that sends the initial transmission data, and / or the difference between the signal quality index in the sub-device mapping relationship and the current signal quality index is greater than the preset difference; Then update the sub-device mapping relationship according to the current signal quality indicator and its own gateway identification; And send update information including the current signal quality indicator and the gateway identifier to the remaining gateway devices in the sub-device mapping relationship, so that the remaining gateway devices update the sub-device mapping relationship according to the update information.

13. The method according to any one of claims 8 to 11, characterized in that: It is defined that there are N sensing types of home devices in the home control system, and the heartbeat gateway device is the main gateway device in the sub-device mapping relationship of the p-th sensing type of home device, wherein N is a positive integer, 1≤p≤N, and the method further includes: If it is determined that it belongs to the heartbeat gateway device, it sends heartbeat information to other gateway devices at a preset period; wherein the heartbeat information includes the sub-device mapping relationship of the home device of the pth perception type.

14. The method according to claim 13, characterized in that The method further comprises: If it is determined that it does not belong to the heartbeat gateway device, then when receiving the heartbeat information, it updates the second sub-device mapping relationship of the p-th perception type of home device stored in itself according to the first sub-device mapping relationship of the p-th perception type of home device.

15. The method according to claim 13, characterized in that The method further comprises: If it is determined that it does not belong to the heartbeat gateway device, then record the latest receiving time of the heartbeat information; If the heartbeat information sent by the heartbeat gateway device is not received again within a preset time interval from the latest receiving time, the heartbeat gateway device is deleted from the device mapping relationship stored in itself to update the device mapping relationship.

16. A home control method, characterized in that: Applied to a home control system according to any one of claims 1 to 7, characterized in that the method comprises: The household device belonging to the perception type acquires environmental data, determines initial transmission data according to the environmental data, and sends the initial transmission data to the gateway device; wherein the initial transmission data includes a device identification of the household device belonging to the perception type; The gateway device receives the initial transmission data, generates target transmission data according to the initial transmission data, determines a device identifier according to the initial transmission data, determines whether it is a master gateway device corresponding to the device identifier according to the device identifier and a device mapping relationship, and processes the target transmission data according to the determination result; wherein the device mapping relationship includes a mapping relationship between the device identifier and its corresponding master gateway device; The server receives the target transmission data, and determines the target control device and the control instruction according to the target transmission data and the preset control rules; the server sends the control instruction to the target control device so that the target control device executes the control instruction; wherein, the target control device belongs to the home appliance of the controlled type.

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 that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the home control method described in any one of claims 8-16.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the electronic device to execute the home control method described in any one of claims 8-16.

Citation Information

Patent Citations

  • Method for realizing intelligent home security networking based on intelligent cloud television gateway

    CN103685323A

  • Information processing method and intelligent household device

    CN105446153A