Control method and device, electronic equipment and readable storage medium

By receiving scene settings and restore commands, the system automatically saves and restores the status of all smart home devices, solving the problem of tedious manual adjustment of device status and improving system usability and user experience.

CN120979856APending Publication Date: 2025-11-18GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511027777.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

In a smart home system, after a user creates a new scene, they need to manually adjust the device to restore it to its original state. This process is cumbersome and time-consuming, impacting the user experience.

Method used

By receiving scene setting instructions, the system identifies the target device group and saves its status, sends instructions to put the device into a new state, and receives scene recovery instructions to restore it to its original state with one click.

Benefits of technology

It enables one-click restoration of device status, making operation convenient and quick, and improving the ease of use and user experience of the whole-house smart system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120979856A_ABST
    Figure CN120979856A_ABST
Patent Text Reader

Abstract

The invention provides a control method and apparatus, an electronic device and a readable storage medium. The method comprises the steps of receiving a scene setting instruction sent by a control device in response to a first operation; determining a target device group related to the scene setting instruction, and obtaining and storing a first state corresponding to each target device in the target device group; sending the scene setting instruction to each target device in the target device group, so that each target device in the target device group enters a second state; and receiving a scene recovery instruction sent by the control device in response to a second operation, and recovering the state of each target device in the target device group from the second state to the first state. When the user sets the new scene, the original state of the equipment related to the new scene can be obtained and stored, after the user applies the new scene, the original state of the equipment before the new scene is applied can be recovered through the second operation in a one-key mode, and operation is convenient.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the field of smart home, and in particular to a control method and device, electronic equipment and readable storage medium. BACKGROUND

[0002] The whole-house intelligence takes an intelligent host as a core, takes a central controller as a control and display center, takes an APP (application) as a remote management and control center, and takes air conditioners, refrigerators, washing machines, fans, lamps, switches, sockets, curtains and various types of life electrical appliances as carriers to form a whole-house intelligent control system.

[0003] To meet different life scene requirements, a user can customize multiple intelligent scenes, such as a home-coming scene and a leaving-home scene. Taking the home-coming scene as an example, the user can set a series of device actions such as cooling the air conditioner in the home to 26 degrees, turning on the fan and making it swing, turning on the TV, and opening the curtains.

[0004] However, in actual use, after the user creates and executes a new scene, if the device needs to return to a state before the new scene, the device parameters need to be manually adjusted one by one, which is tedious and time-consuming, and seriously affects the user experience. SUMMARY

[0005] In view of the above problems, embodiments of the present application are proposed to provide a control method, device, electronic equipment and readable storage medium which overcome the above problems or at least partially solve the above problems.

[0006] In a first aspect, the embodiments of the present application disclose a control method, which comprises:

[0007] receiving a scene setting instruction sent by a control device in response to a first operation;

[0008] determining a target device group related to the scene setting instruction, and obtaining and saving a first state corresponding to each target device in the target device group;

[0009] sending the scene setting instruction to each target device in the target device group, so that each target device in the target device group enters a second state;

[0010] receiving a scene recovery instruction sent by the control device in response to a second operation, and recovering the state of each target device in the target device group from the second state to the first state.

[0011] In a second aspect, the embodiments of the present application disclose a control device applied to an intelligent host, and the device comprises:

[0012] The receiving module is used to receive the scene setting command sent by the control device in response to the first operation;

[0013] The storage module is used to determine the target device group related to the scene setting instruction, and to obtain and store the first state corresponding to each target device in the target device group.

[0014] The setting module is used to send the scene setting instruction to each target device in the target device group, so that each target device in the target device group enters the second state;

[0015] The recovery module is used to receive a scene recovery command sent by the control device in response to the second operation, and restore the state of each target device in the target device group from the second state to the first state.

[0016] Thirdly, embodiments of this application also disclose an electronic device, including a processor and a memory, wherein the memory stores a program or instructions that can run on the processor, and the program or instructions, when executed by the processor, implement the steps of the control method as described in the first aspect.

[0017] Fourthly, embodiments of this application also disclose a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the control method as described in the first aspect.

[0018] In this embodiment, a scene setting instruction sent by a control device in response to a first operation is received; a target device group related to the scene setting instruction is determined, and a first state corresponding to each target device in the target device group is obtained and saved; the scene setting instruction is sent to each target device in the target device group, causing each target device in the target device group to enter a second state; a scene recovery instruction sent by the control device in response to a second operation is received, and the state of each target device in the target device group is restored from the second state to the first state. This method allows the user to first obtain and save the original state of the devices involved in the new scene when setting a new scene. After the user applies the new scene, if they want to return to the device state before the new scene, they can restore the original state of the devices before the new scene application with one click through the second operation. This is convenient, time-saving, and improves the usability and user experience of the whole-house smart system. Attached Figure Description

[0019] Figure 1 This is a flowchart of a control method provided in an embodiment of the present invention;

[0020] Figure 2 This is a flowchart of another control method provided in an embodiment of the present invention;

[0021] Figure 3 This is a flowchart of the third control method provided in the embodiments of the present invention;

[0022] Figure 4 This is a block diagram of a control device provided in an embodiment of the present invention;

