A method of switching a scenario mode and a related apparatus
Patent Information
- Application Number
- CN202510571027.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2026-10-30
AI Technical Summary
但是可能存在以下情况:电子设备在同一时刻满足多个条件,该多个条件可能对应同一情景模式,可能对应不同的情景模式
[0031]第二方面至第五方面的有益效果可以参考上述第一方面的有益效果。
Smart Images

Figure CN123011343A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a method and related apparatus for switching scene modes. Background Technology
[0002] To improve user focus, electronic devices can create scenario modes. These modes can be set with activation conditions that include one or more criteria. When these conditions are met, the device can automatically activate the corresponding scenario mode. However, it's possible that multiple conditions may be met simultaneously, potentially corresponding to the same scenario mode or different scenarios. Determining the appropriate scenario mode to use when multiple conditions are met simultaneously is a pressing problem in this field. Summary of the Invention
[0003] This application provides a method and related apparatus for switching scene modes. When the activation conditions of different scene modes are met simultaneously, the electronic device can reasonably select the scene mode to use, thereby avoiding confusion in scene mode switching.
[0004] In a first aspect, this application provides a method for switching scenario modes, characterized in that the method is applied to an electronic device, the electronic device being configured with a first scenario mode and a second scenario mode, the method comprising: when a first condition is detected to be met, activating the first scenario mode corresponding to the first condition; when a second condition is detected to be met while in the first scenario mode, switching from the first scenario mode to the second scenario mode corresponding to the second condition.
[0005] Specifically, electronic devices tend to use scenario modes that are triggered later. This allows the scenario modes activated by the electronic device to switch over time based on later-met conditions, rather than always using earlier-met conditions. This gives users a sense of flexibility in the scenario modes offered by the electronic device, thus improving the user experience.
[0006] By implementing the first aspect, electronic devices can rationally select the appropriate scenario mode when the activation conditions for different scenario modes are met simultaneously. This avoids user misunderstanding and better meets user expectations in activating or deactivating scenario modes.
[0007] In conjunction with the first aspect, in some embodiments, the single effective time of the second condition is later than the single effective time of the first condition. The single effective time of a condition is the moment when the electronic device detects a switch from not meeting the condition to meeting it. That is, the single effective time of a condition is related to the specific content included in the condition.
[0008] In conjunction with the first aspect, in some embodiments, after switching from the first scenario mode to the second scenario mode corresponding to the second condition, the method further includes: turning off the second scenario mode when the electronic device detects that the second condition is not met; determining whether the first condition is met; if the first condition is met, starting the first scenario mode; if the first condition is not met, not starting the first scenario mode. Examples can be found below. Figure 2A and Figure 2B The application scenarios shown.
[0009] In conjunction with the first aspect, in some embodiments, the electronic device further includes a third scenario mode. After switching from the first scenario mode to the second scenario mode corresponding to the second condition, the method further includes: when the electronic device detects that the second condition is not met, turning off the second scenario mode; determining whether the first condition or the condition associated with the third scenario mode is met; and determining whether to activate the first scenario mode or the third scenario mode based on the determination of the first condition and the condition associated with the third scenario mode. Examples can be found in the following... Figures 4A-4B The application scenarios shown.
[0010] In conjunction with the first aspect, in some embodiments, the conditions associated with the third scenario mode include a third condition. Determining whether to activate the first scenario mode or the third scenario mode based on the judgment of the conditions associated with the first condition and the third scenario mode specifically includes: activating the first scenario mode if the third condition is not met but the first condition is met; activating the third scenario mode if the first condition is not met but the third condition is met; activating the third scenario mode if both the first and third conditions are met simultaneously, determining the single effective time of the third condition and the single effective time of the first condition; activating the third scenario mode if the single effective time of the third condition is later than the single effective time of the first condition; and activating the first scenario mode if the single effective time of the first condition is later than the single effective time of the third condition.
[0011] In conjunction with the first aspect, in some embodiments, the electronic device is further provided with at least one other scenario mode. After switching from the first scenario mode to the second scenario mode corresponding to the second condition, the method further includes: turning off the second scenario mode when the electronic device detects that the second condition is not met; determining whether the first condition or the conditions associated with the other scenario mode are met; and determining whether to start the first scenario mode or the other scenario mode based on the determination of the first condition and the conditions associated with the other scenario mode.
[0012] In conjunction with the first aspect, in some embodiments, determining whether to activate the first scenario mode or other scenario modes based on the judgment of the first condition and conditions associated with other scenario modes specifically includes: if the first condition is met but the conditions associated with other scenario modes are not met, activating the first scenario mode; if the first condition is not met but the fourth condition is met, deactivating the second scenario mode and activating the fourth scenario mode, wherein the fourth scenario mode is one of the other scenario modes, and the fourth condition is one of the conditions associated with the fourth scenario mode; if the first condition is met and at least one of the conditions associated with other scenario modes is met simultaneously, or the first condition is not met but at least two of the conditions associated with other scenario modes are met, determining the latest effective condition based on the single effective time of the first condition and at least one of the conditions associated with other scenario modes, and activating the scenario mode corresponding to the latest effective condition, wherein the scenario mode corresponding to the latest effective condition is one of the first scenario mode or other scenario modes.
[0013] In one possible implementation, when an electronic device closes a scenario mode based on unmet conditions, it tends to restore a previously used scenario mode. This ensures that the scenario mode used by the electronic device better matches the set activation conditions, increasing the success rate of matching activation conditions with the corresponding scenario mode. Instead of simply waiting for new conditions to trigger the scenario mode's activation after closing it, the device gives the user the impression that it accurately activates the scenario mode based on the activation conditions, thus improving the user experience.
[0014] In conjunction with the first aspect, in some embodiments, after switching from the first scenario mode to the second scenario mode corresponding to the second condition, the method further includes: when the electronic device meets the second condition and is in the second scenario mode, detecting a first operation by a user to initiate a third scenario mode; and in response to the first operation, switching from the second scenario mode to the third scenario mode. For example, refer to the following... Figure 5A The application scenarios shown.
[0015] In one possible implementation, user actions reflect the user's more subjective desires, and electronic devices tend to prioritize fulfilling these actions. For example, after a user actively activates a particular scenario mode, they become more focused on that mode and are less likely to revert to previously used scenarios.
[0016] In conjunction with the first aspect, in some embodiments, after switching from the second scenario mode to the third scenario mode in response to the first operation, the method further includes: detecting that a third condition is not met while the electronic device is in the third scenario mode, and turning off the third scenario mode corresponding to the third condition; and / or detecting and turning off the third scenario mode in response to a user's operation to turn off the third scenario mode. For example, refer to the following... Figure 5B The application scenarios shown.
[0017] In conjunction with the first aspect, in some embodiments, the electronic device is further provided with at least one other scenario mode. After switching from the second scenario mode to the third scenario mode in response to the first operation, the method further includes: after the electronic device switches to the third scenario mode, detecting a condition corresponding to another scenario mode that is satisfied; and determining whether to switch to using another scenario mode based on the judgment of the conditions associated with the other scenario mode.
[0018] In conjunction with the first aspect, in some embodiments, determining whether to switch to another scenario mode based on the judgment of conditions associated with other scenario modes specifically includes: if the single effective time of the conditions corresponding to the other scenario modes is all before the detection of the first operation, then the switch to another scenario mode is not made; if the single effective time of the fifth condition is after the detection of the first operation, then the electronic device is switched to the scenario mode corresponding to the fifth condition, wherein the fifth condition is the latest single effective time among the conditions associated with other scenario modes. This makes the logic for triggering the start or stop of a scenario mode more complete and improves the user experience.
[0019] In conjunction with the first aspect, in some embodiments, after switching from the first scenario mode to the second scenario mode corresponding to the second condition, the method further includes: when the electronic device meets the second condition and is in the second scenario mode, detecting a second operation by the user to close the second scenario mode; and in response to the second operation, closing the second scenario mode.
[0020] In one possible implementation, after a user actively disables a particular scenario mode, they may not want to use any scenario mode at that moment and would prefer not to revert to the previously used scenario mode. This makes the electronic device more considerate of the user's actual needs.
[0021] In conjunction with the first aspect, in some embodiments, after the second scenario mode is turned off, the method further includes: detecting a satisfied third condition when the electronic device turns off the second scenario mode, and activating the third scenario mode corresponding to the third condition. For example, refer to the following... Figure 5C The application scenarios shown.
[0022] In conjunction with the first aspect, in some embodiments, the electronic device further includes at least one other scenario mode. After the second scenario mode is turned off, the method further includes: detecting conditions corresponding to other scenario modes that are met when the electronic device turns off the second scenario mode; and determining whether to activate other scenario modes based on the judgment of the conditions associated with the other scenario modes. This makes the logic for triggering the activation or deactivation of scenario modes more complete and improves the user experience.
[0023] In conjunction with the first aspect, in some embodiments, determining whether to activate other scenario modes by judging the conditions associated with the other scenario modes specifically includes: if the single effective time of the conditions corresponding to the other scenario modes is all before the detection of the second operation, then the other scenario modes are not activated; if the single effective time of the sixth condition is after the detection of the second operation, then the electronic device is switched to the scenario mode corresponding to the sixth condition, wherein the sixth condition is the condition with the latest single effective time among the conditions associated with the other scenario modes.
[0024] In one possible implementation, for a more rational design, electronic devices do not solely consider user actions. They do not indefinitely use a scenario mode after the user actively activates it, nor do they indefinitely stop using any scenario mode after the user actively deactivates it. Instead, the electronic device can normally detect whether conditions are met and trigger the activation or deactivation of the scenario mode after user action. This makes the logic for triggering scenario mode activation or deactivation more complete and improves the user experience.
[0025] In conjunction with the first aspect, in some embodiments, the first condition includes one or more of the following: the current time belongs to a first time period, the electronic device is located at a first location, a first application in the electronic device is in a first state, and the user is in a first state. The activation condition can include conditions of multiple dimensions. For example, the activation condition can include one or more of the following: time condition, location condition, application state condition, user state condition, etc. For example, the time condition includes a time period. The location condition includes a location range. The application state condition includes the application name. The user state condition is a condition determined based on the user's state; for example, the user state condition includes sleep state and exercise state.
[0026] In conjunction with the first aspect, in some embodiments, the scenario modes set in the electronic device include one or more of the following: Do Not Disturb mode, Sleep mode, Study mode, Work mode, Sports mode, Game mode, Audio-visual mode, Driving mode, and Consumption mode. Scenario modes can be activated or deactivated based on user operation or based on activation conditions. After activating a scenario mode, the electronic device can adjust system functions to allow the user to fully immerse themselves in the scenario, improving user concentration.
[0027] In a second aspect, this application provides an electronic device including a memory, a processor, and computer instructions stored in the memory, wherein the processor executes the computer program to implement the method described in the first aspect or any embodiment of the first aspect.
[0028] Thirdly, this application provides a chip system including a processing circuit and an interface circuit. The interface circuit is used to receive code instructions and transmit them to the processing circuit. The processing circuit is used to allow the code instructions to execute the method described in the first aspect or any embodiment of the first aspect.
[0029] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run on a processor, implements the method described in the first aspect or any of the embodiments of the first aspect.
[0030] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when run on a processor, implements the method described in the first aspect or any of the embodiments of the first aspect.
[0031] The beneficial effects of aspects two through five can be referenced from the beneficial effects of aspect one above. Attached Figure Description
[0032] Figure 1 A schematic diagram of a scenario where multiple conditions for switching scenario modes are included in the activation conditions of scenario mode A, provided for an embodiment of this application;
[0033] Figure 2A This is a schematic diagram illustrating a scenario where an electronic device switches between two scene modes when it is in scene two, as provided in an embodiment of this application.
[0034] Figure 2B A schematic diagram illustrating the switching between two scenario modes when an electronic device is in scenario two, as provided in an embodiment of this application.
[0035] Figures 3A-3D A schematic diagram illustrating the switching between three scenario modes when several electronic devices are in scenario two, as provided in the embodiments of this application;
[0036] Figure 3E This is a schematic diagram illustrating a scenario where an electronic device switches between two scene modes when it is in scene two, as provided in an embodiment of this application.
[0037] Figure 4A A schematic diagram illustrating a scenario for activating a scenario mode based on user operation, provided as an embodiment of this application;
[0038] Figure 4BA schematic diagram illustrating another scenario for activating a scenario mode based on user operation, provided as an embodiment of this application;
[0039] Figure 4C A schematic diagram of a scenario for disabling a scenario mode based on user operation, provided as an embodiment of this application;
[0040] Figures 5A-5D Schematic diagrams of several methods for switching scenario modes provided in embodiments of this application;
[0041] Figures 6A-6D The user interface related to scenario modes provided in the embodiments of this application;
[0042] Figure 7A This is a schematic diagram of the internal module functions of an electronic device provided in an embodiment of this application;
[0043] Figure 7B This is an internal interaction flowchart for switching scenario modes provided in an embodiment of this application;
[0044] Figure 8 This is a flowchart illustrating a method for switching scenario modes provided in an embodiment of this application;
[0045] Figure 9 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;
[0046] Figure 10 This is a schematic diagram of the software structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0047] The technical solutions of the embodiments of this application are described below with reference to the accompanying drawings. In the description of the embodiments of this application, the terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to limit the application. As used in the specification and appended claims of this application, the singular expressions "a," "the," "the," "the," and "this" are intended to also include expressions such as "one or more," unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, "at least one" and "one or more" refer to one or more (including two). The term "and / or" is used to describe the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.
[0048] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. The term "connection" includes direct connections and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.
[0049] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0050] The term "user interface (UI)" used in the following embodiments of this application refers to the medium interface through which an application or operating system interacts and exchanges information with the user. It realizes the conversion between the internal form of information and the form that the user can accept. The user interface is source code written in a specific computer language such as Java or Extensible Markup Language (XML). The interface source code is parsed and rendered on the electronic device, ultimately presenting content that the user can recognize. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be visible interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets displayed on the screen of an electronic device.
[0051] First, let's introduce some terms and concepts involved in the embodiments of this application.
[0052] Scene modes refer to a type of mode that electronic devices can activate or deactivate during operation. Scene modes can be activated or deactivated based on user input or specific conditions. Once activated, a scene mode allows the electronic device to adjust system functions to enable the user to fully immerse themselves in the scenario, enhancing their focus. A scene mode can be understood as an operating mode of an electronic device. Scene modes include various types, such as Do Not Disturb mode, Sleep mode, Study mode, Work mode, Exercise mode, Game mode, Audio / Video mode, Driving mode, and Consumption mode.
[0053] In the embodiments of this application, "activating a scenario mode" can also be understood as the electronic device starting to use the scenario mode, the electronic device turning on the scenario mode, the electronic device entering the scenario mode, etc. "Closing a scenario mode" can also be understood as the electronic device stopping the use of the scenario mode, the electronic device exiting the scenario mode. "Being in a scenario mode" can also be understood as the electronic device using the scenario mode, the scenario mode being in an active state, etc. It is understood that activating or deactivating a scenario mode is an action performed by the electronic device at a certain moment, while being in a scenario mode is an action performed or a state experienced by the electronic device over a certain period of time. In the embodiments of this application, the above specific descriptions are not limited.
[0054] The configuration information for a scene mode indicates the functional settings of an electronic device when it is in that scene mode. When an electronic device activates a scene mode, the corresponding functions can be adjusted based on the configuration information of that scene mode. For example, the configuration information for a scene mode may include: activation conditions, allowed contacts for incoming calls, and allowed applications for notifications. Optionally, the configuration information for a scene mode may also include one or more of the following: whether to repeat the ringtone for incoming calls; whether to intelligently answer incoming calls; whether to enable smart experiences; and the association with other modes, such as whether to associate with dark mode, eye protection mode, power saving mode, etc.
[0055] In this embodiment of the application, the information included in the above configuration information is only for illustrative purposes and may include other more or less information, which is not limited thereto.
[0056] Activation conditions are used to automatically start or stop a scene mode. An activation condition for a scene mode can contain one or more conditions. Generally, disregarding the activation conditions of other scene modes, and focusing only on a single scene mode, if any one of the conditions is met, the electronic device can activate the scene mode corresponding to that activation condition; if none of the conditions are met, the electronic device can deactivate the scene mode corresponding to that activation condition.
[0057] Enabling conditions can include multiple dimensions. For example, enabling conditions can include one or more of the following: time conditions, location conditions, application status conditions, user status conditions, etc. For instance, time conditions include a time period. Location conditions include a location range. Application status conditions include the application name. User status conditions are based on the user's state; for example, user status conditions include sleep status and activity status.
[0058] For example, an electronic device can determine whether a time condition is met based on whether the current time falls within a time period; an electronic device can determine whether a location condition is met based on whether the current location falls within a location range; an electronic device can determine whether an application start / stop condition is met based on whether an application is currently running; an electronic device can determine whether a sleep condition is met based on whether the current user is in a sleep state; and an electronic device can determine whether a movement condition is met based on whether the current user is in a movement state.
[0059] In the embodiments of this application, the above-mentioned activation conditions are only illustrative examples. Activation conditions may also include conditions with more dimensions, and the conditions included in the activation conditions may have other more or fewer contents, which is not limited in this regard.
[0060] In some implementations, electronic devices can activate or deactivate scene modes. Specifically, the electronic device can determine whether to activate a scene mode and which scene mode to activate based on stored activation conditions. A scenario exists where the electronic device detects that activation condition m1 is met and activates scene mode M1 corresponding to condition m1. While activating scene mode M1, the electronic device also detects that activation condition n1 for another scene mode N1 is met, but activation condition m1 is still met at this point. In this case, the electronic device may still activate scene mode M1, ignoring the fulfillment of activation condition n1. That is, the electronic device may meet activation conditions for different scene modes at a given time, and it may maintain the previously activated scene mode. This could mislead the user: that activation condition n1 is met but scene mode N1 corresponding to condition n1 is not activated, resulting in a poor user experience.
[0061] To address the aforementioned problems, embodiments of this application provide a method for switching scenario modes. In this method, after an electronic device successfully activates a scenario mode based on one of the activation conditions, it records single-time related data for that condition. Single-time related data for a condition can be understood as: data related to a single successful activation of the scenario mode by the electronic device under that condition.
[0062] The single-time relevant data for a condition includes one or more of the following: the single-time effective time of the condition, the single-time ineffective time of the condition, and the single-time valid period of the condition. The single-time effective time of a condition refers to the moment when the scenario mode is successfully activated based on that condition, or it can be the moment when the electronic device detects a switch from not meeting the condition to meeting it. The single-time ineffective time of a condition refers to the moment when the electronic device detects a switch from meeting the condition to not meeting it. The single-time valid period of a condition can be the time period between the single-time effective time and the single-time ineffective time. A more detailed description of the single-time relevant data for conditions can be found in the descriptions of Tables 1 and 2 below, which will not be elaborated upon here.
[0063] Electronic devices can also be configured with rules for switching scenario modes (also known as decision rules). A more detailed introduction to switching rules can be found in the following section, which will not be elaborated here.
[0064] Specifically, after activating one scenario mode, the electronic device can detect that the activation conditions for another scenario mode are met, and then determine whether to switch to the other scenario mode. After deactivating a scenario mode based on the activation conditions, the electronic device can determine whether to activate another scenario mode based on the recorded single-time related data of the conditions and the switching rules.
[0065] By implementing the method provided in this application, an electronic device can rationally select the appropriate scenario mode when the activation conditions for different scenario modes are simultaneously met, avoiding confusion during scenario mode switching. The electronic device can also determine whether to restore other scenario modes that were activated before this scenario mode was activated when a scenario mode is deactivated. In this way, the electronic device fully considers the significance of setting each activation condition, reducing the occurrence of activation conditions failing to successfully trigger the corresponding scenario mode, thereby avoiding user misunderstanding. The switching rules set by the electronic device make the switched scenario modes more in line with user expectations.
[0066] To better understand the method for switching scenario modes provided in the embodiments of this application, some application scenarios involved in the embodiments of this application will be introduced below.
[0067] Scenario 1: A scenario where multiple conditions are used to switch between scenario modes based on the activation conditions of a single scenario mode.
[0068] Figure 1 An exemplary diagram illustrates a scenario where multiple condition-based switching scenario modes are included in the activation conditions of scenario mode A.
[0069] like Figure 1As shown, at time T1, the electronic device detects that condition A1 is met and activates scenario mode A corresponding to condition A1. At time T2, the electronic device detects that condition A2 is met and continues to use scenario mode A corresponding to condition A2. At time T3, the electronic device detects that condition A3 is met and continues to use scenario mode A corresponding to condition A3. At time T4, the electronic device detects that none of the conditions are met and deactivates scenario mode A. Conditions A1, A2, and A3 are all activation conditions for scenario mode A. Figure 1 The times shown are in order from morning to night: T1, T2, T3, and T4.
[0070] from Figure 1 In summary: (1) For multiple conditions included in the activation condition of a scenario mode, there may be overlapping single valid time periods. For example, the time period from time T2 to time T3 belongs to the single valid time period of condition A1 and also belongs to the single valid time period of condition B1.
[0071] (2) During the process of satisfying any of the activation conditions, the electronic device is in the scenario mode corresponding to that activation condition. That is to say, the scenario mode corresponding to that activation condition is always in the activated state. For example, from time T1 to time T4, the electronic device is in scenario mode A.
[0072] (3) When the electronic device detects that any condition is not met, the electronic device does not use any scenario mode.
[0073] Scenario 2: A scenario where different scenario modes are switched based on their activation conditions.
[0074] Scenario 2 can be further divided into the following two scenarios: (a) switching between two scenario modes; (b) switching between three scenario modes.
[0075] Figure 2A An exemplary diagram illustrates a scenario in which an electronic device switches between two scenario modes when it is in scenario two.
[0076] like Figure 2A As shown, at time T1, the electronic device detects that condition A1 is met and activates scenario mode A corresponding to condition A1. At time T2, the electronic device detects that condition B1 is met and activates scenario mode B corresponding to condition B1 while simultaneously deactivating scenario mode A. At time T3, the electronic device detects that neither condition is met and deactivates scenario mode B. Here, condition A1 is the activation condition for scenario mode A, and condition B1 is the activation condition for scenario mode B. Time Ts1 is the time when condition A1 fails. Figure 2AThe times shown are in the following order from morning to night: T1, T2, Ts1, and T3.
[0077] In other words, after using scenario mode A, an electronic device can switch to using scenario mode B.
[0078] from Figure 2A In summary: (1) For the conditions included in the activation conditions of different scenario modes, there may be overlapping single valid time periods. For example, the time period from time T2 to time Ts1 belongs to the single valid time period of condition A1 and also belongs to the single valid time period of condition B1.
[0079] (2) When two conditions are detected to be met simultaneously, the electronic device will preferentially select the scenario mode corresponding to the condition that takes effect later. In other words, when two conditions are detected to be met simultaneously, the scenario mode corresponding to the later-acting condition will override the scenario mode corresponding to the earlier-acting condition.
[0080] For example, at time T2, if the electronic device simultaneously satisfies conditions A1 and B1, the electronic device selects to activate scenario mode B corresponding to condition B1, and does not continue to use scenario mode A corresponding to condition A1. The single effective time of condition B1 (e.g., time T2) is later than the single effective time of condition A1 (e.g., time T1).
[0081] (3) When an electronic device is using a scenario mode corresponding to a certain condition, if it detects that another condition is not met, the electronic device will not switch the scenario mode it is using based on the above-mentioned failure to meet the other condition.
[0082] For example, if an electronic device starts scenario mode B at time T2, and the electronic device detects that condition A1 is not met at time Ts1, it will not switch to the scenario mode B it is using, but will continue to use scenario mode B until time T3.
[0083] Figure 2B An exemplary diagram illustrates a scenario where another electronic device switches between two scenario modes when it is in scenario two.
[0084] like Figure 2BAs shown, at time T1, the electronic device detects that condition A1 is met and activates scenario mode A corresponding to condition A1. At time T2, the electronic device detects that condition B1 is met and activates scenario mode B corresponding to condition B1 while simultaneously deactivating scenario mode A. At time T3, the electronic device detects that condition B1 is not met but condition A1 is still met, deactivates scenario mode B while simultaneously activating scenario mode A corresponding to condition A1. At time T4, the electronic device detects that none of the conditions are met and deactivates scenario mode A. Here, condition A1 is the activation condition for scenario mode A, and condition B1 is the activation condition for scenario mode B. Figure 2B The times shown are in order from morning to night: T1, T2, T3, and T4.
[0085] In other words, after using scenario mode A, an electronic device can switch to scenario mode B, and can also switch back to scenario mode A.
[0086] from Figure 2B In summary: (1) Regarding the conditions included in the activation conditions of different scenario modes, there may be overlapping single effective time periods. For example, in Figure 2B In the above, the time period from time T2 to time T3 is a single valid time period under condition A1, and also a single valid time period under condition B1.
[0087] (2) When two conditions are detected to be met simultaneously, the electronic device will preferentially select the scenario mode corresponding to the condition that takes effect later. In other words, when two conditions are detected to be met simultaneously, the scenario mode corresponding to the later-acting condition will override the scenario mode corresponding to the earlier-acting condition.
[0088] For example, in Figure 2B In the scenario, at time T2, the electronic device detects that conditions A1 and B1 are simultaneously met. The electronic device then selects to activate scenario mode B corresponding to condition B1, instead of continuing to use scenario mode A corresponding to condition A1. The single activation time of condition B1 (e.g., time T2) is later than the single activation time of condition A1 (e.g., time T1).
[0089] (3) When an electronic device is using a scenario mode corresponding to a certain condition, and the scenario mode is turned off based on the failure of the certain condition, if the single failure time of the certain condition belongs to the single valid time period of another condition, the electronic device may start the scenario mode corresponding to the other condition at the single failure time of the certain condition.
[0090] For example, in Figure 2BIn the scenario, the electronic device uses scenario mode B between time T2 and time T3, and disables scenario mode B at time T3 because condition B1 is not met. Time T3 is the single failure time of condition B1. The single valid time period of condition A1 is from time T1 to time T4. The single failure time of condition B1 belongs to the single valid time period of condition A1. Therefore, the electronic device can activate scenario mode A corresponding to condition A1 at time T3.
[0091] Understandably, if condition A1 is a time-based condition, the electronic device can obtain the single effective time and single failure time of condition A1 at time T1. In this case, the electronic device can determine at time T3 that the single failure time of condition B1 (e.g., time T3) belongs to the single valid time period of condition A1 (e.g., from time T1 to time T4).
[0092] If condition A1 is another type of condition, the electronic device may only obtain the single effective time of condition A1 at time T1, and cannot determine the single failure time of condition A1. The level failure time of condition A1 can only be determined when the electronic device detects that condition A1 is not met. In this case, the electronic device can only determine at time T3 that condition A1 is currently still within a single effective time period, and thus determine that the single failure time of condition B1 belongs to the single effective time period of condition A1. As for when the single failure time of condition A1 is, it can only be determined when the electronic device detects that condition A1 is not met.
[0093] Figure 3A An exemplary diagram illustrates a scenario in which an electronic device switches between three scenario modes when it is in scenario two.
[0094] like Figure 3A As shown, at time T1, the electronic device detects that condition A1 is met and activates scenario mode A corresponding to condition A1. At time T2, the electronic device detects that condition B1 is met and activates scenario mode B corresponding to condition B1 while simultaneously deactivating scenario mode A. At time T3, the electronic device detects that condition C1 is met and activates scenario mode C corresponding to condition C1 while simultaneously deactivating scenario mode B. At time T4, the electronic device detects that none of the conditions are met and deactivates scenario mode C. Here, condition A1 is the activation condition for scenario mode A, condition B1 is the activation condition for scenario mode B, and condition C1 is the activation condition for scenario mode C. Ts1 is the single failure time of condition A1, and Ts2 is the single failure time of condition B1. Figure 3A The times shown are in the following order from morning to night: T1, T2, T3, Ts1, Ts2, and T4.
[0095] In other words, after using scenario mode A, an electronic device can switch to scenario mode B, and then switch to scenario mode C.
[0096] from Figure 3A In summary: (1) For the conditions included in the activation conditions of different scenario modes, there may be overlapping single effective time periods.
[0097] For example, the time period from time T2 to time T3 is a single valid time period under condition A1, and also a single valid time period under condition B1. The time period from time T3 to time Ts1 is a single valid time period under condition A1, and also a single valid time period under condition B1, and also a single valid time period under condition C1. The time period from time Ts1 to time Ts2 is a single valid time period under condition B1, and also a single valid time period under condition C1.
[0098] (2) When multiple conditions are detected to be met simultaneously, the electronic device prioritizes activating the scenario mode corresponding to the condition that takes effect latest among the multiple conditions. In other words, when multiple conditions are detected to be met simultaneously, the scenario mode corresponding to the last condition to take effect overrides the scenario modes corresponding to the conditions that took effect earlier.
[0099] For example, in Figure 3A In the scenario, at time T3, the electronic device detects that conditions A1, B1, and C1 are simultaneously satisfied. The electronic device selects to activate scenario mode C corresponding to condition C1, but does not select scenario mode A corresponding to condition A1, nor scenario mode B corresponding to condition B1. The single activation time of condition C1 (e.g., time T3) is later than the single activation time of condition A1 (e.g., time T1), and the single activation time of condition C1 (e.g., time T3) is later than the single activation time of condition B1 (e.g., time T2).
[0100] Figure 3B An exemplary diagram illustrates a scenario where another electronic device switches between three scenario modes when it is in scenario two.
[0101] like Figure 3BAs shown, at time T1, the electronic device detects that condition A1 is met, and activates scenario mode A corresponding to condition A1. At time T2, the electronic device detects that condition B1 is met, and activates scenario mode B corresponding to condition B1 while simultaneously deactivating scenario mode A. At time T3, the electronic device detects that condition C1 is met, and activates scenario mode C corresponding to condition C1 while simultaneously deactivating scenario mode B. At time T4, the electronic device detects that condition C1 is not met, and activates scenario mode A corresponding to condition A1 while simultaneously deactivating scenario mode C. At time T5, the electronic device detects that none of the conditions are met, and deactivates scenario mode A. Here, condition A1 is the activation condition for scenario mode A, condition B1 is the activation condition for scenario mode B, and condition C1 is the activation condition for scenario mode C. Ts2 is the single failure time of condition B1. Figure 3B The times shown are in the following order from morning to night: T1, T2, T3, Ts2, T4, and T5.
[0102] In other words, after using scenario mode A, an electronic device can switch to scenario mode B, and then switch to scenario mode C. Then, it can switch back to scenario mode A.
[0103] from Figure 3B In summary: (1) For the conditions included in the activation conditions of different scenario modes, there may be overlapping single effective time periods.
[0104] For example, the time period from time T2 to time T3 is a single valid time period under condition A1, and also a single valid time period under condition B1. The time period from time T3 to time Ts2 is a single valid time period under condition A1, also a single valid time period under condition B1, and also a single valid time period under condition C1. The time period from time Ts2 to time T4 is a single valid time period under condition A1, and also a single valid time period under condition C1.
[0105] (2) When multiple conditions are detected to be met simultaneously, the electronic device prioritizes activating the scenario mode corresponding to the condition with the latest single effective time among the multiple conditions. In other words, when multiple conditions are detected to be met simultaneously, the scenario mode corresponding to the last effective condition overrides the scenario modes corresponding to the previously effective conditions. For details, please refer to the above introduction. Figure 3B The relevant content of (2) in the summary will not be repeated here.
[0106] (3) When an electronic device is using a scenario mode corresponding to a certain condition, and the scenario mode is turned off based on the failure of that certain condition, if the single failure time of that certain condition falls within the single valid time period of another condition, the electronic device may activate the scenario mode corresponding to that other condition at the single failure time of that certain condition. If the single failure time of that certain condition does not fall within the single valid time period of another condition, the electronic device may not activate the scenario mode corresponding to that other condition at the single failure time of that certain condition.
[0107] For example, in Figure 3B In the example, the electronic device uses scenario mode C between time T3 and time T4, and closes scenario mode C at time T4 because condition C1 is not met. Time T4 is the single failure time of condition C1. The single valid time period of condition A1 is from time T1 to time T5. The single failure time of condition C1 belongs to the single valid time period of condition A1. Therefore, the electronic device can activate scenario mode A corresponding to condition A1 at time T4. The single valid time period of condition B1 is from time T2 to time Ts2. The single failure time of condition C1 does not belong to the single valid time period of condition B1. Therefore, the electronic device will not activate scenario mode B corresponding to condition B1 at time T4.
[0108] Figure 3C An exemplary diagram illustrates a scenario where another electronic device switches between three scenario modes when it is in scenario two.
[0109] like Figure 3C As shown, at time T1, the electronic device detects that condition A1 is met, and activates scenario mode A corresponding to condition A1. At time T2, the electronic device detects that condition B1 is met, and activates scenario mode B corresponding to condition B1 while simultaneously deactivating scenario mode A. At time T3, the electronic device detects that condition C1 is met, and activates scenario mode C corresponding to condition C1 while simultaneously deactivating scenario mode B. At time T4, the electronic device detects that condition C1 is not met, and activates scenario mode B corresponding to condition B1 while simultaneously deactivating scenario mode C. At time T5, the electronic device detects that none of the conditions are met, and deactivates scenario mode A. Here, condition A1 is the activation condition for scenario mode A, condition B1 is the activation condition for scenario mode B, and condition C1 is the activation condition for scenario mode C. Ts1 is the single failure time of condition A1. Figure 3C The times shown are in the following order from morning to night: T1, T2, T3, Ts1, T4, and T5.
[0110] In other words, after using scenario mode A, an electronic device can switch to scenario mode B, and then switch to scenario mode C. Then, it can switch back to scenario mode B.
[0111] Specifically from Figure 3C The summary can be found above. Figure 3B The content summarized in the previous section will not be repeated here.
[0112] Figure 3D An exemplary diagram illustrates a scenario where another electronic device switches between three scenario modes when it is in scenario two.
[0113] like Figure 3C As shown, at time T1, the electronic device detects that condition A1 is met, and activates scenario mode A corresponding to condition A1. At time T2, the electronic device detects that condition B1 is met, and activates scenario mode B corresponding to condition B1 while simultaneously deactivating scenario mode A. At time T3, the electronic device detects that condition C1 is met, and activates scenario mode C corresponding to condition C1 while simultaneously deactivating scenario mode B. At time T4, the electronic device detects that condition C1 is not met, and activates scenario mode B corresponding to condition B1 while simultaneously deactivating scenario mode C. At time T5, the electronic device detects that condition B1 is not met, and activates scenario mode A corresponding to condition A1 while simultaneously deactivating scenario mode B. At time T6, the electronic device detects that none of the conditions are met, and deactivates scenario mode A. Here, condition A1 is the activation condition for scenario mode A, condition B1 is the activation condition for scenario mode B, and condition C1 is the activation condition for scenario mode C. Figure 3C The times shown are in the following order from morning to night: T1, T2, T3, T4, T5, and T6.
[0114] In other words, after using scenario mode A, an electronic device can switch to scenario mode B, and then switch to scenario mode C. Then, it can switch back to scenario mode B and then back to scenario mode A.
[0115] from Figure 3B In summary: (1) For the conditions included in the activation conditions of different scenario modes, there may be overlapping single effective time periods.
[0116] For example, the time period from time T2 to time T3 is a single valid time period under condition A1, and also a single valid time period under condition B1. The time period from time T3 to time T4 is a single valid time period under condition A1, also a single valid time period under condition B1, and also a single valid time period under condition C1. The time period from time T4 to time T5 is a single valid time period under condition A1, and also a single valid time period under condition B1.
[0117] (2) When multiple conditions are detected to be met simultaneously, the electronic device prioritizes activating the scenario mode corresponding to the condition with the latest single effective time among the multiple conditions. In other words, when multiple conditions are detected to be met simultaneously, the scenario mode corresponding to the last effective condition overrides the scenario modes corresponding to the previously effective conditions. For details, please refer to the above introduction. Figure 3B The relevant content of (2) in the summary will not be repeated here.
[0118] (3) When an electronic device is using a scenario mode corresponding to a certain condition, and the scenario mode is turned off based on the failure of the certain condition, if the single failure time of the certain condition belongs to the single effective time period of multiple other conditions, the electronic device can start the scenario mode corresponding to the condition with the latest effective time among the multiple other conditions at the single failure time of the certain condition.
[0119] For example, in Figure 3D In the scenario, the electronic device uses scenario mode C between time T3 and time T4, and closes scenario mode C at time T4 because condition C1 is not met. Time T4 is the single failure time of condition C1. The single effective time period of condition A1 is from time T1 to time T6. The single effective time period of condition B1 is from time T2 to time T5. The single failure time of condition C1 belongs to both the single effective time period of condition A1 and the single effective time period of condition B1. However, the single effective time of condition B1 is longer than the single effective time of condition A1. Therefore, the electronic device can activate scenario mode B corresponding to condition B1 at time T4.
[0120] Figure 3E An exemplary diagram illustrates a scenario in which an electronic device switches between two scenario modes when it is in scenario two.
[0121] Figure 3E The scenario shown is the same as the one described above. Figure 3D The scenarios shown are similar, except that: in Figure 3E At time T3, the electronic device detects that condition A2 is met, activates scenario mode A corresponding to condition A2, and simultaneously deactivates scenario mode B.
[0122] like Figure 3EAs shown, at time T1, the electronic device detects that condition A1 is met and activates scenario mode A corresponding to condition A1. At time T2, the electronic device detects that condition B1 is met and activates scenario mode B corresponding to condition B1 while simultaneously deactivating scenario mode A. At time T3, the electronic device detects that condition A2 is met and activates scenario mode A corresponding to condition A2 while simultaneously deactivating scenario mode B. At time T4, the electronic device detects that condition A2 is not met but condition B1 is still met, deactivates scenario mode A, and activates scenario mode B corresponding to condition B1. At time T5, the electronic device detects that condition B1 is not met but condition A1 is still met, deactivates scenario mode B, and activates scenario mode A corresponding to condition A1. At time T6, the electronic device detects that none of the conditions are met and deactivates scenario mode A. Here, conditions A1 and A2 are activation conditions for scenario mode A, and condition B1 is an activation condition for scenario mode B. Figure 2B The times shown are in the following order from morning to night: T1, T2, T3, T4, T5, and T6.
[0123] In other words, after using scenario mode A, an electronic device can switch to scenario mode B, and then switch back to scenario mode A. Then it can switch to scenario mode B again, and then switch back to scenario mode A.
[0124] Specific based on Figure 3E The summary can be found in the above introduction. Figure 3B The relevant content of (2) in the summary will not be repeated here.
[0125] Scenario 3: Scenario where the user switches between scenario modes based on whether the scenario mode is turned on or off.
[0126] Figure 4A An exemplary diagram illustrates a scenario where a scenario mode is activated based on user interaction.
[0127] like Figure 4A As shown, at time T1, the electronic device detects that condition A1 is met and activates scenario mode A corresponding to condition A1. At time T2, the electronic device detects that condition B1 is met and activates scenario mode B corresponding to condition B1 while simultaneously deactivating scenario mode A. At time T3, the electronic device receives an operation from the user to activate scenario mode C, activates scenario mode C, and simultaneously deactivates scenario mode B. If the electronic device subsequently does not detect that other conditions are met and does not receive an operation to deactivate scenario mode C, the electronic device will continue to use scenario mode C. Here, condition A1 is the activation condition for scenario mode A, and condition B1 is the activation condition for scenario mode B. Time Ts2 is the single failure time of condition B1. Figure 4A The times shown are in order from morning to night: T1, T2, and T3.
[0128] from Figure 4A In summary: (1) When the electronic device receives a user's operation to activate a scenario mode, it activates that scenario mode. For example, the electronic device activates scenario mode C in response to a user operation received at time T3.
[0129] (2) After the electronic device activates the scenario mode based on the user's operation, the electronic device no longer switches the scenario mode based on the single relevant data of the conditions recorded before receiving the user's operation.
[0130] For example, in response to a user operation received at time T3, the electronic device activates scenario mode C. Prior to time T3, the electronic device had recorded single-time relevant data for condition A1 and single-time relevant data for condition B1. At time Ts2, the electronic device detects that condition B1 is not met, but does not determine whether time Ts2 belongs to the single valid time period of condition A1; instead, it directly continues to use scenario mode C.
[0131] Figure 4B An exemplary diagram illustrates another scenario where a scenario mode is activated based on user interaction.
[0132] like Figure 4B As shown, at time T1, the electronic device detects that condition A1 is met and activates scenario mode A corresponding to condition A1. At time T2, the electronic device detects that condition B1 is met and activates scenario mode B corresponding to condition B1 while simultaneously deactivating scenario mode A. At time T3, the electronic device receives an operation from the user to activate scenario mode C, activates scenario mode C, and simultaneously deactivates scenario mode B. At time T4, the electronic device detects that condition C1 is met and continues to use scenario mode C corresponding to condition C1. At time T5, the electronic device detects that condition C1 is not met and deactivates scenario mode C. For example, the activation condition for condition C1 is "7:00 to 9:00". If the user actively activates scenario mode C corresponding to condition C1 at 5:00, and the user does not actively deactivate it subsequently, scenario mode C will be active from 5:00 to 9:00. The electronic device deactivates scenario mode C at 9:00. Here, condition A1 is the activation condition for scenario mode A, condition B1 is the activation condition for scenario mode B, and condition C1 is the activation condition for scenario mode C. Time Ts1 is the single failure time of condition A1, and time Ts2 is the single failure time of condition B1. Figure 4B The times shown are in the following order from morning to night: T1, T2, T3, T4, Ts2, T5, and Ts1.
[0133] from Figure 4BIn summary: (1) When the electronic device receives a user's operation to activate a scenario mode, it activates that scenario mode. For example, the electronic device activates scenario mode C in response to a user operation received at time T3.
[0134] (2) After a scenario mode is activated based on a user operation, the electronic device no longer switches scenario modes based on single relevant data of conditions recorded before receiving the user operation.
[0135] For example, in response to a user operation received at time T3, the electronic device activates scenario mode C. Prior to time T3, the electronic device had recorded single-time relevant data for condition A1 and single-time relevant data for condition B1. At time T5, the electronic device detects that condition C1 is not met, but without determining whether time T5 falls within the single valid time period of condition A1, it directly closes scenario mode C based on the failure to meet condition C1.
[0136] (3) After a scenario mode is activated based on a user operation, the electronic device can determine whether a certain condition is met, and activate the corresponding scenario mode if the condition is met, and deactivate the corresponding scenario mode if the condition is not met. In other words, after a scenario mode is activated based on a user operation, the electronic device can record the single-time related data of the condition, and switch the scenario mode based on the single-time related data of the condition recorded after receiving the user operation.
[0137] For example, in response to a user operation received at time T3, the electronic device activates scenario mode C. The electronic device records single-time relevant data for condition C1 after time T3. The electronic device may, after time T3, detect that condition C1 is met at time T4 and activate scenario mode C corresponding to condition C1; or detect that condition C1 is not met at time T5 and deactivate scenario mode C.
[0138] Figure 4C An exemplary diagram illustrates a scenario where a scenario mode is turned off based on user operation.
[0139] like Figure 4CAs shown, at time T1, the electronic device detects that condition A1 is met and activates scenario mode A corresponding to condition A1. At time T2, the electronic device detects that condition B1 is met and activates scenario mode B corresponding to condition B1 while simultaneously deactivating scenario mode A. At time T3, the electronic device detects that condition C1 is met, receives an operation from the user to activate scenario mode C, activates scenario mode C, and simultaneously deactivates scenario mode B. At time T4, the electronic device receives an operation from the user to deactivate scenario mode C and deactivates scenario mode C. At time T5, the electronic device detects that condition B2 is met and activates scenario mode B corresponding to condition B2. At time T5, the electronic device detects that condition B2 is not met and deactivates scenario mode B. Here, condition A1 is the activation condition for scenario mode A, conditions B1 and B2 are the activation conditions for scenario mode B, and condition C1 is the activation condition for scenario mode C. Figure 4C The times shown are in the following order from morning to night: T1, T2, T3, T4, T5, and T6.
[0140] from Figure 4C In summary: (1) When the electronic device receives a user's operation to close a scenario mode, it closes that scenario mode. For example, in response to a user operation received at time T4, the electronic device closes scenario mode C.
[0141] (2) After the scenario mode is turned off based on the user operation, the electronic device no longer switches the scenario mode based on the single relevant data of the conditions recorded before receiving the user operation.
[0142] For example, in response to a user operation received at time T4, the electronic device closes scenario mode C. Prior to time T4, the electronic device had recorded single-time relevant data for condition A1, condition B1, and condition C1. At time T4, the electronic device did not determine whether time T4 belonged to a single valid time period for condition A1 or condition B1, but instead directly closed scenario mode C.
[0143] (3) After a scenario mode is closed based on a user operation, the electronic device can determine whether a certain condition is met, and activate the corresponding scenario mode if the condition is met, and close the corresponding scenario mode if the condition is not met. In other words, after a scenario mode is closed based on a user operation, the electronic device can record the single-time related data of the condition, and switch the scenario mode based on the single-time related data of the condition recorded after receiving the user operation.
[0144] For example, in response to a user operation received at time T4, the electronic device closes scenario mode C. The electronic device records single-time relevant data for condition B2 after time T4. The electronic device may, after time T4, detect that condition B2 is met at time T5, activate scenario mode B corresponding to condition B2, and detect that condition B2 is not met at time T6, close scenario mode B.
[0145] It is understood that the above scenarios are all application scenarios of the method for switching scenario modes provided in the embodiments of this application, and there should be no contradiction between the above scenarios.
[0146] In the embodiments of this application, the conditions and related content of each scenario mode shown in Scenario 1, Scenario 2 and Scenario 3 are only illustrative examples and may include more application scenarios. Scenario 1, Scenario 2 and Scenario 3 may also include more specific application scenarios, which are not limited thereto.
[0147] In combination with the above Figures 1 to 4C In the various application scenarios described above, in this embodiment of the application, the electronic device can record one-time related data of a condition. Furthermore, the electronic device can also update the one-time related data of the condition. Updating the one-time related data of the condition can mean that after the electronic device only records the one-time effective time of the condition, as time progresses, the electronic device acquires the one-time ineffective time of the condition. Specifically, please refer to the above regarding... Figure 2B Related explanations.
[0148] The aforementioned single-item related data of the condition recorded before time Tx, such as the single-item related data of the condition recorded before receiving the user operation, specifically includes the following two cases: the electronic device records the single-item related data of the condition before time Tx, and the electronic device updates the single-item related data of the condition after time Tx; the electronic device records the single-item related data of the condition before time Tx, and the electronic device updates the single-item related data of the condition before time Tx.
[0149] The following is based on Figure 3C The illustrated scenario diagram serves as a model to illustrate the single-time related data of various conditions recorded and updated by an electronic device. For example, using... Figure 3C The example given is that conditions A1, B1, and C1 mentioned in the text are not time-related conditions.
[0150]
[0151] Table 1
[0152] Table 1 provides an example of single-time correlation data of the conditions acquired by the electronic device after time Ts1 and before time T4.
[0153]
[0154] Table 2
[0155] Table 2 provides an example of single-time relevant data for conditions acquired by the electronic device after time T4 and before time T5.
[0156] As can be seen from Tables 1 and 2 above, the electronic device can update the stored Table 1 to Table 2 at time T4. Specifically, the electronic device updates the single-time related data of condition C1 at time T4. For example, the electronic device obtains the single-time failure time of condition C1 as time T4.
[0157] For example, the electronic device detects that condition C1 is met at time T3, and detects that condition C1 is not met at time T4. Since the single failure time of condition B1 has not yet been obtained at time T4, that is, condition B1 is still effective at time T4, time T4 belongs to the single effective time period of condition B1, and thus the electronic device can start the scenario mode B corresponding to condition B1 at time T4.
[0158] In the embodiments of this application, the contents shown in Tables 1 and 2 above are for illustrative purposes only and are not intended to limit the scope of the application.
[0159] In some implementations, the electronic device can record and store one-time relevant data for each condition. For example, the electronic device can record one-time relevant data for conditions as shown in Tables 1 and 2. Optionally, the electronic device can also record the one-time valid time period of the condition.
[0160] Generally, the single valid time periods under the same conditions will not overlap. However, the single valid time periods under different conditions corresponding to the same scenario mode may overlap.
[0161] In some implementations, electronic devices can delete one-time relevant data for a condition.
[0162] Specifically, the electronic device can delete single-time related data for a condition based on time. For example, if the current time is after the single-time failure time of a condition, the electronic device can delete that set of single-time related data for that condition. For instance, after time Ts1, the electronic device can delete the single-time related data in the first row of Table 1 above. As another example, if the current time is some time after the single-time failure time of a condition, the electronic device can then delete that set of single-time related data for that condition. Since the electronic device may delete the set of single-time related data some time after the single-time failure time, it may store multiple sets of single-time related data for the same condition.
[0163] Electronic devices can also delete single-relevance data based on the number of sets of single-relevance data. For example, an electronic device may limit the number of sets of single-relevance data stored, such as 10 sets. If the number of sets of single-relevance data stored exceeds 10 sets, the set of single-relevance data with the earliest effective time is deleted.
[0164] Electronic devices can also delete conditional single-failure related data based on the single failure time. For example, an electronic device always stores only one set of single-failure related data whose single failure time is prior to the current time. If two sets of single-failure related data are detected whose single failure time is prior to the current time, the set with the earlier single failure time is deleted.
[0165] In the embodiments of this application, the method of deleting the relevant data for a single instance is not limited.
[0166] In this embodiment, the multiple sets of single-transaction related data stored in the electronic device are used to determine which specific condition is currently being used. For example, refer to the above. Figures 1 to 4C Related descriptions.
[0167] In combination with the above Figures 1 to 4C In the various application scenarios described in this application embodiment, the electronic device is configured with corresponding switching rules. Specific switching rules include one or more of the following:
[0168] Rule 1. When multiple conditions are detected to be met simultaneously, the electronic device shall prioritize the activation of the scenario mode corresponding to the condition with the latest single effective time.
[0169] The latest possible time for a single activation is the current time. Under rule 1, electronic devices tend to use later-triggered scenario modes. This allows scenario modes activated by electronic devices to switch over time based on later-met conditions, rather than rigidly using only earlier-met conditions. This gives users a sense of flexibility in the scenario modes offered by electronic devices, improving the user experience.
[0170] For example, regarding rule 1, please refer to the above. Figures 2A to 3D Related descriptions.
[0171] Rule 2: When an electronic device is using a scenario mode corresponding to a certain condition, and the scenario mode is turned off based on the failure of the certain condition, if the single failure time of the certain condition belongs to the single effective time period of multiple other conditions, the electronic device may activate the scenario mode corresponding to the condition with the latest effective time among the multiple other conditions at the single failure time of the certain condition.
[0172] In other words, when an electronic device shuts down a scenario mode based on unmet conditions, it can consider restoring a corresponding scenario mode based on conditions that are still met. Furthermore, the scenario mode corresponding to the currently met conditions must have been used previously.
[0173] Understandably, under Rule 2, when an electronic device closes a profile mode based on unmet conditions, it tends to revert to a previously used profile mode. This ensures that the profile mode used by the electronic device better matches the set activation conditions, increasing the success rate of matching activation conditions with the corresponding profile mode. Instead of simply waiting for new conditions to trigger the profile mode's activation after closing it, the device gives the user the impression that it accurately activates the profile mode based on the activation conditions, thus improving the user experience.
[0174] Rule 3: After an electronic device activates or deactivates a scenario mode based on a user action, the electronic device will no longer switch scenario modes based on a single piece of relevant data of the conditions recorded before receiving the user action.
[0175] In other words, electronic devices will invalidate single-item related data recorded before the user's operation.
[0176] Under rule 3, user actions reflect more subjective user intentions, and electronic devices tend to prioritize fulfilling these intentions. For example, after a user actively activates a particular scenario mode, they are more focused on that mode and expect not to revert to a previously used one. Conversely, after a user actively deactivates a scenario mode, they may not want to use any scenario mode at that moment and expect not to revert to a previously used one. In this way, electronic devices are more considerate of the user's actual needs.
[0177] Rule 4: After a scenario mode is activated based on a user operation, the electronic device can determine whether a certain condition is met, and activate the corresponding scenario mode if the condition is met, and deactivate the corresponding scenario mode if the condition is not met.
[0178] Rule 5: After a user closes a scenario mode, the electronic device can determine whether a certain condition is met. If the condition is met, the corresponding scenario mode will be activated; if the condition is not met, the corresponding scenario mode will be closed.
[0179] Understandably, under Rules 4 and 5, electronic devices, for a more rational design, will not solely consider user actions. Electronic devices will not indefinitely use a scenario mode after the user actively activates it, nor will they indefinitely stop using any scenario mode after the user actively deactivates it. Instead, electronic devices can properly check whether conditions are met and trigger the activation or deactivation of the scenario mode after user interaction. This makes the logic for triggering scenario mode activation or deactivation more complete and improves the user experience.
[0180] In the embodiments of this application, the above switching rules are only illustrative examples, and may include other rules, which are not limited thereto.
[0181] In this way, electronic devices can start or stop scene modes based on switching rules, avoiding confusion when switching scene modes and providing users with a good logic for using scene modes.
[0182] Combination Figures 2A to 4C The following describes the methods and processes for switching scenario modes provided in the embodiments of this application, based on various application scenarios.
[0183] Figure 5A An exemplary illustration shows a method flow for switching scenario modes provided in an embodiment of this application. For example, Figure 5A The text only involves conditions A1 and B1, and does not involve other conditions.
[0184] S101. At time T1, the electronic device detects that condition A1 is met and activates scenario mode A. Here, condition A1 is the activation condition for scenario mode A.
[0185] S101-1. Electronic device records single-time related data under condition A1.
[0186] The single effective time of condition A1 is time T1. Optionally, when condition A1 is a time condition, the single failure time of condition A1 can also be recorded.
[0187] S101-1 is not limited to being executed after S101. In this embodiment, S101-1 can also be executed at other times. For example, the electronic device can record one-time related data of the conditions after creating a scenario mode, or it can record one-time related data of the conditions after the user updates the activation conditions of the scenario mode. In this embodiment, the timing of recording the related data of the conditions is not limited.
[0188] S102. At time T2, the electronic device detects that condition B1 is met, activates scenario mode B, and deactivates scenario mode A. Condition B1 is a condition for activating scenario mode B.
[0189] S102-1. Electronic device records single-time related data under condition B1.
[0190] The single effective time of condition B1 is time T2. Optionally, when condition B1 is a time condition, the single failure time of condition B1 can also be recorded.
[0191] S102-1 is not limited to being executed after S102. In this embodiment, S102-1 can also be executed at other times.
[0192] Between time T1 and time T2, the electronic device maintains scenario mode A. At time T2, the electronic device simultaneously detects that conditions A1 and B1 are met. Based on the fact that the single effective time of condition B1 is later than the single effective time of condition A1, it determines to activate scenario mode B and deactivate scenario mode A.
[0193] S103. At time T3, the electronic device detects that condition B1 is not met, closes scenario mode B, and determines whether to reopen scenario mode A.
[0194] The single failure time of condition B1 is time T3. Between time T2 and time T3, the electronic device maintains scenario mode B.
[0195] S104a. The electronic device restarts scenario mode A based on the fact that time T3 belongs to the single valid time period of condition A1.
[0196] In other words, if condition A1 is always met between time T1 and time T3, the electronic device can switch back to scenario mode A at time T3.
[0197] S104b. The electronic device does not activate scenario mode A because time T3 does not belong to a single valid time period under condition A1. For example, Figure 5A The method and flow shown can be referred to the above. Figures 2A to 2B The application scenarios shown.
[0198] Implementation Figure 5A The illustrated method flow allows an electronic device to activate scenario mode A based on condition A1, and then activate scenario mode B if condition B1 is met. Afterwards, if condition B1 is not met, it is determined whether to revert to scenario mode A.
[0199] Figure 5B This example illustrates another method flow for switching scenario modes provided in an embodiment of this application. For example, Figure 5B The condition only involves conditions A1, B1, and C1, and does not involve other conditions.
[0200] S201. At time T1, the electronic device detects that condition A1 is met and activates scenario mode A. Here, condition A1 is the activation condition for scenario mode A.
[0201] S201-1. Electronic device records single-time related data under condition A1.
[0202] S202. At time T2, the electronic device detects that condition B1 is met, activates scenario mode B, and deactivates scenario mode A. Condition B1 is a condition for activating scenario mode B.
[0203] S202-1. Electronic equipment records single-time related data under condition B1.
[0204] For the relevant descriptions of S201 to S202-1, please refer to the relevant descriptions of S101 to S102-1 above, which will not be repeated here.
[0205] S201-1 is not limited to being executed after S201; in this embodiment, S201-1 can also be executed at other times. Similarly, S202-1 is not limited to being executed after S202; in this embodiment, S202-1 can also be executed at other times. For example, the electronic device can record single-time related data of the conditions after creating a scenario mode, or it can record single-time related data of the conditions after the user updates the activation conditions of the scenario mode. In this embodiment, the timing of recording the related data of the conditions is not limited.
[0206] S203. At time T3, the electronic device detects that condition C1 is met, activates scenario mode C, and deactivates scenario mode B. Condition C1 is the activation condition for scenario mode C.
[0207] S203-1. Electronic device records single-time correlation data under condition C1.
[0208] The single effective time of condition C1 is time T3. Optionally, when condition C1 is a time condition, the single failure time of condition C1 can also be recorded.
[0209] Between time T2 and time T3, the electronic device maintains scenario mode B. At time T3, the electronic device simultaneously detects that conditions B1 and C1 are met. Based on the fact that the single effective time of condition C1 is later than the single effective time of condition B1, it determines to activate scenario mode C and deactivate scenario mode B.
[0210] S203-1 is not limited to being executed after S203. In this embodiment, S203-1 can also be executed at other times. For example, the electronic device can record one-time related data of the conditions after creating a scenario mode, or it can record one-time related data of the conditions after the user updates the activation conditions of the scenario mode. In this embodiment, the timing of recording the related data of the conditions is not limited.
[0211] S204. At time T4, the electronic device detects that condition C1 is not met, closes scenario mode B, and determines whether to reopen scenario mode A or scenario mode B.
[0212] The single failure time of condition C1 is time T4. Between time T3 and time T4, the electronic device maintains scenario mode B.
[0213] After executing S204, you can execute S205a, S205b, S205c, or S205d.
[0214] S205a. The electronic device does not activate scenario mode A and scenario mode B if time T4 does not belong to the single valid time period of condition A1 and if time T4 does not belong to the single valid time period of condition B1.
[0215] S205b. The electronic device reactivates scenario mode B based on the fact that time T4 does not belong to the single valid time period of condition A1, and time T4 belongs to the single valid time period of condition B1.
[0216] S205c. The electronic device restarts scenario mode A based on the fact that time T4 belongs to the single valid time period of condition A1, and time T4 does not belong to the single valid time period of condition B1.
[0217] S205d. The electronic device activates scenario mode B again based on the fact that time T4 belongs to the single effective time period of condition A1, time T4 belongs to the single effective time period of condition B1, and the single effective time of condition B1 is after the single effective time of condition A1.
[0218] For example, Figure 5B The method and flow shown can be referred to the above. Figures 3A to 3D The application scenarios shown.
[0219] Implementation Figure 5B The illustrated method flow allows an electronic device to activate scenario mode A based on condition A1, and then activate scenario mode B if condition B1 is met. Then, if condition C1 is met, it activates scenario mode C. Afterwards, if condition C1 is not met, it determines whether to revert to either scenario mode A or scenario mode B.
[0220] Figure 5C This example illustrates another method flow for switching scenario modes provided in an embodiment of this application. For example, Figure 5C The condition only involves conditions A1, B1, and C1, and does not involve other conditions.
[0221] S301. At time T1, the electronic device detects that condition A1 is met and activates scenario mode A. Here, condition A1 is the activation condition for scenario mode A.
[0222] S301-1. Electronic device records single-time related data under condition A1.
[0223] S302. At time T2, the electronic device detects that condition B1 is met, activates scenario mode B, and deactivates scenario mode A. Condition B1 is a condition for activating scenario mode B.
[0224] S302-1. Electronic device records single-time related data under condition B1.
[0225] For the relevant descriptions of S301 to S302-1, please refer to the relevant descriptions of S101 to S102-1 above, which will not be repeated here.
[0226] S303. At time T3, the electronic device responds to the user's operation to activate scenario mode C, activates scenario mode C, and deactivates scenario mode B.
[0227] S304. At time T4, the electronic device detects that condition C1 is met and maintains scenario mode C. Here, condition C1 is a condition for enabling scenario mode A.
[0228] S305. At time T5, the electronic device detects that condition C1 is not met, closes scenario mode C, but does not activate scenario mode A. Here, time T5 is a single valid time period for condition A1.
[0229] The execution order of S301-1 and S302-1 can be found in the descriptions of S101-1 and S102-1 above, and will not be repeated here.
[0230] In one possible implementation, since the user actively activates scenario mode C, they likely expect to use scenario mode C for a certain period. If, after the user actively activates scenario mode C, the electronic device immediately detects that other conditions are met and switches to the scenario mode corresponding to those conditions, it might mislead the user. Therefore, after receiving the operation to activate scenario mode C, the electronic device can set a duration, such as 30 minutes. During this duration, the electronic device can refrain from checking any conditions. After this duration, the electronic device then checks whether the conditions are met. This better aligns with the user's need to actively activate the scenario mode. For example, Figure 5C The method and flow shown can be referred to the above. Figures 4A to 4B The application scenarios shown.
[0231] Implementation Figure 5C The illustrated method flow shows that the electronic device can receive a user operation to activate scenario mode C and activate scenario mode C. Afterwards, if condition C1 is not met, even if it falls within the single valid time period of condition A1, the electronic device will not resume using scenario mode A.
[0232] Figure 5D This example illustrates another method flow for switching scenario modes provided in an embodiment of this application. For example, Figure 5D The condition only involves conditions A1, B1, B2, and C1, and does not involve other conditions.
[0233] S401. At time T1, the electronic device detects that condition A1 is met and activates scenario mode A. Here, condition A1 is the activation condition for scenario mode A.
[0234] S401-1. Electronic device records single-time related data under condition A1.
[0235] S402. At time T2, the electronic device detects that condition B1 is met, activates scenario mode B, and deactivates scenario mode A. Condition B1 is a condition for activating scenario mode B.
[0236] S402-1. Electronic device records single-time related data under condition B1.
[0237] For the relevant descriptions of S401 to S402-1, please refer to the relevant descriptions of S101 to S102-1 above, which will not be repeated here.
[0238] S403. At time T3, the electronic device detects that condition C1 is met, activates scenario mode C, and deactivates scenario mode B. Condition C1 is the activation condition for scenario mode C.
[0239] S403-1. Electronic device records single-time correlation data under condition C1.
[0240] S404. The electronic device responds to the user's operation to close scenario mode C and closes scenario mode C.
[0241] S405. At time T4, the electronic device detects that condition B2 is met and activates scenario mode B. Condition B2 is a condition for activating scenario mode B.
[0242] S405-1. Electronic device records single-item related data under condition B2.
[0243] The execution order of S401-1, S402-1, and S403-1 can be found in the descriptions of S101-1 and S102-1 above, and will not be repeated here.
[0244] In one possible implementation, since the user has actively disabled scenario mode C and hasn't actively enabled any other scenarios, the user would prefer not to use any scenarios at this time. If, after the user actively disables scenario mode C, the electronic device immediately detects that other conditions are met and activates the scenarios corresponding to those conditions, it might mislead the user. Therefore, after receiving the instruction to disable scenario mode C, the electronic device can set a time limit, such as 30 minutes. During this time limit, the electronic device can refrain from detecting any conditions. After this time limit, the electronic device then detects whether the conditions are met. This better aligns with the user's need to actively disable scenarios. For example, Figure 5D The method and flow shown can be referred to the above. Figure 4C The application scenarios shown.
[0245] Implementation Figure 5D The illustrated method flow shows that the electronic device can receive a user operation to activate or deactivate scenario mode C. Even if the moment the user deactivates scenario mode C falls within the single valid time period of condition A1, the electronic device will not resume using scenario mode A. Furthermore, after deactivating a scenario mode based on a user operation, the electronic device can again determine whether other conditions are met to activate the corresponding scenario mode.
[0246] The following describes the user interface related to the scenario modes provided in the embodiments of this application.
[0247] The following section uses scenario mode as an example to introduce the user interface related to scenario mode.
[0248] refer to Figure 6A The user interface 610 is used to display configuration information for the learning mode. The electronic device can access the user interface 610 from the settings application. In this embodiment, the method of displaying the user interface 610 is not limited.
[0249] The user interface 610 includes an option box 611. The option box 611 indicates the conditions for activating the learning mode.
[0250] For example, option box 611 includes: condition 611A, condition 611B, condition 611C, and condition 611D. For instance, conditions 611A and 611B are time-based activation conditions. Condition 611A contains the text "8:00 AM - 12:00 PM on weekdays," and condition 611B contains the text "2:00 PM - 6:00 PM on weekdays." This means that, without considering activation conditions for other scenario modes, the electronic device can automatically activate learning mode during the time periods "8:00 AM - 12:00 PM on weekdays" and "2:00 PM - 6:00 PM on weekdays," and automatically deactivate learning mode during other time periods.
[0251] Condition 611A also includes text 611A1. Text 611A1 indicates whether condition 611A is active or inactive. For example, in user interface 610, text 611A1 displays "On", indicating that condition 611A is active. If text 611A1 displays "Off", it indicates that condition 611A is inactive. When an activation condition is inactive, the electronic device will not activate or deactivate the corresponding scenario mode based on that activation condition. Similarly, condition 611B also includes text 611B1. Text 611B1 indicates whether condition 611B is active or inactive.
[0252] Condition 611C belongs to the application dimension. Condition 611C contains the text "When an application is running". This means that, without considering the activation conditions of other scenario modes: when the electronic device is running application G, the learning mode can be automatically activated; when the electronic device stops running application G, the learning mode can be automatically deactivated. Application G is one of the applications included in condition 611C. Condition 611C also includes text 611C1. Text 611C1 can be referenced from text 611A1 above, and will not be repeated here.
[0253] Condition 611D is a location-based condition. Condition 611D contains the text "When a location is nearby". This means that, without considering the activation conditions of other scenario modes: when the electronic device is near the location "AA Province AA City AA District AA Street AAA Community", the learning mode can be automatically activated; when the electronic device is far from the location "AA Province AA City AA District AA Street AAA Community", the learning mode can be automatically deactivated. The location "AA Province AA City AA District AA Street AAA Community" is a location range included in Condition 611C. Condition 611D also includes text 611D1. Text 611D1 can be referenced from text 611A1 above, and will not be repeated here.
[0254] In this embodiment, the conditions included in the option box 611 are merely illustrative and may include conditions with more dimensions, which are not limited thereto. Option box 611 also includes an add condition control 611E. The electronic device can respond to the operation acting on the add condition control 611E to modify the configuration information of the learning mode, that is, to add new activation conditions to the configuration information of the learning mode. Specifically, please refer to the following... Figures 6B-6D The user interface will not be described in detail here.
[0255] Option box 612 indicates the contacts allowed to receive calls in the learning mode configuration information. Optionally, option box 612 may also indicate the applications allowed to receive notifications.
[0256] Optionally, the user interface 610 may also include one or more of the following: card 613, indicator 614, add mode control 615, control 616, and prompt message 617.
[0257] Card 613 indicates the scenario mode to which the configuration information currently displayed on the user interface belongs, such as learning mode. Card 613 also includes a start control 613A. The electronic device can start learning mode in response to a click operation on the start control 613A. After starting learning mode, the start control 613A will be replaced by a close control. The electronic device can also close learning mode in response to a click operation on the close control.
[0258] Indicator 614 is used to indicate the number of created scenario modes and the order in which the scenario mode indicated by the current user interface is arranged among the multiple created scenario modes.
[0259] Add mode control 615 is used to create new scenario modes. Electronic devices can create new scenario modes in response to a click operation applied to add mode control 335.
[0260] Control 616 is used to set whether to allow the configuration information of created scenarios to be sent to other electronic devices. Electronic devices can respond to click operations on control 616 and choose whether to allow the configuration information of created scenarios to be synchronously sent to other electronic devices logged into the same account as the electronic device.
[0261] The prompt message 617 is used to indicate the function of the scenario mode. For example, prompt message 617 includes the text "Adjust system functions, fully immerse yourself in the scenario, and improve focus." The prompt message 617 is not limited to the text content described above; it may also include other text content, and there is no limitation thereto.
[0262] In the embodiments of this application, the optional content included in the user interface 610 is only for illustrative purposes and is not intended to limit the scope of the application.
[0263] In addition to the partial configuration information of the learning mode displayed in the user interface 610, users can also view other additional configuration information for the learning mode. For example, the electronic device can respond to an upward swipe operation on the user interface 610 to view other additional configuration information for the learning mode.
[0264] The electronic device can respond to a click operation acting on condition 611A and display... Figure 6B The user interface 620 shown is for editing condition 611A.
[0265] The user interface 620 includes: control 621, completion control 622, close control 623, delete control 624, option 625, option 626, and option 627.
[0266] Control 621 is used to enable or disable condition 611A. In user interface 620, control 621 is in an "on" state, indicating that condition 611A is enabled. The electronic device can disable condition 611A by clicking control 621.
[0267] Option 625 is used to edit the frequency of condition 611A, option 626 is used to edit the start time of condition 611A, and option 627 is used to edit the end time of condition 611A. The frequency of the above-mentioned activation condition can include one or more of the following: daily, weekly, monthly, yearly, public holidays, workdays, etc. The electronic device can respond to the operations applied to options 625, 626, and 627 to adjust the frequency, start time, and end time of condition 611A.
[0268] The completion control 622 is used to save the current modification to condition 611A. The close control 623 is used to cancel the current modification to condition 611A. The electronic device can respond to a click operation on the delete control 624 to delete condition 611A.
[0269] The electronic device can respond to a click operation acting on condition 611C and display... Figure 6C The user interface 630 shown is for editing condition 611C.
[0270] The user interface 630 includes: control 631, completion control 632, close control 633, delete control 634, search box 635, and check status 636.
[0271] Control 631 is used to enable or disable condition 611C. In user interface 630, control 631 is in an "on" state, indicating that condition 611C is enabled. The electronic device can disable condition 611C by clicking control 631.
[0272] Search box 635 is used to search for applications installed on the electronic device. Checkbox 636 is used to display the application selected in condition 611C. For example, application G is selected. The electronic device can adjust the application selected in condition 611C in response to the operation acting on checkbox 636.
[0273] The completion control 632 is used to save the current modification to condition 611C. The close control 633 is used to cancel the current modification to condition 611C. The electronic device can respond to a click operation on the delete control 634 to delete condition 611C.
[0274] The electronic device can respond to a click operation acting on condition 611D and display... Figure 6D The user interface 640 shown is used to edit condition 611D.
[0275] The user interface 640 includes: controls 641, completion control 642, close control 643, delete control 644, search box 645, map 646, and location 647.
[0276] Control 641 is used to enable or disable condition 611D. In user interface 640, control 641 is in an "on" state, indicating that condition 611A is enabled. The electronic device can disable condition 611D by clicking control 641.
[0277] Search box 645 is used to search for locations. Map 646 is used to display the range of locations included in condition 611D. Location 647 is used to display the names of the locations included in condition 611D. The electronic device can adjust the locations selected by condition 611D in response to the operation performed on search box 645.
[0278] The completion control 642 is used to save the current modification to condition 611D. The close control 643 is used to cancel the current modification to condition 611D. The electronic device can respond to a click operation on the delete control 644 to delete condition 611D.
[0279] In the embodiments of this application, the content included in each of the above-mentioned user interfaces is only for illustrative purposes and may include more or less content. The electronic device can implement the corresponding functions in each of the above-mentioned user interfaces, and there is no limitation thereto.
[0280] The following describes an internal interaction process for switching scenario modes provided by an embodiment of this application.
[0281] Figure 7A An exemplary schematic diagram of the internal module functions provided in an embodiment of this application is shown.
[0282] The electronic device includes a scenario-mode application located at the application layer. The scenario-mode application may further include a scenario-mode UI. The electronic device also includes a state management module, a scenario-mode management module, a configuration information management module, and a database located at the application framework layer or service layer. The electronic device also includes a decision engine, a perception engine, and an execution engine located at the application framework layer or service layer. In the embodiments of this application, the names of the above-mentioned applications, modules, or engines do not presuppose their functions.
[0283] The scenario-based UI is used to display user interfaces related to scenario-based conditions. Examples include interfaces for setting time conditions, application conditions, and location conditions. See the examples above for further details. Figures 6A-6D The user interface described above.
[0284] The status management module is used to initiate the scenario mode to be started after receiving the instruction information sent by the execution module. Optionally, the status management module is used to interact with other functional modules to implement corresponding functions based on the configuration information settings of the scenario mode.
[0285] The scenario mode management module is used to receive update instructions, generate conditional rules to determine whether the activation conditions are met, and also to send conditional rules to the execution module.
[0286] The configuration information management module is used to obtain the enabling conditions; it is also used to indicate the enabling conditions for database update storage; and it is also used to send update instructions to the scenario mode management module.
[0287] The database is used to store and update scenario mode configuration information, such as the conditions for enabling scenario modes.
[0288] The execution engine is used to instruct other modules to perform corresponding functions. For example, the execution engine instructs the decision engine to store condition rules. The execution engine also instructs the state management module to start the scenario mode to be started.
[0289] The perception engine is used to acquire various data related to the conditional rules. It also sends perception data to the decision engine.
[0290] The decision engine is used to determine the scenario pattern to be initiated. It also stores conditional rules and decision rules. Furthermore, it stores one-time correlation data for the conditions. Finally, it updates the conditional rules.
[0291] Figure 7B An exemplary internal interaction flowchart of the scenario switching embodiment provided in this application is shown.
[0292] in, Figure 7B The internal interaction process shown can be divided into three parts:
[0293] Part 1 (S701-S705) is for generating and storing the condition rules corresponding to each condition.
[0294] Part 2 (S706-S708) determines the current scenario mode to be activated based on the real-time acquired perception data.
[0295] Part 3 (S709-S712) is the scenario mode for successful startup of the pending startup.
[0296] S701. Obtain the activation conditions for the configuration information management module.
[0297] In some implementations, the configuration information management module can directly obtain the activation conditions from the configuration information of the scenario mode after the scenario mode is created on the electronic device.
[0298] In one possible implementation, the configuration information management module can also obtain the updated activation conditions after the electronic device creates a scenario mode. Specifically, it can execute S701-1 followed by S701.
[0299] Optionally, S701-1. The scenario mode UI sends an operation to the configuration information management module to update the start conditions.
[0300] In some implementations, the scenario mode UI includes a condition setting UI. Specifically, the condition setting UI may include an interface for setting time conditions, an interface for setting application conditions, and an interface for setting location conditions. For examples, please refer to the above. Figures 6B to 6D The user interface shown is illustrated. In this embodiment, the setting conditions UI may also include more dimensions of the interface, and there is no limitation thereto.
[0301] After a scenario is created, the electronic device can receive user requests to update the activation conditions through the aforementioned settings UI. Updating the activation conditions can include adding, modifying, or deleting activation conditions.
[0302] If S701 is executed after S701-1, then S701-2 can be executed after S701.
[0303] Optionally, the S701-2 configuration information management module sends the updated enabling conditions to the database.
[0304] In some implementations, the database updates the configuration information for the scenario mode after receiving the updated activation conditions.
[0305] S702. The configuration information management module sends an update command to the scenario mode management module.
[0306] In some implementations, the configuration information management module obtains the activation conditions, indicating that the electronic device needs to determine whether to activate the corresponding scenario mode based on whether the newly obtained activation conditions are met. In other words, the electronic device needs to update the condition rules. Therefore, after obtaining the activation conditions, the configuration information management module can send an update command to the scenario mode management module.
[0307] S703. The scenario mode management module generates conditional rules to determine whether the activation conditions are met.
[0308] In some implementations, the scenario mode management module can generate conditional rules after receiving an update instruction. These conditional rules are used to determine whether the activation conditions are met. For example, if the activation condition for the corresponding working mode obtained in S701 is "weekdays 8:00-12:00", then the conditional rule generated in S703 could be: the working mode can be activated within the time range of "weekdays 8:00-12:00".
[0309] In one possible implementation, a conditional rule corresponds to an enable condition. For example, a conditional rule may have an identifier indicating the corresponding enable condition, so that the decision engine can subsequently update the stored conditional rules.
[0310] S704. The scenario mode management module sends condition rules to the execution engine.
[0311] In some implementations, the scenario management module can send the conditional rules to the execution engine after generating them. For example, the scenario management module can register an Action to make the sent conditional rules usable.
[0312] S705. The execution engine instructs the decision engine to store condition rules.
[0313] In some implementations, after receiving a condition rule, the execution engine determines where that condition rule should be used. For example, the execution engine determines that the condition rule should be used by the decision engine.
[0314] After receiving the condition rules, the execution engine can instruct the decision engine to store the condition rules.
[0315] After receiving an instruction to store a condition rule, the decision engine can store or update the condition rule. For example, if the activation condition obtained in S701 is newly added, the decision engine can store the condition rule. If the activation condition obtained in S701 is modified, the decision engine can delete the condition rule corresponding to the activation condition before the modification and then store the condition rule corresponding to the modified activation condition. For example, the decision engine can determine the deleted condition rule based on the identifier of the activation condition contained in the condition rule.
[0316] S706. The decision engine instructs the perception engine to acquire various data related to the conditional rules.
[0317] In some implementations, S706 can be executed after the electronic device has a scenario mode APP installed.
[0318] The decision engine stores conditional rules and decision rules. The number of conditional rules is the sum of the number of activation conditions for one or more created scenario modes. Conditional rules can be obtained through steps S701 to S705 described above. Decision rules can be built into the decision engine and are used to determine which scenario mode is currently active. Specifically, decision rules can be found in the detailed explanation of switching rules described above, and will not be repeated here. Generally, conditional rules are variable; for example, they can be modified based on user actions that change activation conditions. Decision rules are generally immutable.
[0319] The S707 perception engine acquires and sends perception data to the decision engine in real time.
[0320] In some implementations, after receiving instructions to acquire data related to various conditional rules, the perception engine can acquire various types of data. The various types of data acquired by the perception engine can be collectively referred to as perception data.
[0321] Specifically, the perception engine can acquire one or more of the following data: time data, location data, application start / stop data, sleep data, activity data, and single-time related data for a given condition. For example, when a conditional rule corresponds to a time condition, the perception engine can acquire the current time. When a conditional rule corresponds to a location condition, the perception engine can acquire the real-time location of the electronic device. When a conditional rule corresponds to an application condition, the perception engine can acquire the start or stop time data of the application included in the application condition. When a conditional rule corresponds to a sleep condition, the perception engine can acquire the current user's sleep data in real-time. When a conditional rule corresponds to an activity condition, the perception engine can acquire the current user's activity data in real-time.
[0322] In one possible implementation, the perception engine can record, store, and update one-time relevant data for a condition. Specifically, the perception engine can also limit the amount of one-time relevant data for a condition that is stored, for example, deleting the one-time relevant data for a condition a certain period of time after the one-time failure time of the condition is obtained.
[0323] In one possible implementation, the perception engine can also acquire operation data of the user turning a certain scenario mode on or off.
[0324] In some implementations, the perception engine can continuously send perception data to the decision engine, or it can send perception data to the decision engine when the perception data changes. In the embodiments of this application, there is no limitation on the frequency at which the perception engine sends perception data to the decision engine.
[0325] S708. The decision engine determines the scenario mode to be activated based on perceived data, conditional rules, and decision rules.
[0326] In some implementations, the decision engine can determine one or more currently satisfied activation conditions based on perceived data and conditional rules. The decision engine can then determine the currently used activation condition from among the currently satisfied activation conditions, and further determine the scenario mode to be activated corresponding to that activation condition. In other words, the decision engine can determine the scenario mode to be activated through a two-stage decision process.
[0327] For example, the decision engine determines that the currently satisfied activation conditions are condition A1 and condition B1. The decision engine determines from the perceived data that the single activation time of condition B1 is later than the single activation time of condition A1. Based on the decision rules, the decision engine determines that the currently used activation condition is condition B1, and then determines that the scenario mode to be activated is scenario mode B corresponding to condition B1.
[0328] For example, during the execution of scenario mode C triggered by condition C1, the decision engine determines from the perceived data that condition C1 is no longer satisfied and identifies the currently satisfied activation conditions as condition A1 and condition B1. The decision engine also determines from the perceived data that the single activation time of condition B1 is later than that of condition A1. Based on decision rules, the decision engine determines that the currently used activation condition is condition B1, and thus determines the scenario mode to be activated as scenario mode B corresponding to condition B1.
[0329] In one possible implementation, the decision engine can obtain user operation data (such as enabling or disabling scene modes) sent by the perception engine. Based on this operation data, the decision engine can directly determine which scene mode to enable or disable. Specifically, if the decision engine can determine which scene mode to enable at the current time, it does not need to determine which scene mode to disable; it only needs to transmit the information of the scene mode to be enabled to the scene mode app. If the decision engine cannot determine which scene mode to enable at the current time, but only determines which scene mode to disable—for example, if the decision engine receives operation data to disable a scene mode, or if the decision engine determines that no condition is met at the current moment and the current moment is a transition from meeting a certain condition to not meeting that condition—then the decision engine only needs to transmit the information of the scene mode to be disabled to the scene mode app.
[0330] In one possible implementation, the operational data received by the decision engine influences its determination of the scenario mode to be initiated. Specifically, after receiving the operational data, the decision engine can instruct the perception engine to mark any single relevant data of the condition recorded before receiving the operational data as invalid data.
[0331] For example, during the execution of scenario mode C triggered by condition C1, the decision engine receives operation data from the user to close scenario mode C. Although the perception engine can determine from the single-transaction related data stored therein that the currently satisfied activation conditions are condition A1 and condition B1, the single-transaction effective times of conditions A1 and B1 are both before receiving the user's operation to close scenario mode C. Therefore, the single-transaction related data of conditions A1 and B1 are deleted or invalidated. Consequently, based on the decision rules, the decision engine determines that neither activation condition is currently satisfied, and only closes scenario mode C, without opening other scenario modes.
[0332] In another possible implementation, the perception engine can record and update one-off correlation data of the conditions, and the decision module stores the one-off correlation data of the conditions. The decision module can mark the one-off correlation data of the conditions recorded before receiving the operation data as invalid data.
[0333] S709. The decision engine sends the scenario mode to be started to the execution engine.
[0334] In some implementations, after determining the scenario mode to be launched, the decision engine can send information about the scenario mode to be launched to the execution engine.
[0335] Optionally, after determining the scenario mode to be closed, the decision engine can send information about the scenario mode to be closed to the execution engine.
[0336] The S710 execution engine instructs the state management module to switch to the scenario mode to be started via interface M.
[0337] In some implementations, after receiving information about the scenario mode to be started, the execution engine can instruct the state management module to switch to the scenario mode to be started via interface M. For example, interface M can be a ServiceExtension interface provided by the system functionality.
[0338] S711. The status management module starts the scenario mode to be started.
[0339] In some implementations, after receiving a switch to a scenario mode to be launched, the state management module will directly launch the scenario mode to be launched if no other scenario modes have been launched beforehand. If other scenario modes have been launched beforehand, the state management module will first disable those other scenario modes before launching the scenario mode to be launched.
[0340] Optionally, the S712. Perception engine records one-time relevant data of the conditions.
[0341] In some implementations, if the moment when the scenario mode to be started is the moment when the condition used to trigger the scenario mode to be started takes effect only once, the perception engine can record the moment when the condition takes effect only once.
[0342] Based on the above Figure 7B The interactive flowchart shown illustrates that electronic devices can update activation conditions, determine multiple currently met conditions, and select one condition from these conditions to determine the desired scenario mode. This allows the electronic device to choose a scenario mode that better meets the user's expectations.
[0343] The following describes a method flow for switching scenario modes provided by an embodiment of this application.
[0344] Figure 8 An exemplary flowchart of a method for switching scenario modes provided in an embodiment of this application is shown.
[0345] This method is applied to electronic devices, and the method includes:
[0346] S801. When the first condition is detected to be met, the first scenario mode corresponding to the first condition is activated.
[0347] S802. When the second condition is detected while in the first scenario mode, switch from the first scenario mode to the second scenario mode corresponding to the second condition.
[0348] The second condition takes effect later than the first condition.
[0349] In one possible implementation, after executing S802, if the electronic device detects that the second condition is not met, the second scenario mode is disabled. The electronic device then determines whether the first condition is met. If the first condition is met, the first scenario mode is activated. If the first condition is not met, the first scenario mode is not activated.
[0350] In one possible implementation, the electronic device further includes a third scenario mode. After executing S802, the method further includes: disabling the second scenario mode when the electronic device detects that the second condition is not met; determining whether the first condition or the condition associated with the third scenario mode is met; and determining whether to activate the first scenario mode or the third scenario mode based on the determination of the first condition and the condition associated with the third scenario mode.
[0351] Specifically, if the first condition is met but the third condition is not met, the first scenario mode is activated; if the third condition is met but the first condition is not met, the third scenario mode is activated; if both the first and third conditions are met, the single effective time of the third condition and the single effective time of the first condition are determined; if the single effective time of the third condition is later than the single effective time of the first condition, the third scenario mode is activated; if the single effective time of the first condition is later than the single effective time of the third condition, the first scenario mode is activated.
[0352] In one possible implementation, the electronic device further includes at least one other scenario mode. After executing S802, and after switching from the first scenario mode to the second scenario mode corresponding to the second condition, the method further includes: when the electronic device detects that the second condition is not met, disabling the second scenario mode. The electronic device determines whether the first condition or the conditions associated with the other scenario mode are met. Based on the determination of the first condition and the conditions associated with the other scenario modes, it determines whether to activate the first scenario mode or the other scenario mode.
[0353] Specifically, if the first condition is met but the conditions associated with other scenario modes are not met, the first scenario mode is activated; if the first condition is not met but the fourth condition is met, the second scenario mode is deactivated and the fourth scenario mode is activated, where the fourth scenario mode is one of the other scenario modes, and the fourth condition is one of the conditions associated with the fourth scenario mode; if the first condition is met and at least one of the conditions associated with other scenario modes is met, or if the first condition is not met but at least two of the conditions associated with other scenario modes are met, the latest effective condition is determined based on the single effective time of the first condition and at least one of the conditions associated with other scenario modes, and the scenario mode corresponding to the latest effective condition is activated, where the scenario mode corresponding to the latest effective condition is one of the first scenario mode or other scenario modes.
[0354] In one possible implementation, after S802 is executed, when the electronic device meets the second condition and is in the second scenario mode, the first operation of the user to start the third scenario mode is detected, and in response to the first operation, the device switches from the second scenario mode to the third scenario mode.
[0355] In one possible implementation, after switching from a second scenario mode to a third scenario mode in response to a first operation, while the electronic device is in the third scenario mode, if a third condition is not met, the third scenario mode corresponding to the third condition is closed; and / or, in response to a user's operation to close the third scenario mode, the third scenario mode is closed. In another possible implementation, the electronic device further has at least one other scenario mode. After switching from a second scenario mode to a third scenario mode in response to the first operation, while the electronic device is in the third scenario mode, a condition corresponding to another scenario mode that is met is detected. Based on the judgment of the conditions associated with the other scenario mode, it is determined whether to switch to using the other scenario mode.
[0356] Specifically, if the single effective time of the conditions corresponding to other scenario modes is all before the detection of the first operation, then the other scenario modes will not be switched to; if the single effective time of the fifth condition is after the detection of the first operation, then the electronic device will be switched to the scenario mode corresponding to the fifth condition, wherein the fifth condition is the latest single effective time among the conditions associated with other scenario modes.
[0357] In one possible implementation, after executing S802, when the electronic device meets the second condition and is in the second scenario mode, a second operation by the user to close the second scenario mode is detected, and in response to the second operation, the second scenario mode is closed. When the electronic device closes the second scenario mode, a third condition is detected, and the third scenario mode corresponding to the third condition is activated.
[0358] In one possible implementation, the electronic device is further provided with at least one other scenario mode. When the electronic device closes the second scenario mode, it detects the conditions corresponding to the other scenario mode that are met. Based on the judgment of the conditions associated with the other scenario mode, it is determined whether to activate the other scenario mode.
[0359] Specifically, if the single effective time of the conditions corresponding to other scenario modes is all before the detection of the second operation, then other scenario modes will not be activated; if the single effective time of the sixth condition is after the detection of the second operation, then the electronic device will be switched to the scenario mode corresponding to the sixth condition, wherein the sixth condition is the latest single effective time among the conditions associated with other scenario modes.
[0360] In one possible implementation, the first condition includes one or more of the following: the current moment belongs to a first time period, the electronic device is located at a first location, the first application in the electronic device is in a first state, and the user is in a first state.
[0361] In one possible implementation, the scenario modes set in the electronic device include one or more of the following: Do Not Disturb mode, Sleep mode, Study mode, Work mode, Sports mode, Game mode, Audio / Video mode, Driving mode, and Consumption mode. In some implementations, the electronic device can execute based on rules 1-5 above. Figure 8 The method shown. Specifically. Figure 8 The method and process shown can also be referred to the above. Figures 1-7B The content introduced in that article will not be repeated here.
[0362] In one possible implementation, if both of the satisfied conditions have the latest single effective time, the electronic device can prompt the user and allow the user to select one of the two conditions. The electronic device can then activate the scenario mode corresponding to the user-selected condition.
[0363] In this embodiment, the single effective time of a condition is the moment when the electronic device detects a switch from not meeting the condition to meeting it. That is, the single effective time of a condition is related to the specific content included in the condition. For example, the time period included in condition 611A is "8:00 AM to 12:00 PM on weekdays," the single effective time of condition 611A could be "8:00 AM on Friday," and the single invalidation time of condition 611A could be "12:00 PM on Friday." Condition 611C includes the application "when application G is running," the single effective time of condition 611C could be the moment the electronic device starts running application G, and the single invalidation time of condition 611C could be the moment the electronic device stops running application G. Condition 611D includes the application "when near address A," for example, within 400 meters of address A. The single effective time of condition 611D could be the moment the electronic device enters within 400 meters of address A, and the single invalidation time of condition 611D could be the moment the electronic device leaves within 400 meters of address A.
[0364] In this way, electronic devices can rationally select the appropriate scenario mode to use when the activation conditions for different scenario modes are met simultaneously. Furthermore, when a scenario mode is turned off, the electronic device can determine whether to restore other scenario modes that were activated before this one. Moreover, the user's actions of turning scenario modes on or off also affect the electronic device's determination of the appropriate scenario mode. This avoids user misunderstanding and better aligns with user expectations in activating or deactivating scenario modes.
[0365] Figure 9 A schematic diagram of the hardware structure of the electronic device 100 is shown.
[0366] The following description uses electronic device 100 as an example to illustrate the embodiment. It should be understood that... Figure 9 The electronic device 100 shown is merely an example, and the electronic device 100 may have more than Figure 1 The more or fewer components shown can be combined into two or more components, or they can have different component configurations. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0367] For example, electronic device 100 may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle device, smart home device and / or smart city device. This application embodiment does not impose any special restrictions on the specific type of electronic device 100.
[0368] Electronic device 100 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0369] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0370] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0371] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0372] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0373] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0374] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0375] In this embodiment, processor 110 is used to execute the method for switching scenario modes provided in this embodiment. Specifically, processor 110 is used to determine one or more currently satisfied conditions. Processor 110 is also used to determine a currently used condition from the one or more conditions according to the above-described decision rules. Processor 110 is also used to activate the scenario mode corresponding to the determined condition. Processor 110 can also be used to determine one or more currently satisfied conditions when closing the scenario mode based on the failure to satisfy a certain condition. Processor 110 can also be used to record and update single-time related data of the conditions. Processor 110 can also be used to invalidate single-time related data recorded before receiving user activation or deactivation of scenario mode operation. Further details regarding the functions of processor 110 can be found above. Figure 7BThe relevant steps to be performed in the process.
[0376] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0377] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0378] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0379] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0380] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0381] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0382] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0383] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-CDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0384] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0385] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display panel can also be manufactured using organic light-emitting diodes (OLEDs), active-matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), miniled, microled, micro-OLEDs, quantum dot light-emitting diodes (QLEDs), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0386] In this embodiment, the display screen 194 is used to display the user interface related to the scenario mode provided in this application, such as those described above. Figures 6A-6D The user interface shown.
[0387] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0388] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimizations on image noise, brightness, etc. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0389] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0390] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.
[0391] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0392] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0393] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0394] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0395] In this embodiment, the memory can be used to store single-item related data of conditions, such as Tables 1 and 2 above. The memory is also used to store the activation conditions of each scenario mode. Furthermore, the memory is used to store decision rules and condition rules.
[0396] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0397] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0398] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 170A.
[0399] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.
[0400] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 may have at least one microphone 170C. In some embodiments, electronic device 100 may have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 100 may also have three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.
[0401] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0402] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.
[0403] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes). The gyroscope sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the shake of the electronic device 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shake of the electronic device 100 by moving in the opposite direction, thus achieving image stabilization. The gyroscope sensor 180B can also be used in navigation and motion-sensing game scenarios.
[0404] In this embodiment, the gyroscope sensor 180B is used to determine the position of the electronic device.
[0405] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates altitude using the air pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.
[0406] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip cover. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover using the magnetic sensor 180D. Then, based on the detected opening and closing state of the cover or the flip cover, features such as automatic flip unlocking can be set.
[0407] The 180E accelerometer can detect the magnitude of acceleration of electronic device 100 in various directions (typically three axes). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of electronic devices and applied to applications such as screen orientation switching and pedometers.
[0408] A distance sensor 180F is used to measure distance. Electronic device 100 can measure distance via infrared or laser. In some embodiments, during a shooting scene, electronic device 100 can utilize the distance sensor 180F to measure distance for rapid focusing.
[0409] The proximity sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The electronic device 100 emits infrared light outward through the LED. The electronic device 100 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 may use the proximity sensor 180G to detect when a user holds the electronic device 100 close to their ear for a call, so as to automatically turn off the screen to save power. The proximity sensor 180G can also be used in holster mode and pocket mode for automatic unlocking and locking of the screen.
[0410] The ambient light sensor 180L is used to sense the brightness of ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 194 based on the sensed ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also work with the proximity sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[0411] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.
[0412] Temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 uses the temperature detected by temperature sensor 180J to execute a temperature handling strategy. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs thermal protection by reducing the performance of a processor located near temperature sensor 180J to reduce power consumption. In other embodiments, when the temperature is below another threshold, electronic device 100 heats battery 142 to prevent abnormal shutdown of electronic device 100 due to low temperature. In still other embodiments, when the temperature is below yet another threshold, electronic device 100 boosts the output voltage of battery 142 to prevent abnormal shutdown due to low temperature.
[0413] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.
[0414] In this embodiment, the pressure sensor 180A and the touch sensor 180K are used to receive user operations to turn the scene mode on or off.
[0415] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire vibration signals from the vibrating bone segments of the human vocal cords. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure signals. In some embodiments, the bone conduction sensor 180M can also be incorporated into headphones to form bone conduction headphones. The audio module 170 can parse the voice signals from the vibrating bone segments of the vocal cords acquired by the bone conduction sensor 180M to realize voice functionality. The application processor can parse heart rate information from the blood pressure signals acquired by the bone conduction sensor 180M to realize heart rate detection functionality.
[0416] In this embodiment, the bone conduction sensor 180M is used to detect data related to the user's status, such as heart rate, blood pressure, etc.
[0417] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0418] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can correspond to touch operations performed on different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations performed on different areas of the display screen 194. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.
[0419] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.
[0420] The SIM card interface 195 is used to connect the SIM card.
[0421] Figure 10 An exemplary embodiment of the software structure of an electronic device provided in this application is shown.
[0422] like Figure 10As shown, the software architecture of an electronic device can be divided into several layers. In some embodiments, from bottom to top, these layers are: kernel layer, system service layer, framework layer, and application layer. The layers communicate with each other through software interfaces. System functions can be tailored, added, or combined at the subsystem granularity in different device deployment scenarios, and each subsystem can also be tailored, added, or combined at the functional granularity.
[0423] The Kernel Abstraction Layer (KAL) provides basic kernel capabilities to upper layers by shielding the differences between multiple kernels, including but not limited to process / thread management, memory management, file system, network management, and peripheral device management.
[0424] Kernel Subsystem: Supports the selection of a suitable OS kernel for different resource-constrained devices, including but not limited to Linux kernel, HarmonyOS kernel, LiteOS, etc.
[0425] Driver Subsystem: The driver framework is the foundation for the open system hardware ecosystem, providing unified peripheral access capabilities and a framework for driver development and management. The driver framework includes: display drivers, camera drivers, audio drivers, Bluetooth drivers, sensor drivers, etc.
[0426] The system service layer comprises the core capabilities of the system, providing services to applications through the framework layer. This layer includes, but is not limited to, the following subsystems:
[0427] The system's basic capability subsystems provide fundamental capabilities for the operation, scheduling, and migration of distributed applications across multiple devices. For example, they may include distributed soft bus, distributed data management, distributed task scheduling, and compiler / runner; they may also include multi-modal input subsystem, graphics subsystem, security subsystem, and AI subsystem.
[0428] Basic software service subsystems: provide common and general software services; for example, event notification subsystem, telephone service subsystem, multimedia subsystem, etc.
[0429] In some possible implementations, the basic software service subsystem set may include the aforementioned Figure 7A The system includes a status management module, a scenario mode management module, a configuration information management module, and a database. The system's basic capability subsystems may include the aforementioned modules. Figure 7A The diagram shows the decision engine, perception engine, and execution engine.
[0430] Enhanced software service subsystem suite: Provides differentiated capability-enhancing software services for different devices; for example, it may include proprietary business subsystems for smart screens, wearable devices, and IoT devices.
[0431] Hardware service subsystem set: provides hardware services; for example, it may include location service subsystem, user IAM (Identity and Access Management) subsystem, wearable proprietary hardware service subsystem, biometric identification, IoT proprietary hardware service subsystem, etc.
[0432] Distributed task scheduling enables distributed service management (discovery, synchronization, registration, and invocation), supporting remote startup, remote invocation, remote connection, and migration of applications across devices.
[0433] Distributed data management enables data synchronization, data storage, data sharing, and data access across all scenarios and devices.
[0434] The distributed soft bus provides communication-related capabilities for seamless interconnection between multiple devices, including: WLAN service capabilities, Bluetooth service capabilities, soft bus, inter-process communication RPC (Remote Procedure Call) and other communication capabilities.
[0435] A compiler / runner is a unified compilation and runtime platform designed to support the joint compilation and execution of multiple programming languages and multiple chip platforms. For example, a compiler / runner could be the ArkCompiler.
[0436] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. Examples include the UI framework module (which provides a complete infrastructure for UI development, including UI functionalities such as components, layouts, animations, and interactive events, as well as real-time interface preview tools), the user application framework, and the Ability framework (an Ability is a lightweight application; the Ability framework schedules and manages the operation and lifecycle of Abilities). Different devices may run different operating systems, and therefore support different APIs.
[0437] The HarmonyOS API is a series of open capabilities provided to support HarmonyOS application development. The HarmonyOS API can be set at the framework layer or independently of the framework layer. Examples include: Audio API (audio service), Push API (push service), and Account API (account service).
[0438] The application layer can include applications in electronic devices, including but not limited to: scenario modes, etc.
[0439] Electronic devices can implement the method for switching scenario modes provided in the embodiments of this application through the application layer, framework layer, system service layer, and kernel layer.
[0440] This application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the above-described method for switching scenario modes.
[0441] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps in the above-described method embodiments.
[0442] This application also provides a computer program product, including a computing program, which, when run on a computer, enables the computer to perform the steps in the various method embodiments described above.
[0443] This application also provides a chip system, which includes a processing circuit interface circuit. The interface circuit receives code instructions and transmits them to the processing circuit. The processing circuit executes the code instructions to enable the chip system to implement the steps of any method embodiment of this application. The chip system can be a single chip or a chip module composed of multiple chips.
[0444] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for switching scenario modes, characterized in that, The method is applied to an electronic device, the electronic device being configured with a first scenario mode and a second scenario mode, the method comprising: When the first condition is detected to be met, the first scenario mode corresponding to the first condition is activated; When a second condition is detected while in the first scenario mode, the system switches from the first scenario mode to the second scenario mode corresponding to the second condition.
2. The method according to claim 1, characterized in that, The second condition takes effect at a later time than the first condition takes effect at a later time.
3. The method according to claim 1 or 2, characterized in that, After switching from the first scenario mode to the second scenario mode corresponding to the second condition, the method further includes: When the electronic device detects that the second condition is not met, the second scenario mode is turned off; Determine whether the first condition is met; If the first condition is met, the first scenario mode will be activated; If the first condition is not met, the first scenario mode will not be activated.
4. The method according to claim 1 or 2, characterized in that, The electronic device is further provided with a third scenario mode. After switching from the first scenario mode to the second scenario mode corresponding to the second condition, the method further includes: When the electronic device detects that the second condition is not met, the second scenario mode is turned off; Determine whether the first condition or the condition associated with the third scenario mode is met; Based on the judgment of the conditions associated with the first condition and the third scenario mode, it is determined whether to activate the first scenario mode or the third scenario mode.
5. The method according to claim 4, characterized in that, The conditions associated with the third scenario mode include a third condition. The step of determining whether to activate the first scenario mode or the third scenario mode based on the judgment of the first condition and the conditions associated with the third scenario mode specifically includes: If the third condition is not met but the first condition is met, the first scenario mode is activated. If the first condition is not met but the third condition is met, the third scenario mode is activated. If both the first condition and the third condition are met simultaneously, determine the single effective time of the third condition and the single effective time of the first condition; if the single effective time of the third condition is later than the single effective time of the first condition, activate the third scenario mode; if the single effective time of the first condition is later than the single effective time of the third condition, activate the first scenario mode.
6. The method according to claim 1 or 2, characterized in that, The electronic device is further provided with at least one other scenario mode. After switching from the first scenario mode to the second scenario mode corresponding to the second condition, the method further includes: When the electronic device detects that the second condition is not met, the second scenario mode is turned off; Determine whether the first condition or other conditions associated with the scenario pattern are met; Based on the judgment of the first condition and other conditions associated with the scenario mode, determine whether to activate the first scenario mode or other scenario modes.
7. The method according to claim 6, characterized in that, The step of determining whether to activate the first scenario mode or other scenario modes based on the judgment of the first condition and other scenario modes associated with it specifically includes: If the first condition is met and other conditions associated with the scenario mode are not met, the first scenario mode is activated. If the first condition is not met but the fourth condition is met, the second scenario mode is turned off and the fourth scenario mode is started, wherein the fourth scenario mode is one of the other scenario modes, and the fourth condition is one of the conditions associated with the fourth scenario mode. If the first condition is met and at least one of the conditions associated with other scenario modes is met, or if the first condition is not met but at least two of the conditions associated with other scenario modes are met, the latest effective condition is determined based on the single effective time of the first condition and at least one of the conditions associated with other scenario modes, and the scenario mode corresponding to the latest effective condition is activated. The scenario mode corresponding to the latest effective condition is one of the first scenario mode or other scenario modes.
8. The method according to claim 1 or 2, characterized in that, After switching from the first scenario mode to the second scenario mode corresponding to the second condition, the method further includes: When the electronic device meets the second condition and is in the second scenario mode, the first operation of the user to start the third scenario mode is detected. In response to the first operation, the system switches from the second scenario mode to the third scenario mode.
9. The method according to claim 8, characterized in that, After switching from the second scenario mode to the third scenario mode in response to the first operation, the method further includes: When the electronic device is in the third scenario mode, if the third condition is not met, the third scenario mode corresponding to the third condition is turned off; and / or, Detect and respond to the user's action of turning off the third scenario mode, and turn off the third scenario mode.
10. The method according to claim 8, characterized in that, The electronic device is further provided with at least one other scenario mode, and after switching from the second scenario mode to the third scenario mode in response to the first operation, the method further includes: After the electronic device switches to the third scenario mode, conditions corresponding to other scenario modes that are met are detected. Based on the judgment of the conditions associated with other scenario modes, determine whether to switch to using other scenario modes.
11. The method according to claim 10, characterized in that, The determination of whether to switch to another scenario mode based on the conditions associated with other scenario modes specifically includes: If the single effective time of the conditions corresponding to other scenario modes is all before the detection of the first operation, then the other scenario mode will not be switched to be used. If the single effective time of the fifth condition is after the detection of the first operation, the electronic device is switched to the scenario mode corresponding to the fifth condition, wherein the fifth condition is the condition with the latest single effective time among the conditions associated with other scenario modes.
12. The method according to claim 1 or 2, characterized in that, After switching from the first scenario mode to the second scenario mode corresponding to the second condition, the method further includes: When the electronic device meets the second condition and is in the second scenario mode, a second operation by the user to close the second scenario mode is detected. In response to the second operation, the second scenario mode is turned off.
13. The method according to claim 12, characterized in that, After disabling the second scenario mode, the method further includes: When the electronic device turns off the second scenario mode, a third condition is detected and the third scenario mode corresponding to the third condition is activated.
14. The method according to claim 12, characterized in that, The electronic device is further provided with at least one other scenario mode, and after the second scenario mode is turned off, the method further includes: When the electronic device turns off the second scenario mode, conditions corresponding to other scenario modes that are met are detected; Based on the judgment of the conditions associated with other scenario modes, determine whether to activate other scenario modes.
15. The method according to claim 14, characterized in that, The determination of whether to activate other scenario modes by judging the conditions associated with them specifically includes: If the single effective time of the conditions corresponding to other scenario modes is all before the detection of the second operation, then other scenario modes will not be activated. If the single effective time of the sixth condition is after the detection of the second operation, the electronic device is switched to the scenario mode corresponding to the sixth condition, wherein the sixth condition is the latest single effective time among the conditions associated with other scenario modes.
16. The method according to any one of claims 1-15, characterized in that, The first condition includes one or more of the following: the current time belongs to a first time period, the electronic device is located at a first location, the first application in the electronic device is in a first state, and the user is in a first state.
17. The method according to any one of claims 1-16, characterized in that, The scenario modes set in the electronic device include one or more of the following: Do Not Disturb mode, Sleep mode, Study mode, Work mode, Sports mode, Game mode, Audio-visual mode, Driving mode, and Consumption mode.
18. An electronic device, characterized in that, The electronic device includes a memory, a processor, and computer instructions stored in the memory, wherein the processor executes the computer program to implement the method of any one of claims 1-17.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1-17.
20. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a processor, implement the method of any one of claims 1-17.
