Household scene generation method and device, electronic equipment and storage medium

By displaying device status and generating structured data in the smart home system, and combining it with environmental feature information to automatically generate target scenes, the problem of cumbersome scene generation in traditional smart home apps is solved. This enables fast, automated scene generation and real-time updates, improving the user experience.

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

Patent Information

Application Number
CN202511118668.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-11
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

In traditional smart home apps, users need to manually add devices one by one and set parameters to generate scenes, which is a cumbersome process and lacks an intuitive interactive experience.

Method used

By displaying device status on a graphical user interface, generating structured data in response to user control commands, and automatically generating target scenes by combining environmental feature information, it supports manual and automatic execution modes and updates the scenes in real time.

Benefits of technology

It enables rapid and automated scene generation, improves user experience, simplifies the configuration process, and enhances generation accuracy and maintainability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120973281A_ABST
    Figure CN120973281A_ABST
Patent Text Reader

Abstract

Embodiments of the invention provide a home scene generation method and apparatus, an electronic device and a storage medium. The method comprises the steps of displaying a first device state collected for a current online device on a graphical user interface; in response to a first control instruction for storing a scene, obtaining structured data based on the first equipment state; converting the structured data according to a preset scene format to obtain equipment scene data; determining environment feature information based on the first equipment state; and generating a target scene according to the equipment scene data and the environment feature data. Through the embodiment of the invention, the target scene is automatically and quickly generated, and the requirement of a user for quickly storing a real-time state is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of home scene creation, and in particular to a method and apparatus for generating home scenes, an electronic device, and a storage medium. Background Technology

[0002] With the increasing popularity of smart home systems, users are paying more and more attention to personalized management and convenient control of home devices. In traditional smart home apps, users need to manually add devices one by one and set parameters (such as light brightness, air conditioning temperature, curtain status, etc.) to generate a scene. The process is cumbersome, inefficient, and lacks an intuitive "what you see is what you get" interactive experience. Summary of the Invention

[0003] In view of the above problems, a method, apparatus, electronic device, and storage medium for generating a home scene are proposed to overcome or at least partially solve the above problems, including:

[0004] A method for generating a home scene, the method comprising:

[0005] Displays the first device status collected for the currently online device in the graphical user interface;

[0006] In response to a first control command for saving the scene, structured data is obtained based on the state of the first device;

[0007] The structured data is converted according to a preset scenario format to obtain device scenario data;

[0008] Environmental characteristic information is determined based on the status of the first device;

[0009] A target scene is generated based on the device scene data and the environmental feature data.

[0010] Optionally, the step of obtaining structured data based on the first device state in response to a first control command for saving the scene includes:

[0011] The target control for saving the scene is displayed on the graphical user interface;

[0012] In response to a first control command for the target control, structured data is obtained based on the first device state.

[0013] Optionally, the step of obtaining structured data based on the first device state in response to a first control command for saving the scene includes:

[0014] Obtain user voice data

[0015] The voice data is input into a preset semantic recognition model. The semantic recognition model determines, based on a preset device control dictionary, whether the voice data contains a first control command for saving the scene.

[0016] When it is determined that the voice data contains a first control instruction for saving the scene, structured data is obtained based on the device state in response to the control instruction for saving the scene.

[0017] Optionally, it also includes:

[0018] The created target scene is displayed on the graphical user interface;

[0019] In response to a second control command that edits the target scene, the target scene is modified.

[0020] Optionally, it also includes:

[0021] An interactive switching control for switching the execution mode of the target scene is displayed on the graphical user interface;

[0022] In response to a third control operation by the user on the interactive switching control, the target scene is controlled to switch between different execution modes.

[0023] Optionally, it also includes:

[0024] When the execution mode of the target scenario is manual execution, execution controls for controlling the execution of the target scenario are displayed on the graphical user interface;

[0025] In response to a fourth control operation on the execution control unit, device control instructions for multiple devices associated with the target scene are generated;

[0026] The device control command is sent to the corresponding device to control the multiple devices to operate according to the target scenario.

[0027] Optionally, it also includes:

[0028] When the execution mode of the target scenario is automatic execution, when the automatic execution condition corresponding to the target scenario is triggered, device control instructions for multiple devices associated with the target scenario are generated;

[0029] The device control command is sent to the corresponding device to control the multiple devices to operate according to the target scenario.

[0030] Optionally, it also includes:

[0031] The device's real-time status is acquired according to a preset cycle.

[0032] Determine whether the real-time device status matches the device status in the saved target scene;

[0033] When it is determined that the real-time device status does not match the device status in the saved target scene, a scene update prompt is generated;

[0034] The target scene is synchronously updated according to the real-time device status, based on the scene update prompts.

[0035] Optionally, determining environmental feature information based on the state of the first device includes:

[0036] The first device state is input into the target model for feature extraction, and the environmental feature information corresponding to the first device state is output.

[0037] A home scene generation device, the device comprising:

[0038] The first device status display module is used to display the first device status collected for the currently online device on the graphical user interface;

[0039] A structured data generation module is used to obtain structured data based on the state of the first device in response to a first control command for saving the scene.

[0040] The device scene data generation module is used to convert the structured data according to a preset scene format to obtain device scene data;

[0041] An environmental feature information determination module is used to determine environmental feature information based on the state of the first device.

[0042] The target scene generation module is used to generate a target scene based on the device scene data and the environmental feature data.

[0043] An electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the method for generating a home scene as described above.

[0044] A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and the computer program, when executed by a processor, implements the method for generating a home scene as described above.

[0045] The embodiments of the present invention have the following advantages:

[0046] This invention, through its graphical user interface, displays a first device status collected from a currently online device; responds to a first control command for saving a scene, obtains structured data based on the first device status; converts the structured data according to a preset scene format to obtain device scene data; determines environmental feature information based on the first device status; and generates a target scene according to the device scene data and the environmental feature data. This achieves automated and rapid generation of target scenes, meeting users' needs for rapid saving of real-time status. Attached Figure Description

[0047] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 This is a flowchart illustrating the steps of a method for generating a home scene according to an embodiment of the present invention;

[0049] Figure 2 This is a flowchart of another method for generating a home scene according to an embodiment of the present invention;

[0050] Figure 3 This is a flowchart of another method for generating a home scene according to an embodiment of the present invention;

[0051] Figure 4 This is a flowchart of another method for generating a home scene according to an embodiment of the present invention;

[0052] Figure 5 This is a schematic diagram of a graphical user interface provided in an embodiment of the present invention;

[0053] Figure 6 This is a schematic diagram of the structure of a home scene generation device provided in an embodiment of the present invention. Detailed Implementation

[0054] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0055] Reference Figure 1The diagram illustrates a flowchart of a method for generating a home scene according to an embodiment of the present invention, which may specifically include the following steps:

[0056] Step S101: Display the first device status collected for the currently online device on the graphical user interface;

[0057] In practical applications, multiple devices can be controlled in a scene via a mobile terminal. The mobile terminal may include a graphical user interface, which can display the status of the first device collected by the currently online device, including but not limited to status data such as on / off status, brightness, temperature, wind speed, and mode.

[0058] In this embodiment of the invention, based on the device communication protocol adaptation layer and abstract parameter model, the parameters of currently online devices can be automatically identified, supporting unified abstraction and standardized collection of heterogeneous devices from different brands and protocols (such as Zigbee, Wi-Fi, BLE, Z-Wave, etc.). The status collection includes a timestamp synchronization mechanism to ensure the consistency and real-time performance of status data.

[0059] In this embodiment of the invention, the "device communication protocol adaptation layer" and the "abstract parameter model" work together to achieve automatic identification and standardized collection of parameters of currently online devices. The protocol adaptation layer first calls the corresponding communication stack (such as Zigbee ZCL, Wi-Fi RESTfulAPI, BLE, Z-Wave) to read the device's original status data (such as switch status values, brightness percentage values, temperature settings, fan speed mode codes, etc.) in real time for built-in devices of different brands and communication protocols (such as Zigbee ZCL, Wi-Fi RESTfulAPI, BLE GATT). Then, the abstract parameter model comes into play. It defines a unified semantic parameter template across devices (for example, mapping "switch" to "power", "brightness level" to "brightness", and "target temperature" to "target_temp"), and dynamically converts and maps the original, heterogeneous protocol-specific data obtained by the adaptation layer onto these standardized parameters, shielding the underlying protocol and manufacturer differences. The entire process has a timestamp synchronization mechanism to ensure that all collected device status points are time-consistent. The final output is a structured dataset containing unified semantic identifiers (such as device_id) and standardized status values ​​of all online devices, providing timely, accurate and formatted input for subsequent one-click generation of scene configurations.

[0060] Step S102: In response to a first control command for saving the scene, structured data is obtained based on the first device state;

[0061] The mobile terminal can respond to the first control command for saving the scene, execute the scene saving process, and then process the acquired first device state in a structured manner.

[0062] The first control command can be a pre-set control command, such as a touch command or a voice command.

[0063] Step S103: Convert the structured data according to a preset scene format to obtain device scene data;

[0064] After obtaining the structured data, the structured data can be converted into a different format. Specifically, the conversion can be performed according to the preset scene format required by the scene data to obtain the device scene data. In one example, the preset scene format can be JSON.

[0065] Step S104: Determine environmental feature information based on the status of the first device;

[0066] After obtaining the first device status, the first device status can be analyzed to extract environmental feature information, which is used to describe the overall environmental characteristics of the first device status at present.