[0023] Figure 5 This is a block diagram of an electronic device provided in an embodiment of the present invention;

[0024] Figure 6 This is a block diagram of another electronic device according to another embodiment of the present invention. Detailed Implementation

[0025] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.

[0026] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and are not limited in number; for example, a first object can be one or more. Furthermore, the term "and / or" in the specification and claims is used to describe the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. In the embodiments of this application, the term "multiple" refers to two or more, and other quantifiers are similar.

[0027] refer to Figure 1 This illustrates a control method provided in an embodiment of this application, applied to a smart host, the method comprising:

[0028] Step 101: Receive the scene setting command sent by the control device in response to the first operation.

[0029] In a whole-house smart home system, the smart host, central control unit, and app can interact. Through data flow and functional division, they form a collaborative relationship, jointly supporting user control of devices and scene management. The smart host, also known as the home host, is responsible for data storage, command processing, and device linkage logic calculations. For example, the smart host can store device status data and user operation records, converting control commands sent by the central control unit and app into signals that the devices can recognize and then distributing them to the devices. The central control unit can be a smart panel or other device providing visual operation and real-time feedback, allowing users to set scenes or configure the status of individual devices. The smart host and central control unit can communicate with each other. The app enables remote control of smart devices. Users can customize scene settings through the app, and user settings can be synchronized to the smart host.

[0030] For example, a user sets a "Homecoming Scene" in the app, where the air conditioner is set to 26°C, the curtains are open, and the lights are at 50% brightness. After the user clicks "Save," the app sends the scene configuration data to a cloud server via the network, and then synchronizes it to the smart host. The smart host stores the scene information and tags associated devices, such as the air conditioner, curtains, and lights. When the user triggers the "Homecoming Scene" application through the central control or the app, the smart host can parse the application commands sent by the app or the central control and send commands to the associated devices to change their status.

[0031] The scene setting command in this application is used to implement custom scene setting operations. The control device that sends the scene setting command can be a mobile terminal APP or a central control unit. Specifically, the control device can send a request to the smart host to create a new scene. After receiving the request, the smart host can respond to the scene setting command and save the device's status information for later recovery.

[0032] Step 102: Determine the target device group related to the scene setting instruction, and obtain and save the first state corresponding to each target device in the target device group.

[0033] In this embodiment, the intelligent host can parse the scene setting instruction and determine the target device group associated with the scene setting instruction. The target device group is a collection of all target devices related to the scene setting instruction. The intelligent host can obtain the first state of each target device in the target device group. The first state can be used to characterize the original state of the target device before the scene setting instruction is executed. The intelligent host can save the first state.

[0034] Step 103: Send the scene setting instruction to each target device in the target device group, so that each target device in the target device group enters the second state.

[0035] In this embodiment, after receiving the scene setting instruction, the smart host can extract key information from the scene setting instruction. For example, by parsing the scene setting instruction, it can determine that the target device group includes: air conditioner, fan, and curtains; the target states of the devices are: air conditioner "cooling 26℃", fan "oscillating mode", and curtains "opening degree 50%"; each device has a unique identifier in the smart host. After determining the target device and its corresponding target state, the smart host can convert the scene setting instruction into a setting instruction for each target device and send it to the target device, so that each target device in the target device group enters a second state, which is the target state of the device indicated by the scene setting instruction.

[0036] Step 104: Receive the scene recovery command sent by the control device in response to the second operation, and restore the state of each target device in the target device group from the second state to the first state.

[0037] In this embodiment, the smart host can receive a scene recovery command sent by the control device in response to a second operation. The second operation can be an operation performed by the user via a mobile terminal APP or a central control unit to trigger scene recovery. In response to the second operation, the control device sends a scene recovery command to the smart host. The smart host receives the scene recovery command and, based on the saved first state of the device, restores the device's state from the second state to the first state, thus achieving one-click restoration of the device's state.

[0038] The method described in this application enables one-click restoration of device status, offering convenient and quick operation. For example, this method can be applied to temporary scene settings. When a user creates and executes a new scene, the system automatically records the original state of all devices affected by the new scene, such as the current temperature of the air conditioner, fan speed, and curtain position, and associates this information with the new scene. In the interface between the central control unit or the app and the user, a "Restore to Previous Scene State" button can be added to each executed scene. Clicking this button allows the system to retrieve previously recorded state data and automatically synchronize it to all devices. For temporary scenes, such as temporary movie viewing or temporary cooling, the system can quickly restore the original state after the scene application is completed using the "Restore to Previous Scene State" button. This eliminates the need for cumbersome device status restoration operations, allowing users to choose not to create temporary scenes. By automatically saving scene states and providing a one-click restore button, the system's flexibility and the user's smart device experience are enhanced.

[0039] In summary, in this embodiment, the method involves receiving a scene setting instruction sent by a control device in response to a first operation; determining a target device group related to the scene setting instruction and saving the first state corresponding to each target device in the target device group; sending the scene setting instruction to each target device in the target device group, causing each target device in the target device group to enter a second state; and receiving a scene recovery instruction sent by the control device in response to a second operation to restore the state of each target device in the target device group to the first state. This method allows users to save the original states of the devices involved in the new scene when setting it up. After applying the new scene, if the user wants to return to the device state before the new scene, they can restore it to its original state with a single click using the second operation. This convenient operation improves the usability and user experience of the whole-house smart system.

