Scene execution method and device, computer equipment and storage medium
By recording the device execution status in the smart home system to generate a scene copy and resume execution, the problem that traditional smart scene systems cannot be interrupted and restored is solved, and the system's interactivity and user experience are improved.
Patent Information
- Application Number
- CN202510776914.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-09-16
AI Technical Summary
Traditional intelligent scene systems cannot be interrupted and maintain the current state at any time during execution, cannot be accurately restored and continue to run, and lack the flexibility and controllability of the scene.
When a pause instruction is received, the execution status of multiple devices in the target space is recorded, a scene copy is generated, and when a continue instruction is received, the device is controlled to resume execution according to the scene copy.
It realizes the flexible interruption and resumption of scene actions in the smart home system, improving the interactivity and user experience of the system.
Smart Images

Figure CN120652832A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of smart home devices, and in particular to a scene execution method, device, computer device, and storage medium. Background Art
[0002] With the development of whole-home smart technology, smart home systems have been widely used in scenarios such as homes, stores, exhibitions, and showrooms. Users can realize the linkage control of multiple smart devices through preset scenarios. However, in actual use, especially in B-end (for example, real estate developers, high-end apartments, hotels) demonstrations or C-end (user families) interaction scenarios, users often need to temporarily pause the execution of the scene, such as to explain the product or respond to unexpected needs.
[0003] Traditional smart scene systems often only support a linear execution process for scenes, with no ability to interrupt execution at any time and maintain the current state, nor accurately restore the previous execution state after an interruption. Therefore, how to record and manage the execution status of multiple pauses during the execution of smart home scenes, and based on these states, generate reasonable scene copies for continued execution, thereby improving the flexibility and controllability of the scenes, has become a pressing issue. Summary of the Invention
[0004] In view of this, in order to solve the above technical problems or part of the technical problems, the embodiments of the present invention provide a scenario execution method, apparatus, computer equipment and storage medium.
[0005] In a first aspect, an embodiment of the present invention provides a scenario execution method, including:
[0006] During execution of a target scene in a target space, upon receiving a pause instruction for the target scene, obtaining execution states of multiple devices in the target space;
[0007] Generate a scene copy corresponding to the target scene according to the multiple execution states;
[0008] When a continue instruction for the target scene is received, the device in the target space is controlled to execute the scene copy according to the continue instruction.
[0009] In one possible implementation, obtaining the execution status of multiple devices in the target space includes:
[0010] controlling the device in the target space to pause execution of the target scene according to the pause instruction;
[0011] For a device that has completed executing the target scenario, a switch state and an operating parameter are obtained as the execution state, and for a device that has not completed executing the target scenario, an execution progress is obtained as the execution state.
[0012] In a possible implementation, generating a scene copy corresponding to the target scene according to the multiple execution states includes:
[0013] Adding a first semantic tag to the current pause instruction, where the first semantic tag represents the type of the pause instruction and the device that issues the pause instruction;
[0014] The scene copy is generated according to the first semantic tag, the plurality of execution states and the target scene for storage.
[0015] In one possible implementation, controlling the device in the target space to execute the scene copy according to the continue instruction includes:
[0016] determining a second semantic tag corresponding to the continue instruction, where the second semantic tag represents a type of the continue instruction and a device that issues the continue instruction;
[0017] determining the scene copy according to the second semantic tag and the first semantic tag;
[0018] The device that has not completed the execution of the target scene is controlled according to the scenario copy to continue to execute the target scene, and the device that has completed the execution of the target scene is controlled according to the scenario copy to verify the current device status.
[0019] In one possible implementation, the method further includes:
[0020] When multiple pause instructions are received, determining the execution priority of each pause instruction according to the first semantic tag of each pause instruction;
[0021] determining a target pause instruction according to the execution priority;
[0022] Controlling the plurality of devices to pause execution of the target scenario according to the target pause instruction.
[0023] In a possible implementation, before generating a scene copy corresponding to the target scene according to the plurality of execution states, the method further includes:
[0024] Set the threshold for the number of scene copies corresponding to each target space;
[0025] When the number of currently stored scene copies reaches the number threshold, the scene copies are deleted in a preset order, or the scene copies are deleted according to the execution priority of each scene copy, and the execution priority of the scene copy is positively correlated with the execution priority of the corresponding pause instruction.
[0026] In a possible implementation, after generating a scene copy corresponding to the target scene according to the plurality of execution states, the method further includes:
[0027] When the pause instruction is sent via the scenario panel corresponding to the target space, sending the scenario copy to the scenario panel for storage;
[0028] When no target object is detected in the target space, the scene copy is sent to a target host corresponding to the target space for storage.
[0029] In a second aspect, an embodiment of the present invention provides a scenario execution device, including:
[0030] an acquisition module, configured to acquire the execution status of a plurality of devices in the target space when a pause instruction for the target scene is received during the execution of the target scene in the target space;
[0031] A generating module, configured to generate a scene copy corresponding to the target scene according to the plurality of execution states;
[0032] The control module is used to control the device in the target space to execute the scene copy according to the continue instruction when receiving the continue instruction for the target scene.
[0033] In a third aspect, an embodiment of the present invention provides a computer device, comprising: a processor and a memory, wherein the processor is configured to execute a scenario execution program stored in the memory to implement the scenario execution method described in any one of the first aspects above.
[0034] In a fourth aspect, an embodiment of the present invention provides a storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the scenario execution method described in any one of the first aspects above.
[0035] The scenario execution solution provided by an embodiment of the present invention obtains the execution status of multiple devices in the target space when a pause instruction is received for the target scene during the execution of the target scene in the target space; generates a scenario copy corresponding to the target scene based on the multiple execution states; and when a resume instruction is received for the target scene, controls the devices in the target space to execute the scenario copy according to the resume instruction. Thus, by introducing a scenario copy mechanism during the scenario execution process, flexible interruption and resumption of scenario actions can be achieved in the smart home system, thereby improving the system's interactivity, display flexibility, and user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 A schematic diagram of a flow chart of a scenario execution method provided by an embodiment of the present invention;
[0037] Figure 2 A schematic diagram of a flow chart of another scenario execution method provided by an embodiment of the present invention;
[0038] Figure 3 A flowchart of another scenario execution method provided by an embodiment of the present invention;
[0039] Figure 4 A schematic structural diagram of a scene execution device provided by an embodiment of the present invention;
[0040] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0041] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0042] To facilitate understanding of the embodiments of the present invention, specific embodiments will be further explained below with reference to the accompanying drawings. The embodiments do not limit the embodiments of the present invention.
[0043] Figure 1 A flow chart of a scenario execution method provided by an embodiment of the present invention is shown as follows: Figure 1 As shown, the method specifically includes:
[0044] S11. During the process of executing the target scene in the target space, when a pause instruction for the target scene is received, the execution status of multiple devices in the target space is obtained.
[0045] The scene execution method provided in an embodiment of the present invention is applied to computer devices, which may include but are not limited to: servers, desktop computers, tablet computers, etc., and is specifically applied to automated scene control in a whole-house smart home system. It is particularly suitable for scenarios where temporary interruption and flexible recovery are required during the execution of multiple devices in a coordinated manner. For example, in environments such as homes, showrooms, stores, and exhibitions, users or operators can issue a pause command at any time during the execution of a smart scene. The system can record the current execution status and resume execution when needed, ensuring the continuity and controllability of scene operations, thereby improving the user interaction experience and scene display effect.
[0046] In this embodiment, a user can receive a pause command via the "Pause" button on the scene panel or the whole-home smart control application, or by voice control. Based on the pause command, the home host determines whether a scene is currently executing and confirms whether it can be paused. The home host retrieves the ID of the currently executing target scene from the local cache or cloud synchronization to uniquely identify the current scene task. The home host then calls the device list corresponding to the scene ID, which was registered during scene execution initialization and contains the device numbers and types of all devices participating in the current scene. For each device in the list, the home host sends a "status query" request to each device and collects the returned information locally or through the device gateway. For example, the device and execution status may include: smart curtains: current opening and closing percentage (such as 45%), motor status (running / stopped); air conditioner: switch status (on / off), current temperature setting (such as 26°C), fan speed mode, operating mode (cooling / heating); lighting system: switch status, brightness level (such as 60%), color temperature, color information; audio / background music: playback status (play / pause), volume, currently playing track or channel; other devices (such as air purifiers, humidifiers): working mode, fan speed level and other operating parameters.
[0047] S12. Generate a scene copy corresponding to the target scene according to multiple execution states.
[0048] In this embodiment, the execution status returned by each device is stored in a structured manner. The home host aggregates and packages the execution status of all devices, associates it with the current scene ID, and generates a scene copy state snapshot. The state snapshot storage content includes but is not limited to: the target scene ID, the content that each device in the target scene needs to execute, the pause timestamp, the device ID and execution status, and the currently completed action instruction number (for skipping when continuing). The scene copy is stored in a local cache database or a temporary memory queue, and a scene sub-ID can be assigned to it for subsequent recovery. If multi-terminal synchronization is enabled (such as a scene panel or multiple control terminals), the home host can synchronize this copy to the panel or cloud via MQTT or HTTP protocol for subsequent continued operation or persistence.
[0049] S13. When a continue instruction for the target scene is received, the device in the target space is controlled to execute the scene copy according to the continue instruction.
[0050] In this embodiment, the sources of the continue instruction may include: application instructions (such as clicking the "Continue" button); voice instructions (such as saying "continue executing the scene"); scenario panel (triggering "Continue" through local Bluetooth); when receiving the continue instruction, the home host reads the scene copy from the local cache / database, and the scene copy marks which devices have completed the action (such as devices that have been turned on do not need to be executed again) and which are not completed (such as the curtains are half open and the lights are not all on); based on the scene copy, the home host compares the predefined action sequence in the complete target scene and generates an unfinished action set, for example, the remaining actions (to be continued): the curtains continue to open from 45% to 100%; the light brightness increases from 50% to 100%; the background music continues to play the second segment.
[0051] The home host sends action control instructions to the devices that have not yet been executed, calls the device control protocol interface (such as Modbus, MQTT, Zigbee) to control the devices to complete the target scene, and reports the status back to the home host after each action is completed.
[0052] The home host updates the execution log after each action is completed. If all actions are completed, the corresponding scene ID is cleared and the scene is updated to the "Completed" status. If the action is paused again, a new scene copy is generated based on the current status. The execution results are synchronized to: the app status display interface; the execution status bar of the scene panel; and the cloud log service (for device operation records).
[0053] The scene execution method provided by an embodiment of the present invention obtains the execution status of multiple devices in the target space when a pause instruction for the target scene is received during the execution of the target scene in the target space; generates a scene copy corresponding to the target scene based on the multiple execution states; and when a resume instruction for the target scene is received, controls the devices in the target space to execute the scene copy according to the resume instruction. Thus, by introducing a scene copy mechanism during scene execution, flexible interruption and resumption of scene actions can be achieved in a smart home system, thereby improving the system's interactivity, display flexibility, and user experience.
[0054] Figure 2 A flow chart of another scenario execution method provided by an embodiment of the present invention is shown as follows: Figure 2 As shown, the method specifically includes:
[0055] S21. During the process of executing the target scene in the target space, when a pause instruction for the target scene is received, the devices in the target space are controlled to pause the execution of the target scene according to the pause instruction; the switch status and operating parameters of the devices that have completed the execution of the target scene are obtained as the execution status, and the execution progress of the devices that have not completed the execution of the target scene is obtained as the execution status.
[0056] In this embodiment, when a pause instruction is received during the execution of the target scene in the target space, all devices are controlled to pause execution; devices with different execution states are classified and processed, and the execution states of all devices are recorded to provide data support for subsequent continued execution.
[0057] Specifically, the pause command content may include: the ID of the target scene currently being executed, the command type is "pause", and the target space information (such as bedroom, living room). The home host uniformly broadcasts the pause command to the devices currently participating in the execution scene; each device adopts different pause strategies according to its own type: the air conditioner can maintain the current temperature operating status unchanged; the compressor can be turned off and on standby, and the curtains can be paused at the current opening and closing percentage position (such as 50%); the audio / TV pauses playback and records the playback time code; the lights maintain the current brightness and are no longer adjusted; the humidifier / fresh air system enters the "pause standby" state.
[0058] The system divides the devices into two categories based on the current task status of each device and records their status: for devices that have completed tasks, the switch status and operating parameters are obtained, for example, the air conditioner obtains the operating mode, wind speed, set temperature, etc.; the light obtains the brightness, color temperature, etc.; the audio obtains the volume, currently playing file, etc. For devices that have not completed tasks, the execution progress is obtained, for example, the curtains are not fully opened and the lights are not fully dimmed; the data items obtained may include: remaining time of the action, execution ratio, remaining path, etc. The execution status of all devices (regardless of whether it is completed) is uniformly packaged and stored as a scene copy, which is associated with the scene sub-ID; the storage fields may include: device ID, execution status category (completed / uncompleted); operating parameters or progress information; current timestamp; storage location: local home host storage module; optional synchronization to the cloud for cross-device management and recovery.
[0059] In one possible implementation, when multiple pause instructions are received, the execution priority of each pause instruction is determined based on the first semantic tag of each pause instruction; a target pause instruction is determined according to the execution priority; and multiple devices are controlled to pause execution of the target scenario according to the target pause instruction.
[0060] Specifically, the system may receive multiple pause instructions simultaneously or in close proximity during the execution of a scenario. These instructions may come from different sources (APP, scenario panel, voice input, etc.). The processing flow is as follows: receive all pause instructions and temporarily cache them in the instruction processing queue; assign a unique identifier to each instruction; and extract the first semantic label of each instruction for subsequent priority evaluation; each instruction is accompanied by a first semantic label to indicate its purpose and source context. For example: APP click pause, user active pause, voice "pause", user temporary interruption, panel long press pause, local direct control, system security policy triggered pause, automatic termination by abnormality detection, etc.
[0061] Furthermore, the system assigns a default priority (the lower the value, the higher the priority) based on the semantic tag of each instruction. In the instruction queue, the instructions are sorted in ascending order according to the priority value, and the one with the highest priority is selected as the target pause instruction. The first instruction from the sorted instructions is selected as the target pause instruction; the source, semantics, and scene ID of the target instruction are tagged and recorded in the system log; the control host issues a pause broadcast to pause all devices in the currently executing scene. If multiple instructions have the same priority, the one received most recently will prevail; if the instructions come from different user roles (such as sales demonstrators and customers), the user permission level can be set to determine the priority; certain special semantic tags (such as system security) can be set to force interruption, and the priority overrides all other instructions. For example, during a sales demonstration, the panel triggers a pause, and then the APP receives a manual click of the pause button by the customer. The panel pause instruction has a priority of 3, and the APP pause instruction has a priority of 5. After comparison, the system prioritizes the panel instruction, puts the control scene into the pause state, and ignores subsequent instructions with lower priorities. This can avoid conflicts between multiple sources of instructions and improve the processing reliability of pause instructions; achieve pauses based on semantic priority to ensure priority response to important control or demonstration interrupts; and provide a more intelligent interrupt management mechanism for multi-user collaborative demonstrations or automatic control in intelligent environments.
[0062] S22. Set a threshold value for the number of scene copies corresponding to each target space; when the number of currently stored scene copies reaches the threshold value, delete the scene copies in a preset order, or delete the scene copies according to the execution priority of each scene copy, and the execution priority of the scene copy is positively correlated with the execution priority of the corresponding pause instruction.
[0063] In this embodiment, a separate scene copy storage space is allocated for each target space (such as each home, store, and showroom); a threshold value N for the maximum number of storable copies is set, such as N=10; this threshold value can be dynamically adjusted according to system resources (such as local memory, cloud cache strategy). Each time a pause command is received during the execution of a scene, the system generates a scene copy, and the scene copy is saved in the storage queue corresponding to the target space. Monitor whether the number of copies in the current target space reaches or exceeds the set threshold; if it does not exceed, the new copy is directly stored; if the threshold has been reached, the system needs to perform a copy elimination operation.
[0064] The system provides two copy deletion strategies, which can be used individually or in combination: Strategy A: Delete in a preset order, for example, use the first-in-first-out rule to delete the earliest generated copy first; it is suitable for lightweight demonstration scenarios where all copies have the same weight. Strategy B: Delete by execution priority. When each scene copy is created, the execution priority of its source pause instruction is recorded; the execution priority of the scene copy is positively correlated with the priority of its source instruction; when a copy is eliminated, the copy with the lowest priority is deleted first; if there are multiple copies with the same priority, the oldest one is deleted in chronological order. In this way, the usage of storage resources can be controlled to avoid resource overflow due to too many copies; priority retention of important scene status is achieved to ensure that key interruption records are not deleted by mistake; the scene pause mechanism has stronger intelligence and stability, which is convenient for long-term demonstration on the B side and continuous experience on the C side; it supports multi-dimensional policy customization and strong compatibility, and is suitable for local gateway and cloud platform deployment.
[0065] S23. Add a first semantic tag to the current pause instruction, where the first semantic tag represents the type of the pause instruction and the device that issues the pause instruction; and generate a scene copy according to the first semantic tag, multiple execution states, and the target scene for storage.
[0066] In this embodiment, when processing a pause instruction, the system adds a first semantic tag (Semantic Tag) to the pause instruction based on the source and context information of the pause instruction. The first semantic tag includes but is not limited to the following dimensions: instruction type (user actively issues a pause instruction, pause due to device abnormality, etc.), type of issuing device, priority level, etc. The system integrates the following information to generate a scene copy: original scene ID, current timestamp, semantic tag, execution status of each device (completed or unfinished), space / location identifier, instruction issuing source identifier, copy unique ID (can be generated by splicing scene ID + timestamp + source device ID); the above-generated scene copy is stored.
[0067] S24. When the pause instruction is sent through the scenario panel corresponding to the target space, the scene copy is sent to the scenario panel for storage; when the target object is not detected in the target space, the scene copy is sent to the target host corresponding to the target space for storage.
[0068] In this embodiment, when the system receives a pause command for a target scene in the target space, the system parses the source device type of the pause command and determines whether the target object (such as a user) is detected in the space. For example, it detects whether there is someone in the current space based on a human body sensor; based on camera image recognition; based on the device's active interactive behavior records (such as whether there is panel touch behavior, voice response, etc.); if the target object is not detected, it can be considered that the user has left or no one is paying attention to the current space status.
[0069] Case A: The command source is the scenario panel. The system sends the generated scene copy to the scenario panel corresponding to the current space. The scenario panel caches the copy locally for subsequent execution, prompt display, or operation backtracking. The copy will be accompanied by a unique secondary ID to facilitate binding and differentiation with the main scene.
[0070] Case B: No target object is detected in the current space, and the system sends a scene copy to the home host corresponding to the space for storage; the home host serves as the management center of the space and takes over the function of pausing copy management in unmanned scenes; the copy will participate in unified copy management within the host (such as maximum number limit, priority processing, etc.).
[0071] If the user is subsequently detected re-entering the target space, the scene copy in the host can be synchronized to the scene panel, ensuring that the user can view, restore, and continue executing the copy at any time through the local panel. This allows for dynamic allocation of scene copy storage by identifying the source of instructions and the status of the target space, improving the accuracy and efficiency of copy storage. When a user directly pauses an operation in the local space, the copy is stored nearby in the scene panel, improving response speed and operational consistency. When the space is unoccupied, the copy storage location is automatically switched to the host, enabling intelligent takeover and subsequent recovery capabilities. The dual-path storage strategy of the host and panel enhances the stability and traceability of copy storage.
[0072] S25. When a continue instruction for a target scene is received, a second semantic tag corresponding to the continue instruction is determined, where the second semantic tag represents the type of the continue instruction and the device that issues the continue instruction; a scene copy is determined based on the second semantic tag and the first semantic tag; a device that has not completed the target scene is controlled to complete the target scene based on the scene copy, and a device that has completed the target scene is controlled to verify the current device status based on the scene copy.
[0073] In this embodiment, when the system receives a continue instruction, the scene recovery mechanism is triggered. The continue instruction carries a second semantic tag, which includes at least: instruction type (such as user-initiated control to continue execution, or continuing execution after device abnormality recovery); source device information (such as the specific app terminal, voice assistant, and scene panel number); target space information (such as "living room" or "exhibition hall area A"); and a timestamp (optional) to assist in matching the corresponding scene copy.
[0074] Based on the extracted second semantic tag, the system searches for the scene copy corresponding to the first semantic tag that matches it. The matching can be done in the following ways: the scene ID is consistent; the secondary ID matches the source device or space; the copy with the higher tag matching degree is given priority; if there are multiple copies, the latest timestamp or priority is selected.
[0075] A list of unfinished devices and their last execution progress (for example, the air conditioner setting has not yet reached the target temperature); a list of completed devices and their current status (for example, the curtains are open and the lights have been adjusted); a system status check code (such as a CRC or HASH value) at the time the replica was generated; and the time interval between the current system time and the replica generation.
[0076] Control the unfinished devices to continue executing the scene and read the unfinished part in the copy; control the corresponding devices to continue completing the target action from the current state, for example, the audio has not finished playing the background music, the lights have not completed the full brightness adjustment, etc.
[0077] Verify the status of completed devices: The system compares the current operating status of the device with the status recorded in the copy; if they are consistent, it is skipped; if there is a deviation, such as the user manually turning off the light, the system can issue a compensation instruction to restore to the target state (configurable whether to force recovery); or prompt the user that "the current device status is inconsistent with the last pause."
[0078] If the source of the continue instruction is inconsistent with the source device of the pause instruction, the system can generate an execution change log for subsequent management audit or user review; if the scene copy has expired (exceeded the set storage time or was cleared), the system prompts "Unable to restore the scene, please re-execute"; it supports automatic clearing of successfully restored scene copies to reduce the system storage burden. As a result, the continue instruction can be accurately mapped to the corresponding pause scene copy to ensure a high degree of consistency in the recovery process; no matter how the continue instruction is initiated (voice, APP, panel), the system can intelligently identify and resume execution; by verifying the status of the executed device, the system stability and linkage reliability are improved; from execution, pause to recovery, the closed-loop capability of scene control is achieved, improving the display and service capabilities of Gree's whole-house intelligence.
[0079] As an example, Figure 3A flow chart of another scenario execution method provided by an embodiment of the present invention is as follows: Figure 3 As shown, the method specifically includes:
[0080] The user creates a scene from the app, and the user can select the execution status of the scene (execute, pause, continue). The scene ID and details are saved in the cloud and passed to the home host. The home host saves the scene ID and details locally, waiting for execution. When the user triggers a pause command (via APP or voice), the home host receives the command and parses the scene status, generates a scene sub-ID, and saves the current device status. When the user issues a continue execution command, the system resumes the unfinished device tasks based on the scene sub-ID and continues to execute the scene. If a pause is triggered again during execution, the sub-ID generation and status recording process is repeated. Finally, the execution of all device actions in the scene is completed. The entire mechanism supports complex scenes with ≥10 devices, with features such as status buffering (300-500ms), automatic clearing of sub-IDs (30min), and local Bluetooth linkage of the scene panel.
[0081] Figure 4 A schematic diagram of the structure of a scene execution device provided by an embodiment of the present invention is shown in FIG. Figure 4 As shown, the device specifically includes:
[0082] An acquisition module 41 is configured to acquire the execution status of multiple devices in the target space when a pause instruction for the target scene is received during the execution of the target scene in the target space;
[0083] A generating module 42, configured to generate a scene copy corresponding to the target scene according to the plurality of execution states;
[0084] The control module 43 is configured to control the devices in the target space to execute the scene copy according to the continue instruction when receiving the continue instruction for the target scene.
[0085] In a possible implementation, the acquisition module is specifically configured to control the device in the target space to pause execution of the target scene according to the pause instruction;
[0086] For a device that has completed executing the target scenario, a switch state and an operating parameter are obtained as the execution state, and for a device that has not completed executing the target scenario, an execution progress is obtained as the execution state.
[0087] In one possible implementation, the generating module is specifically configured to add a first semantic tag to the current pause instruction, where the first semantic tag represents the type of the pause instruction and the device that issued the pause instruction;
[0088] The scene copy is generated according to the first semantic tag, the plurality of execution states and the target scene for storage.
[0089] In one possible implementation, the control module is specifically configured to determine a second semantic tag corresponding to the continue instruction, where the second semantic tag represents a type of the continue instruction and a device that issues the continue instruction;
[0090] determining the scene copy according to the second semantic tag and the first semantic tag;
[0091] The device that has not completed the execution of the target scene is controlled according to the scenario copy to continue to execute the target scene, and the device that has completed the execution of the target scene is controlled according to the scenario copy to verify the current device status.
[0092] In a possible implementation, the control module is further configured to, when receiving multiple pause instructions, determine the execution priority of each pause instruction according to the first semantic tag of each pause instruction;
[0093] determining a target pause instruction according to the execution priority;
[0094] Controlling the plurality of devices to pause execution of the target scenario according to the target pause instruction.
[0095] In one possible implementation, the setting module 44 is configured to set a threshold value for the number of scene copies corresponding to each target space;
[0096] When the number of currently stored scene copies reaches the number threshold, the scene copies are deleted in a preset order, or the scene copies are deleted according to the execution priority of each scene copy, and the execution priority of the scene copy is positively correlated with the execution priority of the corresponding pause instruction.
[0097] In a possible implementation, the sending module 45 is configured to, when the pause instruction is sent via the scenario panel corresponding to the target space, send the scenario copy to the scenario panel for storage;
[0098] When no target object is detected in the target space, the scene copy is sent to a target host corresponding to the target space for storage.
[0099] The scene execution device provided in this embodiment can be as follows Figure 4 The device shown in , can perform the following Figure 1-2 All steps of the scene execution method are implemented to achieve Figure 1-2 For details on the technical effects of the execution method of the scenario shown, please refer to Figure 1-2For the sake of brevity, the relevant description will not be repeated here.
[0100] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention is provided. Figure 5 The computer device 500 shown includes: at least one processor 501, memory 502, at least one network interface 504 and other user interfaces 503. The various components in the computer device 500 are coupled together via a bus system 505. It is understood that the bus system 505 is used to achieve connection and communication between these components. In addition to including a data bus, the bus system 505 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 505 is not described in detail. Figure 5 Various buses are labeled as bus system 505.
[0101] The user interface 503 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touchpad, or a touch screen).
[0102] It is understood that the memory 502 in the embodiment of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0103] In some embodiments, the memory 502 stores the following elements, executable units, or data structures, or a subset thereof, or an extended set thereof: an operating system 5021 and application programs 5022 .
[0104] The operating system 5021 includes various system programs, such as a framework layer, a core library layer, and a driver layer, for implementing various basic services and handling hardware-based tasks. Application programs 5022 include various application programs, such as a media player and a browser, for implementing various application services. Programs implementing the methods of the embodiments of the present invention may be included in application programs 5022.
[0105] In an embodiment of the present invention, by calling a program or instruction stored in the memory 502, specifically, a program or instruction stored in the application 5022, the processor 501 is configured to execute the method steps provided in each method embodiment, for example, including:
[0106] During execution of a target scene in a target space, upon receiving a pause instruction for the target scene, obtaining execution states of multiple devices in the target space;
[0107] Generate a scene copy corresponding to the target scene according to the multiple execution states;
[0108] When a continue instruction for the target scene is received, the device in the target space is controlled to execute the scene copy according to the continue instruction.
[0109] In a possible implementation, controlling the device in the target space to pause execution of the target scene according to the pause instruction;
[0110] For a device that has completed executing the target scenario, a switch state and an operating parameter are obtained as the execution state, and for a device that has not completed executing the target scenario, an execution progress is obtained as the execution state.
[0111] In one possible implementation, a first semantic tag is added to the current pause instruction, where the first semantic tag represents the type of the pause instruction and the device that issued the pause instruction;
[0112] The scene copy is generated according to the first semantic tag, the plurality of execution states and the target scene for storage.
[0113] In one possible implementation, determining a second semantic tag corresponding to the continue instruction, where the second semantic tag represents a type of the continue instruction and a device that issues the continue instruction;
[0114] determining the scene copy according to the second semantic tag and the first semantic tag;
[0115] The device that has not completed the execution of the target scene is controlled according to the scenario copy to continue to execute the target scene, and the device that has completed the execution of the target scene is controlled according to the scenario copy to verify the current device status.
[0116] In one possible implementation, when multiple pause instructions are received, determining the execution priority of each pause instruction according to the first semantic tag of each pause instruction;
[0117] determining a target pause instruction according to the execution priority;
[0118] Controlling the plurality of devices to pause execution of the target scenario according to the target pause instruction.
[0119] In one possible implementation, a threshold value for the number of scene copies corresponding to each target space is set;
[0120] When the number of currently stored scene copies reaches the number threshold, the scene copies are deleted in a preset order, or the scene copies are deleted according to the execution priority of each scene copy, and the execution priority of the scene copy is positively correlated with the execution priority of the corresponding pause instruction.
[0121] In one possible implementation, when the pause instruction is sent via the scenario panel corresponding to the target space, the scenario copy is sent to the scenario panel for storage;
[0122] When no target object is detected in the target space, the scene copy is sent to a target host corresponding to the target space for storage.
[0123] The methods disclosed in the above embodiments of the present invention can be applied to or implemented by processor 501. Processor 501 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in processor 501 or by software instructions. The above processor 501 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in conjunction with the embodiments of the present invention can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software units in the decoding processor. The software units can be located in storage media well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory 502 , and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.
[0124] It is understood that the embodiments described herein may be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSP devices, DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or a combination thereof.
[0125] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0126] The computer device provided in this embodiment may be Figure 5 The device shown in , can perform Figure 1-2 All steps of the scene execution method are implemented to achieve Figure 1-2 For details on the technical effects of the execution method of the scenario shown, please refer to Figure 1-2 For the sake of brevity, the relevant description will not be repeated here.
[0127] An embodiment of the present invention further provides a storage medium (computer-readable storage medium). The storage medium stores one or more programs. The storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; and the memory may also include a combination of the aforementioned types of memory.
[0128] When one or more programs in the storage medium can be executed by one or more processors, the above-mentioned scenario execution method executed on the device side can be implemented.
[0129] The processor is configured to execute a scene execution program stored in the memory to implement the following steps of a scene execution method executed on the device side:
[0130] During execution of a target scene in a target space, upon receiving a pause instruction for the target scene, obtaining execution states of multiple devices in the target space;
[0131] Generate a scene copy corresponding to the target scene according to the multiple execution states;
[0132] When a continue instruction for the target scene is received, the device in the target space is controlled to execute the scene copy according to the continue instruction.
[0133] In a possible implementation, controlling the device in the target space to pause execution of the target scene according to the pause instruction;
[0134] For a device that has completed executing the target scenario, a switch state and an operating parameter are obtained as the execution state, and for a device that has not completed executing the target scenario, an execution progress is obtained as the execution state.
[0135] In one possible implementation, a first semantic tag is added to the current pause instruction, where the first semantic tag represents the type of the pause instruction and the device that issued the pause instruction;
[0136] The scene copy is generated according to the first semantic tag, the plurality of execution states and the target scene for storage.
[0137] In one possible implementation, determining a second semantic tag corresponding to the continue instruction, where the second semantic tag represents a type of the continue instruction and a device that issues the continue instruction;
[0138] determining the scene copy according to the second semantic tag and the first semantic tag;
[0139] The device that has not completed the execution of the target scene is controlled according to the scenario copy to continue to execute the target scene, and the device that has completed the execution of the target scene is controlled according to the scenario copy to verify the current device status.
[0140] In one possible implementation, when multiple pause instructions are received, determining the execution priority of each pause instruction according to the first semantic tag of each pause instruction;
[0141] determining a target pause instruction according to the execution priority;
[0142] Controlling the plurality of devices to pause execution of the target scenario according to the target pause instruction.
[0143] In one possible implementation, a threshold value for the number of scene copies corresponding to each target space is set;
[0144] When the number of currently stored scene copies reaches the number threshold, the scene copies are deleted in a preset order, or the scene copies are deleted according to the execution priority of each scene copy, and the execution priority of the scene copy is positively correlated with the execution priority of the corresponding pause instruction.
[0145] In one possible implementation, when the pause instruction is sent via the scenario panel corresponding to the target space, the scenario copy is sent to the scenario panel for storage;
[0146] When no target object is detected in the target space, the scene copy is sent to a target host corresponding to the target space for storage.
[0147] Professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0148] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0149] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A scenario execution method, characterized in that: include: During execution of a target scene in a target space, upon receiving a pause instruction for the target scene, obtaining execution states of multiple devices in the target space; Generate a scene copy corresponding to the target scene according to the multiple execution states; When a continue instruction for the target scene is received, the device in the target space is controlled to execute the scene copy according to the continue instruction.
2. The method according to claim 1, characterized in that The acquiring the execution status of the plurality of devices in the target space includes: controlling the device in the target space to pause execution of the target scene according to the pause instruction; For a device that has completed executing the target scenario, a switch state and an operating parameter are obtained as the execution state, and for a device that has not completed executing the target scenario, an execution progress is obtained as the execution state.
3. The method according to claim 1, characterized in that Generating a scene copy corresponding to the target scene according to the plurality of execution states includes: Adding a first semantic tag to the current pause instruction, where the first semantic tag represents the type of the pause instruction and the device that issues the pause instruction; The scene copy is generated according to the first semantic tag, the plurality of execution states and the target scene for storage.
4. The method according to claim 1, wherein The controlling the device in the target space to execute the scene copy according to the continue instruction includes: determining a second semantic tag corresponding to the continue instruction, where the second semantic tag represents a type of the continue instruction and a device that issues the continue instruction; determining the scene copy according to the second semantic tag and the first semantic tag; The device that has not completed the execution of the target scene is controlled according to the scenario copy to continue to execute the target scene, and the device that has completed the execution of the target scene is controlled according to the scenario copy to verify the current device status.
5. The method according to claim 3, characterized in that The method further comprises: When multiple pause instructions are received, determining the execution priority of each pause instruction according to the first semantic tag of each pause instruction; determining a target pause instruction according to the execution priority; Controlling the plurality of devices to pause execution of the target scenario according to the target pause instruction.
6. The method according to claim 1, characterized in that Before generating a scene copy corresponding to the target scene according to the plurality of execution states, the method further includes: Set the threshold for the number of scene copies corresponding to each target space; When the number of currently stored scene copies reaches the number threshold, the scene copies are deleted in a preset order, or the scene copies are deleted according to the execution priority of each scene copy, and the execution priority of the scene copy is positively correlated with the execution priority of the corresponding pause instruction.
7. The method according to claim 1, characterized in that After generating a scene copy corresponding to the target scene according to the plurality of execution states, the method further includes: When the pause instruction is sent via the scenario panel corresponding to the target space, sending the scenario copy to the scenario panel for storage; When no target object is detected in the target space, the scene copy is sent to a target host corresponding to the target space for storage.
8. A scene execution device, characterized in that: include: an acquisition module, configured to acquire the execution status of a plurality of devices in the target space when a pause instruction for the target scene is received during the execution of the target scene in the target space; A generating module, configured to generate a scene copy corresponding to the target scene according to the plurality of execution states; The control module is used to control the device in the target space to execute the scene copy according to the continue instruction when receiving the continue instruction for the target scene.
9. A computer device, characterized in that: include: A processor and a memory, wherein the processor is configured to execute a scenario execution program stored in the memory to implement the scenario execution method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the scenario execution method according to any one of claims 1 to 7.