[0067] In one embodiment of the present invention, determining environmental feature information based on the first device state includes: inputting the first device state into a target model for feature extraction, and outputting environmental feature information corresponding to the first device state.

[0068] The target model can be a pre-trained target model used for feature extraction.

[0069] Step S105: Generate a target scene based on the device scene data and the environmental feature data.

[0070] After obtaining the device scene data and environmental feature data, the target scene can be generated by combining the device scene data and environmental feature data.

[0071] For example, when a user triggers the "Save current living room environment" command, the system first obtains structured data (such as living room light brightness of 70%, air conditioner heating mode of 26℃, and curtain opening / closing degree of 50%) through the device status snapshot acquisition module. The module automatically encapsulates the data into a standardized JSON configuration (as shown below) and simultaneously calls a large model to analyze the aggregated features of the device status:

[0072]

[0073]

[0074] In this process, the large model infers semantic features based on device parameter values: for example, an air conditioner heating at 26°C + medium brightness lighting → generates a "warm mode" label; curtains opening at 50% + soft brightness → generates a "comfortable lighting" description. Ultimately, a dual scene configuration of device status (machine-readable JSON) + environmental semantics (human-readable labels) is formed. Users can further edit the name (e.g., change it to "winter living room") or add trigger rules (e.g., "automatically activate when room temperature is below 20°C").

[0075] In one embodiment of the present invention, an interactive switching control for switching the execution mode of the target scene is displayed on the graphical user interface; in response to a third control operation by the user on the interactive switching control, the target scene is controlled to switch between different execution modes.

[0076] In practical applications, each scenario can have its execution mode set independently, specifying how the target scenario should be executed. An interactive switching control for changing the execution mode of the target scenario can be displayed on the mobile terminal's graphical user interface. Thus, when the user triggers the interactive switching control on the interface, the execution mode of the scenario can be changed.

[0077] For example, the target scenario can be set to manual or automatic execution, and the interactive toggle control is used to switch between manual and automatic execution. When the target scenario is currently set to manual execution, the interactive toggle control can be used to switch from manual to automatic execution; when the target scenario is currently set to automatic execution, the interactive toggle control can be used to switch from automatic to manual execution.

[0078] In this embodiment of the invention, the target scenario employs a dual-mode saving mechanism. An interactive switching component allows users to choose between "manual execution" or "automatic triggering." The automatic mode supports multiple triggering methods, including time, location, and sensor conditions, and is stored in the rule engine. Trigger suggestions are generated using a large model (e.g., "Should I set it to automatically execute at 18:00 every day?"). Here, "large model" specifically refers to a domain-fine-tuned conversational language model (e.g., a vertical domain model trained based on ChatGPT or the Tongyi Qianwen architecture).

[0079] The dual-mode saving mechanism (manual / automatic) in this embodiment of the invention allows users to flexibly select the execution mode and provides a one-click switching entry, enhancing user freedom and scenario controllability.

[0080] In one embodiment of the present invention, when the execution mode of the target scene is manual execution, an execution control for controlling the execution of the target scene is displayed on the graphical user interface; in response to a fourth control operation for the execution control, device control instructions for multiple devices associated with the target scene are generated; the device control instructions are sent to the corresponding devices to control the multiple devices to run according to the target scene.

[0081] When the target scenario is manually executed, the user can manipulate the execution controls on the interface to trigger the execution of the target scenario.

[0082] In one embodiment of the present invention, when the execution mode of the target scene is automatic execution, when the automatic execution condition corresponding to the target scene is triggered, device control instructions for multiple devices associated with the target scene are generated; the device control instructions are sent to the corresponding devices to control the multiple devices to run according to the target scene.

[0083] When the target scenario is to be executed automatically, the automatic execution conditions can be preset, and it can be determined whether the preset automatic execution conditions are met at present. If the automatic execution conditions are met, the target scenario can be triggered.

[0084] In one embodiment of the present invention, the real-time device status of the device is acquired according to a preset period, and it is determined whether the real-time device status matches the device status in the saved target scene; when it is determined that the real-time device status does not match the device status in the saved target scene, a scene update prompt is generated; and the target scene is synchronously updated according to the real-time device status based on the scene update prompt.

[0085] In practical applications, a device status change detection and recommendation mechanism can also be set up. That is, the system periodically / in real-time compares the current status of the device with the saved scene configuration, and generates user-friendly prompts based on the target model (such as: "The living room lighting has been changed. Do you want to update the current scene?") to guide the user to complete the scene synchronization.

[0086] In this embodiment of the invention, the generated scenes can be displayed as UI cards on the App's large model page. Each card displays a scene status summary and a device list, and supports operations such as click to execute, long press to edit, and swipe to delete. The cards use a combination of semantic naming and icon visual identification to improve readability and execution efficiency. In this embodiment of the invention, scenes are presented in card form, supporting operations such as previewing status, editing parameters, setting as default, and quick execution, thus enhancing the overall interactive experience.