[0040] refer to Figure 2 This illustrates yet another control method provided by an embodiment of this application, the method comprising:

[0041] Step 201: Receive the scene setting command sent by the control device in response to the first operation;

[0042] Step 202: Determine the target device group related to the scene setting instruction, and obtain and save the first state corresponding to each target device in the target device group.

[0043] Optionally, step 202 includes:

[0044] Sub-step 2021: Obtain and save the first state corresponding to each target device in the target device group and the timestamp corresponding to the first state.

[0045] In this embodiment of the application, when saving the state of each target device, the first state and the timestamp of the first state can be saved at the same time, so that when restoring, the state of the device before the scene setting instruction can be determined based on the timestamp, and the device state can be restored with one click.

[0046] Step 203: Decompose the scene setting instructions to generate target setting instructions corresponding to each target device in the target device group;

[0047] In this embodiment of the application, by parsing the scene setting instructions, the target device group is determined to include: air conditioner, fan, and curtains; the target states of the devices are: air conditioner "cooling 26℃", fan "oscillating mode", and curtains "opening degree 50%". Since different target devices have different types and communication methods, after determining the identifier, target state, and type of the target device, the target setting instructions for each target device can be determined based on the above information to realize the control of the target device.

[0048] Optionally, step 203 includes:

[0049] Sub-step 2031: Decompose the scene setting instruction to obtain the device identifier, device type and target status of each target device in the target device group;

[0050] Sub-step 2032: Based on the device identifier and device type of the target device, convert the target state into a target setting instruction that conforms to the communication protocol of the target device corresponding to the target state.

[0051] In this embodiment of the application, for sub-steps 2031 and 2032, the target devices, such as air conditioners, fans, and curtains, are of different types, with different communication methods and instruction logic. Each device has a unique device identifier in the system. For example, the identifier of the living room air conditioner is 001, and the identifier of the living room curtain is 002. The identifier ensures that the instruction will not be sent to the wrong device. According to the device type and device identifier, a target setting instruction for each target device can be generated.

[0052] For example, taking "air conditioner cooling to 26℃" as an example, the smart host needs to convert it into a private communication protocol command specific to the air conditioner brand. Assuming a certain brand's protocol specifies that "cooling mode code is 02, and temperature codes 01 (16℃) to 1A (32℃) correspond to each degree," then "cooling to 26℃" will be converted into a string of binary or hexadecimal commands, such as 0x01 0x02 0x1A, where the first two digits represent the mode and the last digit represents the temperature. The smart host then sends the converted target setting command to the target device, enabling control of the target device.

[0053] Taking "curtains open 50%" as an example: the curtain motor protocol may stipulate that "the degree of opening is represented by a number from 0 to 100, and the instruction format is OPEN + device ID + degree of opening". In this case, "open 50%" will be converted to OPEN-002-50. The above target setting instruction format is only used as an example and is not limited in the embodiments of this application.

[0054] Step 204: Send the target setting instruction to the target device involved in the target setting instruction, so that each target device in the target device group enters the second state;

[0055] Step 205: Receive the scene recovery command sent by the control device in response to the second operation, and restore the state of each target device in the target device group from the second state to the first state.

[0056] Optionally, step 205 includes:

[0057] Sub-step 2051: Obtain the timestamp of the scene setting instruction, search the database for the first state of each target device saved at the time point before the timestamp of the scene setting instruction, and convert the first state into a device recovery instruction and send it to each target device in the target device group, so that the state of each target device is restored to the first state.

[0058] In this embodiment, obtaining the timestamp of the scene setting instruction determines the time point of the scene setting instruction. This is then compared with the device status and timestamp stored in the database. The device status recorded at the time point closest to the scene setting instruction's time point before the instruction is determined as the device's first state. The device is then restored based on this first state.

[0059] Furthermore, upon receiving a scene setting instruction, the first state of each target device in the target device group can be associated with the scene identifier in the scene setting instruction. After the scene set by the scene setting instruction is applied, if it is necessary to restore the original state with one click, the first state of the device before the scene application can be determined based on the scene identifier corresponding to the current scene, and the device state can be restored. The method of this application can quickly restore the device to the state before scene creation without manual operation by the user, thus improving device control efficiency.

[0060] Optionally, after step 201, the method further includes:

[0061] Step 206: Perform an integrity check on the scene setting command and obtain the check result;

[0062] Step 207: If the verification result is passed, then the scene setting instruction is determined to be complete;

[0063] Step 208: If the verification result is unsuccessful, the scene setting command is determined to be invalid, and verification error information is sent back to the control device.

