Smart home device control method and apparatus, electronic device, and storage medium

By defining device capabilities and roles for smart home devices, analyzing user requests and matching target devices, the challenge of coordinating different devices is solved, improving control efficiency and user experience.

CN121125379BActive Publication Date: 2026-07-24HANGZHOU LIFESMART TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU LIFESMART TECH
Filing Date
2025-09-30
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Due to the diverse communication protocols and interface standards among smart home devices from different manufacturers, seamless collaboration is difficult to achieve. Users need to manually manage these devices through multiple applications, which reduces the user experience.

Method used

By defining device capabilities and roles for smart home devices, analyzing user requests to generate control tasks, matching target devices, and sending control commands, precise batch management is achieved, reducing manual configuration.

Benefits of technology

It improves the control efficiency, response speed, and user experience of smart home devices, and enables precise batch management based on functionality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121125379B_ABST
    Figure CN121125379B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of communication, and discloses a control method and device of smart home equipment, electronic equipment and a storage medium, which comprises the following steps: analyzing a control request initiated by a user for a smart home system to obtain one or more control tasks; determining the device capability and the device role of the required smart device in response to the control request based on the control task; matching the device capability and the device role of the required smart device with the device information of the smart device stored in the device registry to screen one or more target devices meeting the conditions; and sending the control task to the corresponding target device to control the state of the target device. The application not only improves the control efficiency of the smart home equipment, but also reduces the complexity of the smart home equipment control, thereby providing the user with a more convenient and intelligent life experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and more specifically to control methods, devices, electronic equipment, and storage media for smart home devices. Background Technology

[0002] With the rapid development of IoT technology, the variety of smart home devices has exploded, and the communication protocols and interface standards used by different manufacturers are becoming increasingly diverse. However, due to brand barriers and differences in protocols, seamless collaboration between different smart home devices is difficult to achieve. Users are often forced to rely on multiple independent applications for manual management, which greatly reduces the user experience. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide a control method, device, electronic device, and storage medium for smart home devices.

[0004] In a first aspect, embodiments of the present invention provide a control method for a smart home device, comprising: Analyze the control requests initiated by users to the smart home system to obtain one or more control tasks; Based on the control task, determine the device capabilities and device roles of the smart devices required to respond to control requests; The device capabilities and roles of the required smart devices are matched with the device information of smart devices stored in the device registry to filter out one or more target devices that meet the conditions. Control tasks are sent to the corresponding target devices to control the state of the target devices.

[0005] The smart home device control method provided in this invention defines precise device capabilities and roles for each smart home device in the smart home system. When a user initiates a control request for the smart home system, the method determines the device capabilities and roles of the smart devices required to respond to the control request. It then matches the required device capabilities and roles with the device information of smart devices stored in the device registry to filter out one or more target devices that meet the criteria. By sending control tasks to the corresponding target devices to control their status, the method achieves precise batch management based on functionality, eliminating the need for tedious manual configuration by the user. This significantly improves the control efficiency, response speed, and user experience of smart home devices.

[0006] In conjunction with the first aspect, in one implementation, the user's control request to the smart home system is analyzed to obtain one or more control tasks, including: Obtain the control scenario corresponding to the control request; The content of the control request is analyzed based on the control scenario, as well as the corresponding control area and the type of device to be controlled; Based on the request content, control area, and type of device to be controlled, generate one or more control tasks.

[0007] In conjunction with the first aspect, in one implementation, based on the control task, determining the device capabilities and device roles of the intelligent device required in response to a control request includes: Determine the task requirements characteristics of the control task; Obtain the correspondence between task requirements and equipment capabilities and roles; Based on the correspondence, determine the device capabilities and device roles of the smart devices required to respond to control requests.

[0008] In conjunction with the first aspect, in one implementation, the device capabilities and roles of the desired smart device are matched with the device information of smart devices stored in the device registry to filter out one or more target devices that meet the criteria, including: Retrieve device information of smart devices stored in the device registry; Compare the required smart device's capabilities with the device capabilities in the device information to determine the capability matching degree, and match the required smart device's device role with the device role in the device information to verify role compatibility; Based on capability matching and role compatibility, evaluate the suitability score of each smart device in the smart home system; Based on the applicability score, one or more target devices that meet the preset conditions are selected.

[0009] In conjunction with the first aspect, in one implementation, a control task is sent to a corresponding target device to control the state of the target device, including: Parse the control task to generate specific control instructions; Control commands are sent to the target device via a preset communication protocol, so that the target device can perform state adjustment operations based on the control commands.