[0087] This invention provides a one-click device status snapshot collection and structured scene generation method: without relying on historical events or model reasoning optimization, it can quickly build a scene based on the current state, truly achieving "what you see is what you get".

[0088] In this embodiment of the invention, the real-time device status of the device can be acquired at a preset period, and it can be determined whether the real-time device status matches the device status in the saved target scene. When it is determined that the real-time device status does not match the device status in the saved target scene, a scene update prompt is generated. The target scene is then synchronously updated according to the scene update prompt and the real-time device status. By detecting the difference between the device status and the scene configuration in real time, and generating a natural language prompt "Update current scene?" on the user interaction page using a large model, scene maintenance efficiency is improved.

[0089] The embodiments of the present invention can significantly simplify the scene configuration process, improve the accuracy and maintainability of scene generation, reduce the user's learning cost, and achieve a more natural, intelligent and flexible smart home scene management experience.

[0090] In this embodiment of the invention, a first device status collected for a currently online device can be displayed on a graphical user interface; in response to a first control command for saving a scene, structured data can be obtained based on the first device status; the structured data can be converted according to a preset scene format to obtain device scene data; environmental feature information can be determined based on the first device status; and a target scene can be generated according to the device scene data and the environmental feature data. This achieves automated and rapid generation of target scenes, meeting the user's need for rapid saving of real-time status.

[0091] Reference Figure 2 The diagram illustrates a flowchart of another method for generating a home scene according to an embodiment of the present invention, which may specifically include the following steps:

[0092] Step S201: Display the first device status collected for the currently online device on the graphical user interface;

[0093] In practical applications, multiple devices can be controlled in a scene via a mobile terminal. The mobile terminal may include a graphical user interface, which can display the status of the first device collected by the currently online device, including but not limited to status data such as on / off status, brightness, temperature, wind speed, and mode.

[0094] In this embodiment of the invention, based on the device communication protocol adaptation layer and abstract parameter model, the parameters of currently online devices can be automatically identified, supporting unified abstraction and standardized collection of heterogeneous devices from different brands and protocols (such as Zigbee, Wi-Fi, BLE, Z-Wave, etc.). The status collection includes a timestamp synchronization mechanism to ensure the consistency and real-time performance of status data.

[0095] In this embodiment of the invention, the "device communication protocol adaptation layer" and the "abstract parameter model" work together to achieve automatic identification and standardized collection of parameters of currently online devices. The protocol adaptation layer first calls the corresponding communication stack (such as Zigbee ZCL, Wi-Fi RESTfulAPI, BLE, Z-Wave) to read the device's original status data (such as switch status values, brightness percentage values, temperature settings, fan speed mode codes, etc.) in real time for built-in devices of different brands and communication protocols (such as Zigbee ZCL, Wi-Fi RESTfulAPI, BLE GATT). Then, the abstract parameter model comes into play. It defines a unified semantic parameter template across devices (for example, mapping "switch" to "power", "brightness level" to "brightness", and "target temperature" to "target_temp"), and dynamically converts and maps the original, heterogeneous protocol-specific data obtained by the adaptation layer onto these standardized parameters, shielding the underlying protocol and manufacturer differences. The entire process has a timestamp synchronization mechanism to ensure that all collected device status points are time-consistent. The final output is a structured dataset containing unified semantic identifiers (such as device_id) and standardized status values ​​of all online devices, providing timely, accurate and formatted input for subsequent one-click generation of scene configurations.

[0096] Step S202: Display the target control for saving the scene on the graphical user interface;

[0097] Step S203: In response to a first control command for the target control, structured data is obtained based on the first device state;

[0098] Step S204: Convert the structured data according to a preset scene format to obtain device scene data;

[0099] After obtaining the structured data, the structured data can be converted into a different format. Specifically, the conversion can be performed according to the preset scene format required by the scene data to obtain the device scene data. In one example, the preset scene format can be JSON.

[0100] Step S205: Determine environmental feature information based on the status of the first device;

[0101] After obtaining the first device status, the first device status can be analyzed to extract environmental feature information, which is used to describe the overall environmental characteristics of the first device status at present.

[0102] In one embodiment of the present invention, determining environmental feature information based on the first device state includes: inputting the first device state into a target model for feature extraction, and outputting environmental feature information corresponding to the first device state.

[0103] The target model can be a pre-trained target model used for feature extraction.

[0104] Step S206: Generate a target scene based on the device scene data and the environmental feature data.

[0105] After obtaining the device scene data and environmental feature data, the target scene can be generated by combining the device scene data and environmental feature data.