[0064] In this embodiment, the smart host performs a completeness check on the generated scene setting instructions. The completeness check verifies whether the instruction contains all the information necessary for the device to perform the operation. For example, for an air conditioner scene setting instruction, it needs to include temperature parameters, operating mode, and fan speed level; for a curtain instruction, it needs to include opening / closing direction and target opening / closing degree. If the completeness check passes, it means the scene setting instruction contains all the necessary information for the device to execute. At this point, the instruction is determined to be complete and valid, and can proceed to the subsequent instruction sending stage to ensure the device can accurately complete the corresponding operation based on the instruction. If the completeness check fails, it indicates that the scene setting instruction is missing information. For example, the air conditioner instruction may lack temperature parameters, or the curtain instruction may not specify the opening / closing direction. Incomplete instructions will prevent the device from performing the operation normally and may even lead to misoperation. Therefore, after determining that the scene setting instruction is invalid, the smart host can send a verification error message to the control device (such as a central control unit or an app) that sent the scene setting information. The verification error message can be used to indicate the specific content missing from the instruction, such as "the air conditioner instruction lacks temperature parameters," so that the user or control device can correct it according to the prompt, ensuring that the subsequently regenerated scene setting instructions are complete and valid.

[0065] Optionally, step 206 includes:

[0066] Sub-step 2061: Check whether the scene setting instruction contains all the preset required fields and obtain the format verification result; the required fields include at least the device identifier, device type and corresponding target status of the target device;

[0067] Sub-step 2062: If the format verification result is passed, the original data of the scene setting instruction is calculated to obtain a first verification value, and the first verification value is compared with a second verification value to obtain a data verification result; the second verification value is the verification value carried in the scene setting instruction, and the second verification value is generated by the control device.

[0068] Sub-step 2063: If the data verification result is passed, check whether the target status corresponding to each target device matches the device type to obtain the logical verification result;

[0069] Sub-step 2064: If the logical verification result is passed, then the verification result is determined to be passed; if any one of the format verification result, data verification result, or logical verification result is failed, then the verification result is determined to be failed.

[0070] In this embodiment, for sub-steps 2061 to 2064, integrity verification may include: format verification, data verification, and logic verification. Format verification checks whether the scene setting instruction contains all preset required fields. Required fields are essential information for the instruction to take effect, including at least the device identifier of the target device, such as "living room air conditioner-001," ensuring the instruction can accurately locate the specific device and device type, such as "air conditioner" or "curtains," to match the corresponding control logic and target state, such as "cooling 26℃" or "opening degree 50%," clearly defining the operation the device needs to perform. If the instruction lacks any required field, for example, only labeling "air conditioner" without specifying the device identifier, or without setting a target state, the format verification result is "failed," and the instruction is directly determined to be invalid; if all required fields are complete, the format verification result is "passed," and the process proceeds to the next step.

[0071] After the format verification passes, the process proceeds to the data verification stage in sub-step 2062. At this point, the intelligent host calculates the original data of the scene setting command—the complete command content including device identifier, type, target status, etc.—to generate a first verification value. This first verification value can be a 16-bit number obtained using the CRC16 algorithm. The scene setting command carries a second verification value pre-generated by the control device (such as an app or central control unit). This second verification value is calculated by the control device based on the same original data before sending the command. The intelligent host compares the first and second verification values. If they match, it indicates that the command has not been tampered with or damaged during transmission, and the data verification result is "passed." If they do not match, it indicates that the data may have been transmitted incorrectly or tampered with, and the data verification result is "failed."

[0072] For instructions that pass data verification, further logical verification is performed to check whether the target status of each target device matches its device type. For example, the target status of an "air conditioner" can be set to "cooling 26℃" or "heating 28℃", but cannot be set to "oscillation"; the target status of a "curtain" should be "opening degree 30%" or "closed", not "fan speed level 3". If the target status of all devices conforms to the functional logic corresponding to their type, the logical verification result is "passed"; if there is a mismatch between status and type, such as the target status of "curtain-001" being "cooling", the logical verification result is "failed".

[0073] The scene setting command is considered "passed" only if format validation, data validation, and logic validation all pass. If any of the three validation layers fail, the overall validation result is "failed," the command is deemed invalid, and the subsequent error feedback process is triggered. Validating the scene setting command ensures both the structural integrity of the command and the authenticity of the data and the rationality of the logic, thus guaranteeing the reliable execution of the whole-house smart scene.

[0074] Optionally, after step 205, the method further includes:

[0075] Step 209: Receive the latest status information fed back by the target device group;

[0076] Step 210: Send the latest status information to the control device for display.

[0077] In this embodiment of the application, for steps 209 and 210, after the execution status is restored, the latest status information fed back by the device group can also be received and sent to the control device for display.

[0078] After the scene setting command is executed by the target device group (i.e., all devices involved in the scene, such as air conditioners, fans, and curtains), the smart host actively receives the current operating status data returned by these devices. The "latest status information" can include specific parameters for each device. For example, the air conditioner might report "Current cooling mode, temperature 26℃, operating normally," the fan "Oscillating mode on, fan speed level 2," and the curtains "Opening / closing degree 80%, in place," etc. The latest status information not only reflects whether the device has completed the operation according to the command but also reflects the device's real-time operating status, such as whether a malfunction has occurred or whether the target state has been reached. Feedback from the target device group is typically achieved through an IoT communication protocol compatible with the smart host, ensuring the timeliness and accuracy of information transmission. After the smart host obtains the latest status information from the target device group, it organizes and converts this information into user-friendly text or chart format, then transmits it over the network to the control device, such as the user's mobile app or living room central control screen, and displays it intuitively on the control device's interface. For example, the "Scene Execution Status" page of the mobile app can display "Air Conditioner: 26℃ (Cooling) √", "Fan: Oscillation (Level 2) √", and "Curtains: 80% Opening / Closing √". If a device fails to execute the command, such as the curtains only opening / closing to 30% due to a malfunction, it will be marked "Curtains: 30% Opening / Closing (Abnormal)". By providing feedback to the control device, users can clearly understand the current status of all devices in the scene in real time, confirm whether the scene is working as expected, and promptly detect and handle any abnormalities, thereby ensuring the user's sense of control and user experience with the whole-house smart system.