[0010] In conjunction with the first aspect, in one embodiment, the above method further includes: Retrieve the function string of the newly added smart device; Perform a bitwise AND operation on the first target bit of the function string to parse out one or more device capabilities of the newly added smart device, and perform a bitwise operation on the second target bit of the function string to parse out one or more device roles of the newly added smart device; Register the device capabilities and roles of newly added smart devices into the device registry.

[0011] In conjunction with the first aspect, in one embodiment, the above method further includes: Receive control events initiated by newly added smart devices; Based on the control event search, add device roles for smart devices in each area within the region where the smart device is located; Generate corresponding linkage control prompts based on the device roles and control events of the regional intelligent devices; Based on user feedback regarding the linkage control prompts, a linkage control system is established between newly added smart devices and regional smart devices.

[0012] Secondly, embodiments of the present invention provide a control device for a smart home device, comprising: The request analysis module is used to analyze the control requests initiated by users for the smart home system and obtain one or more control tasks; The feature determination module is used to determine the device capabilities and device roles of the intelligent devices required to respond to control requests based on the control task. The device matching module is used to match the device capabilities and device roles of the required smart devices with the device information of smart devices stored in the device registry, so as to filter out one or more target devices that meet the conditions. The device control module is used to send control tasks to the corresponding target device in order to control the status of the target device.

[0013] The control device for smart home devices provided in this invention defines precise device capabilities and roles for each smart home device in the smart home system. Upon receiving a control request from a user for the smart home system, it determines the device capabilities and roles of the smart devices required to respond to the control request. It then matches the required device capabilities and roles with the device information of smart devices stored in the device registry to filter out one or more target devices that meet the criteria. By sending control tasks to the corresponding target devices to control their states, it achieves precise batch management based on functionality, eliminating the need for tedious manual configuration by the user and greatly improving the control efficiency, response speed, and system reliability of smart home devices. Thirdly, this invention provides an electronic device including a memory and a processor, which are communicatively connected. The memory stores computer instructions, and the processor executes these computer instructions to perform the control method for smart home devices described in the first aspect or any corresponding embodiment.

[0014] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer instructions, which are used to cause a computer to execute the control method of the smart home device described in the first aspect or any corresponding embodiment.

[0015] Fifthly, embodiments of the present invention provide a computer program product, including computer instructions, which are used to cause a computer to execute the control method for a smart home device according to the first aspect or any corresponding embodiment described above. Attached Figure Description

[0016] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0017] Figure 1 This is a flowchart illustrating a control method for a smart home device according to some embodiments of the present invention; Figure 2 This is a flowchart illustrating a control method for another smart home device according to an embodiment of the present invention; Figure 3 This is a structural block diagram of the control device for a smart home device according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] According to an embodiment of the present invention, a control method for a smart home device is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0020] This invention provides a method for controlling smart home devices. Figure 1This is a flowchart of a control method for a smart home device according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps: Step S101: Analyze the control requests initiated by the user for the smart home system to obtain one or more control tasks.

[0021] The smart home system includes multiple interconnected smart home devices, such as lighting controllers, thermostats, security sensors, and home appliances. These devices are connected to a central control unit via wireless or wired networks to form an integrated home automation platform that can respond to control requests and execute corresponding control tasks.

[0022] In one possible implementation, when analyzing a user's control request to the smart home system to obtain one or more control tasks, the control scenario corresponding to the control request can be obtained first; the request content of the control request, as well as the corresponding control area and the type of device to be controlled, can be analyzed based on the control scenario; and one or more control tasks can be generated according to the request content, control area, and type of device to be controlled.

[0023] Specifically, control scenarios can be obtained through user input or preset scenario configuration files. For example, when a user initiates a request via a voice assistant or mobile application, keywords in the command (such as "away mode," "home mode," "living room mode," "sleep scenario," and "OTA upgrade scenario") are identified to determine the corresponding scenario type. Next, based on the control scenario, the request content is parsed, including operation commands (such as turn on, turn off, adjust), time parameters, or environmental conditions. Simultaneously, combined with the device layout data of the smart home system, the control area (such as the living room or bedroom) is identified, and the type of device to be controlled (such as lights, air conditioners, and sensors) is matched through the device database. Finally, based on the parsed request content, control area, and type of device to be controlled, one or more control tasks are dynamically generated. For example, a dimming task is generated for the light controller in the living room area, or a target temperature task is set for the thermostat, ensuring that task execution matches the user's intentions. Figure 1 To.