[0106] In this embodiment of the invention, a first device status collected from a currently online device can be displayed on a graphical user interface; a target control for saving a scene can be displayed on the graphical user interface; in response to a first control command for the target control, structured data can be obtained based on the first device status; the structured data can be converted according to a preset scene format to obtain device scene data; environmental feature information can be determined based on the first device status; and a target scene can be generated according to the device scene data and the environmental feature data. This achieves automated and rapid generation of target scenes, meeting the user's need for rapid saving of real-time status.

[0107] Reference Figure 3 The diagram illustrates a flowchart of another method for generating a home scene according to an embodiment of the present invention, which may specifically include the following steps:

[0108] Step S301: Display the first device status collected for the currently online device on the graphical user interface;

[0109] In practical applications, multiple devices can be controlled in a scene via a mobile terminal. The mobile terminal may include a graphical user interface, which can display the status of the first device collected by the currently online device, including but not limited to status data such as on / off status, brightness, temperature, wind speed, and mode.

[0110] In this embodiment of the invention, based on the device communication protocol adaptation layer and abstract parameter model, the parameters of currently online devices can be automatically identified, supporting unified abstraction and standardized collection of heterogeneous devices from different brands and protocols (such as Zigbee, Wi-Fi, BLE, Z-Wave, etc.). The status collection includes a timestamp synchronization mechanism to ensure the consistency and real-time performance of status data.

[0111] In this embodiment of the invention, the "device communication protocol adaptation layer" and the "abstract parameter model" work together to achieve automatic identification and standardized collection of parameters of currently online devices. The protocol adaptation layer first calls the corresponding communication stack (such as Zigbee ZCL, Wi-Fi RESTfulAPI, BLE, Z-Wave) to read the device's original status data (such as switch status values, brightness percentage values, temperature settings, fan speed mode codes, etc.) in real time for built-in devices of different brands and communication protocols (such as Zigbee ZCL, Wi-Fi RESTfulAPI, BLE GATT). Then, the abstract parameter model comes into play. It defines a unified semantic parameter template across devices (for example, mapping "switch" to "power", "brightness level" to "brightness", and "target temperature" to "target_temp"), and dynamically converts and maps the original, heterogeneous protocol-specific data obtained by the adaptation layer onto these standardized parameters, shielding the underlying protocol and manufacturer differences. The entire process has a timestamp synchronization mechanism to ensure that all collected device status points are time-consistent. The final output is a structured dataset containing unified semantic identifiers (such as device_id) and standardized status values ​​of all online devices, providing timely, accurate and formatted input for subsequent one-click generation of scene configurations.

[0112] Step S302: Obtain the user's voice data;

[0113] Step S303: Input the voice data into a preset semantic recognition model. When the semantic recognition model determines whether the voice data contains a first control command for saving the scene based on a preset device control dictionary;

[0114] Step S304: When it is determined that the voice data contains a first control instruction for saving the scene, in response to the control instruction for saving the scene, structured data is obtained based on the device state.

[0115] Step S305: Convert the structured data according to a preset scene format to obtain device scene data;

[0116] Step S306: Determine environmental feature information based on the status of the first device;

[0117] Step S307: Generate a target scene based on the device scene data and the environmental feature data.

[0118] In practical applications, multi-turn dialogue models (such as ChatGPT and Tongyi Qianwen) can be used to perform intent recognition and contextual understanding of users' natural language commands. Through device control dictionaries, semantic slot filling, and custom triggers, a structured mapping from natural language to device commands can be achieved. For example, the command "Save current state as comfort mode" can be parsed and automatically named and a scenario draft can be generated.

[0119] The large-scale model semantic understanding module of this invention achieves accurate conversion of natural language to device commands through the following process: First, based on a multi-turn dialogue model (such as Tong Yiqianwen), the user command (such as "save current living room settings") is subjected to intent recognition. Through a predefined device control dictionary (such as "save" mapping to scene storage command, "living room" identifying spatial range) and semantic slot filling technology, the core action verb ("save"), the operation object ("living room device") and implicit parameters are extracted. Second, combined with contextual understanding (such as the "living room" device range defined in historical dialogues) and custom trigger rules (such as "save as scene" triggering snapshot collection), the ambiguous natural language is transformed into a structured command tree. For example, the operation type action: "save_scene" and the target area scope: "living_room" are parsed. Finally, by dynamically binding the device status snapshot collection interface, the system calls the real-time device parameter collection module to complete the closed-loop mapping from natural language to executable device commands (such as generating a JSON configuration containing the status of all devices in the living room).