[0079] Optionally, the scene setting instruction includes a scene type, and the method further includes:

[0080] Step 211: If the scene type of the scene setting instruction is a temporary scene type, then the first state of the target device group involved in the scene setting instruction is recorded.

[0081] Step 212: If the scene type of the scene setting instruction is a fixed scene type, then the first state of the target device group involved in the scene setting instruction is not recorded.

[0082] In this embodiment, regarding steps 211 and 212, when the scenario type of the scenario setting instruction is a temporary scenario type, the smart host records the first state of the target device group involved in the scenario before executing the scenario instruction. A "temporary scenario type" can be a scenario created by the user for short-term, specific needs, such as a "temporary meeting scenario" or a "lunch break scenario." The execution of such scenarios is temporary, and users often want the devices to return to their state before execution after the scenario ends. The "first state" refers to the original state of the device before receiving the scenario setting instruction, such as the air conditioner being in heating mode at 28°C, the curtains being fully closed, and the light brightness being 30%. The smart host collects this state data in real time through the IoT communication protocol and stores it in the smart host's storage module using a scenario identifier and timestamp association, providing data support for possible subsequent "state restoration" needs.

[0083] For scene setting commands of fixed scene types, the first state of the target device group does not need to be recorded. "Fixed scene types" can be scenarios that users use regularly and frequently, such as "daily home scene" or "sleep scene." Execution of these scenes is to ensure the device remains stably in the set state, and users typically do not need to restore the device to its original state after the scene ends. For example, if a "sleep scene" is set with the air conditioner at 26°C and the lights off, the user is more likely to execute the "morning scene" upon waking rather than reverting to the device's pre-sleep state. Therefore, not recording the first state reduces the storage resource usage of the smart host, avoids unnecessary data processing, and improves system operating efficiency.

[0084] This application achieves on-demand control over the initial state records of devices by distinguishing between temporary and fixed scenarios. This satisfies users' potential needs for device state restoration in temporary scenarios while also taking into account the rational use of system resources, further optimizing the practicality and efficiency of the whole-house smart system.

[0085] Optionally, after step 205, the method further includes:

[0086] Step 213: Send an instruction confirmation message to the control device;

[0087] Step 214: After receiving the confirmation instruction from the control device for the instruction confirmation message, process the scene recovery instruction.

[0088] In this embodiment, regarding steps 213 and 214, after receiving the scene restoration command, the smart host can also send a command confirmation message to the control device. That is, when it detects that a scene restoration operation needs to be performed, such as a mobile APP or central control screen pushing a command confirmation message. The command confirmation message can contain clear operation prompts, such as "The living room air conditioner, fan, and curtains are about to be restored to the state of 15:30. Do you confirm the execution?". It can also indicate the list of target devices involved and the restoration time point, so that the user clearly understands the operation to be performed. Sending the command confirmation message can prevent the device state from being accidentally restored due to accidental button touches or system misjudgments. For example, if a user intends to close the curtains but accidentally clicks the "Restore Scene" button, etc.

[0089] Only after the smart host receives the "confirmation command" from the control device will it formally process the scene restoration command. The "confirmation command" can be explicit authorization from the user through the control device, such as clicking the "Confirm Restoration" button on a mobile app or completing confirmation via touch operation on the central control screen. Upon receiving the confirmation command, the smart host initiates the restoration process: it retrieves the previously recorded "first state" data of the target device group, generates corresponding restoration commands, such as adjusting the air conditioner from the current 20℃ back to the original 26℃, and restoring the curtains from the closed state to the original open state, and sends these commands to each device via the IoT protocol. If no confirmation command is received, such as if the user clicks "Cancel" or there is no action within the timeout period, the smart host will not execute the restoration operation, ensuring that the entire process is completely under the user's control.

[0090] The method in this application reduces the risk of misoperation through secondary confirmation. Especially in temporary scenarios involving changes in the status of multiple devices, it can effectively avoid user experience problems caused by improper recovery operations, and further improve the security and reliability of the whole-house smart system.

[0091] refer to Figure 3 , Figure 3 This application illustrates a third control method provided in an embodiment, comprising:

[0092] Step S1: Create a scene using the APP or central control system;

[0093] Step S2: All devices and actions involved in the scene are sent to the intelligent host;

[0094] Step S3: The smart host separates the relevant devices and their corresponding statuses from the scene setting data and saves them.

[0095] Step S4: After the smart host finishes saving, it sends scene setting instructions to the relevant devices to complete the scene setting.

[0096] Step S5: After all the device scene settings are completed, the smart host returns the scene setting completion result to the triggering terminal.