[0024] As an example, when a user initiates a "away mode" request via a mobile app, the system first identifies the keyword "away mode" to confirm the scenario type is an away safety mode. Next, it parses the request content: the operation command is "off," the time parameter is immediate execution, and environmental conditions include door and window status security monitoring. Simultaneously, based on device layout data, the control area is identified as the entire residence, and the types of devices to be controlled, such as lights, security sensors, and air conditioning, are matched through the device database. Subsequently, a control task is dynamically generated: turn off all light controllers, activate the security sensor monitoring function, and adjust the air conditioning to an energy-saving temperature. The task execution results are verified in real time, such as confirming light status and temperature changes through sensor feedback, ensuring that all operations match the user's intentions. Figure 1 For example, to avoid missing areas or misoperation of equipment.

[0025] Step S102: Based on the control task, determine the device capabilities and device roles of the smart devices required to respond to the control request.

[0026] The device capabilities can include: Perpetual Online / High Priority (identifier ALWAYS_ON, capability bitmask 0x80, 1000): The device requires continuous power and a stable connection, typically serving as critical infrastructure (such as gateways, hubs); Edge Artificial Intelligence (identifier EDGE_AI, capability bitmask 0x40, 0100): The device possesses local AI processing capabilities (such as human recognition, voice wake-up), enabling autonomous decision-making during network outages; Data Storage (identifier HISTORY, capability bitmask 0x20, 0010): The device can locally cache or record historical data (such as temperature and humidity logs, operation records). Timer (identifier: SCHEDULER, capability bitmask: 0x10, 0001): The device supports localized timed, delayed, or recurring tasks that can be executed without cloud intervention; OTA upgrade (identifier: OTA, capability bitmask: 0x08, 1000): The device supports online firmware upgrades via the network; Sensor (identifier: SENSOR, capability bitmask: 0x04, 0100): The device can detect and report environmental or its own physical quantities (such as temperature, humidity, light intensity, and motion); Battery powered (identifier: BATTERY, capability bitmask: 0x02, 0010): The device is battery powered. This capability is used for system power optimization strategies, such as reducing communication frequency; Basic control (identifier: BASIC, capability bitmask: 0x01, 0001): A capability that all devices must possess, including the most basic control and status feedback such as device on / off, online status query, and fault reporting. For example, a battery-powered temperature and humidity sensor that supports OTA has the following capability value: OTA|SENSOR|BATTERY =(0x08|0x04|0x02)=0x0E.

[0027] Device roles can include: Bridge / Gateway (identifier BRIDGE, role bitmask 0x08, 1000): acting as a network hub or protocol converter (such as a Zigbee coordinator or Bluetooth gateway), managing sub-devices and connecting to the upper-layer network; Actuator (identifier ACTUATOR, role bitmask 0x04, 0100): devices capable of performing physical operations or output control (such as switching relays, adjusting light brightness, or controlling motors); User Interface (identifier UI, role bitmask 0x02, 0010): providing input interfaces for receiving user commands (such as buttons, knobs, touchscreens, microphones, etc.); Terminal Device (identifier ENDPOINT, role bitmask 0x01, 0001): the most basic leaf node in the network, typically possessing only a single function (such as a simple light bulb or socket), and most devices have this role. For example, a Zigbee gateway with button functionality has the role value: BRIDGE|UI|ENDPOINT=(0x08|0x02|0x01)=0x0B.

[0028] In one possible implementation, when determining the device capabilities and roles of the intelligent devices required to respond to control requests based on the control task, the task requirement characteristics of the control task can be determined first; the correspondence between the task requirement characteristics and the device capabilities and roles can be obtained; and the device capabilities and roles of the intelligent devices required to respond to control requests can be determined according to the correspondence.

[0029] Specifically, task requirement characteristics can include the type, priority, execution environment parameters (such as current network status and device availability), functional requirements (such as switch control and brightness adjustment), and constraints (such as power consumption limits and response time requirements) of the control task. By querying a pre-defined device capability role mapping table or configuration database, the correspondence between task requirement characteristics and device capabilities (such as basic control capabilities identified by the BASIC identifier) ​​and device roles (such as the ACTUATOR role and ENDPOINT role) can be obtained. For example, when the control task involves energy-saving optimization, the task requirement characteristics may indicate the need to reduce communication frequency, and the correspondence is mapped to the device capability with power consumption optimization capabilities and the BRIDGE role; or when the task requires user interaction, the correspondence is associated with the UI user interface role and online status query capability. Based on this, the intelligent devices required to respond to control requests can be accurately selected, ensuring the efficiency and integrity of the control process.