[0120] In this embodiment of the invention, the semantic intent parsing process of the large model is as follows: the user inputs a voice or text command "save the current state as a scene", the large model parses the semantic intent, extracts the verb action "save" + object "current state", the system calls the snapshot acquisition module to obtain the status of all online devices, automatically generates a SceneDraft and submits it to the user for confirmation and saving. If the user adds additional conditions such as "automatic execution" or "every night", the large model can parse it as a TriggerRule.

[0121] In this embodiment of the invention, a large model semantic parsing module is introduced, which supports users to quickly trigger scene creation through natural language (such as "save the current settings as a scene"), forming a closed loop between semantic intent and device status.

[0122] In this embodiment of the invention, a first device status collected for a currently online device can be displayed on a graphical user interface; user voice data can be acquired; the voice data can be input into a preset semantic recognition model; when the semantic recognition model determines whether the voice data contains a first control command for saving a scene based on a preset device control dictionary; when it is determined that the voice data contains a first control command for saving a scene, in response to the control command for saving a scene, structured data can be obtained based on the device status; the structured data can be converted according to a preset scene format to obtain device scene data; environmental feature information can be determined based on the first device status; and a target scene can be generated according to the device scene data and the environmental feature data. This enables users to automatically and quickly generate target scenes through voice commands, meeting users' needs for rapid saving of real-time status.

[0123] Reference Figure 4 The diagram illustrates a flowchart of another method for generating a home scene according to an embodiment of the present invention, which may specifically include the following steps:

[0124] Step S401: Display the first device status collected for the currently online device on the graphical user interface;

[0125] In practical applications, multiple devices can be controlled in a scene via a mobile terminal. The mobile terminal may include a graphical user interface, which can display the status of the first device collected by the currently online device, including but not limited to status data such as on / off status, brightness, temperature, wind speed, and mode.

[0126] In this embodiment of the invention, based on the device communication protocol adaptation layer and abstract parameter model, the parameters of currently online devices can be automatically identified, supporting unified abstraction and standardized collection of heterogeneous devices from different brands and protocols (such as Zigbee, Wi-Fi, BLE, Z-Wave, etc.). The status collection includes a timestamp synchronization mechanism to ensure the consistency and real-time performance of status data.

[0127] In this embodiment of the invention, the "device communication protocol adaptation layer" and the "abstract parameter model" work together to achieve automatic identification and standardized collection of parameters of currently online devices. The protocol adaptation layer first calls the corresponding communication stack (such as Zigbee ZCL, Wi-Fi RESTfulAPI, BLE, Z-Wave) to read the device's original status data (such as switch status values, brightness percentage values, temperature settings, fan speed mode codes, etc.) in real time for built-in devices of different brands and communication protocols (such as Zigbee ZCL, Wi-Fi RESTfulAPI, BLE GATT). Then, the abstract parameter model comes into play. It defines a unified semantic parameter template across devices (for example, mapping "switch" to "power", "brightness level" to "brightness", and "target temperature" to "target_temp"), and dynamically converts and maps the original, heterogeneous protocol-specific data obtained by the adaptation layer onto these standardized parameters, shielding the underlying protocol and manufacturer differences. The entire process has a timestamp synchronization mechanism to ensure that all collected device status points are time-consistent. The final output is a structured dataset containing unified semantic identifiers (such as device_id) and standardized status values ​​of all online devices, providing timely, accurate and formatted input for subsequent one-click generation of scene configurations.

[0128] Step S402: In response to a first control command for saving the scene, structured data is obtained based on the first device state;

[0129] The mobile terminal can respond to the first control command for saving the scene, execute the scene saving process, and then process the acquired first device state in a structured manner.

[0130] The first control command can be a pre-set control command, such as a touch command or a voice command.

[0131] Step S403: Convert the structured data according to a preset scene format to obtain device scene data;

[0132] After obtaining the structured data, the structured data can be converted into a different format. Specifically, the conversion can be performed according to the preset scene format required by the scene data to obtain the device scene data. In one example, the preset scene format can be JSON.

[0133] Step S404: Determine environmental feature information based on the status of the first device;

[0134] After obtaining the first device status, the first device status can be analyzed to extract environmental feature information, which is used to describe the overall environmental characteristics of the first device status at present.

[0135] In one embodiment of the present invention, determining environmental feature information based on the first device state includes: inputting the first device state into a target model for feature extraction, and outputting environmental feature information corresponding to the first device state.

[0136] The target model can be a pre-trained target model used for feature extraction.

[0137] Step S405: Generate a target scene based on the device scene data and the environmental feature data.

[0138] After obtaining the device scene data and environmental feature data, the target scene can be generated by combining the device scene data and environmental feature data.

[0139] Step S406: Display the created target scene on the graphical user interface;

[0140] Step S407: In response to a second control command for editing the target scene, the target scene is modified.