[0097] In step S6, the user receives a successful scene setting instruction, manually triggers the scene, and changes the state of the involved devices;

[0098] Step S7: The user clicks the "Restore Scene Settings Before State" button to restore the state of the relevant devices.

[0099] In this embodiment, during the startup phase of the whole-house smart system, the smart host completes system initialization, including loading the IoT communication module, connecting to the status storage database, and initializing the device status acquisition program, ensuring that the smart host is ready to respond to device status acquisition requests at any time. When a user initiates a request to create a new smart scene on a mobile app or central control unit, the request information is sent to the smart host via wireless communication (such as Wi-Fi, Bluetooth, etc.). Upon receiving the request, the smart host triggers the scene setting sending program and the relevant device status acquisition and saving program. The smart host decomposes the scene setting instructions issued by the app or central control unit to obtain the relevant action instructions for each device, and sends them to the relevant devices via wireless communication. Each device remembers the scene identifier and specific actions. The smart host uses IoT communication protocols (such as MQTT, ZigBee, etc.) to establish communication connections with various devices in the whole-house smart environment sequentially according to device type and unique device identifier. For each device, a status query instruction is sent. After receiving the instruction, the device returns its current working status parameters to the smart host.

[0100] The intelligent host collects device status information, organizes and categorizes it according to a pre-designed data structure, and stores it in a status storage database. For example, it uses the device's unique identifier as the primary key and inserts information such as device type, device name, and current status parameters as fields into the corresponding tables in the database, ensuring accurate storage and fast retrieval of device status information.

[0101] Specifically, creating new scenes via control devices can involve the user setting desired actions for each device in a newly created smart scene using a user app or central control unit via touchscreen, voice input, etc. Examples include setting the air conditioner's cooling temperature, fan on / off and oscillation settings, computer power-on command, and curtain opening / closing degree in a "homecoming" scene. The central control unit or mobile device then wirelessly transmits the user-defined scene information as scene setting commands to the smart host. Upon receiving the scene setting commands, the smart host parses and verifies them to ensure accuracy and completeness. Based on the parsed scene setting commands, the smart host generates target setting commands for each device according to its type and unique identifier. For example, the air conditioner cooling temperature setting command might be converted into a command format conforming to the air conditioner communication protocol, and then sent to the corresponding device via the IoT communication protocol. After completing the scene settings, the user can click "Execute Scene" to check if the scene has been successfully sent. At this point, all involved devices will simultaneously execute the scene-set actions and return a status update to the app or central control unit, allowing the user to view the latest device actions in real time.

[0102] When a user clicks the "One-Click Restore" button on the app or central control unit, the central control unit sends a restore command to the smart host via wireless communication. Upon receiving the restore command, the smart host immediately initiates the device status restore procedure. The smart host retrieves the previously saved original status information of each device before scene creation from the status storage database, based on the device's unique identifier. This ensures the information is accurate and covers all key device status parameters. The retrieved original status information is then converted into corresponding device control commands. For example, if the previously saved air conditioner temperature was 25 degrees Celsius and the current temperature is 26 degrees Celsius, the smart host generates a control command to adjust the air conditioner temperature back to 25 degrees Celsius. These restore commands are then sent to the corresponding devices via the IoT communication protocol. Upon receiving the restore command, the device quickly adjusts its operating status, restoring it to the original setting before scene creation. After restoring its status, the device feeds back the latest status information to the smart host, which updates the device status display on the 4-inch and 10-inch central control units and simultaneously updates the device status information in the status storage database, completing the one-click device status restore operation.

[0103] In summary, in this embodiment, the method involves receiving a scene setting instruction sent by a control device in response to a first operation; determining a target device group related to the scene setting instruction and saving the first state corresponding to each target device in the target device group; sending the scene setting instruction to each target device in the target device group, causing each target device in the target device group to enter a second state; and receiving a scene recovery instruction sent by the control device in response to a second operation to restore the state of each target device in the target device group to the first state. This method allows users to save the original states of the devices involved in the new scene when setting it up. After applying the new scene, if the user wants to return to the device state before the new scene, they can restore it to its original state with a single click using the second operation. This convenient operation improves the usability and user experience of the whole-house smart system.

[0104] refer to Figure 4 It illustrates a control device 30 provided in an embodiment of this application, comprising:

[0105] The receiving module 301 is used to receive the scene setting command sent by the control device in response to the first operation;

[0106] The storage module 302 is used to determine the target device group related to the scene setting instruction, and to obtain and store the first state corresponding to each target device in the target device group.

[0107] Setting module 303 is used to send the scene setting instruction to each target device in the target device group, so that each target device in the target device group enters the second state;

[0108] The recovery module 304 is used to receive a scene recovery command sent by the control device in response to the second operation, and restore the state of each target device in the target device group from the second state to the first state.

[0109] Optionally, the setting module includes:

[0110] The instruction decomposition submodule is used to decompose the scene setting instructions and generate target setting instructions corresponding to each target device in the target device group.

[0111] The instruction sending submodule is used to send the target setting instruction to the target device involved in the target setting instruction.

[0112] Optionally, the instruction decomposition submodule includes:

[0113] The decomposition unit is used to decompose the scene setting instructions to obtain the device identifier, device type and target status of each target device in the target device group;

[0114] The conversion unit is used to convert the target state into a target setting instruction that conforms to the communication protocol of the target device corresponding to the target state, based on the device identifier and device type of the target device.

[0115] Optionally, the device further includes:

[0116] The verification module is used to perform integrity verification on the scene setting instructions and obtain the verification result;

[0117] The first determination module is used to determine that the scene setting instruction is complete if the verification result is passed.

[0118] The second determination module is used to determine that the scene setting instruction is invalid if the verification result is unsuccessful, and to send verification error information back to the control device.

[0119] Optionally, the verification module includes:

[0120] The first verification submodule is used to check whether the scene setting instruction contains all the preset required fields and obtain the format verification result; the required fields include at least the device identifier of the target device, the device type and the corresponding target status;

[0121] The second verification submodule is used to calculate the original data of the scene setting instruction if the format verification result is passed, obtain a first verification value, and compare the first verification value with a second verification value to obtain a data verification result; the second verification value is the verification value carried in the scene setting instruction, and the second verification value is generated by the control device;

[0122] The third verification submodule is used to check whether the target status corresponding to each target device matches the device type if the data verification result is passed, and to obtain the logical verification result.

[0123] The fourth verification submodule is used to determine that the verification result is passed if the logical verification result is passed, and to determine that the verification result is failed if any one of the format verification result, the data verification result, or the logical verification result is failed.

[0124] Optionally, the storage module includes:

[0125] The storage submodule is used to obtain and save the first state corresponding to each target device in the target device group and the timestamp corresponding to the first state.

[0126] The recovery module includes:

[0127] The recovery submodule is used to obtain the timestamp of the scene setting instruction, find the first state of each target device saved in the database at the time point before the timestamp of the scene setting instruction, and convert the first state into a device recovery instruction and send it to each target device in the target device group, so that the state of each target device is restored to the first state.

[0128] Optionally, the device further includes:

[0129] The status update module is used to receive the latest status information fed back by the target device group;

[0130] The status display module is used to send the latest status information to the control device for display.

[0131] Optionally, the scene setting instruction includes a scene type, and the device further includes:

[0132] The first scene setting submodule is used to record the first state of the target device group involved in the scene setting instruction if the scene type of the scene setting instruction is a temporary scene type.

[0133] The second scene setting submodule is used to not record the first state of the target device group involved in the scene setting instruction if the scene type of the scene setting instruction is a fixed scene type.

[0134] Optionally, the device further includes:

[0135] The instruction confirmation module is used to send instruction confirmation messages to the control device;

[0136] The anti-accidental touch module is used to process the scene recovery command after receiving a confirmation command from the control device for the command confirmation message.

[0137] In summary, in this embodiment, the method involves receiving a scene setting instruction sent by a control device in response to a first operation; determining a target device group related to the scene setting instruction and saving the first state corresponding to each target device in the target device group; sending the scene setting instruction to each target device in the target device group, causing each target device in the target device group to enter a second state; and receiving a scene recovery instruction sent by the control device in response to a second operation to restore the state of each target device in the target device group to the first state. This method allows users to save the original states of the devices involved in the new scene when setting it up. After applying the new scene, if the user wants to return to the device state before the new scene, they can restore it to its original state with a single click using the second operation. This convenient operation improves the usability and user experience of the whole-house smart system.

[0138] Figure 5 A block diagram of an electronic device 600 is shown according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0139] Reference Figure 5 The sub-device 600 may include one or more of the following components: processing component 602, memory 604, power supply component 606, multimedia component 608, audio component 610, input / output (I / O) interface 612, sensor component 614, and communication component 616.

[0140] Processing component 602 typically controls the overall operation of electronic device 600, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 602 may include one or more modules to facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602.

[0141] Memory 604 is used to store various types of data to support the operation of electronic device 600. Examples of such data include instructions for any application or method operating on electronic device 600, contact data, phonebook data, messages, pictures, multimedia, etc. Memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0142] Power supply component 606 provides power to various components of electronic device 600. Power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 600.

[0143] Multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 608 includes a front-facing camera and / or a rear-facing camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a multimedia mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0144] Audio component 610 is used to output and / or input audio signals. For example, audio component 610 includes a microphone (MIC) used to receive external audio signals when electronic device 600 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 604 or transmitted via communication component 616. In some embodiments, audio component 610 also includes a speaker for outputting audio signals.

[0145] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0146] Sensor assembly 614 includes one or more sensors for providing state assessments of various aspects of electronic device 600. For example, sensor assembly 614 can detect the on / off state of electronic device 600, the relative positioning of components such as the display and keypad of electronic device 600, changes in position of electronic device 600 or a component of electronic device 600, the presence or absence of user contact with electronic device 600, orientation or acceleration / deceleration of electronic device 600, and temperature changes of electronic device 600. Sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 614 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0147] Communication component 616 facilitates wired or wireless communication between electronic device 600 and other devices. Electronic device 600 can access wireless networks based on communication standards, such as WiFi, carrier networks (such as 2G, 3G, 4G, or 5G), or combinations thereof. In one exemplary embodiment, communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 616 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0148] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to implement the control method provided in the embodiments of this application.

