WO2018010596A1 - 一种模式切换方法及装置 - Google Patents
一种模式切换方法及装置 Download PDFInfo
- Publication number
- WO2018010596A1 WO2018010596A1 PCT/CN2017/092114 CN2017092114W WO2018010596A1 WO 2018010596 A1 WO2018010596 A1 WO 2018010596A1 CN 2017092114 W CN2017092114 W CN 2017092114W WO 2018010596 A1 WO2018010596 A1 WO 2018010596A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- terminal
- state
- image file
- operating system
- state information
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
Definitions
- the present invention relates to the field of terminal technologies, and in particular, to a mode switching method and apparatus.
- terminals such as smart watches, mobile phones, netbooks, notebook computers, computers, etc.
- These terminals can usually have two working modes, namely, normal mode and power saving mode. These terminals can be switched between two operating modes.
- the terminal when the terminal is in the normal mode, all the functions of the terminal can be used.
- some functions of the terminal are restricted, for example, when the smart watch is in the power saving mode.
- the user can trigger the designated button, etc., so that the terminal restarts the booting process according to the normal booting method to switch the terminal to the normal mode.
- the embodiment of the invention provides a mode switching method and device, which solves the problem that the terminal takes a long time and the user experience is poor when the terminal switches from the power saving mode to the normal mode.
- a mode switching method is provided, where the method is applied to a terminal, where the first operating system and the second operating system are disposed, and when the terminal is in the power saving mode, the second operating system is in a running state, when When the terminal is in the normal mode, the first operating system is in an operating state, and the method includes: when the terminal is in the power saving mode, if the terminal receives the first switching instruction, the terminal detects whether an image file exists; wherein, the first The switching instruction is used to switch the terminal from the power saving mode to the normal mode; the image file includes memory state information when the terminal is in the first operating system; if the image file exists, the terminal terminates the operation of the second operating system; The memory state information restores the state of the terminal to the state when the first operating system is running to switch the terminal from the power saving mode to the normal mode.
- a mode switching device wherein the device is provided with a first operating system and a second operating system, when the device is in the power saving mode, the second operating system is in an operating state, when the device is in the normal mode
- the first operating system is in an operating state
- the device comprising: a detecting unit, configured to be when the mode switching device is In the power saving mode, if the first switching instruction is received, detecting whether there is an image file; wherein the first switching instruction is used to switch the mode switching device from the power saving mode to the normal mode; and the image file includes the mode switching device in the first operation
- the memory state information of the system the termination unit is configured to terminate the operation of the second operating system if the image file exists
- the recovery unit is configured to restore the state of the mode switching device to the operation of the first operating system according to the memory state information State to switch the mode switching device from the power saving mode to the normal mode.
- the terminal when the terminal is switched from the power saving mode to the normal mode, the terminal can detect whether an image file exists, and when the image file exists, quickly restore the state of the terminal to the first operating system according to the image file.
- the state indicated by the memory state information at the time thereby shortening the time for the terminal to switch to the normal mode and improving the user experience.
- the terminal includes a main processor and a microprocessor, the main processor is configured to run a first operating system, and the microprocessor is configured to run the second operating system.
- the method when the terminal is in the power saving mode, if the terminal receives the first switching instruction, the method further includes: when the terminal receives the power-on command of the normal mode, The terminal detects whether an image file exists. If an image file exists, the terminal restores the state of the terminal to the state when the first operating system is running according to the memory state information.
- the detecting unit is further configured to: when the mode switching device receives the power-on command of the normal mode, detecting whether an image file exists; the recovery unit is further configured to: if the image file exists, according to the memory state information, The state of the mode switching device is restored to the state when the first operating system is operating.
- the terminal detects whether an image file exists by receiving a power-on command in a normal mode, and when the image file exists, quickly restores the state of the terminal to the power-on state according to the image file.
- the state which greatly shortens the boot time of the terminal and improves the user experience.
- the image file is an image file when the terminal is in the first state or the second state in the normal mode; wherein the first state is the terminal after the booting of the terminal before the booting The initial state, the second state is the termination state of the terminal before any shutdown before the current startup.
- the image file is an image file when the mode switching device is in the first state or the second state in the normal mode; wherein the first state is that the mode switching device is turned on before the current booting.
- the second state is the termination state of the mode switching device before any shutdown before the current power-on.
- an image file of two different mirroring modes is provided, so that the terminal can be quickly restored to the first state or the second state according to the mirror file of different mirroring modes.
- the terminal restores the state of the terminal to the state in which the first operating system is running according to the memory state information
- the method further includes: determining, by the terminal, the mirroring mode of the image file, where the mirroring mode includes a first state and a second state; if the mirrored form of the image file is the first state, the memory state information includes hardware state information about the at least one hardware, and application state information about the at least one application; correspondingly, the terminal is based on the memory state
- the information the state of the terminal is restored to the state when the first operating system is in operation, and the terminal: recovers the at least one hardware to the state indicated by the hardware state information, and restores the at least one application to the application state according to the memory state information.
- the status indicated by the message is indicated by the message.
- the method further includes: The terminal restores the user status of the terminal to the state indicated by the user usage information according to the user usage information at the time of the first operating system.
- the method further includes: if the mirroring mode of the image file is the second state, the memory state information includes hardware state information about the at least one hardware. And the application state information of the at least one application, and the user usage information; correspondingly, the terminal restores the state of the terminal to the state when the first operating system is running according to the memory state information, including: the terminal according to the memory state information, Recovering at least one hardware to a state indicated by the hardware status information, restoring the at least one application to the status indicated by the application status information, and restoring the user status of the terminal to the status indicated by the user usage information.
- the device further includes: a determining unit, configured to determine a mirroring mode of the image file, where the mirroring mode includes the first state and the second state; and if the mirroring mode of the image file is the first state, the memory state
- the information includes hardware state information about the at least one hardware, and application state information about the at least one application;
- the recovery unit is specifically configured to: restore the at least one hardware to the state indicated by the hardware state information according to the memory state information, and Restore at least one application to the state indicated by the application status information.
- the recovery unit is further configured to: restore the user state of the mode switching device to the state indicated by the user usage information according to the user usage information of the first operating system.
- the memory state information includes hardware state information about the at least one hardware, application state information about the at least one application, and user usage information;
- the recovery unit is specifically configured to: restore the at least one hardware to the state indicated by the hardware state information according to the image file, restore the at least one application to the state indicated by the application state information, and restore the user state of the mode switching device. To the status indicated by the user usage information.
- the terminal may restore the state of the terminal to the first state or the second state according to the memory state information, and when the state of the terminal is restored to the first state, in order to further restore the user state,
- the terminal can also restore the user state according to the user usage information, so that the restored state of the terminal is the same as the state when the user uses the device, thereby further improving the user experience.
- the method further includes: when the terminal is in the normal mode, if receiving the second switching instruction, the terminal detects whether an image file exists; wherein the second switching instruction is used to The normal mode switches to the power saving mode; if the image file exists, the terminal terminates the operation of the first operating system; the terminal runs the second operating system to switch the terminal from the normal mode to the power saving mode.
- the device further includes: a detecting unit, configured to: when the mode switching device is in the normal mode, if the second switching instruction is received, detecting whether an image file exists; wherein, the second switching instruction is used Switching the mode switching device from the normal mode to the power saving mode; the terminating unit is further configured to terminate the operation of the first operating system if the image file exists; and the operating unit is configured to run the second operating system to switch the mode switching device To the power saving mode.
- a detecting unit configured to: when the mode switching device is in the normal mode, if the second switching instruction is received, detecting whether an image file exists; wherein, the second switching instruction is used Switching the mode switching device from the normal mode to the power saving mode; the terminating unit is further configured to terminate the operation of the first operating system if the image file exists; and the operating unit is configured to run the second operating system to switch the mode switching device To the power saving mode.
- the terminal when the terminal switches to the power saving mode, it detects whether an image file exists, and when the image file exists, directly switches the terminal to the power saving mode, thereby ensuring that the terminal switches to the next time. Normal mode can be quickly switched according to the image file.
- the method further includes: if the image file does not exist, the terminal is in the first operating system Memory The status information is mirrored to get an image file.
- the device further includes: a mirroring unit, configured to mirror the memory state information of the mode switching device in the normal mode to obtain an image file if the image file does not exist.
- a mirroring unit configured to mirror the memory state information of the mode switching device in the normal mode to obtain an image file if the image file does not exist.
- the terminal when the terminal switches to the power saving mode, it detects whether an image file exists. When there is no image file, the terminal mirrors the memory state information to obtain an image file, thereby ensuring that the terminal is under Switching to normal mode at a time allows you to quickly switch between image files.
- the memory state information of the terminal in the first operating system is mirrored to obtain an image file, including: the terminal clearing the memory state information in the first operating system, and the Hardware status information, and/or application status information about the preset application; the terminal mirrors the cleared memory status information to obtain an image file.
- the mirroring unit is specifically configured to: clear hardware state information about the preset hardware in the memory state information, and/or application state information about the preset application; and mirror the cleared memory state information. , get the image file.
- the terminal when the terminal mirrors the memory state information, the terminal clears some unnecessary hardware or application states, thereby obtaining a smaller image file, saving storage space and further reducing the storage space.
- the terminal switches to the switching time of the normal mode.
- the method further includes: if the preset update condition is met, the terminal updates the image file; wherein the preset update condition includes at least one of the following: a system version upgrade, an incomplete image file, or an error The image file meets the update cycle.
- the device further includes: an updating unit, configured to update the image file if the preset update condition is met; wherein the preset update condition includes at least one of: a system version upgrade, the mirroring The file is incomplete or incorrect, and the image file meets the update cycle.
- an updating unit configured to update the image file if the preset update condition is met; wherein the preset update condition includes at least one of: a system version upgrade, the mirroring The file is incomplete or incorrect, and the image file meets the update cycle.
- the terminal updates the image file after detecting that the preset update condition is met, thereby ensuring the freshness and integrity of the image file, and ensuring that the state of the terminal after the recovery is the latest after the user is used. status.
- FIG. 1 is a schematic structural diagram of hardware of a terminal according to an embodiment of the present disclosure
- FIG. 2 is a schematic flowchart of a first mode switching method according to an embodiment of the present invention
- FIG. 3 is a schematic flowchart diagram of a second mode switching method according to an embodiment of the present disclosure
- FIG. 4 is a schematic flowchart of a third mode switching method according to an embodiment of the present invention.
- FIG. 5 is a schematic flowchart diagram of a fourth mode switching method according to an embodiment of the present disclosure.
- FIG. 6 is a schematic diagram of switching to a normal mode according to an embodiment of the present invention.
- FIG. 7 is a schematic flowchart diagram of a fifth mode switching method according to an embodiment of the present disclosure.
- FIG. 8 is a schematic diagram of switching to a power saving mode according to an embodiment of the present invention.
- FIG. 9 is a schematic flowchart of a fast booting method according to an embodiment of the present invention.
- FIG. 10 is a schematic flowchart diagram of still another fast booting method according to an embodiment of the present invention.
- FIG. 11 is a schematic structural diagram of a mode switching apparatus according to an embodiment of the present disclosure.
- FIG. 12 is a schematic structural diagram of another mode switching apparatus according to an embodiment of the present disclosure.
- FIG. 13 is a schematic structural diagram of still another mode switching apparatus according to an embodiment of the present invention.
- FIG. 1 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
- the terminal may be a mobile phone, a tablet computer, a notebook computer, an UMPC (Ultra-mobile Personal Computer), a netbook, or a PDA (Personal Digital Assistant,
- the terminal device of the personal digital assistant, the computer, the smart watch, and the like is described by taking the terminal as a smart watch as an example.
- FIG. 1 is a block diagram showing a partial structure of the terminal related to each embodiment of the present invention.
- FIG. 1 is merely illustrative and does not limit the structure of the smart watch.
- the smart watch may also include more or fewer components than shown in FIG. 1, or have a different configuration than that shown in FIG.
- the terminal includes a memory 101, a processor 102, a multimedia component 103, a power component 104, and an input/output interface 105.
- a memory 101 As shown in FIG. 1, the terminal includes a memory 101, a processor 102, a multimedia component 103, a power component 104, and an input/output interface 105.
- the memory 101 can be used to store data, software programs, and modules, and the memory 101 mainly includes a storage program area and a storage data area.
- the storage program area may store an operating system, an application required for at least one function, such as a sound playing function, an image playing function, and the like; the storage data area may store data created according to the use of the terminal, such as audio data, image data, Phone book, etc.
- the memory 101 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
- the processor 102 is a control center of the terminal, which connects various parts of the entire terminal by various interfaces and lines, and executes by executing or executing software programs and/or modules stored in the memory 101, and calling data stored in the memory 101.
- the processor 102 may include multiple processing units, including, for example, an application processor, or an application processor and a microprocessor; preferably, the processor 102 may integrate an application processor and a modem processor, where The application processor mainly processes an operating system, a user interface, an application, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the above described modem processor may also not be integrated into the processor 102.
- the multimedia component 103 provides a screen of an output interface between the terminal and the user, the screen may be a touch panel, and when the screen is a touch panel, the screen may be implemented as a touch screen to receive an input signal from the user.
- the touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel.
- the touch sensor may sense not only the boundary of the touch or sliding action, but also the duration and pressure associated with the touch or slide operation.
- the power component 104 is used to provide power to various components of the terminal, and the power component 105 can include a power management system, one or more power sources, and other components associated with the terminal generating, managing, and distributing power.
- the input/output interface 105 provides an interface between the processor 102 and the peripheral interface module.
- the peripheral interface module may include but is not limited to a physical keyboard, function keys (such as a volume control button, a power switch button, etc.), a trackball, a mouse, One or more of a lever or the like.
- the terminal may further include a sensor, an audio component, a communication component, and the like.
- the audio component includes a microphone
- the communication component includes a WiFi (wireless fidelity) module, a Bluetooth module, etc., and the embodiment of the present invention does not Let me repeat.
- FIG. 2 is a schematic flowchart of a mode switching method according to an embodiment of the present invention. The method is applied to a terminal, where a first operating system and a second operating system are disposed, and when the terminal is in a power saving mode, the second The operating system is in an operating state, and when the terminal is in the normal mode, the first operating system is in an operating state.
- the method includes the following steps.
- Step 201 When the terminal is in the power saving mode, if the first switching instruction is received, detecting whether an image file exists; wherein the first switching instruction is used to switch the terminal from the power saving mode to the normal mode; the image file includes the Memory status information when the terminal is in the first operating system.
- the first operating system and the second operating system are two different operating systems, and the power saving mode of the terminal runs on the second operating system, and the normal mode of the terminal runs on the first operating system.
- the operating system is a collection of system software that manages terminal hardware resources, controls other programs to run and provides interactive operation interfaces for users, and is responsible for managing and configuring memory, determining system resource supply and demand priorities, controlling input and output devices, operating networks and management. Basic tasks such as file system.
- There are many types of operating systems, and the operating systems installed in various terminals can range from simple to complex. Currently, popular modern operating systems mainly include Android, BSD, iOS, Linux, Mac OS X, Windows, Windows Phone, and z/OS.
- part of the function of the terminal is restricted, that is, when the terminal is in the power saving mode, some functions of the terminal can be used, and another limited function cannot be used.
- some functions that are restricted when the terminal is in the power saving mode may be set by the user, or may be set by the terminal by default.
- some of the lesser functions in the terminal are set to be restricted functions, while some important functions are reserved for use in the power saving mode.
- the more important functions of the smart watch may include time display, call, send and receive short messages, etc.
- the secondary functions may include audio and video playback, GPS positioning, Bluetooth connection, etc. Therefore, the system defaults When you set the function to be restricted, you can set the functions of audio and video playback, GPS positioning, Bluetooth connection, etc. as restricted functions.
- the first switching instruction may be triggered by the user or triggered by the terminal.
- the user may trigger by using the first specified operation, which may be a pressing operation, a click operation, a sliding operation, etc., for example, the user may press a specified physical button to trigger, or pass Clicking or sliding the normal mode switching area to trigger;
- the terminal may trigger when the battery power is lower than the preset threshold, or may trigger when the time is within the specified time range, that is, When the terminal meets the preset first trigger condition, the terminal may trigger the first switching instruction.
- the image file may be an image file in a first state or a second state in the normal mode, and the first state is an initial state of the terminal after any power-on before the power-on, the second state For The terminal terminates before any shutdown before this power-on.
- the first state may be an initial state of the terminal after the last power-on before the power-on.
- the initial state refers to the terminal completing the boot process, and the user
- the second state may be the termination state of the terminal before the last shutdown before the power-on,
- the termination state refers to the state that the user ends, and the terminal will perform the state before the shutdown process.
- Step 202 If there is an image file, the terminal terminates the operation of the second operating system.
- the terminal can detect whether an image file exists, and if the image file exists, the terminal can be quickly switched to the normal mode according to the image file, thereby There is no need to re-execute the boot process according to the prior art, which shortens the switching time and thus improves the user experience.
- the terminal may terminate the operation of the second operating system, that is, the terminal stops the application running on the second operating system and the hardware associated with the second operating system.
- the application includes a process of the terminal itself running on the second operating system, a third party application, and the like.
- Step 203 The terminal restores the state of the terminal to the state when the first operating system is running according to the memory state information of the first operating system.
- the terminal may further initialize some devices in the terminal, and then according to the first The memory state information at the time of the operating system restores the state of the terminal to the state when the first operating system is running to switch the terminal from the power saving mode to the normal mode.
- the device in the terminal may include at least one of the following: a Bluetooth module, a wifi module, a multimedia component, a sensor, a touch panel, a GPS positioning chip, and the like.
- the preset device may be set in advance, and the preset device may be at least one of the devices included in the terminal, which is not specifically limited in the embodiment of the present invention.
- the terminal when the terminal detects that no image file exists, the terminal may perform a boot process again according to the prior art, and switch the terminal to the normal mode.
- step 203 the method further includes step 204.
- Step 204 The terminal determines a mirroring mode of the image file, where the mirroring mode includes a first state and a second state.
- the mirroring mode of the image file may include the first state and the second state, and when the mirroring mode of the image file is the first state or the second state, the terminal may be different according to step 203 to restore the state of the terminal. Therefore, the different mirror images of the image file are described separately.
- the memory state information includes hardware state information about the at least one hardware, and application state information about the at least one application.
- the at least one hardware refers to hardware that is in an open state when the terminal is in the first state; the hardware state information refers to a specific state parameter when at least one hardware is in the first state.
- the at least one application refers to an application that is in an open state when the terminal is in the first state, and the application may include not only an application of the terminal system itself, but also an application installed in the terminal.
- the application status information refers to a specific status parameter of at least one application when the terminal is in the first state.
- the hardware state information of the at least one hardware may be a hardware identifier of the at least one hardware, and a state parameter corresponding to each hardware identifier.
- the application state information of the at least one application may be at least one The application ID of the application and the status parameters corresponding to each application ID.
- the Bluetooth module when the smart watch is in the first state, in hardware, if the Bluetooth module is turned on and connected to the Bluetooth BT-A0, at least one hardware includes a Bluetooth module, and when the identifier of the Bluetooth module is ID1
- the hardware status information of the Bluetooth module may be: ID1 is enabled, and BT-A0 is connected; in application, if the mailbox is opened and is in the inbox page, at least one application includes a mailbox, and when the mailbox identifier is ID2, the mailbox
- the application status information can be: ID2 is on and is on the inbox page.
- step 203 the terminal restores the state of the terminal to the state indicated by the memory state information according to the memory state information of the first operating system, specifically step 203a: the terminal according to the memory state information, at least one The hardware is restored to the state indicated by the hardware status information, and the at least one application is restored to the state indicated by the application status information.
- the terminal restores the at least one hardware and the at least one application of the terminal to the state in which the at least one hardware and the at least one application are in the first state according to the memory state information included in the image file.
- step 203a the method further includes: step 205.
- Step 205 The terminal restores the user state of the terminal to the state indicated by the user usage information according to the user usage information of the first operating system.
- the first state is the initial state of the terminal after the power is turned on before the powering on, that is, the terminal completes the booting process, and the user has not used the booting process. Status, so the user status information about the user status is not included in the memory status information. Therefore, after the terminal resumes according to the above step 203a, in order to restore the user status in the terminal to the state when the user used it before, the terminal may The user usage information at the time of the first operating system restores the user state of the terminal to the state indicated by the user usage information.
- the user usage information may be information about the user stored in the terminal, for example, may be stored in a memory of the terminal, and the user usage information may include setting information of the user corresponding terminal, information of the user opening or using the application, and the user. File information and more.
- the user setting information may include a display background of the user to the terminal, an application icon location, an on/off time, a scene mode, and the like; the information of the user opening or using the application may include application information opened by the user, and what is the open application. Status information, etc.; user profile information may include user accounts, passwords, fingerprints, images, and the like.
- the main processor shuts down the terminal according to the user usage information.
- the user usage information includes: shutdown time 6:00, mailbox open and inbox page, user account 123456, password abc
- the main processor shuts down the terminal according to the user usage information.
- the memory state information includes hardware state information about at least one hardware, application state information about at least one application, and user usage information.
- step 203 the terminal restores the state of the terminal to the state of the first operating system according to the memory state information of the first operating system, specifically step 203b: the terminal according to the memory state information, at least one The hardware is restored to the state indicated by the hardware status information, the at least one application is restored to the state indicated by the application state information, and the user state of the terminal is restored to the state indicated by the user usage information.
- hardware state information of at least one hardware in the second case, at least one application The application state information and the user usage information are consistent with the hardware state information of the at least one hardware in the first case, the application state information of the at least one application, and the user usage information.
- the embodiment of the present invention does not Let me repeat.
- the method further includes: Step 206-Step 209.
- Step 206 When the terminal is in the normal mode, if receiving the second switching instruction, the terminal detects whether an image file exists; wherein the second switching instruction is used to switch the terminal from the normal mode to the power saving mode.
- the second switching instruction may be triggered by the user or triggered by the terminal.
- the user may trigger by the second specified operation, the second specified operation is different from the first specified operation, and the second specified operation may be a pressing operation, a click operation, a sliding operation, etc., for example,
- the user can press the specified physical button to trigger, or click or slide the power saving mode switching area to trigger; when the switching instruction is triggered by the terminal, the terminal can trigger when the battery charging power is higher than or equal to the preset threshold.
- the triggering may also be performed when the time is within the specified time range, that is, when the terminal meets the preset second trigger condition, the terminal may trigger the second switching instruction.
- Step 207 If the image file exists, the terminal terminates the operation of the first operating system.
- the terminal When the terminal detects that the image file exists, the terminal does not need to create an image file, that is, the mirroring of the memory state information in the first operating system is not required, and the operation of the first operating system can be directly terminated, that is, the terminal stops running.
- An application on the first operating system and hardware associated with the first operating system the application including a process of the terminal itself running on the first operating system, a third party application, and the like.
- Step 208 If the image file does not exist, mirror the memory state information of the terminal in the first operating system to obtain an image file, and terminate the operation of the first operating system.
- the switch can be quickly switched according to the image file. Therefore, if the terminal detects that the image file does not exist, the terminal can switch to the power-saving mode before The terminal mirrors the memory state information under the first operating system to obtain an image file, and then terminates the operation of the first operating system.
- the image state information of the terminal in the first operating system is mirrored to obtain an image file, which may include: the terminal clears the hardware state information about the preset hardware in the memory state information, and/or the application about the preset application. Status information; mirrors the cleared memory status information to obtain an image file.
- the terminal may first clear some unnecessary preset hardware and/or status information of the preset application, so that the state information corresponding to the preset hardware and/or the preset application is Idle state, so that only the minimum memory state information required when the terminal is in normal mode is retained to reduce the size of the image file.
- the terminal may also adjust the display of the terminal to a dark screen state, so that the screen is in a dark state.
- the memory status information is mirrored to obtain an image file.
- the terminal may further compress the image file to save storage space.
- the terminal may perform the image file again. unzip.
- Step 209 The terminal runs the second operating system to switch the terminal from the normal mode to the power saving mode.
- the terminal When the terminal is switched to the power saving mode, the terminal can be disabled when the terminal is in the power saving mode.
- the terminal may switch the terminal from the power-saving mode to the normal mode according to the foregoing steps 201-205; or, the terminal follows the In the above steps 206-209, the terminal is switched from the normal mode to the power saving mode.
- the terminal updates the image file; wherein the preset update condition includes at least one of the following: the system version is upgraded, the image file is incomplete, or Error, image file meets the update cycle.
- the terminal can detect whether the image file meets the preset update condition, and meets the preset update in the image file. When the condition is met, the image file is updated in a timely manner.
- the terminal detects that the image file meets the system version upgrade, it can detect whether the operating system of the terminal has been upgraded. If it is determined that the terminal has performed the system upgrade, the image file is updated.
- the terminal when the terminal detects whether the image file is incomplete or incorrect, the terminal can detect the CRC code by random loop check, and/or detect whether the file header and the end of the image file are complete, and/or detect that the image file is in the Encryption and decryption during compression and decompression are correct, and / or detect the length of the image file, segmentation, total size is correct, and / or detect the correct version of the image file and so on.
- version of the image file is similar to the version of the software in the prior art, and may be identified by the version number, or by the mirroring time.
- the terminal when the terminal detects whether the image file meets the update period, it means that the terminal can periodically update the image file, and the image file is updated once every other update period, and the update period can be set in advance.
- the terminal may include only one processor, and the processor may be an application processor, and the terminal can implement the power saving mode by using the application processor. Switch between normal modes.
- the mode switching method provided by the embodiment of the present invention detects whether an image file exists by receiving the first switching instruction, and restores the state of the terminal to the memory state of the first operating system according to the image file when the image file exists.
- the status indicated by the information thereby quickly switching the terminal from the power saving mode to the normal mode, reducing the switching time and improving the user experience.
- FIG. 5 is a schematic flowchart of a mode switching method according to an embodiment of the present invention, where a main processor and a microprocessor are disposed in the terminal.
- the microprocessor When the terminal is in the power saving mode, the microprocessor is in the running state, that is, the second operating system is in the running state; when the terminal is in the normal mode, the main processor is in the running state, that is, the first job
- the system is in operation, see Figure 5, which includes the following steps.
- Step 301 When the terminal is in the power saving mode, if the microprocessor receives the first switching instruction, the microprocessor sends a first wake-up instruction to the main processor; wherein the first switching instruction is used to save the terminal by power saving The mode switches to normal mode.
- the main processor of the terminal is electrically connected to the microprocessor.
- the microprocessor is connected to the control power of the main processor through the general-purpose input/output GPIO, and the first wake-up is sent by the microprocessor to the main processor.
- the microprocessor sends a first wake-up command to the main processor to turn on the power of the main processor by controlling the power signal of the main processor.
- Step 302 The main processor performs a power-on process based on the trigger of the first wake-up instruction.
- the main processor After the microprocessor sends the first wake-up instruction to the main processor, the main processor performs a power-on process based on the trigger of the first wake-up instruction, that is, the main processor performs power supply based on the trigger of the first wake-up instruction. Make the main processor boot up.
- Step 303 The main processor detects whether an image file exists, and the image file includes memory state information when the terminal is in the first operating system.
- Step 304 If an image file exists, the main processor restores the state of the terminal to the state when the first operating system is running according to the memory state information.
- the main processor can detect whether an image file exists, and in the case where the image file exists, the main processor can directly according to the image.
- the memory status information included in the file quickly switches the terminal to the normal mode, thereby eliminating the need to re-execute the boot process according to the prior art, shortening the switching time, and thereby improving the user experience.
- step 304 the method further includes step 305.
- Step 305 The main processor determines a mirrored shape of the image file, where the mirror image includes a first state and a second state.
- the mirroring mode of the image file may include the first state and the second state, and when the mirroring mode of the image file is the first state or the second state, the main processor may restore the state of the terminal according to step 304. Different, therefore, the different mirror images of the image file are described separately.
- step 304 the main processor restores the state of the terminal to the state indicated by the memory state information according to the image file, specifically step 304a: The main processor restores the at least one hardware to the state indicated by the hardware status information according to the image file, and restores the at least one application to the state indicated by the application status information.
- step 304a the method further includes: step 306.
- Step 306 The main processor restores the user state of the terminal to the state indicated by the user usage information according to the user usage information in the first operating system.
- the main processor restores the state of the terminal to the state when the first operating system is running according to the memory state information, specifically step 304b: The main processor restores the at least one hardware to the state indicated by the hardware state information according to the memory state information, restores the at least one application to the state indicated by the application state information, and restores the user state of the terminal to the user usage information. status.
- the process of switching the smart watch from the power saving mode to the normal mode is as shown in FIG. 6, and the kernel in the figure is the ACPU core, in the figure.
- the included MCU link, the kernel link, and the operating system link switch the smart watch from the power saving mode to the normal mode in the prior art according to the method of restarting.
- the invention is to start detecting the image file after the kernel driver is initialized in the kernel link, and then perform hardware recovery, application recovery according to the image file, and information according to the user. Quickly restore user status.
- the method further includes: Step 307-Step 311.
- Step 307 When the terminal is in the normal mode, if the main processor receives the second switching instruction, the main processor sends a second wake-up instruction to the microprocessor; wherein the second switching instruction is used to switch the terminal from the normal mode. To the power saving mode.
- the main processor sends the second wake-up instruction to the microprocessor, similar to the method in the step 301, the microprocessor sends the first wake-up instruction to the main processor.
- the microprocessor sends the first wake-up instruction to the main processor.
- Step 308 The main processor detects whether an image file exists.
- Step 309 If the image file exists, the main processor performs a power-off process.
- the main processor When the main processor detects the presence of an image file, the main processor does not need to create an image file, that is, the main processor can directly perform the power-off process without mirroring the memory state information. Specifically, when the main processor performs the power-off process, the main processor may first power off the preset device of the terminal, and then the main processor powers off the self and the memory.
- Step 310 If the image file does not exist, the main processor mirrors the memory state information of the terminal in the normal mode to obtain an image file, and the main processor performs a power-off process.
- the switching can be quickly performed according to the image file. Therefore, if the main processor detects that the image file does not exist, the main processor can switch to the power saving mode.
- the memory state information of the terminal in the normal mode is mirrored to obtain an image file, and then the main processor performs a power-off process.
- the main processor mirrors the memory state information of the terminal in the normal mode, and obtains the image file, which may include: the main processor clears the hardware state information about the preset hardware in the memory state information, and/or the preset application. Application status information; the main processor mirrors the cleared memory status information to obtain an image file.
- the main processor may also adjust the display of the terminal to a dark state, thereby mirroring the memory state information in a dark state. Get the image file.
- the main processor can also compress the image file to save storage space.
- the main processor needs to reply to the state of the terminal according to the image file, the image can be mirrored again. The file is unzipped.
- Step 311 The microprocessor switches the terminal to the power saving mode based on the trigger of the second wakeup instruction.
- the microprocessor When the main processor sends the second wake-up instruction to the microprocessor, based on the trigger of the second wake-up instruction, the microprocessor starts running and switches the terminal to the power saving mode. Wherein, when the microprocessor switches the terminal to the power saving mode, the microprocessor can disable the function that is restricted when the terminal is in the power saving mode, and is responsible for managing the function that can be normally used in the power saving mode.
- the microprocessor when the microprocessor switches the smart watch to the power saving mode, the microprocessor turns off the GPS positioning, Bluetooth connection and the like of the smart watch, and is responsible for managing the time display function and the call of the smart watch, etc.
- the process of switching the smart watch from the normal mode to the power saving mode can be referred to FIG.
- step 307-step 311 and step 301-step 306 the terminal may switch the terminal from the power-saving mode to the normal mode according to steps 301-306 above; or, the terminal according to the terminal In the above steps 307-311, the terminal is switched from the normal mode to the power saving mode.
- the main processor updates the image file; wherein the preset update condition includes at least one of the following: the system version is upgraded, and the image file is incomplete. Or the error, the image file meets the update cycle.
- the preset update condition when the main processor updates the image file is consistent with the preset update condition that is not included when the terminal does not include the main processor and the microprocessor, and the present invention is specifically described above. The embodiments are not described herein again.
- the mode switching method provided by the embodiment of the present invention receives the first switching instruction by the microprocessor, and sends a first wake-up instruction to the main processor, so that the main processor executes the power-on process based on the trigger of the first wake-up instruction, and then, the main The processor detects whether an image file exists, and when the image file exists, restores the state of the terminal to the state indicated by the memory state information according to the image file, thereby quickly switching the terminal from the power saving mode to the normal mode, thereby reducing Switched time and improved user experience.
- FIG. 9 is a schematic flowchart of a fast booting method according to an embodiment of the present invention. Referring to FIG. 9, the method includes the following steps.
- Step 401 When the terminal receives the power-on command of the normal mode, the terminal detects whether an image file exists, and the image file includes memory state information when the terminal is in the first operating system.
- the power-on command of the normal mode can be triggered by the user, and the user can trigger by specifying the operation. For example, in the case of a notebook computer, the user can turn on the power switch first, and select the normal mode to be turned on among the several boot methods provided, so that the notebook computer receives the power-on command in the normal mode.
- the image file may be an image file in a first state or a second state in the normal mode, where the first state is an initial state of the terminal after any power-on before the power-on, and the second state is The terminal terminates before any shutdown before this power-on.
- Step 402 If the image file exists, the terminal restores the state of the terminal to the state when the first operating system is running according to the memory state information of the first operating system.
- the terminal in order to quickly boot the terminal in the normal mode, the terminal can detect whether an image file exists. In the case that the image file exists, the terminal can quickly restore the state of the terminal to the image file.
- the normal mode eliminates the need to boot according to the prior art boot process, thereby shortening the boot time and thereby improving the user experience.
- the terminal when the terminal detects that there is no image file, the terminal may perform a booting process according to the prior art, and the terminal is powered on in the normal mode.
- step 402 the method further includes: step 403.
- Step 403 The terminal determines a mirroring mode of the image file, where the mirroring mode includes a first state and a second state.
- the mirroring mode of the image file may include the first state and the second state, and when the mirroring mode of the image file is the first state or the second state, the terminal may be different according to step 402 to restore the state of the terminal. Therefore, the different mirror images of the image file are described separately.
- the memory state information includes Hardware state information of at least one hardware, and application state information about at least one application.
- the at least one hardware refers to hardware that is in an open state when the terminal is in the first state; the hardware state information refers to a specific state parameter when at least one hardware is in the first state.
- the at least one application refers to an application that is in an open state when the terminal is in the first state, and the application may include not only an application of the terminal system itself, but also an application installed in the terminal.
- the application status information refers to a specific status parameter of at least one application when the terminal is in the first state.
- the hardware state information of the at least one hardware may be a hardware identifier of the at least one hardware, and a state parameter corresponding to each hardware identifier.
- the application state information of the at least one application may be an application identifier of the at least one application. And status parameters corresponding to each application identifier.
- step 402 the terminal restores the state of the terminal to the state when the first operating system is running according to the memory state information of the first operating system, specifically step 402a: the terminal according to the memory state information, at least A piece of hardware is restored to the state indicated by the hardware status information, and the at least one application is restored to the state indicated by the application status information.
- the terminal restores the at least one hardware and the at least one application of the terminal to the state in which the at least one hardware and the at least one application are in the first state according to the memory state information included in the image file.
- step 402a the method further includes: step 404.
- Step 404 The terminal restores the user state of the terminal to the state indicated by the user usage information according to the user usage information of the first operating system.
- the first state is the initial state of the terminal after the power is turned on before the powering on, that is, the terminal completes the booting process, and the user has not used the booting process. Status, so the user status information about the user status is not included in the memory status information. Therefore, after the terminal resumes according to the above step 402a, in order to restore the user status in the terminal to the state when the user used it before, the terminal may The user usage information at the time of the first operating system restores the user state of the terminal to the state indicated by the user usage information.
- the user usage information may be information about the user stored in the terminal, for example, may be stored in a memory of the terminal, and the user usage information may include setting information of the user corresponding terminal, information of the user opening or using the application, and the user. File information and more.
- the user setting information may include a display background of the user to the terminal, an application icon location, an on/off time, a scene mode, and the like; the information of the user opening or using the application may include application information opened by the user, and what is the open application. Status information, etc.; user profile information may include user accounts, passwords, fingerprints, images, and the like.
- the memory state information includes hardware state information about at least one hardware, application state information about at least one application, and user usage information.
- step 402 the terminal restores the state of the terminal to the first operating system running state according to the memory state information of the first operating system, specifically step 402b: the terminal according to the memory state information, at least one The hardware is restored to the state indicated by the hardware status information, the at least one application is restored to the status indicated by the application status information, and the user status of the terminal is restored to the status indicated by the user usage information.
- hardware state information of at least one hardware in the second case application state information of at least one application, and user usage information, and hardware state of at least one hardware in the foregoing first case
- the information, the application state information of the at least one application, and the user usage information are the same.
- the terminal updates the image file; wherein the preset update condition includes at least one of the following: the system version is upgraded, the image file is incomplete, or Error, image file meets the update cycle.
- the method for detecting whether the image file meets the preset update condition is consistent with the operation in the mode switching method provided by the foregoing embodiment.
- the embodiment of the present invention is No longer.
- the terminal comprises a main processor and a microprocessor, the main processor is configured to run a first operating system, and the microprocessor is configured to run the second operating system.
- the main processor of the terminal is electrically connected to the microprocessor, for example, the microprocessor is connected to the main processor through a general-purpose input/output GPIO.
- the fast booting method provided by the embodiment of the present invention detects whether an image file exists by receiving a power-on command in a normal mode, and restores the state of the terminal to the memory state information according to the image file when the image file exists.
- the state which quickly turns the terminal into the normal mode, reduces the boot time and improves the user experience.
- FIG. 11 is a schematic structural diagram of a mode switching device according to an embodiment of the present invention.
- the device is provided with a first operating system and a second operating system.
- the second operating system is in an operating state.
- the first operating system is in an operating state.
- the device includes a detecting unit 501, a terminating unit 502, and a restoring unit 503.
- the detecting unit 501 is configured to: when the mode switching device is in the power saving mode, if the first switching instruction is received, detecting whether an image file exists; wherein the first switching instruction is used to switch the mode switching device from the power saving mode to the normal mode
- the image file includes memory state information when the mode switching device is in the first operating system
- the terminating unit 502 is configured to terminate the operation of the second operating system if the image file exists;
- the recovery unit 503 is configured to restore the state of the mode switching device to the state when the first operating system is running according to the memory state information of the first operating system, to switch the mode switching device from the power saving mode to the normal mode.
- the detecting unit 501 is further configured to: when the mode switching device receives the power-on command of the normal mode, detecting whether an image file exists;
- the recovery unit 503 is further configured to restore the state of the mode switching device to the state when the first operating system is running according to the memory state information of the first operating system if the image file exists.
- the image file is an image file when the mode switching device is in the first state or the second state in the normal mode; wherein the first state is an initial state of the mode switching device after any power-on before the power-on, The second state is the termination state of the mode switching device before any shutdown before the current power-on.
- the apparatus further includes: a determining unit 504.
- the determining unit 504 is configured to determine a mirroring mode of the image file, where the mirroring mode includes a first state and a second state; if the mirroring mode of the image file is the first state, the memory state information includes hardware state information about the at least one hardware, and Application status information of at least one application;
- the recovery unit 503 is specifically configured to: restore the at least one hardware to the state indicated by the hardware state information according to the memory state information, and restore the at least one application to the state indicated by the application state information.
- the recovery unit 503 is further configured to: according to user usage information when the first operating system is used, The user state of the mode switching device is restored to the state indicated by the user usage information.
- the memory state information includes hardware state information about the at least one hardware, application state information about the at least one application, and user usage information;
- the recovery unit 503 is specifically configured to: restore the at least one hardware to the state indicated by the hardware state information according to the memory state information, restore the at least one application to the state indicated by the application state information, and the user of the mode switching device The status is restored to the status indicated by the user usage information.
- the apparatus further includes an operating unit 505.
- the detecting unit 501 is further configured to: when the mode switching device is in the normal mode, if the second switching instruction is received, detecting whether an image file exists; wherein the second switching instruction is used to switch the mode switching device from the normal mode to the power saving mode ;
- the terminating unit 502 is further configured to terminate the operation of the first operating system if the image file exists;
- the operating unit 505 is configured to run the second operating system to switch the mode switching device to the power saving mode.
- the apparatus further includes a mirroring unit.
- the mirroring unit is configured to mirror the memory state information of the mode switching device in the normal mode if an image file does not exist, and obtain an image file.
- the mirroring unit is specifically configured to: clear hardware state information about the preset hardware in the memory state information, and/or application state information about the preset application; and mirror the cleared memory state information to obtain an image file.
- the device further includes an update unit.
- the update unit is configured to update the image file if the preset update condition is met; wherein the preset update condition includes at least one of the following: the system version is upgraded, the image file is incomplete or incorrect, and the image file meets the update period.
- the mode switching device detects whether an image file exists by receiving the first switching instruction, and restores the state of the mode switching device according to the memory state information of the first operating system when the image file exists.
- the state to the time when the first operating system is running, thereby quickly switching the mode switching device from the power saving mode to the normal mode, reducing the switching time and improving the user experience.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Power Sources (AREA)
- Stored Programmes (AREA)
Abstract
一种模式切换方法及装置,涉及终端技术领域。该方法应用于终端,终端中设置有第一作业系统和第二作业系统,当终端处于省电模式时,第二作业系统处于运行状态,当终端处于正常模式时,第一作业系统处于运行状态,包括:当终端处于省电模式时,若终端接收到第一切换指令,终端检测是否存在镜像文件(201);第一切换指令用于将终端由省电模式切换至正常模式;镜像文件包括终端处于第一作业系统时的内存状态信息;若存在镜像文件,终端终止第二作业系统的运行(202);根据内存状态信息,将终端的状态恢复至第一作业系统运行时的状态,以将终端由省电模式切换至正常模式(203)。
Description
本申请要求于2016年07月14日提交中国专利局、申请号为201610555067.0、发明名称为“一种模式切换方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明涉及终端技术领域,尤其涉及一种模式切换方法及装置。
随着终端技术的快速发展,出现了越来越多的终端,比如,智能手表、手机、上网本、笔记本电脑、计算机等等,这些终端通常可以存在两种工作模式,即正常模式和省电模式,这些终端可以在两个工作模式之间进行切换。
目前,当终端处于正常模式时,终端的全部功能均可以开启使用,当终端处于省电模式时,为了降低终端的功耗,终端的部分功能被限制使用,比如,当智能手表处于省电模式时,智能手表的显示界面上只会显示时间,而无法开启诸如GPS定位、音乐播放、拍照等其他功能。如果用户需要将终端由省电模式切换至正常模式,用户可以通过触发指定按键等,以使终端按照正常开机的方法,重新进行一次开机启动过程,以将终端切换至正常模式。
但是,由于终端正常开机时需要的时间较长,以智能手表为例,智能手表开机大约需要20-30秒,从而终端按照正常开机的方法由省电模式切换至正常模式时耗费的时间较长,导致用户体验不佳。
发明内容
本发明的实施例提供一种模式切换方法及装置,解决了现有技术中终端由省电模式切换至正常模式时耗费时间长,用户体验不佳的问题。
为达到上述目的,本发明的实施例采用如下技术方案:
第一方面,提供一种模式切换方法,该方法应用于终端,该终端中设置有第一作业系统和第二作业系统,当该终端处于省电模式时,第二作业系统处于运行状态,当该终端处于正常模式时,第一作业系统处于运行状态,该方法包括:当该终端处于省电模式时,若该终端接收到第一切换指令,该终端检测是否存在镜像文件;其中,第一切换指令用于将该终端由省电模式切换至正常模式;镜像文件包括该终端处于第一作业系统时的内存状态信息;若存在镜像文件,该终端终止第二作业系统的运行;该终端根据内存状态信息,将该终端的状态恢复至第一作业系统运行时的状态,以将该终端由省电模式切换至正常模式。
第二方面,提供一种模式切换装置,该装置中设置有第一作业系统和第二作业系统,当该装置处于省电模式时,第二作业系统处于运行状态,当该装置处于正常模式时,第一作业系统处于运行状态,该装置包括:检测单元,用于当模式切换装置处于
省电模式时,若接收到第一切换指令,检测是否存在镜像文件;其中,第一切换指令用于将模式切换装置由省电模式切换至正常模式;镜像文件包括模式切换装置处于第一作业系统时的内存状态信息;终止单元,用于若存在镜像文件,终止第二作业系统的运行;恢复单元,用于根据内存状态信息,将模式切换装置的状态恢复至第一作业系统运行时的状态,以将模式切换装置由省电模式切换至正常模式。
上述技术方案中,该终端在由省电模式切换至正常模式时,可以检测是否存在镜像文件,并在存在镜像文件时,快速地根据镜像文件,将该终端的状态恢复至第一作业系统运行时的内存状态信息所指示的状态,从而缩短了该终端切换至正常模式的时间,提高了用户体验。
可选的,基于第一方面,该终端包括主处理器和微处理器,主处理器用于运行第一作业系统,微处理器用于运行所述第二作业系统。
对应的,可选的,基于第一方面,当该终端处于省电模式时,若该终端接收到第一切换指令之前,该方法还包括:当该终端接收到正常模式的开机指令时,该终端检测是否存在镜像文件;若存在镜像文件,该终端根据内存状态信息,将该终端的状态恢复至第一作业系统运行时的状态。
可选的,基于第二方面,检测单元,还用于当模式切换装置接收到正常模式的开机指令时,检测是否存在镜像文件;恢复单元,还用于若存在镜像文件,根据内存状态信息,将模式切换装置的状态恢复至第一作业系统运行时的状态。
上述可选的技术方案中,该终端通过在接收到正常模式的开机指令时,检测是否存在镜像文件,并在存在镜像文件时,快速地根据镜像文件,将该终端的状态恢复至开机后的状态,从而大大缩短了该终端的开机时间,提高了用户体验。
可选的,基于第一方面,镜像文件为该终端处于正常模式下的第一状态或者第二状态时的镜像文件;其中,第一状态为该终端在本次开机之前的任一次开机后的初始状态,第二状态为该终端在本次开机之前的任一次关机前的终止状态。
可选的,基于第二方面,镜像文件为模式切换装置处于正常模式下的第一状态或者第二状态时的镜像文件;其中,第一状态为模式切换装置在本次开机之前的任一次开机后的初始状态,第二状态为模式切换装置在本次开机之前的任一次关机前的终止状态。
上述可选的技术方案中,提供了两种不同镜像形态的镜像文件,从而根据不同镜像形态的镜像文件,可以快速的将该终端恢复至第一状态或者第二状态。
可选的,基于第一方面,该终端根据内存状态信息,将该终端的状态恢复至第一作业系统运行时的状态之前,该方法还包括:该终端判断镜像文件的镜像形态,镜像形态包括第一状态和第二状态;若镜像文件的镜像形态为第一状态,内存状态信息包括关于至少一个硬件的硬件状态信息、以及关于至少一个应用的应用状态信息;相应的,该终端根据内存状态信息,将该终端的状态恢复至第一作业系统运行时的状态,包括:该终端根据内存状态信息,将至少一个硬件恢复至硬件状态信息所指示的状态,以及将至少一个应用恢复至应用状态信息所指示的状态。
对应的,可选的,基于第一方面,将至少一个硬件恢复至硬件状态信息所指示的状态,以及将至少一个应用恢复至应用状态信息所指示的状态之后,该方法还包括:
该终端根据第一作业系统时的用户使用信息,将该终端的用户状态恢复至用户使用信息所指示的状态。
对应的,可选的,基于第一方面,该终端判断镜像文件的镜像形态之后,该方法还包括:若镜像文件的镜像形态为第二状态,内存状态信息包括关于至少一个硬件的硬件状态信息、关于至少一个应用的应用状态信息、以及用户使用信息;相应的,该终端根据内存状态信息,将该终端的状态恢复至第一作业系统运行时的状态,包括:该终端根据内存状态信息,将至少一个硬件恢复至硬件状态信息所指示的状态,将至少一个应用恢复至应用状态信息所指示的状态、以及将该终端的用户状态恢复至用户使用信息所指示的状态。
可选的,基于第二方面,该装置还包括:判断单元,用于判断镜像文件的镜像形态,镜像形态包括第一状态和第二状态;若镜像文件的镜像形态为第一状态,内存状态信息包括关于至少一个硬件的硬件状态信息、以及关于至少一个应用的应用状态信息;相应的,恢复单元具体用于:根据内存状态信息,将至少一个硬件恢复至硬件状态信息所指示的状态,以及将至少一个应用恢复至应用状态信息所指示的状态。
对应的,可选的,基于第二方面,恢复单元还具体用于:根据第一作业系统时的用户使用信息,将模式切换装置的用户状态恢复至用户使用信息所指示的状态。
对应的,可选的,基于第二方面,若镜像文件的镜像形态为第二状态,内存状态信息包括关于至少一个硬件的硬件状态信息、关于至少一个应用的应用状态信息、以及用户使用信息;相应的,恢复单元具体用于:根据镜像文件,将至少一个硬件恢复至硬件状态信息所指示的状态,将至少一个应用恢复至应用状态信息所指示的状态、以及将模式切换装置的用户状态恢复至用户使用信息所指示的状态。
上述可选的技术方案中,该终端可以根据内存状态信息将该终端的状态恢复至第一状态或者第二状态,并在将该终端的状态恢复至第一状态时,为了进一步恢复用户状态,该终端还可以根据用户使用信息,对用户状态进行恢复,从而使恢复后的该终端的状态与用户使用时的状态相同,从而进一步提高了用户体验。
可选的,基于第一方面,该方法还包括:当该终端处于正常模式时,若接收到第二切换指令,该终端检测是否存在镜像文件;其中,第二切换指令用于将该终端由正常模式切换至省电模式;若存在所述镜像文件,该终端终止所述第一作业系统的运行;该终端运行第二作业系统,以将该终端由正常模式切换至省电模式。
可选的,基于第二方面,该装置还包括:检测单元,还用于当模式切换装置处于正常模式时,若接收到第二切换指令,检测是否存在镜像文件;其中,第二切换指令用于将模式切换装置由正常模式切换至省电模式;终止单元,还用于若存在镜像文件,终止第一作业系统的运行;运行单元,用于运行第二作业系统,以将模式切换装置切换至省电模式。
上述可选的技术方案中,该终端在切换至省电模式时,检测是否存在镜像文件,并在存在镜像文件时,直接将该终端切换至省电模式,从而保证了该终端在下一次切换至正常模式可以根据镜像文件快速的进行切换。
可选的,基于第一方面,该终端运行第二作业系统,以将该终端切换至省电模式之前,该方法还包括:若不存在镜像文件,该终端对该终端在第一作业系统下的内存
状态信息进行镜像,得到镜像文件。
可选的,基于第二方面,该装置还包括:镜像单元,用于若不存在镜像文件,对模式切换装置在正常模式下的内存状态信息进行镜像,得到镜像文件。
上述可选的技术方案中,该终端在切换至省电模式时,检测是否存在镜像文件,在不存在镜像文件时,该终端对内存状态信息进行镜像,得到镜像文件,从而保证了该终端在下一次切换至正常模式可以根据镜像文件快速的进行切换。
可选的,基于第一方面,对该终端在第一作业系统下的内存状态信息进行镜像,得到镜像文件,包括:该终端清除处于第一作业系统下的内存状态信息中关于预设硬件的硬件状态信息,和/或关于预设应用的应用状态信息;该终端对清除后的内存状态信息进行镜像,得到镜像文件。
可选的,基于第二方面,镜像单元具体用于:清除内存状态信息中关于预设硬件的硬件状态信息,和/或关于预设应用的应用状态信息;对清除后的内存状态信息进行镜像,得到镜像文件。
上述可选的技术方案中,该终端在对内存状态信息进行镜像时,清除一些不必要的硬件或应用的状态,从而可以得到较小的镜像文件,节省了存储空间,同时也进一步减小了该终端切换至正常模式的切换时间。
可选的,基于第一方面,该方法还包括:若满足预设更新条件,该终端对镜像文件进行更新;其中,预设更新条件包括以下至少一个:系统版本升级、镜像文件不完整或错误、镜像文件满足更新周期。
可选的,基于第二方面,该装置还包括:更新单元,用于若满足预设更新条件,对镜像文件进行更新;其中,预设更新条件包括以下至少一个:系统版本升级、所述镜像文件不完整或错误、所述镜像文件满足更新周期。
上述可选的技术方案中,该终端在检测满足预设更新条件,对镜像文件进行更新,从而可以保证镜像文件的新鲜性和完整性,进而保证恢复后该终端的状态为用户使用后的最新状态。
为了更清楚地说明本发明实施例的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种终端的硬件结构示意图;
图2为本发明实施例提供的第一种模式切换方法的流程示意图;
图3为本发明实施例提供的第二种模式切换方法的流程示意图;
图4为本发明实施例提供的第三种模式切换方法的流程示意图;
图5为本发明实施例提供的第四种模式切换方法的流程示意图;
图6为本发明实施例提供的一种切换至正常模式的示意图;
图7为本发明实施例提供的第五种模式切换方法的流程示意图;
图8为本发明实施例提供的一种切换至省电模式的示意图;
图9为本发明实施例提供的一种快速开机方法的流程示意图;
图10为本发明实施例提供的又一种快速开机方法的流程示意图;
图11为本发明实施例提供的一种模式切换装置的结构示意图;
图12为本发明实施例提供的另一种模式切换装置的结构示意图;
图13为本发明实施例提供的又一种模式切换装置的结构示意图。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
图1为本发明实施例提供的一种终端的结构示意图,该终端可以为手机、平板电脑、笔记本电脑、UMPC(Ultra-mobile Personal Computer,超级移动个人计算机)、上网本、PDA(Personal Digital Assistant,个人数字助理)、计算机、智能手表等终端设备,本发明实施例以终端为智能手表为例进行说明,图1示出的是与本发明各实施例相关的终端的部分结构的框图。
本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对智能手表的结构造成限定。例如,该智能手表还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。
如图1所示,该终端包括:存储器101、处理器102、多媒体组件103、电源组件104、输入\输出接口105。下面结合图1对终端的各个构成部件进行具体的介绍:
存储器101可用于存储数据、软件程序以及模块,存储器101主要包括存储程序区和存储数据区。其中,存储程序区可存储操作系统、至少一个功能所需的应用程序,比如声音播放功能、图像播放功能等;存储数据区可存储根据终端的使用所创建的数据,比如音频数据、图像数据、电话本等。此外,存储器101可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
处理器102是终端的控制中心,利用各种接口和线路连接整个终端的各个部分,通过运行或执行存储在存储器101内的软件程序和/或模块,以及调用存储在存储器101内的数据,执行终端的各种功能和处理数据,从而对终端进行整体监控。可选的,处理器102可包括多个处理单元,比如,包括应用处理器,或者包括应用处理器和微处理器;优选的,处理器102可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器102中。
多媒体组件103在终端和用户之间的提供一个输出接口的屏幕,该屏幕可以为触摸面板,且当该屏幕为触摸面板时,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。
电源组件104用于为终端的各个组件提供电源,电源组件105可以包括电源管理系统,一个或多个电源,及其他与终端生成、管理和分配电力相关联的组件。
输入\输出接口105为处理器102和外围接口模块之间提供接口,比如,外围接口模块可以包括但不限于物理键盘、功能键(比如音量控制按键、电源开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
尽管未示出,终端还可以包括传感器、音频组件和通信组件等,比如,音频组件包括麦克风,通信组件包括WiFi(wireless fidelity,无线保真)模块、蓝牙模块等,本发明实施例在此不再赘述。
图2为本发明实施例提供的一种模式切换方法的流程示意图,该方法应用于终端,该终端中设置有第一作业系统和第二作业系统,当该终端处于省电模式时,第二作业系统处于运行状态,当该终端处于正常模式时,第一作业系统处于运行状态,参见图2,该方法包括以下几个步骤。
步骤201:当该终端处于省电模式时,若接收到第一切换指令,检测是否存在镜像文件;其中,第一切换指令用于将该终端由省电模式切换至正常模式;镜像文件包括该终端处于第一作业系统时的内存状态信息。
其中,第一作业系统和第二作业系统是不同的两个操作系统,且该终端的省电模式运行在第二作业系统上,该终端的正常模式运行在第一作业系统上。该操作系统是管理终端硬件资源,控制其他程序运行并为用户提供交互操作界面的系统软件的集合,负责管理与配置内存、决定系统资源供需的优先次序、控制输入与输出设备、操作网络与管理文件系统等基本任务。操作系统的种类很多,各种终端安装的操作系统可从简单到复杂。目前,流行的现代操作系统主要有Android、BSD、iOS、Linux、Mac OS X、Windows、Windows Phone和z/OS等。
该终端处于省电模式是指该终端的部分功能被限制使用,也即是,该终端处于省电模式时,该终端的一部分功能可以使用,另一部分被限制的功能则无法使用。
需要说明的是,该终端处于省电模式时被限制的部分功能可以由用户进行设置,也可以由终端进行默认设置。可选的,将终端中一些比较次要的功能设置为被限制使用的功能,而保留一些比较重要的功能可以在省电模式下使用。
比如,以智能手表为例,智能手表比较重要的功能可以包括时间显示、通话、发送和接收短信息等,比较次要的功能可以包括音视频播放、GPS定位、蓝牙连接等,因此,系统默认设置被限制使用的功能时可以将音视频播放、GPS定位、蓝牙连接等功能设置为被限制使用的功能。
另外,第一切换指令可以由用户触发,也可以由终端触发。当第一切换指令由用户触发时,用户可以通过第一指定操作进行触发,第一指定操作可以为按压操作、点击操作、滑动操作等等,比如,用户可以按压指定物理按键进行触发,或者通过点击或滑动正常模式切换区进行触发;当第一切换指令由终端触发时,终端可以在电池电量低于预设阈值时进行触发,也可以在时间处于指定时间范围时进行触发,也即是,当终端满足预设的第一触发条件时,终端可以触发第一切换指令。
再者,该镜像文件可以为该终端处于正常模式下的第一状态或者第二状态时的镜像文件,第一状态为该终端在本次开机之前的任一次开机后的初始状态,第二状态为
该终端在本次开机之前的任一次关机前的终止状态。
比如,以本次开机之前的上一次开机和关机为例,第一状态可以为该终端在本次开机之前的上一次开机后的初始状态,该初始状态是指该终端完成开机过程,且用户未开始使用时的状态;第二状态可以为该终端在本次开机之前的上一次关机前的终止状态,该终止状态是指用户使用结束,且该终端将执行关机过程之前的状态。
步骤202:若存在镜像文件,该终端终止第二作业系统的运行。
为了快速地将该终端由省电模式切换至正常模式,该终端可以检测是否存在镜像文件,并在存在镜像文件的情况下,可以直接根据镜像文件,快速地将该终端切换至正常模式,从而无需按照现有技术重新执行一次开机过程,缩短了切换时间,进而提高了用户体验。
具体的,当该终端检测并确定存在镜像文件时,该终端可以终止第二作业系统的运行,也即是,该终端停止运行在第二作业系统上的应用以及与第二作业系统相关的硬件,该应用包括运行在第二作业系统上的终端自身的进程、第三方应用等等。
步骤203:该终端根据第一作业系统时的内存状态信息,将该终端的状态恢复至第一作业系统运行时的状态。
其中,该终端在确定存在镜像文件之后,为了保证该终端中的一些器件在该终端的状态恢复之后可以正常使用,该终端还可以先对该终端中的一些器件进行初始化之后,再根据第一作业系统时的内存状态信息,将该终端的状态恢复至第一作业系统运行时的状态,以将该终端由省电模式切换至正常模式。
该终端中的器件可以包括以下至少一个:蓝牙模块、wifi模块、多媒体组件、传感器、触摸面板、GPS定位芯片等等。预设器件可以事先进行设置,且预设器件可以是该终端中包括的器件中的至少一个,本发明实施例对此不作具体限定。
需要说明的是,当该终端检测不存在镜像文件时,该终端可以根据现有技术重新执行一次开机过程,将该终端切换至正常模式。
进一步的,在步骤203之前,该方法还包括步骤204。
步骤204:该终端判断该镜像文件的镜像形态,该镜像形态包括第一状态和第二状态。
由于该镜像文件的镜像形态可以包括第一状态和第二状态,且当该镜像文件的镜像形态为第一状态或者第二状态时,该终端根据步骤203恢复该终端的状态时会有所不同,因此,针对该镜像文件不同的镜像形态,分别进行阐述。
第一种情况、当该镜像文件的镜像形态为第一状态时,该内存状态信息包括关于至少一个硬件的硬件状态信息、以及关于至少一个应用的应用状态信息。
其中,该至少一个硬件是指该终端处于第一状态时,处于开启状态的硬件;硬件状态信息是指至少一个硬件在该终端处于第一状态时具体的状态参数。至少一个应用是指该终端处于第一状态时,处于开启状态的应用,该应用不仅可以包括终端系统自身的应用,还可以包括该终端中安装的应用。应用状态信息是指至少一个应用在该终端处于第一状态时具体的状态参数。
可选的,至少一个硬件的硬件状态信息可以为至少一个硬件的硬件标识,以及与每个硬件标识对应的状态参数;同理,至少一个应用的应用状态信息可以为至少一个
应用的应用标识,以及与每个应用标识对应的状态参数。
比如,以智能手表为例,当智能手表处于第一状态时,在硬件方面,若蓝牙模块开启,且与蓝牙BT-A0连接,则至少一个硬件包括蓝牙模块,当蓝牙模块的标识为ID1时,蓝牙模块的硬件状态信息可以为:ID1开启,且连接BT-A0;在应用方面,若邮箱开启,且处于收件箱页面,则至少一个应用包括邮箱,当邮箱的标识为ID2时,邮箱的应用状态信息可以为:ID2开启,且处于收件箱页面。
相应的,步骤203中,该终端根据第一作业系统时的内存状态信息,将该终端的状态恢复至内存状态信息所指示的状态,具体为步骤203a:该终端根据内存状态信息,将至少一个硬件恢复至硬件状态信息所指示的状态,以及将至少一个应用恢复至应用状态信息所指示的状态。
也即是,该终端根据镜像文件包括的内存状态信息,将该终端的至少一个硬件和至少一个应用,恢复至该终端在第一状态时至少一个硬件和至少一个应用所处的状态。
进一步的,参见图3,在步骤203a之后,该方法还包括:步骤205。
步骤205:该终端根据第一作业系统时的用户使用信息,将该终端的用户状态恢复至用户使用信息所指示的状态。
当该镜像文件的镜像形态为第一状态时,由于第一状态是该终端在本次开机之前的任一次开机后的初始状态,也即是,该终端完成开机过程,且用户还未使用的状态,所以内存状态信息中没有包括关于用户状态的用户使用信息,因此,在该终端按照上述步骤203a恢复之后,为了将该终端中的用户状态恢复至用户之前使用时的状态,该终端可以根据第一作业系统时的用户使用信息,将该终端的用户状态恢复至用户使用信息所指示的状态。
其中,用户使用信息可以是存储在终端中关于用户的信息,比如,可以存储在终端的存储器中,且用户使用信息可以包括用户对应终端的设定信息、用户开启或使用应用的信息,以及用户档案信息等等。比如,用户设定信息可以包括用户对终端的显示背景、应用图标位置、开关机时间、情景模式等等;用户开启或使用应用的信息可以包括用户开启的应用信息、以及开启的应用处于何种状态的信息等等;用户档案信息可以包括用户账号、密码、指纹、图像等等。
以智能手表为例,若用户使用信息包括:关机时间6:00、邮箱开启且处于收件箱页面、用户账号123456、密码abc,则主处理器根据上述用户使用信息,将该终端的关机时间设置为6:00,将邮箱开启并显示在收件箱页面,并在用户档案中记录用户账号为123456,密码为abc。
第二种情况、当该镜像文件的镜像形态为第二状态时,该内存状态信息包括关于至少一个硬件的硬件状态信息、关于至少一个应用的应用状态信息、以及用户使用信息。
相应的,步骤203中,该终端根据第一作业系统时的内存状态信息,将该终端的状态恢复至第一作业系统时的状态,具体为步骤203b:该终端根据内存状态信息,将至少一个硬件恢复至硬件状态信息所指示的状态,将至少一个应用恢复至应用状态信息所指示的状态、以及将该终端的用户状态恢复至用户使用信息所指示的状态。
需要说明的是,第二种情况中的至少一个硬件的硬件状态信息、至少一个应用的
应用状态信息、以及用户使用信息,与上述第一种情况中的至少一个硬件的硬件状态信息、至少一个应用的应用状态信息、用户使用信息一致,具体参见上述描述,本发明实施例在此不再赘述。
进一步的,参见图4,该方法还包括:步骤206-步骤209。
步骤206:当该终端处于正常模式时,若接收到第二切换指令,该终端检测是否存在镜像文件;其中,第二切换指令用于将该终端由正常模式切换至省电模式。
其中,第二切换指令可以由用户触发,也可以由终端触发。当第二切换指令由用户触发时,用户可以通过第二指定操作进行触发,第二指定操作与第一指定操作不同,且第二指定操作可以为按压操作、点击操作、滑动操作等等,比如,用户可以按压指定物理按键进行触发,或者通过点击或滑动省电模式切换区进行触发;当第而切换指令由终端触发时,终端可以在电池充电的电量高于等于预设阈值时进行触发,也可以在时间处于指定时间范围时进行触发,也即是,当终端满足预设的第二触发条件时,终端可以触发第二切换指令。
步骤207:若存在该镜像文件,该终端终止第一作业系统的运行。
当该终端检测存在镜像文件时,该终端无需制作镜像文件,即无需对第一作业系统下的内存状态信息进行镜像,可以直接终止第一作业系统的运行,也即是,该终端停止运行在第一作业系统上的应用以及与第一作业系统相关的硬件,该应用包括运行在第一作业系统上的终端自身的进程、第三方应用等等。
步骤208:若不存在该镜像文件,对该终端在第一作业系统下的内存状态信息进行镜像,得到镜像文件,并终止第一作业系统的运行。
为了保证该终端在下一次由省电模式切换至正常模式时,可以根据镜像文件,快速地进行切换,因此,若该终端检测不存在该镜像文件,该终端可以在切换至省电模式之前,对该终端在第一作业系统下的内存状态信息进行镜像,得到镜像文件,之后,再终止第一作业系统的运行。
其中,对该终端在第一作业系统下的内存状态信息进行镜像,得到镜像文件,可以包括:该终端清除内存状态信息中关于预设硬件的硬件状态信息,和/或关于预设应用的应用状态信息;对清除后的内存状态信息进行镜像,得到镜像文件。
也即是,该终端在制作镜像文件时,可以先将一些不必要的预设硬件和/或预设应用的状态信息进行清除,以使预设硬件和/或预设应用对应的状态信息处于闲置状态,从而只保留该终端处于正常模式时所需的最小内存状态信息,以减小镜像文件的容量大小。
进一步的,该终端对该终端在第一作业系统下的内存状态信息进行镜像之前,为了降低该终端的功耗,还可以将该终端的显示调整为暗屏状态,从而在暗屏状态下对内存状态信息进行镜像,得到镜像文件。
可选的,在得到镜像文件之后,该终端还可以对镜像文件进行压缩,以节省存储空间;相应的,该终端在需要根据镜像文件对该终端的状态进行回复时,可以再对镜像文件进行解压缩。
步骤209:该终端运行第二作业系统,以将该终端由正常模式切换至省电模式。
其中,将该终端切换至省电模式时,该终端可以关闭该终端处于省电模式时被限
制使用的功能,并负责管理处于省电模式时可以正常使用的功能。
需要说明的是,将该终端切换至省电模式的过程与现有技术一致,具体的切换过程可以参考相关技术,本发明实施例对此不作详细阐述。
需要说明的是,上述步骤206-步骤209与步骤201-步骤205不分先后顺序,该终端可以按照上述步骤201-步骤205,将该终端由省电模式切换至正常模式;或者,该终端按照上述步骤206-步骤209,将该终端由正常模式切换至省电模式。
进一步的,在上述步骤201-步骤209的过程中,若满足预设更新条件,该终端对该镜像文件进行更新;其中,预设更新条件包括以下至少一个:系统版本升级、镜像文件不完整或错误、镜像文件满足更新周期。
为了保证该终端可以根据新鲜且完整的镜像文件,及时地对该终端处于第一作业系统下的状态进行恢复,该终端可以检测镜像文件是否满足预设更新条件,并在镜像文件满足预设更新条件时,对镜像文件进行及时的更新。
其中,当该终端检测镜像文件是否满足系统版本升级时,可以检测该终端的操作系统是否进行了版本升级,若确定该终端进行了系统升级,则更新镜像文件。
另外,当该终端检测镜像文件是否不完整或错误时,该终端可以通过随机循环校验CRC码进行检测,和/或检测镜像文件的档头和档尾是否完整,和/或检测镜像文件在压缩和解压缩时的加密和解密是否正确,和/或检测镜像文件的长度、分段、总容量大小是否正确,和/或检测镜像文件的版本是否正确等等。
需要说明的是,镜像文件的版本与现有技术中软件的版本类似,可以通过版本号进行标识,或者通过镜像时间进行标识等等,本发明实施例对此不作具体限定。
再者,当该终端检测镜像文件是否满足更新周期时,是指该终端可以周期性的对镜像文件进行更新,每隔一个更新周期,对镜像文件进行一次更新,该更新周期可以事先进行设置。
上述图2-图4所示的模式切换方法的实施例中,该终端可以只包括一个处理器,该处理器器可以是应用处理器,该终端通过该应用处理器即可实现省电模式和正常模式之间的切换。
本发明实施例提供的模式切换方法,通过在接收第一切换指令时,检测是否存在镜像文件,并在存在镜像文件时,根据镜像文件将该终端的状态恢复至第一作业系统时的内存状态信息所指示的状态,从而将该终端快速地由省电模式切换至正常模式,减小了切换时间,并提高了用户体验。
图5为本发明实施例提供的一种模式切换方法的流程示意图,该终端中设置有主处理器和微处理器。当该终端处于省电模式时,微处理器处于运行状态,也即是,第二作业系统处于运行状态;当该终端处于正常模式时,主处理器处于运行状态,也即是,第一作业系统处于运行状态,参见图5,该方法包括以下几个步骤。
步骤301:当该终端处于省电模式时,若微处理器接收到第一切换指令,微处理器向主处理器发送第一唤醒指令;其中,第一切换指令用于将该终端由省电模式切换至正常模式。
具体的,该终端的主处理器与微处理器之间电性连接,比如,微处理器通过通用输入输出GPIO与主处理器的控制电源连接,当微处理器向主处理器发送第一唤醒指
令时,微处理器通过控制主处理器的电源信号的方式,向主处理器发送第一唤醒指令以开启主处理器的电源。
步骤302:基于第一唤醒指令的触发,主处理器执行上电流程。
当微处理器向主处理器发送第一唤醒指令之后,基于第一唤醒指令的触发,主处理器执行上电流程,也即是,基于第一唤醒指令的触发,为主处理器进行供电,使主处理器进行启动处于运行状态。
步骤303:主处理器检测是否存在镜像文件,该镜像文件包括该终端处于第一作业系统时的内存状态信息。
步骤304:若存在镜像文件,主处理器根据内存状态信息,将该终端的状态恢复至第一作业系统运行时的状态。
具体的,当主处理器上电之后,为了快速地将该终端由省电模式切换至正常模式,主处理器可以检测是否存在镜像文件,在存在镜像文件的情况下,主处理器可以直接根据镜像文件包括的内存状态信息,快速地将该终端切换至正常模式,从而无需按照现有技术重新执行一次开机过程,缩短了切换时间,进而提高了用户体验。
进一步的,在步骤304之前,该方法还包括步骤305。
步骤305:主处理器判断该镜像文件的镜像形态,该镜像形态包括第一状态和第二状态。
由于该镜像文件的镜像形态可以包括第一状态和第二状态,且当该镜像文件的镜像形态为第一状态或者第二状态时,主处理器根据步骤304恢复该终端的状态时会有所不同,因此,针对该镜像文件不同的镜像形态,分别进行阐述。
第一种情况、当该镜像文件的镜像形态为第一状态时,步骤,304中主处理器根据该镜像文件,将该终端的状态恢复至内存状态信息所指示的状态,具体为步骤304a:主处理器根据该镜像文件,将至少一个硬件恢复至硬件状态信息所指示的状态,以及将至少一个应用恢复至应用状态信息所指示的状态。
进一步的,在步骤304a之后,该方法还包括:步骤306。
步骤306:主处理器根据第一作业系统下的用户使用信息,将该终端的用户状态恢复至用户使用信息所指示的状态。
第二种情况、当该镜像文件的镜像形态为第二状态时,步骤304中主处理器根据内存状态信息,将该终端的状态恢复至第一作业系统运行时的状态,具体为步骤304b:主处理器根据内存状态信息,将至少一个硬件恢复至硬件状态信息所指示的状态,将至少一个应用恢复至应用状态信息所指示的状态、以及将该终端的用户状态恢复至用户使用信息所指示的状态。
需要说明的是,图5所示的实施例中的内存状态信息与上述图2-图4所示的实施例中的内存状态信息一致,具体参见上述描述,本发明实施例在此不再赘述。
具体的,以智能手表为例,若主处理器为ACPU,微处理器为MCU,智能手表由省电模式切换至正常模式的过程如图6所示,图中的内核为ACPU内核,图中包括的MCU环节、内核环节、操作系统环节为现有技术中按照重新开机的方式,将智能手表由省电模式切换至正常模式。本发明是在内核环节中的内核驱动初始化以后,即开始检测镜像文件,然后根据镜像文件进行硬件恢复、应用恢复,以及根据用户使用信息
对用户状态进行快速恢复。
进一步的,参见图7,该方法还包括:步骤307-步骤311。
步骤307:当该终端处于正常模式时,若主处理器接收到第二切换指令,主处理器向微处理器发送第二唤醒指令;其中,第二切换指令用于将该终端由正常模式切换至省电模式。
需要说明的是,当主处理器向微处理器发送第二唤醒指令时,与上述步骤301中微处理器向主处理器发送第一唤醒指令的方法类似,具体参见上述步骤301中的描述,本发明实施例在此不再赘述。
步骤308:主处理器检测是否存在镜像文件。
步骤309:若存在该镜像文件,主处理器执行下电流程。
当主处理器检测存在镜像文件时,主处理器无需制作镜像文件,也即是,无需对内存状态信息进行镜像,主处理器可以直接执行下电流程。具体的,当主处理器执行下电流程时,主处理器可以先对该终端的预设器件进行下电,之后,主处理器对自身和内存进行下电。
步骤310:若不存在该镜像文件,主处理器对该终端在正常模式下的内存状态信息进行镜像,得到镜像文件,主处理器执行下电流程。
为了保证该终端在下一次由省电模式切换至正常模式时,可以根据镜像文件,快速地进行切换,因此,若主处理器检测不存在该镜像文件,主处理器可以在切换至省电模式之前,对该终端在正常模式下的内存状态信息进行镜像,得到镜像文件,之后,主处理器执行下电流程。
其中,主处理器对该终端在正常模式下的内存状态信息进行镜像,得到镜像文件,可以包括:主处理器清除内存状态信息中关于预设硬件的硬件状态信息,和/或关于预设应用的应用状态信息;主处理器对清除后的内存状态信息进行镜像,得到镜像文件。
进一步的,主处理器对该终端在正常模式下的内存状态信息进行镜像之前,主处理器也可以将该终端的显示调整为暗屏状态,从而在暗屏状态下对内存状态信息进行镜像,得到镜像文件。
可选的,在得到镜像文件之后,主处理器还可以对镜像文件进行压缩,以节省存储空间;相应的,主处理器在需要根据镜像文件对该终端的状态进行回复时,可以再对镜像文件进行解压缩。
步骤311:基于第二唤醒指令的触发,微处理器将该终端切换至省电模式。
当主处理器将第二唤醒指令发送给微处理器时,基于第二唤醒指令的触发,微处理器开始运行,并将该终端切换至省电模式。其中,微处理器将该终端切换至省电模式时,微处理器可以关闭该终端处于省电模式时被限制使用的功能,并负责管理处于省电模式时可以正常使用的功能。
以智能手表为例,当微处理器将智能手表切换至省电模式时,微处理器关闭智能手表的GPS定位、蓝牙连接等功能,并负责管理智能手表的时间显示功能和通话等,具体的,智能手表由正常模式切换至省电模式过程可以参考图8所示。
需要说明的是,微处理器将该终端切换至省电模式的过程与现有技术一致,具体的切换过程可以参考相关技术,本发明实施例对此不作详细阐述。
需要说明的是,上述步骤307-步骤311与步骤301-步骤306不分先后顺序,该终端可以按照上述步骤301-步骤306,将该终端由省电模式切换至正常模式;或者,该终端按照上述步骤307-步骤311,将该终端由正常模式切换至省电模式。
进一步的,在上述步骤301-步骤311的过程中,若满足预设更新条件,主处理器对该镜像文件进行更新;其中,预设更新条件包括以下至少一个:系统版本升级、镜像文件不完整或错误、镜像文件满足更新周期。
需要说明的是,主处理器对该镜像文件进行更新时的预设更新条件与上述终端未同时包括主处理器和微处理器时所述的预设更新条件一致,具体参见上述描述,本发明实施例在此不再赘述。
本发明实施例提供的模式切换方法,通过微处理器接收第一切换指令,并向主处理器发送第一唤醒指令,使得主处理器基于第一唤醒指令的触发执行上电流程,之后,主处理器检测是否存在镜像文件,并在存在镜像文件时,根据镜像文件将该终端的状态恢复至内存状态信息所指示的状态,从而将该终端快速地由省电模式切换至正常模式,减小了切换时间,并提高了用户体验。
图9为本发明实施例提供的一种快速开机方法的流程示意图,参见图9,该方法包括以下几个步骤。
步骤401:当该终端接收到正常模式的开机指令时,该终端检测是否存在镜像文件,该镜像文件包括该终端处于第一作业系统时的内存状态信息。
其中,正常模式的开机指令可以由用户触发,用户可以通过指定操作进行触发。比如,以笔记本电脑为例,用户可以先打开电源开关,并在提供的几种开机方法中选择正常模式开机,从而使笔记本电脑接收到正常模式的开机指令。
另外,该镜像文件可以为该终端处于正常模式下的第一状态或者第二状态时的镜像文件,第一状态为该终端在本次开机之前的任一次开机后的初始状态,第二状态为该终端在本次开机之前的任一次关机前的终止状态。
步骤402:若存在该镜像文件,该终端根据第一作业系统时的内存状态信息,将该终端的状态恢复至第一作业系统运行时的状态。
具体的,为了快速地将该终端以正常模式进行开机,该终端可以检测是否存在镜像文件,在存在镜像文件的情况下,该终端可以直接根据镜像文件,快速地将该终端的状态恢复至至正常模式,从而无需按照现有技术的开机过程进行开机,从而可以缩短开机时间,进而提高用户体验。
需要说明的是,当该终端检测不存在镜像文件时,该终端可以根据现有技术执行一次开机过程,将该终端以正常模式进行开机。
进一步的,在步骤402之前,该方法还包括:步骤403。
步骤403:该终端判断该镜像文件的镜像形态,该镜像形态包括第一状态和第二状态。
由于该镜像文件的镜像形态可以包括第一状态和第二状态,且当该镜像文件的镜像形态为第一状态或者第二状态时,该终端根据步骤402恢复该终端的状态时会有所不同,因此,针对该镜像文件不同的镜像形态,分别进行阐述。
第I种情况、当该镜像文件的镜像形态为第一状态时,该内存状态信息包括关于
至少一个硬件的硬件状态信息、以及关于至少一个应用的应用状态信息。
其中,该至少一个硬件是指该终端处于第一状态时,处于开启状态的硬件;硬件状态信息是指至少一个硬件在该终端处于第一状态时具体的状态参数。至少一个应用是指该终端处于第一状态时,处于开启状态的应用,该应用不仅可以包括终端系统自身的应用,还可以包括该终端中安装的应用。应用状态信息是指至少一个应用在该终端处于第一状态时具体的状态参数。
可选的,至少一个硬件的硬件状态信息可以为至少一个硬件的硬件标识,以及与每个硬件标识对应的状态参数;同理,至少一个应用的应用状态信息可以为至少一个应用的应用标识,以及与每个应用标识对应的状态参数。
相应的,步骤402中,该终端根据第一作业系统时的内存状态信息,将该终端的状态恢复至第一作业系统运行时的状态,具体为步骤402a:该终端根据内存状态信息,将至少一个硬件恢复至硬件状态信息所指示的状态,以及将至少一个应用恢复至应用状态信息所指示的状态。
也即是,该终端根据镜像文件包括的内存状态信息,将该终端的至少一个硬件和至少一个应用,恢复至该终端在第一状态时至少一个硬件和至少一个应用所处的状态。
进一步的,参见图10,在步骤402a之后,该方法还包括:步骤404。
步骤404:该终端根据第一作业系统时的用户使用信息,将该终端的用户状态恢复至用户使用信息所指示的状态。
当该镜像文件的镜像形态为第一状态时,由于第一状态是该终端在本次开机之前的任一次开机后的初始状态,也即是,该终端完成开机过程,且用户还未使用的状态,所以内存状态信息中没有包括关于用户状态的用户使用信息,因此,在该终端按照上述步骤402a恢复之后,为了将该终端中的用户状态恢复至用户之前使用时的状态,该终端可以根据第一作业系统时的用户使用信息,将该终端的用户状态恢复至用户使用信息所指示的状态。
其中,用户使用信息可以是存储在终端中关于用户的信息,比如,可以存储在终端的存储器中,且用户使用信息可以包括用户对应终端的设定信息、用户开启或使用应用的信息,以及用户档案信息等等。比如,用户设定信息可以包括用户对终端的显示背景、应用图标位置、开关机时间、情景模式等等;用户开启或使用应用的信息可以包括用户开启的应用信息、以及开启的应用处于何种状态的信息等等;用户档案信息可以包括用户账号、密码、指纹、图像等等。
第II种情况、当该镜像文件的镜像形态为第二状态时,该内存状态信息包括关于至少一个硬件的硬件状态信息、关于至少一个应用的应用状态信息、以及用户使用信息。
相应的,步骤402中,该终端根据第一作业系统时的内存状态信息,将该终端的状态恢复至第一作业系统运行时状态,具体为步骤402b:该终端根据内存状态信息,将至少一个硬件恢复至硬件状态信息所指示的状态、将至少一个应用恢复至应用状态信息所指示的状态、以及将该终端的用户状态恢复至用户使用信息所指示的状态。
需要说明的是,第II种情况中的至少一个硬件的硬件状态信息、至少一个应用的应用状态信息、以及用户使用信息,与上述第I种情况中的至少一个硬件的硬件状态
信息、至少一个应用的应用状态信息、用户使用信息一致,具体参见上述描述,本发明实施例在此不再赘述。
进一步的,在上述步骤401-步骤404的过程中,若满足预设更新条件,该终端对该镜像文件进行更新;其中,预设更新条件包括以下至少一个:系统版本升级、镜像文件不完整或错误、镜像文件满足更新周期。
需要说明的是,该终端检测镜像文件是否满足预设更新条件的方法,与上述实施例提供的一种模式切换方法中的操作一致,具体参见上述实施例中的描述,本发明实施例在此不再赘述。
可选的,该终端包括主处理器和微处理器,主处理器用于运行第一作业系统,微处理器用于运行所述第二作业系统。可选的,该终端的主处理器与微处理器之间电性连接,比如,微处理器通过通用输入输出GPIO与主处理器连接。
本发明实施例提供的快速开机方法,通过在接收到正常模式的开机指令时,检测是否存在镜像文件,并在存在镜像文件时,根据镜像文件将该终端的状态恢复至内存状态信息所指示的状态,从而快速地将该终端以正常模式进行开机,减小了开机时间,并提高了用户体验。
图11为本发明实施例提供的一种模式切换装置的结构示意图,该装置中设置有第一作业系统和第二作业系统,当该装置处于省电模式时,第二作业系统处于运行状态,当该装置处于正常模式时,第一作业系统处于运行状态,参见图11,该装置包括:检测单元501、终止单元502和恢复单元503。
检测单元501,用于当模式切换装置处于省电模式时,若接收到第一切换指令,检测是否存在镜像文件;其中,第一切换指令用于将模式切换装置由省电模式切换至正常模式;镜像文件包括模式切换装置处于第一作业系统时的内存状态信息;
终止单元502,用于若存在镜像文件,终止第二作业系统的运行;
恢复单元503,用于根据第一作业系统时的内存状态信息,将模式切换装置的状态恢复至第一作业系统运行时的状态,以将模式切换装置由省电模式切换至正常模式。
在本发明的另一实施例中,检测单元501,还用于当模式切换装置接收到正常模式的开机指令时,检测是否存在镜像文件;
恢复单元503,还用于若存在镜像文件,根据第一作业系统时的内存状态信息,将模式切换装置的状态恢复至第一作业系统运行时的状态。
可选的,镜像文件为模式切换装置处于正常模式下的第一状态或者第二状态时的镜像文件;其中,第一状态为模式切换装置在本次开机之前的任一次开机后的初始状态,第二状态为模式切换装置在本次开机之前的任一次关机前的终止状态。
在本发明的另一实施例中,参见图12,该装置还包括:判断单元504。
判断单元504,用于判断镜像文件的镜像形态,镜像形态包括第一状态和第二状态;若镜像文件的镜像形态为第一状态,内存状态信息包括关于至少一个硬件的硬件状态信息、以及关于至少一个应用的应用状态信息;
相应的,恢复单元503具体用于:根据内存状态信息,将至少一个硬件恢复至硬件状态信息所指示的状态,以及将至少一个应用恢复至应用状态信息所指示的状态。
可选的,恢复单元503还具体用于:根据第一作业系统时的用户使用信息,将模
式切换装置的用户状态恢复至用户使用信息所指示的状态。
在本发明的另一实施例中,若镜像文件的镜像形态为第二状态,内存状态信息包括关于至少一个硬件的硬件状态信息、关于至少一个应用的应用状态信息、以及用户使用信息;
相应的,恢复单元503具体用于:根据内存状态信息,将至少一个硬件恢复至硬件状态信息所指示的状态,将至少一个应用恢复至应用状态信息所指示的状态、以及将模式切换装置的用户状态恢复至用户使用信息所指示的状态。
在本发明的另一实施例中,参见图13,该装置还包括运行单元505。
检测单元501,还用于当模式切换装置处于正常模式时,若接收到第二切换指令,检测是否存在镜像文件;其中,第二切换指令用于将模式切换装置由正常模式切换至省电模式;
终止单元502,还用于若存在镜像文件,终止第一作业系统的运行;
运行单元505,用于运行第二作业系统,以将模式切换装置切换至所述省电模式。
在本发明的另一实施例中,该装置还包括镜像单元。镜像单元,用于若不存在镜像文件,对模式切换装置在正常模式下的内存状态信息进行镜像,得到镜像文件。
可选的,镜像单元具体用于:清除内存状态信息中关于预设硬件的硬件状态信息,和/或关于预设应用的应用状态信息;对清除后的内存状态信息进行镜像,得到镜像文件。
可选的,该装置还包括更新单元。更新单元,用于若满足预设更新条件,对镜像文件进行更新;其中,预设更新条件包括以下至少一个:系统版本升级、镜像文件不完整或错误、镜像文件满足更新周期。
本发明实施例提供的模式切换装置,通过在接收到第一切换指令时,检测是否存在镜像文件,并在存在镜像文件时,根据第一作业系统时的内存状态信息将模式切换装置的状态恢复至第一作业系统运行时的状态,从而将模式切换装置快速地由省电模式切换至正常模式,减小了切换时间,并提高了用户体验。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。
Claims (21)
- 一种模式切换方法,其特征在于,所述方法应用于终端,所述终端中设置有第一作业系统和第二作业系统,当所述终端处于省电模式时,所述第二作业系统处于运行状态,当所述终端处于正常模式时,所述第一作业系统处于运行状态,所述方法包括:当所述终端处于省电模式时,若所述终端接收到第一切换指令,所述终端检测是否存在镜像文件;其中,所述第一切换指令用于将所述终端由所述省电模式切换至所述正常模式;所述镜像文件包括所述终端处于所述第一作业系统时的内存状态信息;若存在所述镜像文件,所述终端终止所述第二作业系统的运行;所述终端根据所述内存状态信息,将所述终端的状态恢复至所述第一作业系统运行时的状态,以将所述终端由所述省电模式切换至所述正常模式。
- 根据权利要求1所述的方法,其特征在于,所述当所述终端处于省电模式时,若所述终端接收到第一切换指令之前,所述方法还包括:当所述终端接收到正常模式的开机指令时,所述终端检测是否存在镜像文件;若存在所述镜像文件,所述终端根据所述内存状态信息,将所述终端的状态恢复至所述第一作业系统运行时的状态。
- 根据权利要求1或2所述的方法,其特征在于,所述镜像文件为所述终端处于正常模式下的第一状态或者第二状态时的镜像文件;其中,所述第一状态为所述终端在本次开机之前的任一次开机后的初始状态,所述第二状态为所述终端在本次开机之前的任一次关机前的终止状态。
- 根据权利要求3所述的方法,其特征在于,所述终端根据所述内存状态信息,将所述终端的状态恢复至所述第一作业系统运行时的状态之前,所述方法还包括:所述终端判断所述镜像文件的镜像形态,所述镜像形态包括所述第一状态和所述第二状态;若所述镜像文件的镜像形态为所述第一状态,所述内存状态信息包括关于至少一个硬件的硬件状态信息、以及关于至少一个应用的应用状态信息;相应的,所述终端根据所述内存状态信息,将所述终端的状态恢复至所述第一作业系统运行时的状态,包括:所述终端根据所述内存状态信息,将所述至少一个硬件恢复至所述硬件状态信息所指示的状态,以及将所述至少一个应用恢复至所述应用状态信息所指示的状态。
- 根据权利要求4所述的方法,其特征在于,所述将所述至少一个硬件恢复至所述硬件状态信息所指示的状态,以及将所述至少一个应用恢复至所述应用状态信息所指示的状态之后,所述方法还包括:所述终端根据所述第一作业系统时的用户使用信息,将所述终端的用户状态恢复至所述用户使用信息所指示的状态。
- 根据权利要求4所述的方法,其特征在于,所述终端判断所述镜像文件的镜像形态之后,所述方法还包括:若所述镜像文件的镜像形态为所述第二状态,所述内存状态信息包括关于至少一个硬件的硬件状态信息、关于至少一个应用的应用状态信息、以及用户使用信息;相 应的,所述终端根据所述内存状态信息,将所述终端的状态恢复至所述第一作业系统运行时的状态,包括:所述终端根据所述内存状态信息,将所述至少一个硬件恢复至所述硬件状态信息所指示的状态,将所述至少一个应用恢复至所述应用状态信息所指示的状态、以及将所述终端的用户状态恢复至所述用户使用信息所指示的状态。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:当所述终端处于正常模式时,若所述终端接收到第二切换指令,所述终端检测是否存在镜像文件;其中,所述第二切换指令用于将所述终端由所述正常模式切换至所述省电模式;若存在所述镜像文件,所述终端终止所述第一作业系统的运行;所述终端运行所述第二作业系统,以将所述终端由所述正常模式切换至所述省电模式。
- 根据权利要求7所述的方法,其特征在于,所述终端运行所述第二作业系统,以将所述终端切换至所述省电模式之前,所述方法还包括:若不存在所述镜像文件,所述终端对所述终端在所述第一作业系统下的内存状态信息进行镜像,得到镜像文件。
- 根据权利要求8所述的方法,其特征在于,所述终端对所述终端在所述第一作业系统下的内存状态信息进行镜像,得到镜像文件,包括:所述终端清除处于所述第一作业系统下的内存状态信息中关于预设硬件的硬件状态信息,和/或关于预设应用的应用状态信息;所述终端对清除后的内存状态信息进行镜像,得到镜像文件。
- 根据权利要求1-9任一项所述的方法,其特征在于,所述方法还包括:若满足预设更新条件,所述终端对所述镜像文件进行更新;其中,所述预设更新条件包括以下至少一个:系统版本升级、所述镜像文件不完整或错误、所述镜像文件满足更新周期。
- 根据权利要求1-10任一项所述的方法,其特征在于,所述终端包括主处理器和微处理器,所述主处理器用于运行所述第一作业系统,所述微处理器用于运行所述第二作业系统。
- 一种模式切换装置,其特征在于,所述装置中设置有第一作业系统和第二作业系统,当所述装置处于省电模式时,所述第二作业系统处于运行状态,当所述装置处于正常模式时,所述第一作业系统处于运行状态,所述装置包括:检测单元,用于当所述模式切换装置处于省电模式时,若接收到第一切换指令,检测是否存在镜像文件;其中,所述第一切换指令用于将所述模式切换装置由所述省电模式切换至所述正常模式;所述镜像文件包括所述模式切换装置处于所述第一作业系统时的内存状态信息;终止单元,用于若存在所述镜像文件,终止所述第二作业系统的运行;恢复单元,用于根据所述内存状态信息,将所述模式切换装置的状态恢复至所述第一作业系统运行时的状态,以将所述模式切换装置由所述省电模式切换至所述正常模式。
- 根据权利要求12所述的装置,其特征在于,所述检测单元,还用于当所述模式切换装置接收到正常模式的开机指令时,检测是否存在镜像文件;所述恢复单元,还用于若存在所述镜像文件,根据所述第一作业系统时的内存状态信息,将所述模式切换装置的状态恢复至所述第一作业系统运行时的状态。
- 根据权利要求12或13所述的装置,其特征在于,所述镜像文件为所述模式切换装置处于正常模式下的第一状态或者第二状态时的镜像文件;其中,所述第一状态为所述模式切换装置在本次开机之前的任一次开机后的初始状态,所述第二状态为所述模式切换装置在本次开机之前的任一次关机前的终止状态。
- 根据权利要求14所述的装置,其特征在于,所述装置还包括:判断单元,用于判断所述镜像文件的镜像形态,所述镜像形态包括所述第一状态和所述第二状态;若所述镜像文件的镜像形态为所述第一状态,所述内存状态信息包括关于至少一个硬件的硬件状态信息、以及关于至少一个应用的应用状态信息;相应的,所述恢复单元,具体用于:根据所述内存状态信息,将所述至少一个硬件恢复至所述硬件状态信息所指示的状态,以及将所述至少一个应用恢复至所述应用状态信息所指示的状态。
- 根据权利要求15所述的装置,其特征在于,所述恢复单元,还具体用于:根据第一作业系统时的用户使用信息,将所述模式切换装置的用户状态恢复至所述用户使用信息所指示的状态。
- 根据权利要求15所述的装置,其特征在于,若所述镜像文件的镜像形态为所述第二状态,所述内存状态信息包括关于至少一个硬件的硬件状态信息、关于至少一个应用的应用状态信息、以及用户使用信息;相应的,所述恢复单元,具体用于:根据所述内存状态信息,将所述至少一个硬件恢复至所述硬件状态信息所指示的状态,将所述至少一个应用恢复至所述应用状态信息所指示的状态、以及将所述模式切换装置的用户状态恢复至用户使用信息所指示的状态。
- 根据权利要求12所述的装置,其特征在于,所述装置还包括:所述检测单元,还用于当所述模式切换装置处于正常模式时,若接收到第二切换指令,检测是否存在镜像文件;其中,所述第二切换指令用于将所述模式切换装置由所述正常模式切换至所述省电模式;所述终止单元,还用于若存在所述镜像文件,终止所述第一作业系统的运行;运行单元,用于运行所述第二作业系统,以将所述模式切换装置切换至所述省电模式。
- 根据权利要求18所述的装置,其特征在于,所述装置还包括:镜像单元,用于若不存在所述镜像文件,对所述模式切换装置在正常模式下的内存状态信息进行镜像,得到镜像文件。
- 根据权利要求19所述的装置,其特征在于,所述镜像单元,具体用于:清除所述内存状态信息中关于预设硬件的硬件状态信息,和/或关于预设应用的应 用状态信息;对清除后的内存状态信息进行镜像,得到镜像文件。
- 根据权利要求12-20任一项所述的装置,其特征在于,所述装置还包括:更新单元,还用于若满足预设更新条件,对所述镜像文件进行更新;其中,所述预设更新条件包括以下至少一个:系统版本升级、所述镜像文件不完整或错误、所述镜像文件满足更新周期。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610555067.0A CN106095065B (zh) | 2016-07-14 | 2016-07-14 | 一种模式切换方法及装置 |
CN201610555067.0 | 2016-07-14 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018010596A1 true WO2018010596A1 (zh) | 2018-01-18 |
Family
ID=57220318
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/092114 WO2018010596A1 (zh) | 2016-07-14 | 2017-07-06 | 一种模式切换方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106095065B (zh) |
WO (1) | WO2018010596A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112198953A (zh) * | 2020-09-27 | 2021-01-08 | 西安墨科通讯科技有限公司 | 终端设备的控制方法、控制装置及控制设备 |
CN114546093A (zh) * | 2022-03-01 | 2022-05-27 | 联想(北京)有限公司 | 控制方法、装置及电子设备和存储介质 |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106095065B (zh) * | 2016-07-14 | 2019-04-19 | 华为技术有限公司 | 一种模式切换方法及装置 |
CN106774794A (zh) * | 2016-11-30 | 2017-05-31 | 宇龙计算机通信科技(深圳)有限公司 | 终端业务的处理方法及装置 |
CN109062678A (zh) * | 2018-07-25 | 2018-12-21 | 努比亚技术有限公司 | 一种工作模式切换方法、可穿戴设备及计算机存储介质 |
CN113325737B (zh) * | 2020-02-28 | 2023-10-13 | Oppo广东移动通信有限公司 | 可穿戴设备控制方法、装置、可穿戴设备和可读存储介质 |
CN115437724A (zh) * | 2021-06-02 | 2022-12-06 | Oppo广东移动通信有限公司 | 界面显示方法、装置、终端设备及计算机可读存储介质 |
CN118276955A (zh) * | 2022-12-30 | 2024-07-02 | 华为技术有限公司 | 芯片启动方法、芯片、电子设备,以及可读存储介质 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140281632A1 (en) * | 2013-03-12 | 2014-09-18 | Canon Kabushiki Kaisha | Electronic apparatus that measures power during power saving state, method of controlling the same, and storage medium |
CN105204931A (zh) * | 2014-06-11 | 2015-12-30 | 联发科技(新加坡)私人有限公司 | 低功耗可穿戴设备及其多操作系统切换、通信及管理方法 |
CN106095065A (zh) * | 2016-07-14 | 2016-11-09 | 华为技术有限公司 | 一种模式切换方法及装置 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101610309B (zh) * | 2009-06-26 | 2014-06-18 | 宇龙计算机通信科技(深圳)有限公司 | 一种移动终端模式切换控制方法、系统及移动终端 |
CN104105227A (zh) * | 2014-04-17 | 2014-10-15 | 美的集团股份有限公司 | 基于不同应用场景的wifi模块工作方法及装置 |
CN105302663B (zh) * | 2015-09-19 | 2019-02-01 | 华为技术有限公司 | 一种镜像开机方法和终端设备 |
-
2016
- 2016-07-14 CN CN201610555067.0A patent/CN106095065B/zh active Active
-
2017
- 2017-07-06 WO PCT/CN2017/092114 patent/WO2018010596A1/zh active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140281632A1 (en) * | 2013-03-12 | 2014-09-18 | Canon Kabushiki Kaisha | Electronic apparatus that measures power during power saving state, method of controlling the same, and storage medium |
CN105204931A (zh) * | 2014-06-11 | 2015-12-30 | 联发科技(新加坡)私人有限公司 | 低功耗可穿戴设备及其多操作系统切换、通信及管理方法 |
CN106095065A (zh) * | 2016-07-14 | 2016-11-09 | 华为技术有限公司 | 一种模式切换方法及装置 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112198953A (zh) * | 2020-09-27 | 2021-01-08 | 西安墨科通讯科技有限公司 | 终端设备的控制方法、控制装置及控制设备 |
CN112198953B (zh) * | 2020-09-27 | 2024-01-26 | 西安墨科通讯科技有限公司 | 终端设备的控制方法、控制装置及控制设备 |
CN114546093A (zh) * | 2022-03-01 | 2022-05-27 | 联想(北京)有限公司 | 控制方法、装置及电子设备和存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN106095065A (zh) | 2016-11-09 |
CN106095065B (zh) | 2019-04-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018010596A1 (zh) | 一种模式切换方法及装置 | |
CN102622079B (zh) | 一种休眠方法、唤醒方法和移动终端设备 | |
US11698792B2 (en) | Method for starting up device and device | |
JP5666591B2 (ja) | 低電力補助プロセッサによってコンピュータを動作させるための方法およびシステム | |
US10241553B2 (en) | Apparatus and method for waking up a processor | |
US9230150B1 (en) | Finger print sensor and auxiliary processor integration in an electronic device | |
EP3160150A1 (en) | Electronic device and method for executing function using speech recognition thereof | |
WO2016161792A1 (zh) | 一种刷机方法及智能终端 | |
US20150058651A1 (en) | Method and apparatus for saving battery of portable terminal | |
WO2016161800A1 (zh) | 系统运行的方法及智能终端 | |
CN110018901B (zh) | 内存回收方法、装置、计算机设备和计算机可读存储介质 | |
WO2010139169A1 (zh) | 终端电量节省方法及装置 | |
US20190294229A1 (en) | Power-on processing method and apparatus of terminal device, and terminal device | |
EP3308246A1 (en) | Background task management | |
CN104572187A (zh) | 一种终端 | |
CN107239169A (zh) | 一种触摸屏触控功能的控制方法及装置 | |
WO2022127341A1 (zh) | 系统切换方法、装置、设备及存储介质 | |
US9672048B2 (en) | Electronic device and method for waking up operating system thereof | |
CN110989820A (zh) | 处理器功耗的控制方法、装置、处理器及电子装置 | |
WO2014176893A1 (zh) | 移动终端的关机方法及装置 | |
CN110543333A (zh) | 针对处理器的休眠处理方法、装置、移动终端和存储介质 | |
WO2023124554A1 (zh) | 应用启动方法、装置、设备及存储介质 | |
CN102044201B (zh) | 行动设备屏幕恒亮显示的装置与方法 | |
CN107203377B (zh) | 一种移动终端的唤醒方法和移动终端 | |
CN108132806B (zh) | 信息处理方法及电子设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17826932 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17826932 Country of ref document: EP Kind code of ref document: A1 |