[0141] In this embodiment of the invention, the created target scene allows users to further edit its name, icon, and execution conditions. In this embodiment, a first device status collected from currently online devices can be displayed on a graphical user interface; in response to a first control command for saving the scene, structured data is obtained based on the first device status; the structured data is converted according to a preset scene format to obtain device scene data; environmental feature information is determined based on the first device status; and a target scene is generated according to the device scene data and the environmental feature data. This achieves automated and rapid generation of target scenes, meeting users' needs for rapid saving of real-time status. Furthermore, displaying the created target scene on the graphical user interface and modifying it in response to a second control command for editing the target scene allows for modification of the created Mubuo scene.

[0142] Reference Figure 5 The diagram illustrates a graphical user interface (GUI) according to an embodiment of the present invention. The GUI can display the current device status, such as: lighting equipment: currently on, 80% brightness; air conditioning equipment: currently 26 degrees Celsius, cooling mode; curtains: closed; fresh air system: on, currently at level 3.

[0143] The graphical user interface can also display a "Save Current State with One Click" control. When the user clicks the "Save Current State with One Click" control, it can trigger the generation of a target scene based on the current device state in this embodiment of the invention, and store the target scene so that the mode can be opened later.

[0144] The graphical user interface displays currently stored scenes. Each scene's information card can include the scene name, the multiple control devices involved, and the scene's activation mode. Each stored scene can be edited.

[0145] Specifically, the interaction flow on the graphical user interface can include the scene creation flow and the scene execution flow:

[0146] (1) Scene creation process ("One-click save current scene"): The main interface displays the device status (such as lights, air conditioners, curtains); the user clicks the "One-click save current status as scene" button; a pop-up window appears: automatically named "Current Scene", the user can modify the name; a list of all device statuses is displayed (such as a list or icon card); the user selects the save mode (manual / automatic) and sets the trigger conditions (optional); after clicking "Save", an interactive scene card is generated and returned to the homepage for display;

[0147] (2) Scene execution process: Click the corresponding scene card in the card area on the homepage; display status details + execution button; the user clicks "Execute Now" or sets it to automatic execution by default; the system sends batch control commands to the device and provides feedback on the execution status (success / failure);

[0148] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0149] Reference Figure 6 The diagram shows a structural schematic of a home scene generation device according to an embodiment of the present invention, which may specifically include the following modules:

[0150] The first device status display module 601 is used to display the first device status collected for the currently online device on a graphical user interface;

[0151] The structured data generation module 602 is used to obtain structured data based on the state of the first device in response to a first control command for saving the scene.

[0152] The device scene data generation module 603 is used to convert the structured data according to a preset scene format to obtain device scene data;

[0153] The environmental feature information determination module 604 is used to determine environmental feature information based on the state of the first device.

[0154] The target scene generation module 605 is used to generate a target scene based on the device scene data and the environmental feature data.

[0155] In one embodiment of the present invention, the structured data generation module 602 may include:

[0156] The target control for saving the scene is displayed on the graphical user interface;

[0157] In response to a first control command for the target control, structured data is obtained based on the first device state.

[0158] In one embodiment of the present invention, the structured data generation module 602 may include:

[0159] The voice data acquisition submodule is used to acquire the user's voice data;

[0160] The voice data judgment submodule is used to input the voice data into a preset semantic recognition model. The semantic recognition model determines whether the voice data contains a first control command for saving the scene based on a preset device control dictionary.

[0161] The structured data acquisition submodule is used to obtain structured data based on the device state in response to the control command for saving the scene when it is determined that the voice data contains a first control command for saving the scene.

[0162] In one embodiment of the present invention, the device further includes:

[0163] A target scene creation module is used to display the created target scene on the graphical user interface.

[0164] The scene modification module is used to modify the target scene in response to a second control command that edits the target scene.

[0165] In one embodiment of the present invention, the device further includes:

[0166] An interactive switching control display module is used to display an interactive switching control on the graphical user interface for switching the execution mode of the target scene;

[0167] The switching control module is used to respond to a third control operation by the user on the interactive switching control, and to control the target scene to switch between different execution modes.

[0168] In one embodiment of the present invention, the device may further include:

[0169] The execution control display module is used to display execution controls for controlling the execution of the target scene on the graphical user interface when the execution mode of the target scene is manual execution;

[0170] The first device control instruction generation module is used to generate device control instructions for multiple devices associated with the target scene in response to a fourth control operation for the execution control unit.

[0171] The first target scenario operation module is used to send the device control instructions to the corresponding devices to control the multiple devices to operate according to the target scenario.

[0172] In one embodiment of the present invention, the device may further include:

[0173] The second device control instruction generation module is used to generate device control instructions for multiple devices associated with the target scenario when the execution mode of the target scenario is automatic execution and the automatic execution condition corresponding to the target scenario is triggered.

[0174] The second target scenario operation module is used to send the device control instructions to the corresponding devices to control the multiple devices to operate according to the target scenario.