[0149] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, which can be executed by a processor 620 of an electronic device 600 to perform the above-described method. For example, the non-transitory storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and control device, etc.

[0150] Figure 6A block diagram of an electronic device 700 is shown according to an exemplary embodiment. For example, the electronic device 700 may be provided as a server. (Refer to...) Figure 6 The electronic device 700 includes a processing component 722, which further includes one or more processors, and memory resources represented by a memory 732 for storing instructions, such as application programs, that can be executed by the processing component 722. The application programs stored in the memory 732 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 722 is configured to execute instructions to perform a control method provided in embodiments of this application.

[0151] Electronic device 700 may also include a power supply component 726 configured to perform power management of electronic device 700, a wired or wireless network interface 750 configured to connect electronic device 700 to a network, and an input / output (I / O) interface 758. Electronic device 700 may operate on an operating system stored in memory 732, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.

[0152] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0153] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A control method, characterized in that, Applied to a smart host, the method includes: Receive the scene setting command sent by the control device in response to the first operation; Identify the target device group related to the scene setting instruction, and obtain and save the first state corresponding to each target device in the target device group; The scene setting command is sent to each target device in the target device group, causing each target device in the target device group to enter the second state; The control device receives a scene recovery command sent in response to the second operation and restores the state of each target device in the target device group from the second state to the first state.

2. The method according to claim 1, characterized in that, Sending the scene setting command to each target device in the target device group includes: The scene setting instructions are decomposed to generate target setting instructions corresponding to each target device in the target device group; The target setting instruction is sent to the target device involved in the target setting instruction.

3. The method according to claim 2, characterized in that, The step of decomposing the scene setting instructions to generate target setting instructions for each target device in the target device group includes: The scenario setting instructions are decomposed to obtain the device identifier, device type, and target status of each target device in the target device group; Based on the device identifier and device type of the target device, the target state is converted into a target setting instruction that conforms to the communication protocol of the target device corresponding to the target state.

4. The method according to claim 1, characterized in that, After the receiving control device responds to the scene setting command sent in the first operation, the method further includes: The integrity of the scene setting command is verified, and the verification result is obtained. If the verification result is passed, then the scene setting instruction is determined to be complete; If the verification result is unsuccessful, the scene setting instruction is determined to be invalid, and verification error information is sent back to the control device.

5. The method according to claim 4, characterized in that, The integrity verification of the scene setting command, and the resulting verification, includes: Check whether the scene setting instruction contains all the preset required fields to obtain the format verification result; the required fields include at least the device identifier of the target device, the device type, and the corresponding target status. If the format verification result is passed, the original data of the scene setting instruction is calculated to obtain a first verification value, and the first verification value is compared with a second verification value to obtain a data verification result; the second verification value is the verification value carried in the scene setting instruction, and the second verification value is generated by the control device. If the data verification result is passed, then check whether the target status corresponding to each target device matches the device type to obtain the logical verification result; If the logical verification result is passed, then the verification result is determined to be passed; if any one of the format verification result, the data verification result, or the logical verification result is failed, then the verification result is determined to be failed.

6. The method according to claim 1, characterized in that, The step of obtaining and saving the first state corresponding to each target device in the target device group includes: Obtain and save the first state and the timestamp corresponding to the first state for each target device in the target device group. Restoring the state of each target device in the target device group from the second state to the first state includes: Obtain the timestamp of the scene setting instruction, search the database for the first state of each target device saved at the time point before the timestamp of the scene setting instruction, and convert the first state into a device recovery instruction and send it to each target device in the target device group, so that the state of each target device is restored to the first state.

7. The method according to claim 1, characterized in that, After restoring the state of each target device in the target device group to the first state, the method further includes: Receive the latest status information fed back by the target device group; The latest status information is sent to the control device for display.

8. The method according to claim 1, characterized in that, The scene setting instruction includes a scene type, and the method further includes: If the scenario type of the scenario setting instruction is a temporary scenario type, then the first state of the target device group involved in the scenario setting instruction is recorded; If the scenario type of the scenario setting instruction is a fixed scenario type, then the first state of the target device group involved in the scenario setting instruction will not be recorded.

9. The method according to claim 1, characterized in that, After the receiving control device responds to the scene recovery command sent in the second operation, the method further includes: Send a command confirmation message to the control device; After receiving the confirmation instruction from the control device regarding the instruction confirmation message, the scene restoration instruction is processed.

10. A control device, characterized in that, Applied to a smart host, the device includes: The receiving module is used to receive the scene setting command sent by the control device in response to the first operation; The storage module is used to determine the target device group related to the scene setting instruction, and to obtain and store the first state corresponding to each target device in the target device group. The setting module is used to send the scene setting instruction to each target device in the target device group, so that each target device in the target device group enters the second state; The recovery module is used to receive a scene recovery command sent by the control device in response to the second operation, and restore the state of each target device in the target device group from the second state to the first state.

11. An electronic device, characterized in that, It includes a processor and a memory. The memory stores programs or instructions that can run on the processor, which, when executed by the processor, implement the steps of the control method as described in any one of claims 1 to 9.

12. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the control method as described in any one of claims 1 to 9.