[0030] As an example, when a control task involves ambient temperature regulation, the task requirement characteristics might indicate the need for real-time monitoring and rapid response. These characteristics might include a constant temperature control type, high priority, execution of environmental parameters such as the current indoor temperature fluctuation range, functional requirements such as temperature setpoint adjustment, and constraints such as a response time of less than 1 second. By querying a pre-defined device capability role mapping table, the task requirement characteristics are mapped to device capabilities with high-precision sensing capabilities (such as sensor monitoring capabilities identified by the SENSOR identifier) ​​and device roles (such as the ACTUATOR role). For example, in a summer air conditioning control scenario, the mapping is associated with device roles capable of temperature regulation execution (such as the ACTUATOR role) and online data processing capabilities. This ensures that when a user issues a cooling request, the intelligent thermostat and environmental sensors can be accurately selected to respond collaboratively, avoiding unnecessary device activation, thereby optimizing energy consumption and improving the user experience.

[0031] As another example, when the control task involves security monitoring, the task requirements may include intrusion detection type, emergency priority, execution environment parameters such as nighttime lighting conditions, functional requirements such as motion alarms, and constraints such as low power mode. The corresponding relationships are mapped to the capabilities of devices with night vision capabilities (such as sensor monitoring capabilities with the SENSOR identifier and data storage capabilities with the HISTORY identifier) ​​and the device roles that ensure reliable delivery of instructions (such as BRIDGE bridge / gateway roles), ensuring that smart cameras and alarm devices can be quickly activated when an anomaly is detected, thereby achieving an efficient security response.

[0032] Step S103: Match the device capabilities and device roles of the required smart devices with the device information of smart devices stored in the device registry to filter out one or more target devices that meet the conditions.

[0033] The device registry stores device information for multiple smart devices that have completed device registration.

[0034] In one possible implementation, when matching the device capabilities and roles of the required smart devices with the device information of smart devices stored in the device registry to filter out one or more target devices that meet the conditions, the device information of smart devices stored in the device registry can be obtained first; the device capabilities of the required smart devices are compared with the device capabilities in the device information to determine the capability matching degree, and the device roles of the required smart devices are matched with the device roles in the device information to verify role compatibility; based on the capability matching degree and role compatibility, the applicability score of each smart device in the smart home system is evaluated; and based on the applicability score, one or more target devices that meet the preset conditions are filtered out.

[0035] Specifically, for example, in security monitoring tasks, required equipment capabilities such as night vision can be compared with the capabilities of the SENSOR identifier in the registered equipment information, and a similarity score is calculated as the capability matching degree. Role compatibility is verified by matching the BRIDGE role identifier to check whether the device supports command transmission functionality. The applicability score can be based on the weighted sum of capability matching degree and role compatibility, where the weight is dynamically adjusted according to task priority. Preset conditions include setting the scoring threshold to above 70%, or the device supporting a low-power mode to meet the constraints. In addition, during the screening process, smart cameras with high matching degree can be prioritized, and response efficiency can be optimized by combining historical data storage capabilities (such as HISTORY identifiers).

[0036] As an example, suppose in a smart home system, a user initiates a lighting control task, requiring device capabilities including brightness adjustment (LUMINANCE identifier), and the device role is ACTUATOR. First, the system retrieves device information for all registered smart lights from the device registry. Then, it compares the required brightness adjustment capability with the capability parameters of the registered devices, such as calculating a similarity score (e.g., using a cosine similarity algorithm), resulting in a capability match rate of 80%. Simultaneously, the ACTUATOR role is matched to verify that the device supports direct control functions, achieving 100% role compatibility. Based on dynamic weights (capability weight accounts for 60% and role weight accounts for 40% when task priority is high), an applicability score of 84% is calculated. Preset conditions include a score threshold greater than 75% and the device supporting energy-saving mode (POWER_SAVE identifier), filtering out target devices such as smart bulb A. Furthermore, by combining historical response latency data (e.g., LATENCY identifier), device selection is optimized to improve system efficiency. In another scenario, such as environmental monitoring tasks, the required capability is temperature and humidity sensing (TEMP_HUMID identifier), and the role is SENSOR. Through a similar process, devices with high matching degree and strong storage capacity are selected first to ensure the accuracy and real-time performance of data collection.

[0037] Step S104: Send the control task to the corresponding target device to control the status of the target device.

[0038] Among them, the control task can be sent to the corresponding target device through a preset communication protocol in order to control the status of the target device.

[0039] In one possible implementation, when sending a control task to the corresponding target device to control the state of the target device, the control task can be parsed to generate specific control instructions; the control instructions are then sent to the target device through a preset communication protocol so that the target device can perform state adjustment operations based on the control instructions.

