Server, mobile terminal and terminal equipment control method
By managing the initial status information on the server side of the smart home system, the problem of difficulty for users to accurately restore the initial status of the device after switching in multiple scenarios is solved, and the stability and convenience of the system are improved.
Patent Information
- Application Number
- CN202411864340.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-22
AI Technical Summary
In smart home systems, when users frequently switch multiple scenarios, it is difficult to accurately restore the initial state of the device, resulting in users needing manual adjustments, increasing operational complexity and affecting the convenience and automation of the system.
By implementing the management of initial state information on the server side, it is ensured that when scene switching, the owner of the initial state information is changed from the scene before the switch to the scene after the switch, so that when the last scene is closed, it uses the initial state information it holds to accurately restore to the initial state set before the terminal device first opens the scene.
It simplifies user operations, improves the stability and convenience of the system, and ensures that it can accurately restore to the initial state after switching in multiple scenarios.
Smart Images

Figure CN119861612A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of device control, and in particular to a server, a mobile terminal and a terminal device control method. Background Art
[0002] With the popularity of smart home systems, users can automatically control home devices by setting different scene modes. When setting scene modes for smart home systems, users not only need to turn on and off a single scene, but also need to frequently switch between multiple scenes, such as switching from "cinema mode" to "party mode" and then switching to other modes.
[0003] Many smart home systems can save the initial state information of the current home appliances when switching to a preset scene. When the preset scene is closed, the saved initial state information can be used to restore the initial state of the home appliances.
[0004] However, when the user switches from one scene to another, the initial state of the current home device will be saved again. When the last mode is finally exited, the initial state of the device may change or be lost multiple times, and the system often cannot accurately restore it to the originally set state. This situation leads to user experience problems in actual use. Users often need to manually adjust the device status to restore to the initial settings, which not only increases the complexity of the operation, but also affects the convenience and automation of the system. Summary of the invention
[0005] Some embodiments of the present application provide a server, a mobile terminal, and a terminal device control method. When multiple scenes are switched, the owner of the initial state information can be changed from the scene before the switch to the scene after the switch, so that when the last scene is closed, the initial state information held by it can be used to accurately restore to the initial state set before the terminal device first opens the scene, simplifying user operations and improving system stability and convenience.
[0006] In a first aspect, some embodiments of the present application provide a server, including:
[0007] A communication module, configured to establish a communication connection with a terminal device;
[0008] The processing module is configured as follows:
[0009] Receiving an instruction to start the first scene sent by the mobile terminal;
[0010] When the terminal device is not in the second scene, sending an instruction to start the first scene to the terminal device; recording the operating parameters of the terminal device before receiving the instruction to start the first scene as initial state information, and marking the owner of the initial state information as the first scene, wherein the second scene includes scenes other than the first scene, and the instruction to start the first scene is used to make the terminal device run according to the operating parameters corresponding to the first scene;
[0011] When the terminal device is in the second scene, sending an instruction to close the second scene to the terminal device, and sending an instruction to open the first scene to the terminal device, and changing the owner of the initial state information from the second scene to the first scene; wherein the initial state information includes the operating parameters of the terminal device before the scene is opened for the first time, and the instruction to close the second scene is used to make the terminal device close the second scene;
[0012] receiving an instruction to close the first scene;
[0013] Sending an instruction to close the first scene to the terminal device, so that the terminal device closes the first scene;
[0014] The initial state information held by the first scene is called to generate and send a state recovery instruction to the terminal device, so that the terminal device runs with the operating parameters of the initial state information.
[0015] The above technical solution has the following advantages or beneficial effects: after receiving the instruction to open the first scene, if the terminal device does not open any scene, the initial state of the terminal device can be directly saved and the initial state can be set to the first scene. If the terminal device opens a second scene different from the first scene, it is necessary to change the owner of the initial state information from the second scene to the first scene, so that when the first scene is closed, the initial state information held by the first scene is used to accurately restore the terminal device to the initial state set before the scene is first opened, simplifying user operations and improving the stability and convenience of the system.
[0016] In some embodiments, the instruction to close the first scene includes a source identifier, the processing module executes sending the instruction to close the first scene to the terminal device, and calls the initial state information held by the first scene to generate and send a state recovery instruction to the terminal device, and is further configured as follows:
[0017] The source identifier indicates that the instruction to close the first scene is sent from the mobile terminal, and in response to the instruction to close the first scene, the instruction to close the first scene is sent to the terminal device, and the initial state information held by the first scene is called to generate and send a state recovery instruction to the terminal device;
[0018] The source identifier indicates that the instruction to close the first scene is sent from the terminal device. In response to the instruction to close the first scene, the instruction to close the first scene is sent to the terminal device, and the initial state information held by the first scene is not called to generate a state recovery instruction.
[0019] The above technical solution has the following advantages or beneficial effects: for the scene closing instruction from the mobile terminal, the initial state recovery related operations are executed, and for the scene closing instruction from the terminal device, the initial state recovery related operations are not executed. Whether to execute the state recovery operation can be limited by closing the first scene instruction source, so that the execution of user instructions can better meet the user's actual needs.
[0020] In some embodiments, before executing the instruction to close the second scene to send to the terminal device, the processing module is further configured to: record the second scene;
[0021] The processing module executes changing the owner of the initial state information from the second scene to the first scene, and is further configured as follows:
[0022] If the initial state information exists in the database, determining whether the owner of the initial state information is the recorded second scene;
[0023] If the owner of the initial state information is the recorded second scene, the owner of the initial state information is changed from the second scene to the first scene.
[0024] The above technical solution has the following advantages or beneficial effects: only when there is initial state information in the database and the initial state information is the second scene that was previously closed, can the owner of the initial state information be changed from the second scene to the first scene, thereby preventing the first scene from inheriting erroneous initial state information.
[0025] In some embodiments, after executing the instruction to start the first scene and sending it to the terminal device, the processing module is further configured to:
[0026] If the initial state information does not exist in the database, or the owner of the initial state information is not the recorded second scene, the operating parameters of the terminal device before receiving the instruction to start the first scene are recorded as the initial state information, and the owner of the initial state information is marked as the first scene.
[0027] The above technical solution has the following advantages or beneficial effects: when there is no initial state information in the database, or the initial state information is not the second scene that was previously closed, it means that the initial state information is lost or wrong, and the previous initial state information cannot be used directly, but the initial state information needs to be re-recorded, which helps to restore the state of the terminal device to the state that the user needs to set when closing the first scene.
[0028] In some embodiments, the processing module is further configured to record the operating parameters of the terminal device before receiving the instruction to start the first scene as the initial state information:
[0029] Obtain the partner ID, category ID and / or product ID of the terminal device;
[0030] Searching the operating parameter name corresponding to the partner ID, category ID and / or product ID in the scenario initialization configuration table;
[0031] The parameter values corresponding to the operating parameter names of the terminal device are recorded as initial state information.
[0032] The above technical solution has the following advantages or beneficial effects: when a large amount of status information is reported to the server by the terminal device, the operating parameters of the required initial status information are set for each device and saved in the scene initialization configuration table, which helps to avoid irrelevant data from being stored in the initial status information, thereby reducing interference from irrelevant data and space occupancy.
[0033] In some embodiments, the processing module executes the calling of the initial state information held by the first scene to generate a state recovery instruction, and is further configured to:
[0034] Obtaining a status instruction conversion table, the status instruction conversion table including a correspondence between an operation parameter name and a status instruction;
[0035] Assemble the parameter values in the initial state information into the state instructions corresponding to the operating parameter names of the parameter values to generate state recovery instructions.
[0036] The above technical solution has the following advantages or beneficial effects: assembling the state recovery instruction according to the state instruction conversion table and the initial state information can help the terminal device to accurately restore to the initial state set before the scene is first opened based on the state recovery instruction.
[0037] In a second aspect, some embodiments of the present application provide a mobile terminal, including:
[0038] A display; configured to display a device details page of a terminal device;
[0039] A controller is coupled to the display and is configured to:
[0040] After receiving a confirmation operation on the start control of the first scene in the device details page, an instruction to start the first scene is sent to the server; when the terminal device is not in the second scene, the server sends an instruction to start the first scene to the terminal device; the operating parameters of the terminal device before receiving the instruction to start the first scene are recorded as initial state information, and the owner of the initial state information is marked as the first scene, wherein the second scene includes scenes other than the first scene, and the instruction to start the first scene is used to make the terminal device run according to the operating parameters corresponding to the first scene; when the terminal device is in the second scene, the server sends an instruction to close the second scene to the terminal device, and sends an instruction to start the first scene to the terminal device, and changes the owner of the initial state information from the second scene to the first scene; wherein the initial state information includes the operating parameters of the terminal device before the scene is first started, and the instruction to close the second scene is used to make the terminal device close the second scene;
[0041] After receiving a confirmation operation on the close control of the first scene in the device details page, an instruction to close the first scene is sent to the server; the server sends an instruction to close the first scene to the terminal device, so that the terminal device closes the first scene; the initial state information held by the first scene is called to generate and send a state recovery instruction to the terminal device, so that the terminal device runs with the operating parameters of the initial state information.
[0042] The above technical solution has the following advantages or beneficial effects: after receiving the instruction sent by the mobile terminal to open the first scene of the terminal device, if the terminal device does not open any scene, the initial state of the terminal device can be directly saved and the initial state can be set to the first scene. If the terminal device opens a second scene different from the first scene, it is necessary to change the owner of the initial state information from the second scene to the first scene, so that when the first scene is closed, the initial state information held by the first scene is used to accurately restore the terminal device to the initial state set before the scene is first opened, simplifying user operations and improving the stability and convenience of the system.
[0043] In a third aspect, some embodiments of the present application provide a terminal device control method, characterized in that it is applied to a server and includes:
[0044] Receiving an instruction to start the first scene sent by the mobile terminal;
[0045] When the terminal device is not in the second scene, sending an instruction to start the first scene to the terminal device; recording the operating parameters of the terminal device before receiving the instruction to start the first scene as initial state information, and marking the owner of the initial state information as the first scene, wherein the second scene includes scenes other than the first scene, and the instruction to start the first scene is used to make the terminal device run according to the operating parameters corresponding to the first scene;
[0046] When the terminal device is in the second scene, sending an instruction to close the second scene to the terminal device, and sending an instruction to open the first scene to the terminal device, and changing the owner of the initial state information from the second scene to the first scene; wherein the initial state information includes the operating parameters of the terminal device before the scene is opened for the first time, and the instruction to close the second scene is used to make the terminal device close the second scene;
[0047] Receive an instruction to close the first scene;
[0048] Sending an instruction to close the first scene to the terminal device, so that the terminal device closes the first scene;
[0049] The initial state information held by the first scene is called to generate and send a state recovery instruction to the terminal device, so that the terminal device runs with the operating parameters of the initial state information.
[0050] The above technical solution has the following advantages or beneficial effects: after receiving the instruction to open the first scene, if the terminal device does not open any scene, the initial state of the terminal device can be directly saved and the initial state can be set to the first scene. If the terminal device opens a second scene different from the first scene, it is necessary to change the owner of the initial state information from the second scene to the first scene, so that when the first scene is closed, the initial state information held by the first scene is used to accurately restore the terminal device to the initial state set before the scene is first opened, simplifying user operations and improving the stability and convenience of the system.
[0051] In a fourth aspect, some embodiments of the present application provide a terminal device control method, which is applied to a mobile terminal, including:
[0052] After receiving a confirmation operation on the start control of the first scene in the device details page, an instruction to start the first scene is sent to the server; when the terminal device is not in the second scene, the server sends an instruction to start the first scene to the terminal device; the operating parameters of the terminal device before receiving the instruction to start the first scene are recorded as initial state information, and the owner of the initial state information is marked as the first scene, wherein the second scene includes scenes other than the first scene, and the instruction to start the first scene is used to make the terminal device run according to the operating parameters corresponding to the first scene; when the terminal device is in the second scene, the server sends an instruction to close the second scene to the terminal device, and sends an instruction to start the first scene to the terminal device, and changes the owner of the initial state information from the second scene to the first scene; wherein the initial state information includes the operating parameters of the terminal device before the scene is first started, and the instruction to close the second scene is used to make the terminal device close the second scene;
[0053] After receiving a confirmation operation on the close control of the first scene in the device details page, an instruction to close the first scene is sent to the server; the server sends an instruction to close the first scene to the terminal device, so that the terminal device closes the first scene; the initial state information held by the first scene is called to generate and send a state recovery instruction to the terminal device, so that the terminal device runs with the operating parameters of the initial state information.
[0054] The above technical solution has the following advantages or beneficial effects: after receiving the instruction sent by the mobile terminal to open the first scene of the terminal device, if the terminal device does not open any scene, the initial state of the terminal device can be directly saved and the initial state can be set to the first scene. If the terminal device opens a second scene different from the first scene, it is necessary to change the owner of the initial state information from the second scene to the first scene, so that when the first scene is closed, the initial state information held by the first scene is used to accurately restore the terminal device to the initial state set before the scene is first opened, simplifying user operations and improving the stability and convenience of the system.
[0055] The technical solution provided in the embodiment of the present application can change the owner of the initial state information from the scene before the switch to the scene after the switch when multiple scenes are switched, so that when the last scene is closed, the initial state information held by it can be used to accurately restore to the initial state set before the terminal device first opens the scene, thereby simplifying user operations and improving the stability and convenience of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0057] Figure 1 A flowchart of a terminal device control method provided in some embodiments of the present application;
[0058] Figure 2 A schematic diagram of a device control page provided in some embodiments of the present application;
[0059] Figure 3 A schematic diagram of a device details page provided in some embodiments of the present application;
[0060] Figure 4 A schematic diagram of a scene details page provided in some embodiments of the present application;
[0061] Figure 5 A schematic diagram of a scene setting page provided in some embodiments of the present application;
[0062] Figure 6 A schematic diagram of a temperature adjustment page provided in some embodiments of the present application;
[0063] Figure 7 A schematic diagram of a device setting page provided in some embodiments of the present application;
[0064] Figure 8 A schematic diagram of a prompt page provided for some embodiments of the present application;
[0065] Fig. 9 A flowchart of a scenario opening provided for some embodiments of the present application;
[0066] Fig.10 A flowchart of a scene closing provided for some embodiments of the present application;
[0067] Fig.11 A timing diagram of a terminal device control method provided in some embodiments of the present application;
[0068] Fig.12 A schematic diagram of scene switching provided for some embodiments of the present application. DETAILED DESCRIPTION
[0069] The following embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following embodiments do not represent all implementations consistent with the present application. They are only examples of systems and methods consistent with some aspects of the present application as detailed in the claims.
[0070] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.
[0071] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.
[0072] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.
[0073] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0074] In the embodiment of the present application, the server is a specific information technology device that provides computing power and runs software applications in a network environment. It provides computing or application services to other clients in the network, such as personal computers, smart phones, air conditioners and other terminal devices. Servers have the ability to respond to service requests, provide services, and guarantee services. Compared with ordinary computers, servers have high-speed central processing unit computing power, long-term reliable operation capabilities, strong input / output data throughput capabilities, and high scalability.
[0075] In the embodiment of the present application, after receiving the control instruction sent by the mobile terminal or terminal device, the server can parse and process the control instruction, generate a new control instruction, and send the new control instruction to the designated terminal device or the terminal device located in the same local area network or bound to the same account, so as to achieve the purpose of controlling the terminal device. The server can also recognize and understand the semantics of the voice data sent by the terminal device, generate a control instruction, and send the control instruction to the terminal device so that the terminal device executes the operation corresponding to the control instruction.
[0076] In the embodiment of the present application, after receiving the control instruction to start the first scene sent by the mobile terminal or terminal device, the server can directly record the terminal device operating parameters before receiving the instruction to start the first scene as initial state information and mark its owner as the first scene when determining that the terminal device is not in any scene. When determining that the terminal device is in the second scene, the owner of the initial state information is changed from the second scene to the first scene, so that when the first scene is closed, the terminal device can restore the device state to the state originally set before the scene is first started.
[0077] In the embodiments of the present application, the terminal device is a device that inputs programs and data into a computer or receives computer output processing results via communication facilities. The terminal device is usually set up in a convenient place where it can use communication facilities to connect to a remote computer for work. It is mainly composed of a communication interface control device and a dedicated or selected input and output device.
[0078] Terminal devices include, but are not limited to, smart TVs, mobile terminals, computers, wearable devices, virtual reality devices, augmented reality devices, smart air conditioners, smart speakers, smart lamps, smart refrigerators, and smart door locks, etc. Mobile terminals include, but are not limited to, laptops, tablets, and smart phones, etc.
[0079] The terminal device may include a display, a communication device, a controller and a user input interface.
[0080] In some embodiments, the display includes a display function component for presenting a picture, and a driving component for driving an image display. The display is used to receive an image signal output from the controller for display. For example, the display can be used to display video content, image content, and components of a menu control interface and a user control user interface (UI).
[0081] In some embodiments, the communication device is a component for communicating with an external device or server according to various communication protocol types. The terminal device may be provided with multiple communication devices according to the different communication modes supported. For example, when the terminal device supports wireless network communication, the terminal device may be provided with a communication device including a WiFi function. When the terminal device supports Bluetooth connection communication, the terminal device needs to be provided with a communication device including a Bluetooth function.
[0082] The communication device can enable the terminal device to communicate with the external device or server through wireless or wired connection. Among them, the wired connection can connect the terminal device with the external device through components such as data cables and interfaces. The wireless connection can connect the terminal device with the external device through wireless signals or wireless networks. The terminal device can establish a connection relationship with the external device directly, or indirectly through a gateway, router, connection device, etc.
[0083] In some embodiments, the controller may include at least one of a central processing unit, a video processor, an audio processor, a graphics processor, and a power processor, and a first interface to an nth interface for input / output. The controller controls the operation of the terminal device and responds to user operations through various software control programs stored in the memory. The controller controls the overall operation of the terminal device.
[0084] In some embodiments, the user input interface can be used to receive instructions from the user input. Exemplarily, the user input interface can receive a user's confirmation instruction for a control in the user interface. The user input interface can also receive voice data input by the user.
[0085] With the popularization of smart home systems, users can automatically control home appliances by setting different scene modes. For example, they can set different air-conditioning set temperatures in different scene modes to adapt to different life situations.
[0086] After receiving the command to start the scene, the smart home system can send the command to start the scene to the terminal device, so that the terminal device starts the scene. After receiving the command to close the scene, the smart home system can send the command to close the scene to the terminal device, so that the terminal device closes the scene. The scene can be started by running with the operating parameters corresponding to the scene. The scene can be closed by terminating the operation with the operating parameters corresponding to the scene.
[0087] In some embodiments, the user can set the specified operating parameters, or the user's commonly used operating parameters when not in the scene in the recent period can be counted based on the user's operating parameters uploaded by the terminal device as the specified operating parameters. After receiving an instruction to close any scene, when sending a scene closing instruction to the terminal device, an instruction to restore to the specified operating parameters can be sent to the terminal device, so that the terminal device can operate with the specified operating parameters after closing the scene. The specified operating parameters are often fixed or unchanged for a certain period, but the user may adjust the terminal device operating parameters in real time according to his or her own needs. Fixed specified operating parameters cannot meet the user's real-time changing needs.
[0088] In some embodiments, before sending a command to start a scene, the operating parameters of the terminal device before receiving the command to start the scene, that is, the initial state information, can be saved, and after closing the scene, a state recovery command can be generated and sent to the terminal device based on the initial state information to restore the state of the terminal device to the initial setting state, that is, the initial operating parameters.
[0089] Exemplarily, after receiving the user input to turn on the sleep mode, the smart home system saves the operating parameters currently set for the air conditioner and sends the sleep mode turn-on command to the air conditioner. The current operating parameters are: the air conditioner temperature is set to 22°C and the wind speed is set to level 3. After the air conditioner turns on the sleep mode, the air conditioner temperature setting in sleep mode is changed to 25°C and the wind speed setting is changed to level 2. After receiving the user input to turn off the sleep mode, the smart home system sends a state recovery command to the terminal device. The terminal device restores the air conditioner temperature setting to 22°C and the wind speed setting to level 3.
[0090] The embodiment of the present application can restore the initial state of the terminal device when a single scene is turned on and off, but in actual applications, users often need to frequently switch between multiple scenes. When the user wants to switch scenes, that is, switch from one scene to another, it is not necessary to close the current scene and then open the new scene, but directly input the command to open the new scene. For example, after turning on the theater mode, the user does not first input the command to turn off the theater mode and then input the command to turn on the party mode, but directly inputs the command to turn on the party mode.
[0091] In some embodiments, after receiving the first scene start instruction, the smart home system saves the current operating parameters of the terminal device, that is, the first initial state information, and sends the first scene start instruction to the terminal device. The terminal device turns on the first scene. After receiving the second scene start instruction, the smart home system also needs to save the current operating parameters of the terminal device, and then send the second scene start instruction to the terminal device. The terminal device turns on the second scene. At this time, the initial state information is the operating parameters set for the first scene, that is, the second initial state information, and the second initial state information can replace the first initial state information. After receiving the second scene closing instruction, the smart home system sends a state recovery instruction to the terminal device. The terminal device restores the state to the state when the first scene is turned on, rather than the initial state before the first scene is turned on.
[0092] Exemplarily, after receiving the user input of the instruction to turn on the movie mode, the smart home system saves the operating parameters currently set for the air conditioner and sends the instruction to turn on the movie mode to the air conditioner. The current operating parameters are: the air conditioner temperature is set to 23°C and the wind speed is set to level 3. After the air conditioner turns on the movie mode, the temperature setting is changed to 25°C and the wind speed setting is changed to level 2. After receiving the user input of the instruction to turn on the party mode, the smart home system saves the operating parameters currently set for the air conditioner and sends the instruction to turn on the party mode to the air conditioner. The current operating parameters are: the air conditioner temperature is set to 23°C and the wind speed is set to level 3, replaced by the air conditioner temperature is set to 25°C and the wind speed is set to level 2. After receiving the user input of the instruction to turn off the party mode, the smart home system sends a status recovery instruction to the terminal device. The terminal device restores the air conditioner temperature setting to 25°C instead of 23°C, and the wind speed setting to level 2 instead of level 3.
[0093] Although restoring the initial state information is solved by saving the operating parameters before opening the scene, it can usually only cope with simple scene switching and can only effectively manage the state of a single scene. However, when the user switches between multiple scenes and finally exits the last mode, the system often cannot accurately restore to the originally set state. This situation causes the user to manually adjust the device state to restore to the initial setting after switching multiple scenes and closing the last scene, which not only increases the complexity of the operation, but also affects the convenience and automation of the system.
[0094] Therefore, there are certain limitations in processing state recovery after multiple scene switching. This limitation is manifested in the system's inability to effectively manage and restore to the initial state, resulting in a poor user experience during frequent scene switching. In order to improve the automation capabilities and user experience of smart home systems, a new solution is urgently needed that can accurately restore to the state originally set by the user after finally exiting the last mode, thereby simplifying user operations and improving system stability and convenience.
[0095] In order to solve the problem that the terminal device cannot be restored to the state originally set after switching multiple scenes, an embodiment of the present application provides a server, which includes a communication module and a processing module. The communication module is configured to establish a communication connection with the mobile terminal and the terminal device. The embodiment of the present application further improves some functions of the server. Figure 1 As shown, the processing module runs the application program to cause the server to perform the following steps:
[0096] Step S101: receiving an instruction to start a first scene.
[0097] In some embodiments, the server receives an instruction sent by the mobile terminal to start the first scene, the instruction including a specified terminal device, a specified type of terminal device, and all terminal devices. Among them, the mobile terminal is a controlling terminal device that can control the terminal device scene switch, and the terminal device is a controlled terminal device that can be controlled by the mobile terminal.
[0098] After receiving the user input command to start the target application, the mobile terminal displays the device control page. The device control page includes a device list, and the device list includes at least one terminal device control. Among them, the terminal device corresponding to the terminal device control can be a terminal device located in the same local area network as the mobile terminal, and the terminal device corresponding to the terminal device control can also be a terminal device bound to the user account logged in to the mobile terminal.
[0099] After receiving the confirmation operation of the terminal device control input by the user, the mobile terminal displays the device details page corresponding to the terminal device control. The device details page includes at least one scene control. After receiving the confirmation operation of the scene control input by the user, the mobile terminal displays the scene details page. The scene details page includes a start control. After receiving the confirmation operation of the start control by the user, an opening scene instruction, that is, an opening first scene instruction, is generated, and the opening first scene instruction is sent to the server.
[0100] The scene details page includes a scene setting control. After receiving a confirmation operation of the scene setting control input by the user, the mobile terminal displays the scene setting page. The scene setting page includes a parameter control control and a device setting control.
[0101] After receiving the confirmation operation of the user input to the parameter control control, the mobile terminal displays the parameter setting page. After receiving the user's instruction to adjust the parameter in the parameter setting page, the setting value of the parameter in the scene can be changed.
[0102] After receiving the confirmation operation of the user input on the device setting control, the mobile terminal displays the device setting page. The device setting page includes the current device control, the same type of device control and all device controls. After receiving the instruction of the user input on the current device control, the device range identifier is set to a first preset value, exemplarily, the first preset value is 1. After receiving the instruction of the user input on the same type of device control, the device range identifier is set to a second preset value, exemplarily, the second preset value is 2. After receiving the instruction of the user input on all device controls, the device range identifier is set to a third preset value, exemplarily, the third preset value is 3.
[0103] A specific implementation method of generating an instruction to start the first scene may include: obtaining a device range identifier. If the device range identifier is a first preset value, the device identifier of the terminal device is written into the instruction to start the first scene, and the device identifier is used to characterize the specified terminal device. If the device range identifier is a second preset value, the device type identifier of the terminal device is written into the instruction to start the first scene, and the device type identifier is used to characterize the device type of the terminal device. If the device range identifier is a third preset value, all device identifiers are written into the instruction to start the first scene, and all device identifiers are used to characterize all terminal devices in the same local area network and / or all bound terminal devices.
[0104] For example, Figure 2 As shown, the device control page of the mobile terminal includes a device list 21, and the device list 21 includes a bedroom air conditioner control 211, a living room air conditioner control 212, a living room TV control 213, and an add device control 214. The add device control 214 can be used to bind a new device, and after the binding is successful, the control corresponding to the device can be displayed in the device list. After receiving the user input of the confirmation operation on the bedroom air conditioner control 211, the device details page of the bedroom air conditioner can be displayed.
[0105] like Figure 3 As shown, the device details page of the mobile terminal includes a common function area 31, a recommended function area 32 and a smart scene area 33. The common function area 31 includes a mode control, a fast hot and cold control, a direct blowing prevention control and an up and down wind control. The recommended function area includes an energy consumption management control, a sleep curve control and an air conditioning cleaning control. The smart scene area 33 includes a first scene control 331, a first scene start control 332, a second scene control 333 and a second scene start control 334. If a user confirmation operation on the start control 332 is received, a control instruction to start the first scene can be generated and sent to the server. If a user confirmation operation on the first scene control is received, the scene details page of the first scene can be displayed.
[0106] like Figure 4As shown, the scene details page of the mobile terminal includes a start control 41 and a scene setting control 42. If a confirmation operation of the user input to the start control 41 is received, a control instruction for starting the first scene can be generated and sent to the server. If a confirmation operation of the user input to the scene setting control 42 is received, the scene setting page can be displayed.
[0107] like Figure 5 As shown, the scene setting page of the mobile terminal includes a temperature control 51, a high temperature reminder control 52, a power saving reminder control 53, a device setting control 54 and a shutdown setting control 55. After receiving a confirmation operation of the user input on the temperature control 51, the temperature adjustment page can be displayed, such as Figure 6 After receiving the confirmation operation of the high temperature reminder control 52 or the power saving reminder control 53 from the user, the high temperature reminder or power saving reminder function can be turned on or off. After receiving the confirmation operation of the device setting control 54 from the user, the following display can be displayed: Figure 7 The device setting page shown in FIG. 1 includes a current device control 71, a same type device type control 72, and an all device control 73. The application scope to be started by the first scene can be selected on the device setting page.
[0108] It should be noted that controls refer to visual objects displayed in various display areas of the user interface in a mobile terminal to represent corresponding content such as icons, thumbnails, video clips, links, etc. These controls can provide users with various traditional program content received through data broadcasting, as well as various applications and service content set by content manufacturers.
[0109] The display forms of controls are usually diverse. For example, a control may include text content and / or an image for displaying a thumbnail related to the text content, or a video clip related to the text. For another example, a control may be text and / or an icon of an application.
[0110] In other embodiments, an instruction for starting the first scene sent by a terminal device is received, and the instruction may be a voice instruction for starting the first scene.
[0111] The terminal device can wake up the voice service by recognizing the far-field wake-up word spoken by the user, start the sound collector through the voice server to collect the user's voice data, and send the voice data to the voice subsystem of the server. The terminal device can also be configured with a control device, which collects the user's voice data and sends the voice data to the terminal device after receiving the user's operation of pressing the voice key in the control device, and the terminal device then sends the voice data to the voice subsystem of the server.
[0112] The server can perform noise reduction and feature extraction on the voice data to identify candidate texts. Among them, the noise reduction process may include steps such as removing echoes and environmental noise. Then, the acoustic model and language model are used to perform natural language understanding on the identified candidate texts and associated context information, and the text is parsed into structured, machine-readable information, business fields, intentions, word slots and other information to express semantics, etc., to obtain executable intentions and determine the intention confidence score. Select one or more candidate executable intentions based on the determined intention confidence score. Send control instructions to the corresponding business management module according to the semantic parsing results.
[0113] For example, the sound collector of the air conditioner collects ambient sound in real time. After determining that the volume of the ambient sound is greater than the preset volume and recognizing that the ambient sound contains the wake-up word, the sound collector can continue to collect the user's voice and send the user's voice to the server. The user's voice can be "Please turn on the sleep scene mode", "Please turn on the sleep scene mode of all air conditioners", or "Please turn on the sleep scene mode of all devices in the house". The server recognizes the user's voice and sends the corresponding control command to the specified terminal device.
[0114] Step S102: Determine whether the terminal device is in the second scenario.
[0115] In some embodiments, the instruction to start the first scene includes a device identification of the terminal device. In response to the instruction to start the first scene, scene information of the terminal device corresponding to the device identification is obtained, and then it is determined whether the terminal device is in the second scene according to the scene information.
[0116] It should be noted that the terminal device can upload the device status information to the server in real time and save it in the device status table corresponding to the device identification of the terminal device. When the server wants to obtain the status information of the terminal device, it can search in the device status table corresponding to the device identification. The status information includes operating parameters and scene information. The operating parameters include the set temperature and wind speed. The scene information includes the sleeping scene, the party scene, and the movie scene.
[0117] Exemplarily, the mobile terminal receives a confirmation operation of the user inputting on the details page of the bedroom air conditioner to turn on the first scene control, and sends a control instruction for turning on the first scene carrying the bedroom air conditioner device identifier to the server. The server obtains the scene information of the bedroom air conditioner, and then determines whether the bedroom air conditioner is in the second scene.
[0118] In some embodiments, the instruction to start the first scene includes a device type identifier. In response to the instruction to start the first scene, a terminal device located in the same local area network and / or a device with the same device type identifier among bound terminal devices is determined as a target terminal device, and scene information of the target terminal device is obtained, and then it is determined whether the target terminal device is in the second scene based on the scene information.
[0119] Exemplarily, the mobile terminal receives a confirmation operation of the user inputting on the details page of the bedroom air conditioner to turn on the first scene control, wherein the device range identifier is set to 2 according to the user's selection on the device setting page, and then the control instruction of turning on the first scene carrying the air conditioner device type identifier is sent to the server. The server obtains the scene information of the air conditioner and / or the air conditioner in the bound device located in the same local area network, and then determines whether the air conditioner is in the second scene.
[0120] In some embodiments, the instruction to start the first scene includes all device identifiers. In response to the instruction to start the first scene, the scene information of the terminal devices and / or bound terminal devices in the same local area network is obtained, and then it is determined in turn whether the terminal devices are in the second scene.
[0121] Exemplarily, the mobile terminal receives a confirmation operation of the user inputting on the details page of the bedroom air conditioner to turn on the first scene control, wherein the device range identifier is set to 3 according to the user's selection on the device setting page, and then the control instruction of turning on the first scene carrying all device identifiers is sent to the server. The server obtains the scene information of the terminal device and / or the bound terminal device located in the same local area network, and then determines whether the terminal device is in the second scene in turn.
[0122] In some embodiments, a specific implementation of determining whether the terminal device is in the second scene may include: obtaining a scene mutual exclusion table corresponding to the first scene and scene information of the terminal device, wherein the scene mutual exclusion table includes at least one second scene. The second scene includes scenes other than the first scene. The second scene may be a scene mutually exclusive with the first scene. The second scene may also be a scene different from the first scene. Exemplarily, the sleeping scene is mutually exclusive with the party scene.
[0123] If the scene information of the terminal device is empty, it can be determined that the terminal device is neither in the second scene nor in the first scene. Among them, the scene information being empty indicates that the terminal device has not started any scene. If the scene information of the terminal device is not empty, and the scene information of the terminal device is the second scene, it is determined that the terminal device is in the second scene. If the scene information of the terminal device is not empty, and the scene information of the terminal device is the first scene, it is determined that the terminal device is in the first scene.
[0124] In some embodiments, after receiving the instruction to open the first scene, it is determined whether the terminal device supports opening the first scene, and if the terminal device supports opening the first scene, it is determined whether the terminal device is in the second scene. If the terminal device does not support opening the first scene, it is not necessary to perform the steps of determining whether the terminal device is in the second scene and opening the first scene.
[0125] The specific implementation of determining whether the terminal device supports opening the first scene may include: obtaining a supported scene of the terminal device, determining whether the supported scene is the same as the first scene, and if the supported scene is the same as the first scene, the terminal device supports opening the first scene. If the supported scene is different from the first scene, the terminal device does not support opening the first scene.
[0126] In the embodiment of the present application, when the terminal device does not support the first scene, there is no need to switch the scene of the terminal device, thereby avoiding the situation where the current scene of the terminal device is unexpectedly terminated due to failure to support scene activation.
[0127] If the terminal device is in the second scene, execute step S103: send an instruction to close the second scene to the terminal device, and send an instruction to open the first scene to the terminal device, and change the owner of the initial state information from the second scene to the first scene.
[0128] Among them, the instruction to close the second scene is used to make the terminal device close the second scene. The instruction to open the first scene is used to make the terminal device run according to the operating parameters corresponding to the first scene. When the terminal device is in the second scene, the owner of the initial state information in the server can be the second scene, that is, the ownerSceneID is SceneB, and the initial state information is set to valid, that is, valid=1. The initial state information includes the operating parameters of the terminal device before the scene is opened for the first time. The owner of the initial state information is the second scene, allowing the second scene and its opening interface and closing interface to call the initial state information, while the first scene and its opening interface and closing interface cannot call the initial state information at this time.
[0129] After the server sends the instruction to close the second scene to the terminal device, or receives the status information uploaded by the terminal device to close the second scene, the server sets the initial state information to invalid, that is, valid = 0, and the owner of the initial state information is still the second scene. valid = 1 indicates that the initial state information is valid, and valid = 0 indicates that the initial state information is invalid.
[0130] Before sending the instruction to close the second scene to the terminal device, the server records the name of the closed scene, that is, the name of the second scene.
[0131] In some embodiments, if the terminal device is in the second scene, a prompt page may be displayed, where the prompt page is used to prompt the user that the second scene is running and whether to switch scenes.
[0132] For example, in Figure 3 In the device details page, if the pet cooling scene has been activated, after receiving the user's confirmation operation for the second scene activation control, the following display can be displayed: Figure 8 The prompt page shown. The prompt page includes prompt information 81, a yes control 82 and a no control 83. Prompt information 81 prompts whether the pet cooling is in operation and whether to switch scenes. If the user confirms the yes control 82, the operation corresponding to the control instruction for opening the first scene continues to be executed, that is, the instruction for closing the second scene is sent to the terminal device, so that the terminal device closes the second scene. If the user confirms the no control 83, the operation corresponding to the control instruction for opening the first scene is terminated, that is, the instruction for closing the second scene is not sent to the terminal device.
[0133] In some embodiments, when the terminal device is in the second scene, the owner of the initial state information can be directly changed from the second scene to the first scene, that is, the ownerSceneID is changed from SceneB to SceneA.
[0134] In some embodiments, after sending an instruction to close the second scene to the terminal device, it is determined whether there is initial state information in the database; if the initial state information does not exist in the database, the operating parameters of the terminal device before receiving the instruction to open the first scene are recorded as the initial state information, and the owner of the initial state information is marked as the first scene, and the initial state information is set to valid.
[0135] Among them, the absence of initial state information in the database indicates that the initial state information of the second scene is lost or the initial state information is not saved when the second scene is turned on, that is, the second scene does not enable the recording initial state module, and it is necessary to record the operating parameters of the terminal device as the initial state information before receiving the instruction to turn on the first scene, and save it in the database, and mark the owner of the initial state information as the first scene. The recording initial state module can record mutually exclusive scenes when there are mutually exclusive scenes, and save or update the initial state information.
[0136] If the initial state information exists in the database, determine whether the initial state information is valid. Whether the initial state information is valid indicates whether the initial state information can be used. If the initial state information is invalid, determine whether the owner of the initial state information is the recorded second scene. The second scene is recorded by the server before sending an instruction to close the second scene to the terminal device. If the owner of the initial state information is the second scene, change the owner of the initial state information from the second scene to the first scene, and set the initial state information to be valid.
[0137] Among them, the initial state information exists in the database and the owner of the initial state information is the second scene, which means that the initial state information is saved when the second scene is turned on. It is only necessary to change the owner of the initial state information from the second scene to the first scene.
[0138] If the owner of the initial state information is not the second scene, the operating parameters of the terminal device before receiving the instruction to start the first scene are recorded as the initial state information, and the owner of the initial state information is marked as the first scene.
[0139] Among them, the initial state information exists in the database and the owner of the initial state information is not the second scene, indicating that the initial state information is not recorded or inherited when the second scene is turned on. It may be that an error occurs in the initial state information. All fields can be updated, that is, the operating parameters of the terminal device before receiving the instruction to turn on the first scene are recorded as the initial state information, and the owner of the initial state information is marked as the first scene. The initial state information is set to be valid, which can prevent the first scene from inheriting the wrong initial state information.
[0140] If the terminal device is not in the second scene, execute step S104: send an instruction to start the first scene to the terminal device; record the operating parameters of the terminal device before receiving the instruction to start the first scene as initial state information, and mark the owner of the initial state information as the first scene.
[0141] It should be noted that if the terminal device is in the first scene, there is no need to send an instruction to turn on the first scene. When the terminal device is not in the second scene, it can be assumed that the terminal device is not in any scene. Even if the user sends an instruction to turn on the first scene after the terminal device is in the first scene in a certain way, it can be determined whether the terminal device is in the first scene after receiving the instruction to turn on the first scene. If it is in the first scene, no operation related to the scene switch is performed. If it is not in the first scene, a step of determining whether the terminal device is in the second scene can be performed. It is also possible to determine whether the terminal device is in the first scene after the terminal device is not in the second scene. If it is in the first scene, no operation related to the scene switch is performed. If it is not in the first scene, an instruction to turn on the first scene is sent to the terminal device, and the operating parameters of the terminal device before receiving the instruction to turn on the first scene are recorded as initial state information, and the owner of the initial state information is marked as the first scene.
[0142] In some embodiments, if the terminal device is not in the second scene, that is, the terminal device is not in any scene, it can be determined whether there is initial state information in the database; if there is no initial state information in the database, the operating parameters of the terminal device before receiving the instruction to start the first scene are recorded as the initial state information, and the owner of the initial state information is marked as the first scene.
[0143] If the initial state information exists in the database, determine whether the initial state information is valid. If the initial state information is invalid, determine whether the owner of the initial state information is the recorded closing scene. Since the terminal device is not in the second scene, the recorded closing scene is empty, so the owner of the initial state information is not the recorded scene. If the owner of the initial state information is not the recorded closing scene, the initial state information of the terminal device is recorded, and the owner of the initial state information is set to the first scene.
[0144] In some embodiments, a specific implementation method of recording the operating parameters of a terminal device before receiving an instruction to start a first scene as initial state information may include: obtaining a partner identifier (PartnerId), a category identifier (CategoryCode) and / or a product identifier (ProductCode) of the terminal device, and then searching for the operating parameter name corresponding to the partner identifier, the category identifier and / or the product identifier in the scene initialization configuration table, and finally recording the parameter value corresponding to the operating parameter name of the terminal device. The initial state information includes the operating parameter name and the specific parameter value of the corresponding terminal device.
[0145] Exemplarily, the scene initialization configuration table is shown in Table 1.
[0146] Table 1
[0147] Partner Logo Category Identification Product Identification Run parameter name 111 XXX Power Status 111 XXX Setting the temperature 111 XXX Wind speed 222 YYY abcd Power Status 222 YYY abcd brightness
[0148] The partner ID is 111, and the category ID is XXX, and the corresponding operating parameter names are power state, set temperature, and wind speed. The power state, set temperature, and wind speed of the terminal device can be recorded as initial state information.
[0149] The terminal device can report a variety of status information to the server and save it by the server, but not all status information is required for the initial status information. Therefore, setting the required initial status information for each device and saving it to the scene initialization configuration table helps avoid storing data in the initial status information, which can reduce irrelevant data interference and space occupancy.
[0150] In some embodiments, after the owner of the initial state information is changed from the second scene to the first scene, it can be determined whether the terminal device supports the first scene. If the terminal device supports the first scene, an instruction to open the first scene is sent to the terminal device. If the terminal device does not support the first scene, there is no need to send an instruction to open the first scene to the terminal device, and display / play a prompt message, which is used to prompt the user that the terminal device specified does not support the first scene.
[0151] In the embodiment of the present application, when the terminal device does not support the first scene, the second scene previously running can be closed to prevent the second scene running on the terminal device from affecting the running effect of the first scene on other terminal devices.
[0152] In some embodiments, the flowchart of scene opening can be as follows Fig. 9As shown. After the server receives the user's instruction to open the scene, it calls the scene opening interface, pre-checks to determine whether the device supports the operation of this scene, and then needs to close the mutually exclusive scene with the current scene. To close the mutually exclusive scene, it is necessary to first determine whether the mutually exclusive scene with the current scene is turned on. If the mutually exclusive scene with the current scene is not turned on, there is no need to execute the closing of the mutually exclusive scene. If the mutually exclusive scene with the current scene is turned on, the turned-on mutually exclusive scene is recorded, and the interface is called to close the mutually exclusive scene. At this time, the initial state information is invalid. After closing the mutually exclusive scene, the initial state information is recorded. Among them, recording the initial state information requires first determining whether there is corresponding data in the database. If there is no corresponding data, insert the data, that is, record the initial state information and set its owner to the current scene. If there is corresponding data, determine whether the initial state information is valid. If valid, only set the owner of the initial state information to the current scene. If invalid, determine whether the owner of the initial state information is the previously recorded closed scene. If the owner of the initial state information is the previously recorded closed scene, mark the owner of the initial state information as the current scene, and set the initial state information to valid. If the owner of the initial state information is not the previously recorded closed scene, update all fields, that is, record the initial state information, mark its owner as the current scene and set the initial state information to be valid.
[0153] Step S105: receiving an instruction to close the first scene.
[0154] In some embodiments, an instruction to close the first scene sent by the mobile terminal is received. After the mobile terminal starts the first scene of the terminal device, the scene details page may display a close control. After receiving the user's confirmation operation on the close control, an instruction to close the first scene of the terminal device is generated, and the instruction to close the first scene is sent to the server.
[0155] In some embodiments, after starting the first scene of the terminal device, the mobile terminal receives an instruction set by the user to close the first scene of the terminal device at a specified time, starts a timer, generates an instruction to close the first scene of the terminal device after the timer reaches the time specified by the user, and sends the instruction to close the first scene to the server.
[0156] In some embodiments, an instruction to close the first scene is received from a terminal device. The instruction to close the first scene may be a voice instruction to close the first scene. The terminal device sends the collected user voice to the server, the server recognizes the user voice, and issues a corresponding control instruction to the specified terminal device. The user voice may be "please turn off the sleep scene mode", "please turn off the sleep scene mode of all air conditioners", or "please turn off the sleep scene mode of all devices in the house".
[0157] Step S106: Sending a command to close the first scene to the terminal device, and calling the initial state information held by the first scene to generate and send a state recovery command to the terminal device, so that the terminal device runs with the operating parameters of the initial state information. The command to close the first scene is used to make the terminal device close the first scene.
[0158] In some embodiments, the instruction to close the first scene does not include a source identifier, and after receiving the instruction to close the first scene, in response to the instruction to close the first scene, the initial state information held by the first scene is directly called.
[0159] In other embodiments, the instruction to close the first scene includes a source identifier, and the source identifier is used to characterize the sender of the instruction to close the first scene. After receiving the instruction to close the first scene, the source identifier in the instruction to close the first scene is obtained. The source identifier represents that the instruction to close the first scene is sent from the mobile terminal, and in response to the instruction to close the first scene, the instruction to close the first scene is sent to the terminal device, and the initial state information held by the first scene is called to generate and send a state recovery instruction to the terminal device. The source identifier represents that the instruction to close the first scene is sent from the terminal device, and in response to the instruction to close the first scene, the instruction to close the first scene is sent to the terminal device, and the initial state information held by the first scene is not called to generate a state recovery instruction.
[0160] Among them, the source identifier (SourceType) in the instruction to close the first scene is obtained. If the source identifier of the instruction to close the first scene is an application (APP), that is, SourceType = APP, it is determined that the instruction to close the first scene is sent from the mobile terminal. If the source identifier of the instruction to close the first scene is not the APP end, that is, SourceType≠APP, it is determined that the instruction to close the first scene is sent from the terminal device.
[0161] In some embodiments, if the instruction to close the first scene comes from the mobile terminal, it is determined whether the close flag is a preset value, and if the close flag is a preset value, a shutdown instruction is sent to the terminal device. Figure 5 As shown, upon receiving the user's confirmation operation on the closing setting control 55 in the scene setting page, the closing flag can be set to a preset value. The closing flag being the preset value indicates that the terminal device is closed when the scene is closed.
[0162] If the closing flag is not a preset value, determine whether the first scene has corresponding initial state information, if not, send a closing first scene instruction to the terminal device. If yes, generate a state recovery instruction based on the initial state information, and send the state recovery instruction to the terminal device.
[0163] When a user closes a scene through a terminal device, it may not be necessary to restore the initial state. For example, when a user turns off the current scene of the air conditioner by inputting a voice command to the air conditioner, the server can directly issue a command to close the scene after receiving the close command. The embodiment of the present application can perform a state recovery operation when the command to close the scene comes from a mobile terminal, and not perform a state recovery operation when the command to close the scene comes from a terminal device. The solution provided by the present application can limit whether to perform a state recovery operation based on the source of the scene closing command, identify whether it is an interruption of the user's autonomous behavior, and thus accurately identify the scenario that needs to be restored to the initial state.
[0164] The specific implementation method of calling the initial state information held by the first scene to generate a state recovery instruction may include: obtaining a state instruction conversion table, the state instruction conversion table including the correspondence between the operating parameter name and the state instruction; assembling the parameter value in the initial state information into the state instruction corresponding to the state name of the operating parameter value to obtain the state recovery instruction.
[0165] After sending a status recovery instruction to the terminal device, or receiving a status recovery message sent by the terminal device, the server sets the initial status information to invalid.
[0166] In some embodiments, the scene closing process can be as follows Fig.10 As shown. After the server receives the user's instruction to close the scene, it calls the scene closing interface, pre-checks to determine whether the device supports the operation of this scene, and then determines whether the instruction source identifier is the APP side. If it is not the APP side, the scene closing operation is performed, that is, the initial state is not restored. If it is the APP side, the device scene configuration is read to determine whether to shut down after closing the scene. If so, a shutdown instruction is sent to the terminal device. If not, it is determined whether the initial state information is obtained; if not, the scene closing operation is performed. If obtained, it is determined whether the initial state information is valid. If invalid, the scene closing operation is performed. If valid, a state recovery instruction is sent to the terminal device, and the initial state information is set to invalid.
[0167] The embodiment of the present application can automatically restore the device to its original state after switching multiple scenes, simplifying user operations and avoiding the trouble of frequent manual adjustments of the device. This intelligent function significantly improves the user experience and ensures the stability and reliability of the system when frequently using scene switching. In addition, the embodiment of the present application is applicable to various smart home devices, has both versatility and scalability, and adapts to the control requirements of different devices and scenes.
[0168] In some embodiments, the timing diagram of the terminal device control method can be as follows: Fig.11As shown. The server includes a scene opening interface and a scene closing interface of the first scene, and a database. The scene opening interface includes a recording initial state module. The scene closing interface includes a restoring initial state module. The terminal device uploads the state information to the database of the server in real time. The state information includes scene information and operating parameters. After receiving the instruction to open the first scene sent by the mobile terminal or the terminal device, the server calls the scene opening interface. The recording initial state module of the scene opening interface obtains the scene information from the database and determines whether the terminal device is in the second scene. The first scene and the second scene are mutually exclusive. If the terminal device is in the second scene, an instruction to close the second scene is sent to the terminal device so that the terminal device closes the second scene, an instruction to open the first scene is sent to the terminal device so that the terminal device opens the first scene, and the owner of the initial state information is changed from the second scene to the first scene. Wherein, when the terminal device is in the second scene, the owner of the initial state information is the second scene, which is saved to the database. If the terminal device is not in the second scene, an instruction to open the first scene is sent to the terminal device so that the terminal device opens the first scene, and the operating parameters of the terminal device before receiving the instruction to open the first scene are recorded as the initial state information and its owner is set to the first scene. The server sends an instruction to start the first scene to the terminal device, so that the terminal device starts the first scene.
[0169] After receiving the instruction to close the first scene sent by the mobile terminal or terminal device, the server calls the scene closing interface, and the initial state recovery module of the scene closing interface determines whether the instruction to close the first scene comes from the mobile terminal. If the instruction to close the first scene comes from the mobile terminal, the instruction to close the first scene is sent to the terminal device so that the terminal device closes the first scene, and then the initial state information held by the first scene is called to generate a state recovery instruction, and the state recovery instruction is sent to the terminal device so that the terminal device executes the operation corresponding to the state recovery instruction, so that the terminal device runs with the operating parameters before the scene is first opened. If the instruction to close the first scene does not come from the mobile terminal, that is, it comes from the terminal device, the instruction to close the first scene is sent to the terminal device so that the terminal device closes the first scene, and the step of calling the initial state information held by the first scene to generate a state recovery instruction is not performed.
[0170] In some embodiments, the components or modules for recording the initial state information and restoring the initial state can be conveniently embedded in each scene opening and closing interface, thereby transforming the existing business at a low cost. In actual applications, some new scene opening interfaces are embedded in the recording initial state module, referred to as the new opening interface, and the scene closing interface is embedded in the restoration initial state module, referred to as the new closing interface. However, some old scene opening interfaces are not embedded in the recording initial state module, referred to as the old opening interface, and the scene closing interface is not embedded in the restoration initial state module, referred to as the old closing interface.
[0171] like Fig.12 As shown in case (a), after receiving the command to open the new 1 scene, the new 1 scene opening interface records the initial state information (Pre) and the owner is the new 1 scene. After receiving the command to open the new 2 scene, after judging the state of the new 2 scene opening interface, the new 1 scene is closed and the initial state information of the new 1 scene is inherited, that is, the owner of the initial state information is the new 2 scene. After receiving the command to close the new 2 scene, the initial state of the device is restored according to the initial state information, and the initial state information is invalidated.
[0172] like Fig.12 As shown in case (b), after receiving the command to open the new scene, the new scene opening interface records the initial state information (Pre) and the owner is the new scene. After receiving the command to open the old scene, the closing interface of the new scene is not called. After receiving the command to close the old scene, the logic of closing the old scene is executed.
[0173] like Fig.12 As shown in case (c), after receiving the instruction to open the old scene, the old opening interface does not record the initial state information. After receiving the instruction to open the new 1 scene, the new 1 scene opening interface records the initial state information (Pre) and the owner is the new 1 scene. After receiving the instruction to close the new 1 scene, the initial state of the device is restored according to the initial state information, and the initial state information is invalidated.
[0174] like Fig.12 As shown in case (d), after receiving the command to open the new 1 scene, the new 1 scene opening interface records the initial state information (Pre) and the owner is the new 1 scene. After receiving the command to open the old scene, the closing interface of the new 1 scene is not called. After receiving the command to open the new 2 scene, after judging the state of the new 2 scene opening interface, the old scene is closed and the initial state information of the new 1 scene is inherited. After receiving the command to close the new 2 scene, the initial state of the device is restored according to the initial state information, and the initial state information is invalidated.
[0175] like Fig.12 As shown in case (e), after receiving the instruction to open the new 1 scene, the new 1 scene opening interface records the initial state information and the owner is the new 1 scene. After receiving the user instruction, the new 1 scene interruption rule is hit to close the new 1 scene, and the initial state information is invalidated. After receiving the instruction to open the new 2 scene, the new 2 scene opening interface records the initial state information of the new 2 scene and the owner is the new 2 scene. After receiving the instruction to close the new 2 scene, the initial state of the device is restored according to the initial state information, and the initial state information is invalidated.
[0176] The solution provided by the embodiment of the present application realizes the automatic recovery function of the device state after multiple scene switching by recording and managing the initial state of the device. Unlike the traditional method of restoring the device state only in a single scene, the present invention can intelligently identify the scene end state when multiple scenes are switched, and automatically restore the device to its initial state after finally exiting the last scene mode. This improvement effectively solves the problem of device state recovery when switching complex scenes by enhancing the system's state tracking and judgment capabilities, and significantly improves the intelligence level and stability of the system.
[0177] Some embodiments of the present application also provide a computer-readable storage medium, which may store a program. When the computer storage medium is configured in a display device or a server, the program may include the program steps involved in the terminal device control method in the above embodiment when the program is executed. Among them, the computer storage medium may be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0178] The embodiment of the present application provides an electronic device, which includes: a processor and a memory for storing processor executable instructions. The processor is used to read the executable instructions from the memory and execute the instructions to implement the terminal device control method in the above embodiment.
[0179] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0180] For ease of explanation, the above description has been made in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are intended to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various different variations of the embodiments suitable for specific use considerations.
Claims
1. A server, characterized in that: include: A communication module, configured to establish a communication connection with a mobile terminal and a terminal device; The processing module is configured as follows: Receiving an instruction to start the first scene sent by the mobile terminal; When the terminal device is not in the second scene, sending an instruction to start the first scene to the terminal device; recording the operating parameters of the terminal device before receiving the instruction to start the first scene as initial state information, and marking the owner of the initial state information as the first scene, wherein the second scene includes scenes other than the first scene, and the instruction to start the first scene is used to make the terminal device run according to the operating parameters corresponding to the first scene; When the terminal device is in the second scene, sending an instruction to close the second scene to the terminal device, and sending an instruction to open the first scene to the terminal device, and changing the owner of the initial state information from the second scene to the first scene; wherein the initial state information includes the operating parameters of the terminal device before the scene is opened for the first time, and the instruction to close the second scene is used to make the terminal device close the second scene; receiving an instruction to close the first scene; An instruction to close the first scene is sent to the terminal device, and the initial state information held by the first scene is called to generate and send a state recovery instruction to the terminal device, so that the terminal device runs with the operating parameters of the initial state information, and the instruction to close the first scene is used to make the terminal device close the first scene.
2. The server according to claim 1, characterized in that: The instruction to close the first scene includes a source identifier, the processing module executes sending the instruction to close the first scene to the terminal device, and calls the initial state information held by the first scene to generate and send a state recovery instruction to the terminal device, and is further configured as follows: The source identifier indicates that the instruction to close the first scene is sent from the mobile terminal, and in response to the instruction to close the first scene, the instruction to close the first scene is sent to the terminal device, and the initial state information held by the first scene is called to generate and send a state recovery instruction to the terminal device; The source identifier represents that the instruction to close the first scene is sent from the terminal device, and in response to the instruction to close the first scene, the instruction to close the first scene is sent to the terminal device, and the initial state information held by the first scene is not called to generate a state recovery instruction.
3. The server according to claim 1, characterized in that: Before executing and sending the instruction for closing the second scene to the terminal device, the processing module is further configured to: recording the second scene; The processing module executes changing the owner of the initial state information from the second scene to the first scene, and is further configured to: If the initial state information exists in the database, determining whether the owner of the initial state information is the recorded second scene; If the owner of the initial state information is the recorded second scene, the owner of the initial state information is changed from the second scene to the first scene.
4. The server according to claim 3, characterized in that: After executing and sending the instruction for starting the first scene to the terminal device, the processing module is further configured to: If the initial state information does not exist in the database, or the owner of the initial state information is not the recorded second scene, the operating parameters of the terminal device before receiving the instruction to start the first scene are recorded as the initial state information, and the owner of the initial state information is marked as the first scene.
5. The server according to claim 1, characterized in that: The processing module executes recording the operating parameters of the terminal device before receiving the instruction to start the first scene as the initial state information, and is further configured to: Obtaining a partner identifier, a category identifier and / or a product identifier of the terminal device; Searching for an operation parameter name corresponding to the partner identifier, the category identifier and / or the product identifier in a scenario initialization configuration table; The parameter values corresponding to the operating parameter names of the terminal device are recorded as initial state information.
6. The server according to claim 1, characterized in that: The processing module executes calling the initial state information held by the first scene to generate a state recovery instruction, and is further configured to: Acquire a status instruction conversion table, wherein the status instruction conversion table includes a correspondence between an operation parameter name and a status instruction; The parameter values in the initial state information are assembled into the state instructions corresponding to the operating parameter names of the parameter values to generate state recovery instructions.
7. A mobile terminal, characterized in that: include: monitor; A device details page configured to display terminal devices; A controller is coupled to the display and is configured to: After receiving a confirmation operation on the start control of the first scene in the device details page, sending an instruction to start the first scene to the server; the server sends an instruction to start the first scene to the terminal device when the terminal device is not in the second scene; recording the operating parameters of the terminal device before receiving the instruction to start the first scene as initial state information, and marking the owner of the initial state information as the first scene, wherein the second scene includes scenes other than the first scene, and the instruction to start the first scene is used to make the terminal device run according to the operating parameters corresponding to the first scene; the server sends an instruction to close the second scene to the terminal device when the terminal device is in the second scene, and sends an instruction to start the first scene to the terminal device, and changes the owner of the initial state information from the second scene to the first scene; wherein the initial state information includes the operating parameters of the terminal device before the scene is started for the first time, and the instruction to close the second scene is used to make the terminal device close the second scene; After receiving a confirmation operation on the close control of the first scene in the device details page, an instruction to close the first scene is sent to the server; the server sends an instruction to close the first scene to the terminal device, so that the terminal device closes the first scene; the initial state information held by the first scene is called to generate and send a state recovery instruction to the terminal device, so that the terminal device runs with the operating parameters of the initial state information.
8. A terminal device control method, characterized in that: Applicable to servers, including: Receiving an instruction to start the first scene sent by the mobile terminal; When the terminal device is not in the second scene, sending an instruction to start the first scene to the terminal device; recording the operating parameters of the terminal device before receiving the instruction to start the first scene as initial state information, and marking the owner of the initial state information as the first scene, wherein the second scene includes scenes other than the first scene, and the instruction to start the first scene is used to make the terminal device run according to the operating parameters corresponding to the first scene; When the terminal device is in the second scene, sending an instruction to close the second scene to the terminal device, and sending an instruction to open the first scene to the terminal device, and changing the owner of the initial state information from the second scene to the first scene; wherein the initial state information includes the operating parameters of the terminal device before the scene is opened for the first time, and the instruction to close the second scene is used to make the terminal device close the second scene; receiving an instruction to close the first scene; Sending an instruction to close the first scene to the terminal device, so that the terminal device closes the first scene; The initial state information held by the first scene is called to generate and send a state recovery instruction to the terminal device, so that the terminal device runs with the operating parameters of the initial state information.
9. A terminal device control method, characterized in that: Applied to mobile terminals, including: After receiving a confirmation operation on a start control of a first scene in a device details page, sending an instruction to start the first scene to a server; the server sending an instruction to start the first scene to the terminal device when the terminal device is not in a second scene; recording the operating parameters of the terminal device before receiving the instruction to start the first scene as initial state information, and marking the owner of the initial state information as the first scene, wherein the second scene includes scenes other than the first scene, and the instruction to start the first scene is used to make the terminal device run according to the operating parameters corresponding to the first scene; the server sending an instruction to close the second scene to the terminal device when the terminal device is in the second scene, and sending an instruction to start the first scene to the terminal device, and changing the owner of the initial state information from the second scene to the first scene; wherein the initial state information includes the operating parameters of the terminal device before the scene is started for the first time, and the instruction to close the second scene is used to make the terminal device close the second scene; After receiving a confirmation operation on the close control of the first scene in the device details page, an instruction to close the first scene is sent to the server; the server sends an instruction to close the first scene to the terminal device, so that the terminal device closes the first scene; the initial state information held by the first scene is called to generate and send a state recovery instruction to the terminal device, so that the terminal device runs with the operating parameters of the initial state information.