Smart home equipment control method, gateway and system
By storing the instruction library in the gateway, unified control of smart home devices is achieved, which solves the problems of ecosystem incompatibility and protocol incompatibility, improves user experience and device linkage capabilities, and simplifies the device access process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU HEMI TECHNOLOGY CO LTD
- Filing Date
- 2026-02-03
- Publication Date
- 2026-04-14
AI Technical Summary
Existing smart home devices suffer from ecosystem incompatibility and protocol incompatibility, resulting in isolated control methods. Users need to install multiple apps and remote controls, making unified coordination and linkage control impossible. Connecting new devices is complicated, leading to a poor user experience.
By storing the instruction library in the gateway, the conversion from the first type of instruction to the second type of instruction is realized, the differences in underlying protocols are shielded, the devices of different brands are controlled in a unified manner, scene control and local instruction forwarding are supported, and the dependence on the cloud is reduced.
It enables unified control of devices from different brands, improves user experience, simplifies device access procedures, enhances control response speed and privacy security, and reduces reliance on the network.
Smart Images

Figure CN121857362A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of intelligent control technology, and more specifically, to a method, gateway, and system for controlling smart home devices. Background Technology
[0002] With the increasing intelligence of home devices, people are able to enjoy a more comfortable and convenient living environment. However, smart home devices from different manufacturers may experience control incompatibility due to issues such as ecosystem incompatibility and protocol incompatibility. Currently, mainstream smart home devices mainly adopt a direct binding control method, that is, users establish a direct connection with the device through a mobile application (APP) to realize the control function of a single device.
[0003] While app-based control has enabled some degree of smart home device integration, the diverse range of smart home devices means users typically need to install different apps to control devices of different types or from different manufacturers in order to achieve whole-house smart control. This approach is not only cumbersome but also fails to achieve unified coordination between devices, presenting significant problems. Summary of the Invention
[0004] This disclosure provides a smart home device control method, gateway, and system, which can solve the above-mentioned problems of the prior art. The technical solution is as follows: According to one aspect of the present disclosure, a smart home device control method is provided, applied to a gateway, the gateway storing an instruction library, the instruction library including multiple conversion information, the conversion information converting a first type of instruction into a second type of instruction supported by the smart home device connected to the gateway, the first type of instruction conforming to a preset format; Methods, including: Receive interactive information sent by the user terminal, and obtain the target first type of instruction based on the interactive information. The target first type of instruction includes an instruction to cause the target device to perform a first operation. Based on the conversion information between the target type 1 instructions and the target device type 2 instructions in the instruction library, the target type 1 instructions are converted into the target type 2 instructions supported by the target device; Send the second type of target instruction to the target device so that the target device performs the first operation.
[0005] In one possible implementation, the target first type of instruction is obtained based on the interaction information, including: Obtain the target scene command from the interaction information. The target scene command is used to switch one or more smart home devices involved in the target scene to the working state indicated by the target scene. The smart home devices involved in the target scenario are taken as target devices. According to the target scenario instructions, the first type of target instructions corresponding to each target device involved in the target scenario are obtained. For each target device, the first operation is the operation performed by the target device when switching to the working state indicated by the target scenario.
[0006] In one possible implementation, the instruction library also includes scenarios, scenario instructions, and a mapping relationship between the first type of instruction set. The first type of instruction set corresponding to the scenario instructions includes the first type of instructions executed by each smart home device involved in the scenario when the scenario instructions are executed. Based on the target scenario instructions, the first type of target instructions corresponding to each target device involved in the target scenario are obtained, including: Determine the target scenario instruction from the scenario instructions stored in the instruction library, and obtain the target first type instruction set corresponding to the target scenario instruction; Each smart home device in the first type of target instruction set is taken as the target device, and for each target device, the first type of instruction in the first type of target instruction set is taken as the target first type instruction.
[0007] In one possible implementation, obtaining the first type of instruction corresponding to each target device involved in the target scenario based on the target scenario instruction further includes: The target scenario instruction is sent to the server so that the server can perform instruction orchestration operation according to the target scenario instruction, generate the target first type instruction corresponding to each target device when the second operation is performed in the target scenario, and feed it back to the gateway.
[0008] In one possible implementation, the instruction orchestration operation includes: The server parses the target scenario instructions to determine the target scenario and the second operation. The target scene and the second operation input device operation orchestration model are combined to obtain at least one target device corresponding to the target scene output by the device operation orchestration model, and the first operation corresponding to each target device. For each target device, generate the first type of target instruction in a preset format according to the first operation corresponding to the target device.
[0009] In one possible implementation, the method also includes: It is determined that an update operation is being performed on the first smart home device, and the device identifier of the first smart home device is obtained. The update operation includes: establishing an initial connection with the first smart home device or updating the functions of the first smart home device. A command download request is sent to the server to download the sub-command library corresponding to the first smart home device. The sub-command library includes the conversion information involved in the first smart home device. The command library stored in the gateway is updated with the sub-command library. The command download request includes the device identifier of the first smart home device.
[0010] In one possible implementation, receiving interactive information sent by the user client also includes, prior to: Receive user biometric data sent from the client; Compare the biometric features with the biometric features pre-stored in the gateway; If the comparison is successful, the user's identity verification is confirmed, and the interactive information will be received.
[0011] In one possible implementation, the method also includes: Receive operating parameters and energy consumption data from the second smart home device; Input the operating parameters and energy consumption data into the health model of the second smart home device, and obtain the health risk judgment result output by the health model. The health model is established based on historical operating parameters and historical energy consumption data. The historical operating parameters and historical energy consumption data are from the second smart home device or at least one of other smart home devices with the same device model as the second smart home device. If the health risk assessment results indicate that the second smart home device poses a health risk, a health risk warning message will be sent to the user.
[0012] According to another aspect of the present disclosure, a gateway is provided that, when executed, implements the steps of the above-described smart home device control method.
[0013] According to another aspect of the present disclosure, a smart home device control system is provided, including: a gateway, a user terminal, a server, and at least one smart home device; The gateway executes the steps of the above-mentioned smart home device control method.
[0014] According to another aspect of the present disclosure, an electronic device is provided, the electronic device including a memory, a processor, and a computer program stored in the memory, the processor executing the computer program to implement the above-described method.
[0015] According to another aspect of the present disclosure, a computer-readable storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements the above-described method.
[0016] According to one aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described method.
[0017] The beneficial effects of the technical solutions provided in this disclosure are: The gateway's stored instruction library contains conversion information used to convert first-type instructions into second-type instructions supported by smart home devices, establishing a dynamic mapping and conversion mechanism between first-type instructions conforming to a preset format and second-type instructions conforming to the device's communication protocol. When the gateway receives interaction information and obtains the target first-type instruction, it queries its built-in instruction library to convert the target first-type instruction into a second-type instruction with a specific protocol recognizable by the target device, and sends it to the target device to execute the corresponding first operation. This conversion mechanism masks the protocol differences of the underlying devices, enabling unified control of devices from different brands and with different protocols. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments of this disclosure will be briefly introduced below.
[0019] Figure 1 A flowchart illustrating a smart home device control method provided in an embodiment of this disclosure; Figure 2 This is a schematic diagram of an interactive information acquisition process provided in an embodiment of the present disclosure; Figure 3 This is a schematic diagram of the structure of a smart home device control system provided in an embodiment of the present disclosure; Figure 4 This is a schematic diagram of the structure of a gateway provided in an embodiment of the present disclosure; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0020] The embodiments of this disclosure are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this disclosure, and do not constitute a limitation on the technical solutions of the embodiments of this disclosure.
[0021] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this disclosure mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element are connected through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” can be implemented as “A,” or as “B,” or as “A and B.”
[0022] To make the objectives, technical solutions, and advantages of this disclosure clearer, the embodiments of this disclosure will be described in further detail below with reference to the accompanying drawings.
[0023] The following description of several exemplary embodiments illustrates the technical solutions of this disclosure and the technical effects produced by these solutions. It should be noted that the following embodiments can be referenced, learned from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0024] The relevant technologies involved in this application are described below: Currently, mainstream smart home devices (hereinafter referred to as devices, such as smart clothes dryers, smart lights, smart air conditioners, etc.) mainly adopt the direct binding control method, that is, users directly connect to the device through a mobile APP (via wireless protocols such as Bluetooth and Wi-Fi) to realize the control function of a single device.
[0025] Taking smart clothes drying racks as an example, the existing direct-binding control methods mainly include: 1. Direct control via mobile APP: Users can directly connect to the clothes drying rack via Bluetooth or Wi-Fi through a mobile APP to control functions such as lifting, lighting, etc.
[0026] 2. Remote control, which means using a dedicated remote control (such as a magnetic palm-sized remote control) to wirelessly control the device at close range.
[0027] 3. Local voice control: The smart clothes dryer has a built-in offline voice recognition module that can directly respond to specific voice commands through the acoustic interaction system.
[0028] While the above control methods achieve a certain degree of intelligence, they have the following problems: 1. The control methods are isolated. Different brands and types of devices require different control apps and hardware (remote controls, gateways, etc.), making unified management impossible.
[0029] For example, users need to use the first APP to control the clothes dryer, the second APP to control the lights, and the third APP to control the refrigerator, etc.
[0030] 2. Command forwarding relies on the cloud. When existing smart speakers and other devices control home devices, they usually need to upload commands to a cloud server and then send them to the target device. This method relies on an internet connection, cannot be used when the network is poor, and poses a risk of privacy leakage.
[0031] 3. Difficulty in inter-device coordination: Due to the lack of a unified local gateway, it is difficult to achieve linkage control between devices (such as automatically turning on the lights when the clothes dryer is lowered).
[0032] 4. New device integration is complex. Users need to manually bind and configure each new device, which is cumbersome and results in a poor user experience.
[0033] Therefore, current commonly used smart home device control methods suffer from a lack of unified coordination mechanisms between devices. This results in users needing to install multiple apps and use multiple remote controls to achieve whole-house smart control, leading to cumbersome operation. This disclosure provides a smart home device control method to address these technical problems to some extent.
[0034] The following description of several exemplary embodiments illustrates the technical solutions of this disclosure and the technical effects produced by these solutions. It should be noted that the following embodiments can be referenced, learned from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0035] It is understood that in the smart home device control method provided in this disclosure, any step of the method can be executed by an electronic device and / or a server, and all steps in the method can be executed independently by the electronic device or the server, or jointly by the electronic device and the server.
[0036] The server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services. Electronic devices can be smartphones, tablets, laptops, desktop computers, smart voice interaction devices (such as smart speakers), wearable electronic devices (such as smartwatches), in-vehicle terminals, smart home appliances (such as smart TVs), AR / VR devices, etc., but are not limited to these.
[0037] The embodiments of this disclosure will be described subsequently using electronic devices as the execution subject; however, this does not constitute a limitation on the embodiments of this disclosure.
[0038] The smart home device control method provided in this disclosure is applied to a gateway.
[0039] A gateway, also known as an internetwork connector or protocol converter, is a crucial device or software module for interconnecting different networks or systems. In the field of intelligent control technology, the gateway is the core control device of a smart home control system, responsible for unifying the access and control of different communication protocols (such as Wi-Fi, Zigbee, Bluetooth, etc.) and enabling collaborative operation between smart home devices through cloud or local processing.
[0040] The gateway can be carried by devices such as 5G signal conversion terminal equipment (5G Customer Premise Equipment, or 5GCPE), smart speakers, or dedicated voice assistant gateways. The specific device corresponding to the gateway can be determined according to actual needs.
[0041] Smart home devices refer to home products that are connected through Internet of Things (IoT) technology and have intelligent functions. They can be remotely controlled, operated automatically, or work in conjunction with other devices, including but not limited to smart air conditioners, smart speakers, smart lights, smart door locks, smart clothes dryers, smart curtains, smart switches, and human body sensor flat panel lights.
[0042] In this embodiment of the disclosure, the gateway is connected to each device, and the gateway pre-stores an instruction library, which includes multiple conversion information. The first type of instruction is converted into a second type of instruction supported by the smart home device connected to the gateway through the conversion information. The first type of instruction conforms to a preset format.
[0043] It is understandable that the first type of instruction refers to structured instructions generated in a unified preset format, while the second type of instruction refers to specific instructions for a particular device application, matching the communication protocol supported by that device, and used to control that device. That is, for each device connected to the gateway, the gateway's instruction library stores conversion information that transforms the first type of instructions into the second type of instructions that can directly control that device.
[0044] The first and second types of instructions can refer to preset fixed instructions or instructions written using preset fixed templates. Correspondingly, the conversion information in the instruction library defines the conversion method (i.e., mapping relationship) between the first and second types of instructions. This conversion method can be a one-to-one correspondence between the first and second types of instructions, or a mapping conversion between the first and second types of instructions based on templates. The specific conversion method can be determined according to actual needs.
[0045] In this embodiment, the gateway has the ability to automatically discover and configure new devices, simplifying the device access process and improving user experience. After the gateway starts up, it can actively scan for devices on the local area network that support different protocols (such as Zigbee, Bluetooth, Wi-Fi, etc.), enabling automatic device discovery and access. After discovering a new device, the gateway can download the device's conversion information (such as a template) from a cloud server or locally and store it locally, establishing a unified instruction library.
[0046] Figure 1 This is a flowchart illustrating a smart home device control method provided in an embodiment of the present disclosure, as shown below. Figure 1 As shown, the method includes the following steps: Step S101: Receive interactive information sent by the user terminal, and obtain the target first type of instruction based on the interactive information. The target first type of instruction includes an instruction to cause the target device to perform a first operation.
[0047] Specifically, in the embodiments of this disclosure, the user terminal refers to the device or software that interacts with the user and issues control commands. It can be understood that the user terminal can be a device or software that interacts directly with the user (such as an APP, smart speaker, smart control switch, etc.), or it can be a device that can automatically issue interactive information based on the parameters detected by the sensor according to the trigger rules set by the user, thereby realizing indirect interaction with the user (such as a smart clothes dryer that automatically triggers to issue interactive information to the gateway based on the light intensity detected by the sensor).
[0048] The following describes in detail the steps of this embodiment of the disclosure, taking the example of any gateway receiving interactive information sent by any user terminal: In step S101, the gateway receives the interaction information sent by the user terminal and obtains the target first type of instruction based on the interaction information. The target first type of instruction includes an instruction to cause the target device to perform a first operation. The target device refers to the smart home device controlled by the interaction information. The first type of instruction is generated based on a preset format. The specific format can be set according to actual needs. For example, the mapping relationship between each operation and the operation code can be preset. The target first type of instruction includes the device ID corresponding to the target device and the operation code used to indicate the first operation.
[0049] It is understandable that the specific content contained in the interactive information may differ depending on the user terminal sending the interactive information. The interactive information may directly contain the target first type of instruction, or the gateway may parse and understand the interactive information after receiving it and generate the target first type of instruction in a preset format.
[0050] For example, Figure 2 This is a schematic diagram of an interactive information acquisition process provided in an embodiment of the present disclosure, such as... Figure 2 As shown, the user terminal can be a mobile app or a voice speaker in the 5G CPE gateway interaction layer. Users interact with the user terminal to instruct it to generate interactive information. Users can choose the user terminal to interact with from the app and the voice speaker. When the user terminal is a mobile app, the app can provide users with a clickable interface and a conversational intelligent agent.
[0051] Users can control the generation of interactive information on the user end in the following three ways: by clicking on the interface of the mobile APP, the APP interface generates interactive information based on the user's operation; by having the user converse with the intelligent agent in the mobile APP, the intelligent agent performs semantic understanding of the conversation and generates interactive information; and by having the user converse with a voice speaker, the voice speaker receives the user's voice and generates interactive information locally on the gateway.
[0052] Understandably, the app can pre-store a preset format identical to the gateway, and the interaction information sent to the gateway constitutes the first type of instruction. Alternatively, the interaction information sent by the app to the gateway may contain instructions generated in the app's specific format, user voice instructions, or text instructions. After receiving the interaction information, the gateway parses it, understands the instructions contained within, and converts them into first-type instructions conforming to the preset format based on its understanding of the instructions carried in the interaction information.
[0053] Step S102: Based on the conversion information between the target first type of instruction and the target device's second type of instruction in the instruction library, convert the target first type of instruction into the target second type of instruction supported by the target device.
[0054] Specifically, in step S102, the gateway determines the conversion information between the target first type instruction and the target device's second type instruction from the instruction library based on the acquired target first type instruction, and converts the target first type instruction into the target second type instruction supported by the target device based on the conversion information, wherein the target second type instruction matches the communication protocol supported by the target device.
[0055] For example, if the device ID of the smart clothes dryer is A and the target first type instruction is {A: "action": "down"}, after the gateway queries the instruction set, the target first type instruction is converted into a specific target second type instruction that the smart clothes dryer can recognize: {"cmd": "down": "value": 1}.
[0056] Step S103: Send the second type of target instruction to the target device so that the target device performs the first operation.
[0057] Specifically, in step S103, the gateway sends the acquired target second type instruction to the target device so that the target device performs the first operation.
[0058] Correspondingly, after the target device performs the first operation, it can send the execution result of the first operation back to the gateway. The gateway will then convert the execution result into a format that the user can recognize and send it back to the user.
[0059] For example: The user end is a smart speaker. The user interacts with the smart speaker by voice. The smart speaker sends the user's voice as interaction information to the gateway. The gateway receives the voice and processes it, recognizes the semantics and generates a target first type of instruction. The target first type of instruction is converted into a target second type of instruction and sent to the target device. After the target device performs the first operation, it returns the execution result. The gateway converts the execution result into audio and sends it to the smart speaker. The smart speaker plays the audio, thus providing feedback on the execution result to the user.
[0060] In this embodiment, the gateway integrates multiple communication modules (such as Wi-Fi, Bluetooth, and Zigbee modules), possessing multi-protocol conversion and forwarding capabilities. This enables seamless cross-protocol transmission of commands, achieving multi-protocol adaptation and communication. Furthermore, it utilizes a command library to implement a mapping and conversion mechanism between first-type and second-type commands, shielding the protocol differences of underlying devices and achieving unified device control. For example, the gateway receives interactive information from a mobile app via the Wi-Fi protocol and ultimately sends the converted second-type command to the smart clothes dryer via the Bluetooth protocol.
[0061] In the technical solution provided by the embodiments of the present disclosure, the conversion information stored in the instruction library of the gateway is used to convert the first type of instructions into the second type of instructions supported by the smart home devices, and a dynamic mapping and conversion mechanism between the first type of instructions conforming to the preset format and the second type of instructions conforming to the device communication protocol is constructed. When the gateway receives the interaction information and obtains the target first type of instructions, it queries its built-in instruction library, converts the target first type of instructions into the second type of instructions of a specific protocol recognizable by the target device, and sends them to the target device so that the target device can perform the corresponding first operation. With this conversion mechanism, the protocol differences of the underlying devices are shielded, and unified control of devices of different brands and different protocols is achieved. Moreover, the gateway stores the instruction library locally, and the forwarding of instructions only needs to rely on the local area to be realized, effectively reducing the dependence on cloud services and improving the control response speed and privacy security.
[0062] In a possible implementation manner, obtaining the target first type of instructions according to the interaction information includes: Obtaining the target scene instruction from the interaction information, where the target scene instruction is used to switch one or more smart home devices involved in the target scene to the working state indicated by the target scene; Regarding the smart home devices involved in the target scene as the target devices, and according to the target scene instruction, obtaining the target first type of instructions corresponding to each target device involved in the target scene. For each target device, the first operation is the operation performed by the target device when it is switched to the working state indicated by the target scene.
[0063] Specifically, in the field of intelligent control technology, scene control refers to binding a series of preset operations (executing the preset operations to switch the device to the corresponding working state) of multiple different devices to a single trigger instruction, so as to achieve complex, cross-device linkage control through one instruction. That is, a control instruction (i.e., the target scene instruction) of the target scene is used to switch one or more smart home devices involved in the target scene to the working state indicated by the target scene.
[0064] In the embodiments of the present disclosure, in addition to implementing single-device control, the gateway can also implement scene control. That is, in addition to obtaining the target first type of instructions directly used to implement single-device control from the interaction information, the gateway can also obtain the target scene instructions used to implement multi-device linkage control, and obtain the target first type of instructions corresponding to each device involved in the target scene based on the target scene instructions.
[0065] Each scene involves one or more smart home devices. The types and quantities of the smart home devices corresponding to each scene are determined according to actual needs. Taking the target scene instruction corresponding to any target scene as an example, the steps of scene control in the smart home device control method provided by the embodiments of the present disclosure are described: The gateway obtains the target scene instruction from the interaction information. The target scene instruction is used to switch one or more smart home devices involved in the target scene to the working state indicated by the target scene. Here, the target scene refers to the scene indicated and controlled by the interaction information. The specific format of the target scene instruction can be set according to actual needs.
[0066] It is understandable that the target scenario, the devices involved in the target scenario, and the working status of each device can be pre-stored locally on the gateway, or the gateway can intelligently schedule and fine-tune based on the historical operation data of users controlling the devices and the target scenario information stored in the original gateway by artificial intelligence (AI). Alternatively, the gateway can send the target scenario instructions to the server, and the server can determine the target scenario based on the arrangement of all devices in the house by the backend business system and the AI response system. The method of obtaining the target scenario, the devices involved in the target scenario, and the working status of each device can be determined according to actual needs.
[0067] According to the target scenario instructions, the gateway identifies the smart home devices involved in the target scenario as target devices. For each target device, the target scenario is determined as the working state indicated by the target device. The first operation is determined based on the working state. The first operation is the operation performed by the target device when switching to the working state indicated by the target scenario.
[0068] It is understandable that for each target device, the first operation may be determined solely based on the working state indicated by the target scenario, or it may be combined with the current working state of the target device. For example, if the gateway determines that the current working state of the target device is the working state indicated by the target scenario, the first operation may be to instruct the target device to switch to the working state indicated by the target scenario, or it may be to perform no operation.
[0069] For each target device, generate the target first type instruction corresponding to the target device according to the first operation, and obtain the target first type instruction corresponding to each target device involved in the target scenario.
[0070] For example, the target scene command instructs the scene to be switched to "sleep mode". Correspondingly, the devices involved in "sleep mode" include smart lights, smart air conditioners and smart curtains. The target scene command instructs the smart lights to switch to "off", the smart air conditioner to switch to "silent mode" and the smart curtains to switch to "closed".
[0071] In the technical solution provided by the embodiments of the present disclosure, the gateway obtains a target scenario instruction from the interaction information, and according to the target scenario instruction, obtains a target first-class instruction corresponding to each target device involved in the target scenario, so that the gateway can convert the target first-class instruction corresponding to each target device into a target second-class instruction that conforms to the communication protocol of the target device based on the conversion information in the instruction library, thereby realizing disassembling the target scenario instruction into second-class instructions for specific communication protocols of each target device, enabling multiple devices to be collaboratively managed through one instruction, without relying on different APPs and remote control tools, realizing the linkage and collaborative control of the devices involved in the scenario, and improving the interoperability experience and convenience.
[0072] In a possible implementation, the instruction library further includes the mapping relationship between scenarios, scenario instructions, and the first-class instruction sets. The first-class instruction set corresponding to a scenario instruction includes the first-class instructions that each smart home device involved in the scenario should execute when the scenario instruction is executed. Obtaining the target first-class instruction corresponding to each target device involved in the target scenario according to the target scenario instruction further includes: Determining the target scenario instruction from the various scenario instructions stored in the instruction library, and obtaining the target first-class instruction set corresponding to the target scenario instruction; Regarding each smart home device in the target first-class instruction set as a target device, for each target device, regarding the first-class instruction in the target first-class instruction set as the target first-class instruction.
[0073] Specifically, in the embodiments of the present disclosure, the instruction library stored in the gateway further includes the mapping relationship between scenarios, scenario instructions, and the first-class instruction sets. The first-class instruction set corresponding to a scenario instruction includes the first-class instructions that each smart home device involved in the scenario should execute when the scenario instruction is executed. The first-class instruction corresponding to each device is determined by the first operation performed when the target device switches to the working state indicated by the target scenario. For example, the gateway pre-sets the mapping relationship between each scenario ID, scenario instruction, and the encoding of the first-class instruction set. The encoding of the first-class instruction set corresponds to the first-class instructions of each device involved in the scenario.
[0074] The gateway instruction library stores the relevant information (scenario instructions, instruction sets, etc.) of at least one scenario. After obtaining the target scenario instruction, based on the target scenario indicated by the target scenario instruction, it is judged whether the target scenario is one of the scenarios of the relevant information pre-stored by the gateway.
[0075] If it is determined that the gateway has pre-stored the relevant information of the target scenario, then determine the target scenario instruction from the various scenario instructions stored in the instruction library, and directly obtain the target first-class instruction set corresponding to the target scenario instruction from the instruction library.
[0076] Each smart home device in the first type of target instruction set is taken as the target device, and for each target device, the first type of instruction in the first type of target instruction set is taken as the target first type instruction.
[0077] Furthermore, this disclosure also provides a scenario control method that goes beyond basic control and moves towards scenario-based and intelligent control. The gateway can integrate AI processing capabilities, and AI drives personalized scenarios and intelligent decision-making. The gateway can analyze the historical operation data of users controlling the device, learn user habits, and automatically optimize each scenario mode (such as "home", "away", "sleep mode" etc.) based on the target scenario information stored in the original gateway through AI algorithms. It can intelligently schedule and fine-tune the relevant information corresponding to each scenario, and can adaptively adjust and schedule resources according to environmental data (such as temperature, light, and human activity) or external information (such as weather and electricity price) to achieve an energy-saving, comfortable and personalized life experience.
[0078] The technical solution provided in this disclosure includes a gateway-stored instruction library that further includes scenarios, scenario instructions, and mapping relationships between first-type instruction sets. This enables the control logic and instruction sets for some key scenarios to be stored and executed locally on the gateway. Only the forwarding of local instructions is required, ensuring that some key scenarios can still switch stably and automatically even when the network is down. This enables the coordinated control of various devices, significantly reducing reliance on cloud services and networks, improving the real-time performance and reliability of device control, and strengthening the protection of user privacy and security.
[0079] In one possible implementation, obtaining the first type of instruction corresponding to each target device involved in the target scenario based on the target scenario instruction further includes: The target scenario instruction is sent to the server so that the server can perform instruction orchestration operation according to the target scenario instruction, generate the target first type instruction corresponding to each target device when the second operation is performed in the target scenario, and feed it back to the gateway.
[0080] Specifically, the embodiments of this disclosure support a hybrid processing mode of local and cloud collaboration. Simple control commands (such as target first-type commands for a single device and target scene commands stored by the gateway) are processed quickly locally by the gateway to ensure low latency and privacy. Complex requests (such as target scene commands not stored by the gateway) are forwarded by the gateway to the server for processing to achieve intelligent processing.
[0081] That is, if the gateway determines that the relevant information of the target scenario has not been stored in advance, it will send the target scenario instruction to the server. The server refers to the server located at the remote end of the Internet, which is responsible for centralized data processing, execution of business logic and provision of intelligent decision-making platform.
[0082] It is understandable that the target scenario instructions sent to the server are obtained based on the interaction information. They can be instructions generated based on the interaction information and conform to a structured format. When the gateway cannot directly obtain the structured format instructions from the interaction information, the target scenario instructions can also include text or voice input by the user so that the server can perform instruction orchestration operations.
[0083] The gateway sends the target scenario instructions to the server, so that the server can perform instruction orchestration operations according to the target scenario instructions, generate the target first type instruction corresponding to each target device when the second operation is performed in the target scenario, and feed it back to the gateway.
[0084] It is understandable that the instruction orchestration operation executed by the server can be implemented based on the target first type instruction set corresponding to the target scenario instruction pre-stored on the server, or the AI response system in the server can automatically orchestrate the target first type instruction of the target device involved in the scenario based on the target scenario instruction, combined with natural language processing and intent recognition, and the business scheduling system can automatically achieve the orchestration of the target first type instruction of the target device involved in the scenario. The specific orchestration method adopted by the instruction orchestration operation can be determined according to actual needs.
[0085] The scenario control method provided in this disclosure, which involves instruction orchestration by the server, is particularly suitable for scenarios with specific needs. In other words, unconventional scenarios are transferred from local gateway processing to server processing, which can effectively reduce the burden on the gateway's local storage while providing the corresponding functions to the user.
[0086] For example, in special scenarios such as age-friendly renovations and home health care, the gateway can send the target scenario instructions to the server. The server can then arrange the working status of all devices in the house to generate the first type of target instructions. The gateway can then convert the first type of target instructions into the second type of target instructions to instruct each target device to perform the corresponding operation, thereby realizing functions such as voice control, automated scenarios, abnormal behavior monitoring, and emergency alarms. This enables care for specific groups and provides a safer and more convenient living environment for the elderly and those who need care.
[0087] The technical solution system provided in this disclosure supports a hybrid processing mode of local and cloud collaboration, forwarding complex requests (such as target scene instructions not stored in the gateway) to the server for processing. Without pre-occupying gateway storage or frequently upgrading gateway firmware, it achieves adaptive and personalized scene control, taking into account the efficiency, intelligence and flexibility of scene control.
[0088] In one possible implementation, the instruction orchestration operation includes: The server parses the target scenario instructions to determine the target scenario and the second operation. The target scene and the second operation input device operation orchestration model are combined to obtain at least one target device corresponding to the target scene output by the device operation orchestration model, and the first operation corresponding to each target device. For each target device, generate the first type of target instruction in a preset format according to the first operation corresponding to the target device.
[0089] Specifically, the instruction orchestration operation implemented on the server side in this embodiment includes: The server receives and parses the target scenario instructions sent by the gateway to determine the target scenario and the second operation. The server's parsing of the target scenario instructions can involve determining the target scenario and the second operation from instructions conforming to a structured format, or it can involve performing semantic analysis and intent recognition on the speech or text included in the target scenario instructions to obtain the target scenario and the second operation.
[0090] The server provides an automatic orchestration function based on the device operation orchestration model. The target scenario and the second operation are input into the device operation orchestration model, and the model automatically orchestrates at least one target device that needs to be controlled when the second operation is performed in the target scenario, as well as the first operation that each target device performs when switching to the working state indicated by the target scenario.
[0091] Understandably, the device operation orchestration model needs to identify the target device from a pre-set smart home device set (hereinafter referred to as the device set). The device set refers to all smart home devices within a certain range (such as whole-house smart home devices, bedroom smart home devices, or specific types of smart home devices, etc.) to ensure that the acquired target device can work normally.
[0092] The device operation orchestration model can be a large language model, a pre-trained deep learning model for automatic orchestration, or a rule model composed of pre-set orchestration rules based on device set settings, etc., which can be set according to actual needs.
[0093] For example, by using prompt words to define the role of the Large Language Model (LLM), the tasks performed by the LLM are clarified and relevant information about each smart home device in the device set is provided, resulting in a device operation orchestration model. Furthermore, labeled training samples can be constructed based on the user's historical operation data, and supervised fine-tuning (SFT) can be used to train and optimize the device operation orchestration model so that the model is more adapted to the user's personalized needs.
[0094] Labeled training samples can be determined based on users' operating habits on various devices in specific scenarios. For example, based on users' historical operation data, it can be determined that users are accustomed to keeping a small night light on in the sleep scenario. Accordingly, the training sample is "sleep mode" - "on", and the training label is small night light on the device - on, and all other devices - off.
[0095] Understandably, large language models possess the ability to understand natural language text, and the target scenario and second operation obtained from the target scenario instructions by the server can also be executed by the large language model. Based on obtaining the target scenario and second operation, and combining prompt words, the target scenario instructions can be transformed into questions described in natural language. Utilizing the logical reasoning capabilities of the large language model, the target device and the corresponding first operation can be determined within the scope of smart devices throughout the house.
[0096] For each target device, generate the first type of target instruction in a preset format according to the first operation corresponding to the target device.
[0097] The technical solution provided in this disclosure uses a server-side application device operation orchestration model to perform instruction orchestration operations on target scene instructions not stored in the gateway. By utilizing the automatic orchestration function provided by the server to automatically infer the target devices involved in the target scene and the first operation corresponding to the working state of each device, the automatic orchestration of the first type of target instructions for target devices involved in the target scene unknown to the gateway can be realized. In the case of limited scene-related information stored locally by the gateway, more scene control methods are provided to the user.
[0098] In addition, by using large language models as the foundation for providing automatic orchestration functions on the server side, there is no need to manually preset complex orchestration rules. Compared with the solution of training deep learning models, there is no need to collect a large amount of data to train a dedicated model, which reduces the cost of model development and training. Furthermore, it makes full use of the semantic understanding, logical reasoning and generalization capabilities of large language models, which are suitable for users' ever-changing scenario needs, making the instruction orchestration of target devices in the scenario easier to maintain and expand.
[0099] In one possible implementation, the method also includes: It is determined that an update operation is being performed on the first smart home device, and the device identifier of the first smart home device is obtained. The update operation includes: establishing an initial connection with the first smart home device or updating the functions of the first smart home device. A command download request is sent to the server to download the sub-command library corresponding to the first smart home device. The sub-command library includes the conversion information involved in the first smart home device. The command library stored in the gateway is updated with the sub-command library. The command download request includes the device identifier of the first smart home device.
[0100] Specifically, this embodiment of the disclosure provides dynamic updates to the support instruction library. If the gateway determines that there is an update operation for the first smart home device (hereinafter referred to as the first device), it obtains the device identifier of the first device, generates and sends an instruction download request to the server. The instruction download request includes the device identifier of the first device, wherein the device identifier of the first device refers to a unique identifier used to identify the device model.
[0101] It is understandable that the update operation includes: establishing an initial connection with the first device or updating the functionality of the first device. That is, when there is a first device connected to the gateway or when the functionality of a first device changes, the gateway can remotely update the conversion information related to the first device in the gateway's local instruction library through the server.
[0102] The server receives the instruction download request, obtains the device identifier of the first device, and allows the gateway to download the sub-instruction library corresponding to the first device through the server. The sub-instruction library includes the conversion information involved in the first smart home device.
[0103] After the gateway downloads the sub-instruction library of the first device from the server, it updates the instruction library stored in the gateway with the sub-instruction library, that is, updates the instruction library stored locally in the gateway to the latest version.
[0104] When there is a first device connected to the gateway or a first device whose function has changed, the technical solution provided in this disclosure allows the gateway to remotely update the conversion information related to the first device in the gateway's local instruction library through the server, without needing to upgrade the gateway firmware. This greatly improves the scalability and ease of maintenance of the system, enabling the gateway to adapt to the rapid iteration of devices and quickly gain support for new protocols and functions.
[0105] In one possible implementation, receiving interactive information sent by the user client also includes, prior to: Receive user biometric data sent from the client; Compare the biometric features with the biometric features pre-stored in the gateway; If the comparison is successful, the user's identity verification is confirmed, and the interactive information will be received.
[0106] Specifically, in this embodiment of the present disclosure, the gateway can also integrate an authentication function to achieve authentication based on the user's biometrics, wherein the biometrics include, but are not limited to, voiceprints, faces, fingerprints or irises.
[0107] Before receiving interactive information from the user, the gateway needs to verify the user's identity. That is, it receives the user's biometrics from the user and compares the biometrics with the biometrics pre-stored in the gateway.
[0108] It is understood that the biometric features pre-stored in the gateway in this embodiment may come from more than one user, thereby enabling multi-user access control.
[0109] In addition, there can be more than one type of user terminal interacting with the gateway, and the biometric features corresponding to each user can also include one or more types. For example, the biometric features of each user stored in the gateway include facial features and voiceprint features. The user terminal can include a mobile APP and a smart speaker. When the user uses the APP, the biometric feature verified is the facial feature, and when the user uses the smart speaker, the biometric feature verified is the voiceprint feature.
[0110] If the comparison is successful, the user's authentication is confirmed, and interactive information is received. If the comparison fails, the authentication fails, and interactive information is not received.
[0111] Understandably, when the biometric feature is a voiceprint feature, the gateway can use the interaction information as the basis for voiceprint verification. That is, when the interaction information is the user's voice information, the gateway receives the interaction information, extracts the voiceprint feature from the interaction information, compares the voiceprint feature with the voiceprint feature pre-stored in the gateway, if the comparison is successful, the user's identity verification is successful, and the target first type of instruction is obtained according to the interaction information; otherwise, the interaction information is not processed.
[0112] The technical solution provided in this disclosure integrates a biometric-based access control mechanism in the gateway, ensuring that only authorized users whose identity is successfully verified through biometric comparison can operate specific devices, thereby improving the operational security of smart home device control.
[0113] In one possible implementation, the method also includes: Receive operating parameters and energy consumption data from the second smart home device; Input the operating parameters and energy consumption data into the health model of the second smart home device, and obtain the health risk judgment result output by the health model. The health model is established based on historical operating parameters and historical energy consumption data. The historical operating parameters and historical energy consumption data are from the second smart home device or at least one of other smart home devices with the same device model as the second smart home device. If the health risk assessment results indicate that the second smart home device poses a health risk, a health risk warning message will be sent to the user.
[0114] Specifically, in this embodiment of the disclosure, the gateway can integrate device health monitoring functions, and establish a device health model by continuously analyzing the operating parameters of smart home devices (such as motor current harmonics, response delay, signal strength) and energy consumption data (such as power consumption within a fixed time period, motor efficiency, etc.).
[0115] Taking the health detection of any second smart home device (hereinafter referred to as the first device) as an example, the method steps provided in the embodiments of this disclosure will be described.
[0116] The health model of the second device is used to analyze the status of the device when the operating parameters and energy consumption data of the second device are input, to detect potential faults, and to determine whether there is a health risk in the second device. The specific form of the health risk judgment result output by the health model includes, but is not limited to, whether there is a health risk and the specific type of health risk.
[0117] The historical operating parameters and historical energy consumption data for training the health model can be obtained from at least one of the second device or other smart home devices of the same model as the second device (hereinafter referred to as other devices), and can be set according to actual needs.
[0118] For example, training methods for health models include, but are not limited to: when using historical data (including historical operating parameters and historical energy consumption data) from other home appliances as training samples, sufficient fault labels can be accumulated for supervised learning training of the health model to directly predict fault types; when using historical data from a second appliance as training samples, unsupervised learning can be used to train the health model to discover abnormal patterns in the data that do not conform to the healthy operating state; or, based on the basic health model trained from historical data from other appliances, the parameters of the basic health model can be fine-tuned using historical data from a second appliance to obtain the health model.
[0119] If the health risk assessment results output by the health model determine that the second device poses a health risk, a health risk warning message will be sent to the user.
[0120] For example, if the second device is a clothes drying rack, and the health risk assessment result is "decreased efficiency of the clothes drying rack motor", then the gateway will send a health risk warning message to the user, suggesting that the user maintain the clothes drying rack. This will enable early warning of potential faults, help monitor the status of each device, transform the "passive maintenance" of the equipment into "predictive maintenance", improve system reliability and user experience, and reduce downtime risks.
[0121] According to another aspect of the present disclosure, a smart home device control system is provided, including: a gateway, a user terminal, a server, and at least one smart home device; The gateway executes the steps of the above-mentioned smart home device control method.
[0122] Specifically, in this embodiment of the smart home device control system, there is a gateway, a user terminal, a server terminal, and at least one smart home device. The number and type of smart home devices can be set according to actual needs.
[0123] For detailed steps on how the gateway controls smart home devices in a smart home device control system, please refer to the description of the smart home device control method implemented on the gateway side mentioned above, which will not be repeated here.
[0124] The following example illustrates the smart home device control method provided in this disclosure. Figure 3 This is a schematic diagram of the structure of a smart home device control system provided in an embodiment of this disclosure, such as... Figure 3 As shown, the smart home device control system includes a gateway, a user terminal, a server, and at least one smart home device, with the gateway containing the instruction library serving as the core control hub, aiming to solve the problem of unified management of multi-protocol smart home devices.
[0125] The gateway is responsible for the automatic discovery of all access devices, command mapping and conversion, multi-protocol adaptation, and command issuance. The gateway can be implemented by devices such as 5G CPEs, smart speakers, or dedicated voice assistant gateways. Functionally, it can include a smart speaker gateway for receiving and initially processing voice data; a voice assistant gateway for integrating AI processing capabilities to process the initially processed voice information; and a 5G CPE gateway for network access and protocol conversion.
[0126] Smart home devices can come from different brands and use different communication protocols.
[0127] The user terminal provides multiple interaction entry points, including a mobile app (voice / text commands), a smart speaker (voice interaction), and a smart knob control switch (local input). Interaction information is generated by the user terminal and sent to the gateway.
[0128] The server interacts with the gateway, issuing configurations / commands and receiving status / data uploaded by the gateway. The server mainly includes the backend business system and the AI response system, responsible for the configuration and management of command sets, device status monitoring, complex scenario logic processing, and AI-based command orchestration.
[0129] The AI response system is used for natural language processing and intent recognition. The backend business system can be divided into a backend management system and a business scheduling system. The backend management system is used for configuring the instruction library and managing devices, while the business scheduling system is used for setting up scene linkage and automation rules. Combined with the AI response system, instruction orchestration operations are realized.
[0130] The following example, using a voice-controlled smart clothes drying rack to descend, illustrates the complete command conversion and device control process in the smart home device control method provided in this disclosure: Command Reception and Generation: The user says to the smart speaker, "The clothes dryer should be lowered." The speaker performs Automatic Speech Recognition (ASR) and Natural Language Processing (NLP) semantic understanding to generate a structured, unified target type I command (i.e., the interactive information sent by the user), such as {"device": "dryer", "action": "down"}, and sends it to the gateway via the network.
[0131] Command parsing and mapping: The gateway receives the target first type command, queries the command library, finds the conversion information of the corresponding device (smart clothes dryer), and uses the command template corresponding to the conversion information to convert the target first type command into the target second type command that the device can execute. For example, if the smart clothes dryer communicates via Bluetooth protocol, the target first type command is converted into a Bluetooth signal, that is, the target second type command: 0xAA 0xBB 0x01...
[0132] Command Issuance and Execution: The gateway sends the converted target Type II command to the smart clothes dryer via a corresponding communication protocol (such as Bluetooth). The smart clothes dryer executes the command (descends) and returns the execution result.
[0133] Results Feedback and Learning: The gateway converts the execution results returned by the device into a unified format and sends them to the smart speaker, which then announces them to the user. Simultaneously, the operation data from this control session is uploaded to the server for user habit learning and scenario-specific instruction orchestration optimization.
[0134] Understandably, after collecting users' historical operation data, the server can analyze this data, along with environmental parameters (such as lighting, temperature, and humidity) and device status, using machine learning algorithms to achieve personalized adaptive control and AI-driven adaptive adjustment. For example, the server can autonomously learn users' preferred lighting brightness and color temperature and automatically adjust them at different times or in different scenarios; or dynamically adjust the operating parameters of the fresh air system and air conditioner based on the number of family members and their activity levels to optimize energy use while maintaining comfort; or automatically adjust device parameters based on user behavior.
[0135] In addition, the gateway integrates device health monitoring functions. By continuously analyzing the operating parameters and energy consumption data of smart home devices, it monitors the status of each smart home device using a pre-established health model, provides early warnings of potential faults, and transforms the "passive maintenance" of devices into "predictive maintenance," thereby improving system reliability and user experience and reducing downtime risks.
[0136] The two advanced functions mentioned above upgrade the system from "passively responding to commands" to "proactive intelligent services," significantly improving user experience and system reliability, and together they constitute a unified, intelligent, reliable, and secure method for controlling smart home devices.
[0137] The method provided in this disclosure is applied to the unified control and management of smart home devices. It can directly control the gateway through smart speakers and APPs, convert (voice / text) into target first type commands for gateway processing, and then convert the target first type commands into target second type commands specific to each device. This enables unified access, collaborative management and intelligent scheduling of devices of different brands and protocols in the home. Users no longer need to switch between multiple APPs to control devices, achieving more convenient user interaction and improving the interconnection experience and convenience.
[0138] Compared to the traditional control method of directly controlling a single device in the prior art, the solution provided in this disclosure has the following advantages: Compared to traditional methods of decentralized control requiring multiple independent apps, this solution allows for centralized management of all devices through a unified entry point. Regarding network dependency, traditional methods heavily rely on internet cloud connections, while this solution prioritizes local processing, handling critical commands locally for faster response. In terms of device collaboration, traditional methods struggle with cross-brand and cross-protocol linkage, while this solution offers seamless integration, easily enabling complex automation scenarios. Regarding new device integration, traditional methods require manual configuration, resulting in cumbersome processes, while this solution automatically discovers new devices, simplifying user operations. From a privacy and security perspective, traditional methods require data to pass through the cloud, posing a higher risk, while this solution processes critical commands locally, offering better privacy. Finally, in terms of scalability and maintenance, traditional methods face difficulties in firmware upgrades and poor scalability, while this solution allows for updatable commands, facilitating maintenance and expansion.
[0139] In addition, the solutions provided in this disclosure can also be applied to vertical industry expansion, and its core "gateway-instruction set-device" architecture has the potential to be extended to fields such as the Industrial Internet of Things (IoT) that require device linkage and instruction coordination.
[0140] According to another aspect of this disclosure, a gateway is provided. The gateway stores an instruction library, which includes multiple conversion information entries. The conversion information is used to convert a first type of instruction into a second type of instruction supported by a smart home device connected to the gateway. The first type of instruction conforms to a preset format. The steps of the gateway implementing the above-described smart home device control method are not detailed here.
[0141] Figure 4 This is a schematic diagram of the structure of a gateway provided in an embodiment of the present disclosure, such as... Figure 4As shown, gateway 40 includes: The instruction acquisition module 401 is used to receive interactive information sent by the user terminal and acquire a target first type instruction based on the interactive information. The target first type instruction includes an instruction to cause the target device to perform a first operation. The instruction conversion module 402 is used to convert the target first type instruction into the target second type instruction supported by the target device based on the conversion information between the target first type instruction in the instruction library and the target device second type instruction; The instruction execution module 403 is used to send the target second type instruction to the target device so that the target device performs the first operation.
[0142] In one possible implementation, the target first type of instruction is obtained based on the interaction information, including: Obtain the target scene command from the interaction information. The target scene command is used to switch one or more smart home devices involved in the target scene to the working state indicated by the target scene. The smart home devices involved in the target scenario are taken as target devices. According to the target scenario instructions, the first type of target instructions corresponding to each target device involved in the target scenario are obtained. For each target device, the first operation is the operation performed by the target device when switching to the working state indicated by the target scenario.
[0143] In one possible implementation, the instruction library also includes scenarios, scenario instructions, and a mapping relationship between the first type of instruction set. The first type of instruction set corresponding to the scenario instructions includes the first type of instructions executed by each smart home device involved in the scenario when the scenario instructions are executed. Based on the target scenario instructions, the first type of target instructions corresponding to each target device involved in the target scenario are obtained, including: Determine the target scenario instruction from the scenario instructions stored in the instruction library, and obtain the target first type instruction set corresponding to the target scenario instruction; Each smart home device in the first type of target instruction set is taken as the target device, and for each target device, the first type of instruction in the first type of target instruction set is taken as the target first type instruction.
[0144] In one possible implementation, obtaining the first type of instruction corresponding to each target device involved in the target scenario based on the target scenario instruction further includes: The target scenario instruction is sent to the server so that the server can perform instruction orchestration operation according to the target scenario instruction, generate the target first type instruction corresponding to each target device when the second operation is performed in the target scenario, and feed it back to the gateway.
[0145] In one possible implementation, the instruction orchestration operation includes: The server parses the target scenario instructions to determine the target scenario and the second operation. The target scene and the second operation input device operation orchestration model are combined to obtain at least one target device corresponding to the target scene output by the device operation orchestration model, and the first operation corresponding to each target device. For each target device, generate the first type of target instruction in a preset format according to the first operation corresponding to the target device.
[0146] In one possible implementation, the method also includes: It is determined that an update operation is being performed on the first smart home device, and the device identifier of the first smart home device is obtained. The update operation includes: establishing an initial connection with the first smart home device or updating the functions of the first smart home device. A command download request is sent to the server to download the sub-command library corresponding to the first smart home device. The sub-command library includes the conversion information involved in the first smart home device. The command library stored in the gateway is updated with the sub-command library. The command download request includes the device identifier of the first smart home device.
[0147] In one possible implementation, receiving interactive information sent by the user client also includes, prior to: Receive user biometric data sent from the client; Compare the biometric features with the biometric features pre-stored in the gateway; If the comparison is successful, the user's identity verification is confirmed, and the interactive information will be received.
[0148] In one possible implementation, the method also includes: Receive operating parameters and energy consumption data from the second smart home device; Input the operating parameters and energy consumption data into the health model of the second smart home device, and obtain the health risk judgment result output by the health model. The health model is established based on historical operating parameters and historical energy consumption data. The historical operating parameters and historical energy consumption data are from the second smart home device or at least one of other smart home devices with the same device model as the second smart home device. If the health risk assessment results indicate that the second smart home device poses a health risk, a health risk warning message will be sent to the user.
[0149] The gateway in this embodiment can execute the methods provided in this embodiment, and their implementation principles are similar. The actions performed by each module in each embodiment of this disclosure correspond to the steps in the methods of each embodiment of this disclosure. For detailed functional descriptions of the modules, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.
[0150] This disclosure provides an electronic device (computer device / equipment / system) including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the method provided in any optional embodiment of this disclosure, and implements a gateway to store an instruction library. The instruction library contains conversion information used to convert first-type instructions into second-type instructions supported by smart home devices, constructing a dynamic mapping and conversion mechanism between first-type instructions conforming to a preset format and second-type instructions conforming to the device communication protocol. When the gateway receives interaction information and obtains a target first-type instruction, it queries its built-in instruction library to convert the target first-type instruction into a second-type instruction of a specific protocol recognizable by the target device, and sends it to the target device to cause the target device to perform a corresponding first operation. This conversion mechanism masks the protocol differences of underlying devices, achieving a unified control effect for devices of different brands and protocols.
[0151] In one alternative embodiment, an electronic device is provided. Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure, such as... Figure 5 As shown, the electronic device 50 includes a processor 501 and a memory 503. The processor 501 and the memory 503 are connected, for example, via a bus 502. Optionally, the electronic device 50 may further include a transceiver 504, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 504 is not limited to one, and the structure of the electronic device 50 does not constitute a limitation on the embodiments of this disclosure.
[0152] Processor 501 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with this disclosure. Processor 501 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0153] Bus 502 may include a pathway for transmitting information between the aforementioned components. Bus 502 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 502 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0154] The memory 503 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation.
[0155] The memory 503 is used to store computer programs that execute embodiments of the present disclosure, and the execution is controlled by the processor 501. The processor 501 is used to execute the computer programs stored in the memory 503 to implement the steps shown in the foregoing method embodiments.
[0156] The electronic devices in this disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable devices, and fixed terminals such as digital TVs and desktop computers.
[0157] This disclosure provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.
[0158] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments. Compared with the prior art, the gateway stores an instruction library. The conversion information in the instruction library is used to convert a first type of instruction into a second type of instruction supported by smart home devices, constructing a dynamic mapping and conversion mechanism between the first type of instruction conforming to a preset format and the second type of instruction conforming to the device communication protocol. When the gateway receives interaction information and obtains the target first type of instruction, it queries its built-in instruction library to convert the target first type of instruction into a second type of instruction with a specific protocol recognizable by the target device, and sends it to the target device to enable the target device to perform the corresponding first operation. This conversion mechanism shields the protocol differences of the underlying devices, achieving the technical effect of unified control of devices of different brands and different protocols.
[0159] It should be noted that the computer-readable storage medium described above in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, gateway, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0160] In this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used or combined with an instruction execution system, gateway, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof.
[0161] Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit programs for use by or in connection with an instruction execution system, gateway, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0162] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0163] The terms “first,” “second,” “third,” “fourth,” “1,” “2,” etc. (if present) in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in a sequence other than that shown in the figures or text.
[0164] It should be understood that although arrows indicate various operation steps in the flowcharts of the embodiments of this disclosure, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of the embodiments of this disclosure, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured as required, and the embodiments of this disclosure do not limit this.
[0165] The above description is only an optional implementation method for some implementation scenarios of this disclosure. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this disclosure without departing from the technical concept of this disclosure also fall within the protection scope of the embodiments of this disclosure.
Claims
1. A method for controlling smart home devices, characterized in that, Applied to a gateway, the gateway stores an instruction library, which includes multiple conversion information. The conversion information is used to convert a first type of instruction into a second type of instruction supported by the smart home devices connected to the gateway. The first type of instruction conforms to a preset format. The method includes: Receive interactive information sent by the user terminal, and obtain a target first type of instruction based on the interactive information, wherein the target first type of instruction includes an instruction to cause the target device to perform a first operation; Based on the conversion information between the target first type instruction and the target device second type instruction in the instruction library, the target first type instruction is converted into the target second type instruction supported by the target device; The second type of target instruction is sent to the target device to cause the target device to perform the first operation.
2. The method according to claim 1, characterized in that, The step of obtaining the target first type of instruction based on the interaction information includes: Obtain the target scene instruction from the interaction information. The target scene instruction is used to switch one or more smart home devices involved in the target scene to the working state indicated by the target scene. The smart home devices involved in the target scenario are taken as target devices. According to the target scenario instructions, the first type of target instructions corresponding to each target device involved in the target scenario are obtained. For each target device, the first operation is the operation performed by the target device when switching to the working state indicated by the target scenario.
3. The method according to claim 2, characterized in that, The instruction library also includes scenarios, scenario instructions, and the mapping relationship between the first type of instruction set. The first type of instruction set corresponding to the scenario instruction includes the first type of instruction executed by each smart home device involved in the scenario when the scenario instruction is executed. The step of obtaining the first type of target instruction corresponding to each target device involved in the target scenario based on the target scenario instruction further includes: The target scenario instruction is determined from the scenario instructions stored in the instruction library, and the target first type instruction set corresponding to the target scenario instruction is obtained; Each smart home device in the first type of target instruction set is taken as the target device, and for each target device, the first type of instruction in the first type of target instruction set is taken as the target first type of instruction.
4. The method according to claim 2, characterized in that, The step of obtaining the first type of instruction corresponding to each target device involved in the target scenario according to the target scenario instruction further includes: The target scenario instruction is sent to the server so that the server performs instruction orchestration operation according to the target scenario instruction, generates a target first type instruction corresponding to each target device when the second operation is performed in the target scenario, and feeds it back to the gateway.
5. The method according to claim 4, characterized in that, The instruction arrangement operation includes: The server parses the target scenario instruction to determine the target scenario and the second operation; The target scene and the second operation input device operation orchestration model are used to obtain at least one target device corresponding to the target scene, and a first operation corresponding to each target device, as output by the device operation orchestration model. For each target device, a first type of target instruction is generated in the preset format according to the first operation corresponding to the target device.
6. The method according to any one of claims 1-5, characterized in that, The method further includes: Determine that an update operation is being performed on the first smart home device, and obtain the device identifier of the first smart home device. The update operation includes: establishing an initial connection with the first smart home device or updating the functionality of the first smart home device. A download request is sent to the server to download a sub-instruction library corresponding to the first smart home device. The sub-instruction library includes conversion information related to the first smart home device. The sub-instruction library is used to update the instruction library stored in the gateway. The download request includes the device identifier of the first smart home device.
7. The method according to any one of claims 1-5, characterized in that, The process of receiving interactive information sent by the user terminal also includes, prior to: Receive the user's biometric features sent by the user terminal; The biometric features are compared with the biometric features pre-stored in the gateway; If the comparison is successful, the user authentication is confirmed to be successful, and the interaction information is received.
8. The method according to any one of claims 1-5, characterized in that, The method further includes: Receive operating parameters and energy consumption data from the second smart home device; The operating parameters and energy consumption data are input into the health model of the second smart home device, and the health risk judgment result output by the health model is obtained. The health model is established based on historical operating parameters and historical energy consumption data. The historical operating parameters and historical energy consumption data are from at least one of the second smart home device or other smart home devices with the same device model as the second smart home device. If the health risk assessment results indicate that the second smart home device poses a health risk, a health risk warning message will be sent to the user.
9. A gateway, characterized in that, When the gateway is executed, it implements the steps of the method according to any one of claims 1-8.
10. A smart home device control system, characterized in that, include: Gateway, client, server, and at least one smart home device; When the gateway is executed, it implements the steps of the method according to any one of claims 1-8.