[0040] Specifically, for example, in controlling a smart bulb A, the system parses the data and generates specific control commands such as "turn on energy-saving mode" or "set brightness to 80%", which are then sent to the target device via a preset MQTT protocol. Upon receiving the command, the target device automatically switches to a low-power state based on the "POWER_SAVE" identifier, or adjusts the LED drive current according to the brightness value to achieve state adjustment. In environmental monitoring scenarios, when the control task involves temperature and humidity sensing, commands such as "read TEMP_HUMID data" are parsed and generated, sent to the matching sensor device via the CoAP protocol. After data acquisition, the device optimizes its response using the "LATENCY" identifier to ensure real-time upload to the cloud. Furthermore, for high-priority tasks, the communication frequency can be dynamically adjusted, such as using a short-interval polling protocol, to improve execution efficiency and reduce latency.

[0041] The smart home device control method provided in this invention defines precise device capabilities and roles for each smart home device in the smart home system. Upon receiving a control request from a user, it determines the required device capabilities and roles of the smart devices needed to respond to the control request. The method then matches the required device capabilities and roles with the device information stored in the device registry to filter out one or more target devices that meet the criteria. By sending control tasks to the corresponding target devices to control their status, it achieves precise batch management that is function-oriented and aligns with user intent, eliminating the need for tedious manual configuration and significantly improving the control efficiency, response speed, and user experience of smart home devices.

[0042] This invention provides a method for controlling smart home devices. Figure 2 This is a flowchart of a control method for a smart home device according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: Step S201: Obtain the function string of the newly added smart device.

[0043] Step S202: Perform a bitwise AND operation on the first target bit of the function string to parse out one or more device capabilities of the newly added smart device, and perform a bitwise operation on the second target bit of the function string to parse out one or more device roles of the newly added smart device.

[0044] As an example, suppose the complete scenario value Profile of the function string reported by a newly added smart device is 0x2E; converting it to binary, it is: 00101110; the high 4 bits: 0010->0x20->HISTORY (device capability); the low 4 bits: 1110->0x0E->BRIDGE(0x08)|ACTUATOR(0x04)|UI(0x02)= 0x0E (device role). It can be seen that this device is a complex device that supports data storage (HISTORY) and simultaneously acts as a bridge (BRIDGE), actuator (ACTUATOR), and user interface (UI). Therefore, it might be a smart switch panel: possessing multiple user interfaces (such as buttons in the UI) and actuators (such as relays in the ACTUATOR), while also acting as a gateway (BRIDGE) to manage other sub-devices and locally recording button operation logs (HISTORY).

[0045] Step S203: Register the device capabilities and device roles of the newly added smart device into the device registry.

[0046] Step S204: Receive the control event initiated by the newly added smart device.

[0047] Step S205: Search for and add device roles for smart devices in each area within the area where the smart device is located, based on control event search.

[0048] Step S206: Generate corresponding linkage control prompt information based on the device role and control events of the regional intelligent devices.

[0049] Step S207: Based on the user's feedback on the linkage control prompts, establish linkage control between the newly added smart device and the regional smart device.

[0050] Specifically, the function string uses an 8-bit binary encoding format. The first 4 bits (bits 0-3) serve as the first target bits, representing the device capability code; the last 4 bits (bits 4-8) serve as the second target bits, representing the device role code. Bitwise AND operations extract the device capability information from the first target bits by applying a preset mask (e.g., 0xFF), such as parsing capability types like temperature control, lighting adjustment, or security monitoring. Bitwise operations include shift and mask operations to identify the device role from the second target bits, such as a master control device, execution device, or sensor device. The device registry uses a distributed database structure to store the unique identifier, capability list, role attributes, and location information of newly added smart devices, ensuring real-time data synchronization. Control events are initiated by the newly added smart device and may include changes in device status (e.g., temperature exceeding limits), user operation commands, or timed trigger events. When a control event is received, based on the region identifier of the newly added smart device, the device registry is queried for the device roles of all smart devices within that region, and the relevant roles (e.g., execution devices or auxiliary devices) are filtered out. The linkage control prompts are dynamically generated based on the content of the control event and the role of the regional devices. For example, "The temperature has exceeded the limit. Should we link the air conditioning equipment to adjust the temperature?" After the user confirms or refuses through the mobile application or voice interface, linkage control rules are established, including event triggering conditions, target device actions and execution logic, so as to realize the collaborative operation of newly added smart devices and regional smart devices.

[0051] As an example, suppose the newly added smart device is a smart thermostat, whose function string is encoded as the binary value "00110011" (hexadecimal 0x33). The first four bits "0011" indicate the device's capability is temperature monitoring and control (bits 0-3 are interpreted as capability code 3), and the last four bits "0011" indicate the device's role is both a sensor and an actuator (bits 4-8 are interpreted as role code 3). When the thermostat connects to the system via Wi-Fi, after obtaining this function string, a bitwise AND operation is performed on the first target bit using a preset mask 0x0F to extract the temperature control capability. Simultaneously, the second target bit is right-shifted by 4 bits and masked with 0x0F to identify the sensor and actuator roles. The device's unique identifier (e.g., MAC address), capability list (temperature control), and role attributes are registered in the distributed device registry, and the area information is marked as "living room".

