Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The existing home control system mostly depends on a home intelligent gateway, the home intelligent gateway is connected with an internal network and an external network of a home, all home devices are connected with the home intelligent gateway in a wired or wireless mode, the home intelligent gateway carries out centralized management and decentralized control on all home devices through the internal network, and a user can realize remote control and view information of the home devices through the external network.
However, the above manner requires additional setting of the home intelligent gateway, and the setting cost of the home control system is high.
In order to solve the above problems, the present inventors propose a home control system, a method, an apparatus, an electronic device, and a storage medium, the system comprising: a plurality of home devices and servers; wherein at least one of the plurality of home devices belongs to a sensing type, and at least one of the plurality of home devices belongs to a controlled type; at least one home device of the plurality of home devices serves as a gateway device; the household equipment belonging to the perception type is used for acquiring environment data and determining initial transmission data according to the environment data; and is used for sending initial transmission data to the gateway device; the gateway equipment is used for determining target transmission data according to the received initial transmission data; and is used for sending target transmission data to the server; the server is used for receiving the target transmission data and determining target control equipment and control instructions according to the target transmission data and preset control rules; the server is also used for sending a control instruction to the target control equipment so that the target control equipment executes the control instruction; the target control equipment belongs to controlled household equipment. According to the method and the device, the household equipment is used as gateway equipment, the household intelligent gateway is not required to be additionally arranged, the control of the household control system can be achieved, and the setting cost of the household control system is reduced.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is an application scenario schematic diagram of a home control method provided in an embodiment of the present application. As shown in fig. 1, the application scenario 100 in fig. 1 includes: a plurality of home devices 110 and a server 120.
In some implementations, at least one home device 110 of the plurality of home devices is of a perception type and at least one home device of the plurality of home devices 110 is of a controlled type; at least one home device of the plurality of home devices 110 acts as a gateway device.
The sensing type home equipment is used for acquiring environment data, determining initial transmission data according to the environment data and sending the initial transmission data to the gateway equipment; the home equipment of the controlled type is used for receiving and executing the control instruction sent by the server; the gateway equipment is used for determining target transmission data according to the received initial transmission data; and is used to send the target transmission data to the server.
Illustratively, in some embodiments, as shown in fig. 1, the plurality of home devices 110 may include a temperature and humidity sensor 111, a dishwasher 112, an air conditioner 113, and a humidifier 114.
Specifically, in the application scenario 100 shown in fig. 1, the temperature and humidity sensor 111 is a sensing type home device, and may acquire temperature and humidity information in a home environment; the dish washer 112 and the air conditioner 113 are gateway devices, and can send the temperature and humidity information sent by the temperature and humidity sensor 111 to a server; the humidifier 114 is a controlled type of household device.
In some embodiments, when the temperature and humidity sensor 111 senses a change in temperature and humidity in the home environment, for example, when the humidity is lower than a preset threshold, temperature and humidity information is sent to the dish washer 112 and the air conditioner 113 respectively through a bluetooth broadcasting mode, the dish washer 112 and the air conditioner 113 both receive the temperature and humidity information and forward the temperature and humidity information to the server 120, the server 120 determines that the target control device is the humidifier 114 according to the temperature and humidity information, and determines that the control command is a humidification command, so that the server 120 sends the control command to the humidifier 114, and after the humidifier 114 receives the control command, humidification work starts to improve the humidity in the home environment.
In some embodiments, the home device may act as a gateway device and belong to the target control device. For example, the humidifier 114 may receive the temperature and humidity information sent by the temperature and humidity sensor 111, forward the temperature and humidity information to the server 120, and may also receive a control instruction sent by the server 120 to perform a humidifying operation.
In some embodiments, the home device may be a gateway device, and belongs to a sensing type home device, and also belongs to a target control device. For example, if the dishwasher 112 malfunctions during operation, for example, the working environment of the dishwasher 112 changes, for example, the dishwasher 112 detects a water shortage, the dishwasher 112 may directly send environmental data to the server 120 as a gateway device, the server 120 determines that the control command is a shutdown command after receiving the environmental data, and the controlled object is still the dishwasher 112, where the dishwasher 112 belongs to the target control device and executes the control command.
It will be understood that each home device in fig. 1 is only used as an example, and is not limited to the present application, for example, the sensing type home device may also be a switch, a door magnetic sensor, etc. in the home, the gateway device may also be a refrigerator, a bluetooth speaker, etc., and the controlled type home device may also be an air conditioner, a fan heater, etc., which is not limited to the present application.
For example, when the sensing type home device has a temperature sensing function, the target control device may be a fan heater or the like; when the sensing type home equipment is each switch in the home, the target control equipment can be home equipment linked with the switch, for example, the switch is a lamp switch, and the target control equipment is a lamp controlled by the switch; when the sensing type household equipment is door magnetism, the target control equipment is the household equipment which works in the area corresponding to the door magnetism, and the like; when the sensing type home equipment has a human body sensing function, the target control equipment can be a Bluetooth sound box and the like.
According to the method and the device, the household equipment is used as gateway equipment, the household intelligent gateway is not required to be additionally arranged, the control of the household control system can be achieved, the setting cost of the household control system is reduced, and because a plurality of gateway equipment is often arranged in the Bluetooth broadcasting range of the household equipment of the perception type, the household equipment of the perception type can communicate with the gateway equipment, and therefore even if one gateway equipment fails, the rest gateway equipment can send environmental data to the server, and the robustness of the household control system is improved.
Referring to fig. 2 again, fig. 2 is a schematic structural diagram of a home control system according to an embodiment of the present application. As shown in fig. 2, the home control system 200 includes: a plurality of home devices 210 and a server 220; the plurality of home devices 210 include a sensing type home device 211, a gateway device 212, and a target control device 213.
In some embodiments, at least one home device of the plurality of home devices 210 is of a sensing type, i.e., at least one home device is of a sensing type of home device 211, and at least one home device of the plurality of home devices 210 is of a controlled type, i.e., at least one home device is of a target control device 213; at least one home device of the plurality of home devices acts as a gateway device, i.e., at least one home device belongs to gateway device 212.
In some embodiments, the home device 211 belonging to the sensing type is used for acquiring environmental data and determining initial transmission data according to the environmental data; and is used to send initial transmission data to gateway device 212.
In some embodiments, the environmental data is home environmental information acquired by the sensing type home device 211, such as humidity information, etc. in the home environment.
In other embodiments, the environmental data may also be work environment information acquired by the sensing type home device 211, for example, whether the work environment is abnormal, whether the workflow fails, etc.
In some embodiments, the awareness-type home device 211 sends the initial transmission data to the gateway device 212 via short-range communication.
The short-range communication modes include Z/gBee, bluetooth, NFC, and the like. Optionally, in the embodiment of the present application, the sensing type home device 211 sends the initial transmission data to the gateway device 212 through the bluetooth communication method is described as an example.
Further, when the sensing-type home device 211 transmits the initial transmission data to the gateway device 212 through the bluetooth communication, the sensing-type home device 211 may perform bluetooth broadcasting at a high frequency, i.e., fast broadcasting, in a short time, and the sensing-type home device 211 may broadcast 200 times within 1.5S, for example.
It will be appreciated that many applications of the device require stringent power consumption and will require the device to be in a broadcast mode at all times, when the broadcast frequency is reduced to reduce power consumption, which may be referred to as the device being broadcasting slowly.
The faster the broadcast frequency, the more advantageous the connection, so for quick discovery and connection, preferably, the perceived type of home device 211 can employ quick broadcasting to improve the interference immunity of the broadcast.
In some implementations, the sensory-type home device 211 is also to: when the environment data accords with the preset sending condition, the initial transmission data is determined according to the environment data, the protocol identification and the equipment information.
In some embodiments, the protocol identifier is used to identify the data type of the initially transmitted data, and it is understood that the sensing-type home device 211 will also send data to the gateway device 212 when accessing the home control system 200, but the protocol identifier of the data is different from the protocol identifier of the initially transmitted data.
Optionally, the protocol identification is defined as a specific number of two bytes.
In some implementations, the device information includes a universally unique identification code (Un I versa l l y Un I que I dent I f ier, uuid), a media access control (Med I a Access Contro l, MAC) address, and a device runtime of the awareness-type home device 211.
Optionally, UU ID has a byte length < device runtime has a byte length < MAC address. Illustratively, uuid is two bytes in length, device runtime is four bytes in length, and MAC address is six bytes in length, thereby reducing the byte length of the bluetooth broadcast taken up at the time of broadcast.
In some embodiments, the environmental data in the initial transmission data is encrypted data, where the sensing-type home device 211 is further configured to obtain the initial environmental data, and encrypt the initial environmental data according to the device running time to obtain the environmental data.
Illustratively, the perceived type of home device 211 may encrypt the initial environmental data by an advanced encryption standard (Advanced Encrypt i on Standard, AES) in a symmetric encryption algorithm, where both encryption and decryption use the same key, which may be 128, 192 or 256 bits in length. AES includes: codebook mode, cipher block chaining mode, calculator mode, cipher feedback mode, output feedback mode.
In some embodiments, the device running time is used as the key of the AES, because the device running time changes in real time, the key also changes in real time, so that encryption security is improved, the byte length of the device running time is far smaller than the required byte length of the key, and the byte length of the bluetooth broadcast is limited, for example, 37 bytes at most, so that the device running time is used as the key of the AES, the data space of the bluetooth broadcast is saved, and the bluetooth broadcast can carry more information.
Further, when the byte length of the device runtime is insufficient, 0 may be appended after the device runtime until the length meets the encryption or encryption requirement.
Referring to fig. 3 again, fig. 3 is a schematic diagram of an encryption flow provided in an embodiment of the present application. As shown in fig. 3, fig. 3 illustrates encryption in the codebook mode, and the encryption flow 300 includes: plaintext block 310, key 320, encryptor 330, and ciphertext block 340.
Specifically, plaintext block 310 includes initial environmental data, and in some embodiments, plaintext block 310 may further include a cyclic redundancy check (Cyc l i c Redundancy Check, CRC) corresponding to the initial environmental data; key 320 is the device runtime; encryptor 330 is configured to encrypt plaintext block 310 based on key 320 to obtain ciphertext block 340, and it is understood that ciphertext block 340 may include encrypted initial environmental data, i.e., environmental data, and may also include environmental data and an encrypted CRC check code.
Further, when the ciphertext block 340 includes the environment data and the encrypted CRC check code, the sensing-type home device 211 is further configured to determine the initial transmission data according to the environment data, the protocol identifier, the device information, and the encrypted CRC check code.
In some implementations, gateway device 212 is configured to determine target transmission data from the received initial transmission data; and is used to send the target transmission data to the server 220.
In some implementations, gateway device 212 may connect to the internet through WI F I and send the targeted transfer data to server 220 through hypertext transfer protocol (Hyper Text Transfer Protoco l, HTTP).
In some embodiments, the server 220 is configured to receive the target transmission data, and the server 220 is further configured to determine the target control device 213 and the control instruction according to the target transmission data and the preset control rule; the server 220 is further configured to send a control instruction to the target control device 213, so that the target control device 213 executes the control instruction; the target control device 213 belongs to a controlled home device.
In some implementations, the server 220 may send control instructions to the target control device 213 via an internet of things protocol. Optionally, the internet of things protocol includes a message queue telemetry transport protocol (Message Queu i ng Te l emetry Transport, MQTT), a transmission control protocol (Transmi ss i on Contro lProtoco l, TCP), and the like.
Illustratively, the internet of things protocol is illustrated as the MQTT protocol, which is a "lightweight" communication protocol based on a publish/subscribe mode. In the communication process, three identities exist in the MQTT protocol: publishers (publ ish), brokers (Broker), subscribers (subscriber ibe). In one embodiment of the present application, both the publisher and the subscriber are home devices, and the publisher may be both subscribers and the proxy is a server. The messages transmitted by the MQTT are divided into: topic (Top ic) and load (path load), topic is the type of message, after subscribing, the subscriber will receive the message of topic; the load, i.e. the content of the message, contains a certain load.
Further, the target control device subscribes to a unique topic, which may be issued by the server when configuring the network for the target control device, and when the server 220 issues a control instruction to the topic, the target control device subscribed to the topic receives the control instruction to perform a corresponding operation.
When only one gateway device is provided, if the gateway device fails and cannot work normally, the home control system is easily paralyzed, and in order to solve the above problem, in some embodiments, the number of gateway devices in the home control system is set to be a plurality of.
It can be understood that when the number of gateway devices is plural, the sensing type home devices can communicate with plural gateway devices, so that even if one gateway device fails, the rest gateway devices can send the environmental data to the server, thereby improving the robustness of the home control system.
In some embodiments, the home control system 200 further includes a terminal device 230, where the sensing type home device 211 is further configured to send pairing information to the terminal device 230; the terminal device 230 is configured to send pairing information to the server 220; the server 220 is further configured to update pairing device information according to the pairing information; and is used to send paired device information to gateway device 212.
In some embodiments, when the sensing-type home device 211 is accessed to the home control system 200, the sensing-type home device 211 may broadcast pairing information, for example, by pressing a pairing key on the sensing-type home device 211 to trigger the broadcasting of the pairing information, at this time, bluetooth scanning is performed by an APP on the terminal device 230, after the APP scans the pairing information, the pairing information is reported to the server 220, the server 220 may update and store a configuration table after receiving the pairing information, where the configuration table includes information such as mac address, address type, and product model corresponding to the sensing-type home device 211, and the server 220 may also synchronously issue the current configuration table to the gateway device 212 to ensure timely update of the configuration table of the gateway device 212.
It may be appreciated that, when the gateway device 212 receives the initial transmission data, the device information of the sensing type home device 211 that sends the initial transmission data may be determined according to the initial transmission data, and if the device information does not belong to the device information in the configuration table of the gateway device 212, it is indicated that the gateway device 212 is not responsible for processing the data transmitted by the sensing type home device 211, and the initial transmission data may be filtered directly.
Further, the gateway device may also actively request the latest configuration table from the server after the network is disconnected and reconnected.
Referring to fig. 4 again, fig. 4 is a flow chart of a home control method according to an embodiment of the present application. As shown in fig. 4, the home control method 400 is applied to the gateway device, and includes: steps 410 to 420.
Step 410: and determining target transmission data according to the received initial transmission data.
In some embodiments, step 410 comprises: and determining target transmission data according to the environment data, the protocol identification and the equipment information.
Specifically, after receiving the initial transmission data, the gateway device determines the environment data, the protocol identifier and the device information according to the initial transmission data, and then processes the environment data, the protocol identifier and the device information according to a target communication protocol used by the gateway device for communication with the server, so as to generate target transmission data.
In some embodiments, the initially transmitting data includes: including protocol identification and device information, step 410 includes the following steps.
(1) And when the protocol identifier belongs to the preset identifier, determining whether the equipment information is identical to the cached equipment information.
(2) And determining target transmission data according to the initial transmission data when the device information is different from the cached device information.
In some implementations, the device information includes a device identification and a device runtime; the step of determining whether the device information is identical to the cached device information includes the following steps.
(1.1) if the device identifier of the cached device information is the same as the device identifier of the device information, and the device running time of the cached device information is the same as the running time of the device information, determining that the device information is the same as the cached device information.
(1.2) if not, determining that the device information is different from the cached device information.
In some embodiments, when the protocol identifier does not belong to the preset identifier, the initial transmission data is characterized as not being sent out because the home environment is changed, that is, the environment data accords with the preset sending condition, and the initial transmission data is directly filtered at the moment.
In some embodiments, when the initial transmission data is received, whether the same initial transmission data is received may be determined according to whether the device information is the same as the cached device information, and it may be understood that the sensing type home device may perform bluetooth broadcasting multiple times within a period of time, so that the gateway device may receive multiple pieces of the same initial transmission data, and therefore, the same initial transmission data may be filtered according to the above manner, so as to improve data transmission efficiency.
In some embodiments, after receiving the data, the gateway device stores the data in the buffer pool for a period of time, and the data in the buffer pool is referred to as buffer data, where the time for storing the buffer data in the buffer pool can be set according to the needs, which is not limited in this application. Thus, if there is cache data in the cache pool with the same device identifier and the same device running time as the initial transmission data, i.e. the device information is the same as the device information of the cached cache data, the gateway device is characterized to have received and sent the same data to the server, and the repeated initial transmission data can be filtered out.
Step 420: and sending the target transmission data to the server.
In some embodiments, the initial transmission data sent by the home device of the awareness type to the gateway device is stored in a message queue of the gateway device, and the home control method 400 further includes the following steps before step 410.
(1) It is detected whether there is initial transmission data in the message queue.
(2) When the initial transmission data exists in the message queue, the initial transmission data is sequentially acquired in a sequence from front to back according to the sequence of the initial transmission data entering the message queue.
For example, if the first initial transmission data is queued before the second initial transmission data, the gateway device acquires the first initial transmission data first and then acquires the second initial transmission data.
By the method, the gateway equipment is only responsible for transmitting data to the server and does not further process the data, so that the household equipment can also serve as the gateway equipment, the setting cost of the household control system is reduced, and even if one gateway equipment fails, the rest gateway equipment can still transmit data to the server, so that the probability of losing information sent by the household equipment of a perception type is reduced.
Referring to fig. 5 again, fig. 5 is a flow chart of another home control method according to an embodiment of the present disclosure. As shown in fig. 5, the home control method 500 includes: steps 510 to 530.
Step 510: target transmission data is received.
Step 520: and determining target control equipment and control instructions according to the target transmission data and preset control rules.
In some implementations, the target transmission data includes environmental data, protocol identification, and device information; the device information includes a device runtime; step 520 includes the following steps.
(1) It is determined whether the target transmission data is duplicate data based on the device information.
(2) And if the target transmission data is not the repeated data, decrypting the environment data based on the running time of the equipment, and determining the decrypted environment data.
(3) And determining target control equipment and control instructions according to the decrypted environment data and preset control rules.
In some embodiments, the device information further includes a device identifier, and the step of determining whether the target transmission data is duplicate data according to the device information includes:
and determining whether the target transmission data is repeated data according to the device identification and the device running time.
Specifically, if the server receives the target transmission data with the same device identifier and device running time, the newly received target transmission data is directly filtered.
In some embodiments, preset control rules corresponding to each environmental data may be preset according to the environmental data that may be acquired by each sensing type of home device.
For example, if the preset sensing type of home device includes a temperature sensor, the preset control rule may include:
(1) When the temperature of the temperature sensor is lower than a first preset temperature, the warm air blower is controlled to start working. The target control equipment is a warm air blower at the moment, and the control instruction is a temperature rising instruction.
(2) And when the temperature of the temperature sensor is higher than a second preset temperature, controlling the air conditioner to start working. The target control equipment is an air conditioner at the moment, and the control instruction is a cooling instruction.
Referring to fig. 6 again, fig. 6 is a schematic diagram of a decryption flow provided in an embodiment of the present application. As shown in fig. 6, fig. 6 illustrates an example of decryption in the codebook mode, and the decryption flow 600 includes: ciphertext block 610, key 620, decryptor 630, and plaintext block 640.
Specifically, ciphertext block 610 may include environmental data, i.e., encrypted initial environmental data, and in some embodiments, ciphertext block 610 may further include a cyclic redundancy check code (Cyc l i c Redundancy Check, CRC) corresponding to the encrypted initial environmental data; key 620 is the device runtime; decryptor 630 is configured to decrypt ciphertext block 610 based on key 620 to obtain plaintext block 640.
Further, when plaintext block 640 includes a CRC check code and initial environmental data, i.e., decrypted environmental data, the server is further configured to determine whether the initial environmental data is complete according to the CRC check code, and when the initial environmental data is complete, the re-executing step determines a target control device and a control command according to the decrypted environmental data and a preset control rule, so as to prevent the initial environmental data from generating a data loss during transmission, and the server issues an erroneous control command or determines an erroneous target control device, so that a danger occurs.
Step 530: and sending a control instruction to the target control equipment.
Specifically, a control instruction is sent to the target control device, so that the target control device executes corresponding operations according to the control instruction after receiving the control instruction.
Referring to fig. 7 again, fig. 7 is a flow chart of another home control method according to an embodiment of the present disclosure. As shown in fig. 7, the home control method 700 includes: steps 710 through 770.
Step 710: the sensing type household equipment acquires environment data, and initial transmission data is determined according to the environment data.
Step 720: the home device of the awareness type sends initial transmission data to at least one gateway device.
Step 730: the at least one gateway device determines target transmission data from the received initial transmission data.
Specifically, each gateway device that receives the initial transmission data determines the target transmission data according to the received initial transmission data.
Step 740: at least one gateway device sends target transmission data to a server.
Specifically, each gateway device that receives the initial transmission data transmits the target transmission data to the server.
Step 750: and the server determines target control equipment and control instructions according to the target transmission data and preset control rules.
Step 760: the server sends a control instruction to the target control device.
Specifically, the server sends a control instruction to the target control device, so that the target control device executes the control instruction; the target control equipment belongs to controlled household equipment.
Step 770: the target control device executes the control instruction.
Specific details of steps 710 to 770 may be referred to the description of the above portions of the specification, and are not repeated herein.
Referring to fig. 8 again, fig. 8 is another flow chart of another home control method according to the embodiment of the present application. As shown in fig. 8, the home control method 800 includes: steps 801 to 810.
Step 801: the home equipment of the perception type acquires initial environment data, encrypts the initial environment data and CRC check codes corresponding to the initial environment data, and obtains the environment data and the encrypted CRC check codes.
Step 802: and the home equipment of the perception type determines initial transmission data according to the environment data, the protocol identification, the equipment information and the encrypted CRC check code.
Step 803: the home device of the awareness type sends initial transmission data to at least one gateway device.
Step 804: at least one gateway device determines a protocol identification and device information based on the initial transmission data.
Step 805: when the protocol identifier belongs to a preset identifier and the equipment information is different from the cached equipment information, at least one gateway equipment determines target transmission data according to the initial transmission data.
Step 806: at least one gateway device sends the target transmission data to the server.
Step 807: and when the target transmission data is not the repeated data, the server decrypts the environment data based on the running time of the equipment to obtain the initial environment data and the CRC check code.
Step 808: the server judges whether the initial environmental data is complete according to the CRC check code, and when the initial environmental data is complete, the server determines the target control equipment and the control instruction according to the initial environmental data.
Step 809: the server sends a control instruction to the target control device.
Step 810: the target control device executes the control instruction.
Specific details of steps 801 to 810 may be referred to the description of the above part of the specification, and are not repeated here.
The application provides a home control method, a home control device, electronic equipment and a storage medium, wherein the system comprises: a plurality of home devices and servers; wherein at least one of the plurality of home devices belongs to a sensing type, and at least one of the plurality of home devices belongs to a controlled type; at least one home device of the plurality of home devices serves as a gateway device; the household equipment belonging to the perception type is used for acquiring environment data and determining initial transmission data according to the environment data; and is used for sending initial transmission data to the gateway device; the gateway equipment is used for determining target transmission data according to the received initial transmission data; and is used for sending target transmission data to the server; the server is used for receiving the target transmission data and determining target control equipment and control instructions according to the target transmission data and preset control rules; the server is also used for sending a control instruction to the target control equipment so that the target control equipment executes the control instruction; the target control equipment belongs to controlled household equipment. According to the method and the device, the household equipment is used as gateway equipment, the household intelligent gateway is not required to be additionally arranged, the control of the household control system can be achieved, and the setting cost of the household control system is reduced.
Referring to fig. 9 again, fig. 9 is a schematic structural diagram of a home control device according to an embodiment of the present disclosure. As shown in fig. 9, the home control device 900 includes: a determining unit 910 and a transmitting unit 920.
A determining unit 910, configured to determine target transmission data according to the received initial transmission data.
And a transmitting unit 920 configured to transmit the target transmission data to the server.
It should be noted that, for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and the relevant points are referred to in the description of the method embodiment. Any of the described processing manners in the method embodiment may be implemented by a corresponding processing module in the device embodiment, which is not described in detail in the device embodiment.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
Referring to fig. 10 again, fig. 10 is a schematic structural diagram of another home control device according to an embodiment of the present disclosure. As shown in fig. 10, the home control device 1000 includes: a receiving unit 1010, a determining unit 1020, and a transmitting unit 1030.
A receiving unit 1010, configured to receive the target transmission data.
A determining unit 1020 for determining the target control device and the control instruction according to the target transmission data and the preset control rule.
A transmitting unit 1030 configured to transmit a control instruction to the target control device.
It should be noted that, for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and the relevant points are referred to in the description of the method embodiment. Any of the described processing manners in the method embodiment may be implemented by a corresponding processing module in the device embodiment, which is not described in detail in the device embodiment.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
Referring to fig. 11, fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 11, the electronic device 1100 includes: one or more processors 1110, and a memory 1120, one processor 1110 being illustrated in fig. 11.
The processor 1110 and the memory 1120 may be connected by a bus or otherwise, for example in fig. 11.
The processor 1110 is configured to execute the home control method in the above method embodiment.
The memory 1120 is used as a non-volatile computer readable storage medium for storing non-volatile software programs, non-volatile computer executable programs, and modules, such as program instructions/modules for a home control method in the embodiments of the present application. The processor 1110 executes various functional applications of the electronic device and data processing, that is, implements the home control method of the above-described method embodiment, by running nonvolatile software programs, instructions, and modules stored in the memory 1120.
Memory 1120 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to the use of the electronic device, etc. In addition, memory 1120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 1120 optionally includes memory remotely located relative to processor 1110, which may be connected to the controller via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more modules are stored in memory 1120 that, when executed by one or more processors 1110, perform the home control method in any of the method embodiments described above, e.g., perform method steps 410-420 in fig. 4 described above or perform method steps 510-530 in fig. 5 described above.
Referring to fig. 12, fig. 12 is a block diagram illustrating a computer readable storage medium according to an embodiment of the present application. The computer readable storage medium 1200 has stored therein program code 1210, the program code 1210 being executable by a processor to perform the home control method described in the above method embodiments.
The computer readable storage medium 1200 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 comprises a non-volatile computer readable medium (non-trans i tory computer-readab l estorage med i um). The computer readable storage medium 1200 has storage space for program code to perform any of the method steps in the home control method described above. The program code can be read from or written to one or more computer program products. The program code may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; the technical features of the above embodiments or in the different embodiments may also be combined within the idea of the invention, the steps may be implemented in any order, and there are many other variations of the different aspects of the invention as above, which are not provided in details for the sake of brevity; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention. From the above description of embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus a general purpose hardware platform, but may also be implemented by means of hardware. Those skilled in the art will appreciate that a program implementing all or part of the above-described embodiment method steps can be implemented by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium, and the program can include the above-described embodiment method steps when executed. The storage medium may be a magnetic disk, an optical disk, a Read-On-y Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like.