[0175] In one embodiment of the present invention, the device further includes:

[0176] The real-time device status acquisition module is used to acquire the real-time device status of the device according to a preset period.

[0177] The device status matching module is used to determine whether the real-time device status matches the device status in the saved target scene;

[0178] The scene prompt update module is used to generate a scene update prompt when it is determined that the real-time device status does not match the device status in the saved target scene;

[0179] The update module is used to synchronously update the target scene according to the real-time device status based on the scene update prompts.

[0180] In one embodiment of the present invention, when the environmental feature information determination module 604 is used to determine environmental feature information based on the first device state, it is specifically used for:

[0181] The first device state is input into the target model for feature extraction, and the environmental feature information corresponding to the first device state is output.

[0182] In this embodiment of the invention, a first device status collected for a currently online device can be displayed on a graphical user interface; in response to a first control command for saving a scene, structured data can be obtained based on the first device status; the structured data can be converted according to a preset scene format to obtain device scene data; environmental feature information can be determined based on the first device status; and a target scene can be generated according to the device scene data and the environmental feature data. This achieves automated and rapid generation of target scenes, meeting the user's need for rapid saving of real-time status.

[0183] An embodiment of the present invention also provides an electronic device, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the above-described method for generating a home scene.

[0184] An embodiment of the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described method for generating a home scene.

[0185] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0186] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0187] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0188] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0189] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0190] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0191] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0192] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0193] The above provides a detailed description of the method, apparatus, electronic device, and storage medium for generating a home scene. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for generating a home scene, characterized in that, The method includes: Displays the first device status collected for the currently online device in the graphical user interface; In response to a first control command for saving the scene, structured data is obtained based on the state of the first device; The structured data is converted according to a preset scenario format to obtain device scenario data; Environmental characteristic information is determined based on the status of the first device; A target scene is generated based on the device scene data and the environmental feature data.

2. The method according to claim 1, characterized in that, The step of obtaining structured data based on the first device state in response to a first control command for saving the scene includes: The target control for saving the scene is displayed on the graphical user interface; In response to a first control command for the target control, structured data is obtained based on the first device state.

3. The method according to claim 1, characterized in that, The step of obtaining structured data based on the first device state in response to a first control command for saving the scene includes: Obtain the user's voice data; The voice data is input into a preset semantic recognition model. The semantic recognition model determines, based on a preset device control dictionary, whether the voice data contains a first control command for saving the scene. When it is determined that the voice data contains a first control instruction for saving the scene, structured data is obtained based on the device state in response to the control instruction for saving the scene.

4. The method according to claim 1, characterized in that, Also includes: The created target scene is displayed on the graphical user interface; In response to a second control command that edits the target scene, the target scene is modified.

5. The method according to claim 1, characterized in that, Also includes: An interactive switching control for switching the execution mode of the target scene is displayed on the graphical user interface; In response to a third control operation by the user on the interactive switching control, the target scene is controlled to switch between different execution modes.

6. The method according to any one of claims 1 to 5, characterized in that, Also includes: When the execution mode of the target scenario is manual execution, execution controls for controlling the execution of the target scenario are displayed on the graphical user interface; In response to a fourth control operation on the execution control unit, device control instructions for multiple devices associated with the target scene are generated; The device control command is sent to the corresponding device to control the multiple devices to operate according to the target scenario.

7. The method according to any one of claims 1 to 5, characterized in that, Also includes: When the execution mode of the target scenario is automatic execution, when the automatic execution condition corresponding to the target scenario is triggered, device control instructions for multiple devices associated with the target scenario are generated; The device control command is sent to the corresponding device to control the multiple devices to operate according to the target scenario.

8. The method according to claim 1, characterized in that, Also includes: The device's real-time status is obtained according to a preset cycle. Determine whether the real-time device status matches the device status in the saved target scene; When it is determined that the real-time device status does not match the device status in the saved target scene, a scene update prompt is generated; The target scene is synchronously updated according to the real-time device status, based on the scene update prompts.

9. The method according to claim 1, characterized in that, The step of determining environmental feature information based on the state of the first device includes: The first device state is input into the target model for feature extraction, and the environmental feature information corresponding to the first device state is output.

10. A device for generating a home scene, characterized in that, The device includes: The first device status display module is used to display the first device status collected for the currently online device on the graphical user interface; A structured data generation module is used to obtain structured data based on the state of the first device in response to a first control command for saving the scene. The device scene data generation module is used to convert the structured data according to a preset scene format to obtain device scene data; An environmental feature information determination module is used to determine environmental feature information based on the state of the first device. The target scene generation module is used to generate a target scene based on the device scene data and the environmental feature data.

11. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the method for generating a home scene as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the method for generating a home scene as described in any one of claims 1 to 9.