[0052] Subsequently, the thermostat detects that the room temperature exceeds the preset threshold of 28°C, triggers a "temperature overrun" control event, and actively initiates a notification. Based on the event content and the "living room" area where the thermostat is located, search for the roles of all smart devices in this area in the device registry, and filter out relevant devices such as the air conditioner (role: main control execution device) and smart curtain (role: auxiliary execution device). Accordingly, generate a linkage control prompt message, for example, display on the user's mobile application: "It is detected that the temperature in the living room has exceeded the standard to 30°C. Do you want to link the air conditioner device to lower the temperature and close the curtain to save energy?" After the user gives a voice command feedback of "confirm", establish a linkage rule: when the thermostat event trigger condition (temperature > 28°C) is met, automatically execute the actions of lowering the temperature of the air conditioner to 25°C and closing the curtain to achieve efficient collaborative control.

[0053] As another example, the user presses the "leave home mode" button: Event trigger: A device (smart button) with a complete scene value Profile of UI is pressed, reporting {"event": "turnOff", "id": "device_id_1"}, and issuing an instruction of "start leave home mode".

[0054] Analyze and understand the "leave home mode" requirements: Turn off all electrical appliances (requiring an actuator ACTUATOR), start the security monitoring (requiring a sensor SENSOR and having data storage HISTORY to record abnormalities), and ensure that the instruction is reliably delivered (possibly requiring a bridge / gateway BRIDGE for relay).

[0055] Scan the device registry to find the most suitable smart devices to perform the tasks: Search for all smart devices with the role of actuator ACTUATOR (such as smart switches, curtain motors); search for all target devices with the ability of sensor SENSOR and possibly having the role of data storage HISTORY (such as human body sensors, door and window sensors).

[0056] Prioritize devices with the ability of bridge / gateway BRIDGE to relay the instruction to ensure that battery-powered devices at the network edge can also receive the instruction reliably. (Optional optimization, determine its path according to the actual network topology of the system). Send the "turn off" instruction to the matched actuator and the "arm" instruction to the matched sensor.

[0057] Note: In the "Away Mode" scenario, the action executed after requirements analysis, such as "turn off all appliances (ACTUATOR required)," is a logical instruction. This means that during actual execution, the instruction to turn off all devices configured with ACTUATOR will be sent, eliminating the need to store the entire set of devices in the scenario. This avoids the synchronization operations required to update the scenario's specific configuration when adding or deleting devices causes changes in the device list. By implementing device capabilities and roles in the device registry through a gateway or cloud platform, the complexity of scenario configuration is dynamically resolved, resulting in a better automation experience.

[0058] Furthermore, when a device needs an upgrade, simply query the registry for all devices with the OTA (0x08) upgrade capability to precisely manage their upgrade function and push upgrade firmware. Device failure handling: If a BRIDGE role device is detected to be unavailable, attempt to hand over its tasks to another device with the BRIDGE role (such as a smart speaker), commanding it to take over network management responsibilities to achieve high availability and failover.

[0059] As yet another example, a user purchased a new smart knob, plugged it in, and placed it in their study.

[0060] Plug-and-play smart knob (zero-configuration automation), process: When the smart knob goes live, it reports its Profile to the central controller (gateway) of the smart home system: Ability=SENSOR(0x04)|BATTERY(0x02), Role=UI(0x02)|ENDPOINT(0x01), i.e., Profile=0x46. During a registry update, the central controller detects a new input device (UI) in the study (selectable during device configuration). When the user rotates the knob, a UI event is triggered, and the system's matching engine automatically searches the study for all devices with the Role containing ACTUATOR, discovering the smart desk lamp on the desk (Profile: Ability=BASIC, Role=ACTUATOR|ENDPOINT, i.e., Profile=0x15). At this point, the system automatically pops up a prompt (or generates a recommendation rule in the app): "We've detected you're using the knob. Would you like to use it to control the desk lamp?" (Optional: The user can further choose whether to map the knob to brightness adjustment or as an on / off switch). After user confirmation, the system automatically establishes a binding relationship. From then on, all knob operations will directly control the lamp. Users don't need to navigate through complex automation configuration pages, select devices, trigger conditions, or actions. The system automatically discovers and recommends the optimal solution, providing a "what you see is what you get" configuration experience.

[0061] The smart home device control method provided in this invention significantly improves the intelligence level of device management. Through efficient parsing of function strings and a dynamic registration mechanism, it achieves accurate device capability identification and role allocation. By responding to control events in real time and intelligently generating linkage prompts based on regional device roles, it optimizes the user decision-making process. A distributed device registry ensures data consistency and system scalability, making it suitable for complex multi-device environments. For example, in large-scale smart home systems, it allows for seamless integration of new devices, reducing configuration time, and enhances energy efficiency and user experience through adaptive linkage rules. Furthermore, the user feedback mechanism is flexibly implemented through mobile terminals or voice interfaces, lowering the operational threshold and making smart home control more user-friendly and reliable.

[0062] This embodiment provides a control device for smart home devices, such as... Figure 3 As shown, it includes: The request analysis module 301 is used to analyze the control requests initiated by the user for the smart home system and obtain one or more control tasks; The feature determination module 302 is used to determine the device capabilities and device roles of the smart devices required in response to control requests based on the control task. The device matching module 303 is used to match the device capabilities and device roles of the required smart device with the device information of the smart device stored in the device registry, so as to filter out one or more target devices that meet the conditions. The device control module 304 is used to send control tasks to the corresponding target device in order to control the status of the target device.

[0063] In one possible implementation, the request analysis module 301 includes: The control scenario acquisition unit is used to acquire the control scenario corresponding to the control request; The control request analysis unit is used to analyze the content of control requests, as well as the corresponding control area and the type of device to be controlled, based on the control scenario. The control task generation unit is used to generate one or more control tasks based on the request content, control area, and type of device to be controlled.

[0064] In one possible implementation, the feature determination module 302 includes: The requirement characteristic determination unit is used to determine the task requirement characteristics of the control task; The correspondence acquisition unit is used to acquire the correspondence between task requirement characteristics and equipment capabilities and equipment roles; The capability role determination unit is used to determine the device capabilities and device roles of the smart devices required to respond to control requests based on the correspondence.

[0065] In one possible implementation, the device matching module 303 includes: The device information acquisition unit is used to acquire device information of smart devices stored in the device registry. The capability role matching unit is used to compare the device capabilities of the required smart device with the device capabilities in the device information to determine the capability matching degree, and to match the device role of the required smart device with the device role in the device information to verify role compatibility. The suitability scoring unit is used to evaluate the suitability score of each smart device in a smart home system based on capability matching and role compatibility. The target device screening unit is used to screen one or more target devices that meet preset conditions based on the applicability score.

[0066] In one possible implementation, the device control module 304 includes: The control instruction parsing unit is used to parse control tasks to generate specific control instructions. The device status control unit is used to send control commands to the target device through a preset communication protocol, so that the target device can perform status adjustment operations based on the control commands.

[0067] In one possible implementation, the device status control module 304 further includes: The function acquisition unit is used to acquire the function strings of newly added smart devices; The function parsing unit is used to perform a bitwise AND operation on the first target bit of the function string to parse out one or more device capabilities of the newly added smart device, and to perform a bitwise operation on the second target bit of the function string to parse out one or more device roles of the newly added smart device. The device registration unit is used to register the device capabilities and device roles of newly added smart devices into the device registry.

[0068] In one possible implementation, the device status control module 304 is further configured to receive control events initiated by the newly added smart device; search for the device roles of smart devices in each area within the region where the newly added smart device is located based on the control events; generate corresponding linkage control prompt information based on the device roles of the regional smart devices and the control events; and establish linkage control between the newly added smart device and the regional smart devices based on user feedback on the linkage control prompt information.

[0069] In this embodiment, the control device for the smart home device is presented in the form of a functional unit. Here, a unit refers to an ASIC circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0070] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0071] This invention also provides an electronic device having the above-described features. Figure 3 The control device for the smart home device shown.

[0072] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an optional embodiment of the present invention, such as... Figure 4 As shown, the electronic device includes one or more processors 401, a memory 402, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise as required. The processors can process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple electronic devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 4 Take a processor 401 as an example.

[0073] Processor 401 may be a central processing unit, a network processor, or a combination thereof. Processor 401 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0074] The memory 402 stores instructions executable by at least one processor 401 to cause at least one processor 401 to perform the method shown in the above embodiments.

[0075] The memory 402 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the use of the electronic device based on the display of a mini-program landing page. Furthermore, the memory 402 may include high-speed random access memory and may also include non-transient memory, such as at least one disk storage device, flash memory device, or other non-transient solid-state storage device. In some alternative embodiments, the memory 402 may optionally include memory remotely located relative to the processor 401, and these remote memories can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0076] Memory 402 may include volatile memory, such as random access memory; memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; memory 402 may also include combinations of the above types of memory.

[0077] The electronic device also includes an input device 403 and an output device 404. The processor 401, memory 402, input device 403, and output device 404 can be connected via a bus or other means.

[0078] Input device 403 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the electronic device, such as a touch screen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 404 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touch screen.

[0079] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0080] A portion of the embodiments of this application can be applied to computer program products, such as computer program instructions. When executed by a computer, these instructions, through the operation of the computer, can invoke or provide the methods and / or technical solutions according to the present invention. Those skilled in the art will understand that the forms in which computer program instructions exist in computer-readable media include, but are not limited to, source files, executable files, installation package files, etc. Accordingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0081] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A control method for a smart home device, characterized in that, The method includes: Analyze the control requests initiated by users to the smart home system to obtain one or more control tasks; Based on the control task, determine the device capabilities and device roles of the smart device required to respond to the control request; The device capabilities and roles of the required smart devices are matched with the device information of smart devices stored in the device registry to filter out one or more target devices that meet the conditions. The control task is sent to the corresponding target device to control the state of the target device; The step of determining the device capabilities and device roles of the smart device required to respond to the control request based on the control task includes: Determine the task requirements characteristics of the control task; Obtain the correspondence between the task requirement characteristics and the equipment capabilities and equipment roles; Based on the correspondence, determine the device capabilities and device roles of the smart device required to respond to the control request; The step of matching the device capabilities and device roles of the required smart devices with the device information of smart devices stored in the device registry to filter out one or more target devices that meet the conditions includes: Obtain the device information of the smart device stored in the device registry; The device capabilities of the required smart device are compared with the device capabilities in the device information to determine the capability matching degree, and the device roles of the required smart device are matched with the device roles in the device information to verify role compatibility; Based on the capability matching degree and the role compatibility, the suitability score of each smart device in the smart home system is evaluated. Based on the applicability score, one or more target devices that meet the preset conditions are selected.

2. The method according to claim 1, characterized in that, The analysis of user-initiated control requests to the smart home system yields one or more control tasks, including: Obtain the control scenario corresponding to the control request; Based on the control scenario, analyze the request content of the control request, as well as the corresponding control area and the type of device to be controlled; Based on the request content, the control area, and the type of the device to be controlled, one or more control tasks are generated.

3. The method according to claim 1, characterized in that, Sending the control task to the corresponding target device to control the state of the target device includes: The control task is parsed to generate specific control instructions; The control command is sent to the target device through a preset communication protocol, so that the target device performs a state adjustment operation based on the control command.

4. The method according to claim 1, characterized in that, The method further includes: Retrieve the function string of the newly added smart device; Perform a bitwise AND operation on the first target bit of the function string to parse out one or more device capabilities of the newly added smart device, and perform a bitwise operation on the second target bit of the function string to parse out one or more device roles of the newly added smart device; Register the device capabilities and device roles of the newly added smart devices into the device registry.

5. The method according to claim 4, characterized in that, The method further includes: Receive control events initiated by the newly added smart device; Based on the control events, search for the device roles of smart devices in each area within the region where the newly added smart device is located; Generate corresponding linkage control prompt information based on the device role of the intelligent device in the area and the control event; Based on user feedback regarding the linkage control prompts, a linkage control system is established between the newly added smart device and the regional smart devices.

6. A control device for a smart home device, characterized in that, The device includes: The request analysis module is used to analyze the control requests initiated by users for the smart home system and obtain one or more control tasks; The feature determination module is used to determine, based on the control task, the device capabilities and device roles of the intelligent device required in response to the control request, including: Determine the task requirement characteristics of the control task; obtain the correspondence between the task requirement characteristics and device capabilities and device roles; based on the correspondence, determine the device capabilities and device roles of the intelligent device required to respond to the control request; The device matching module is used to match the device capabilities and device roles of the required smart device with the device information of smart devices stored in the device registry, so as to filter out one or more target devices that meet the conditions, including: Obtain device information of smart devices stored in the device registry; compare the device capabilities of the required smart device with the device capabilities in the device information to determine the capability matching degree, and match the device role of the required smart device with the device role in the device information to verify role compatibility; based on the capability matching degree and the role compatibility, evaluate the applicability score of each smart device in the smart home system; and based on the applicability score, select one or more target devices that meet preset conditions. The device control module is used to send the control task to the corresponding target device in order to control the state of the target device.

7. An electronic device, characterized in that, include: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, the processor executing the computer instructions to perform the method of any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the method of any one of claims 1 to 5.