WO2023130866A1 - 操作系统的切换方法及装置、电子设备、存储介质 - Google Patents

操作系统的切换方法及装置、电子设备、存储介质 Download PDF

Info

Publication number
WO2023130866A1
WO2023130866A1 PCT/CN2022/135980 CN2022135980W WO2023130866A1 WO 2023130866 A1 WO2023130866 A1 WO 2023130866A1 CN 2022135980 W CN2022135980 W CN 2022135980W WO 2023130866 A1 WO2023130866 A1 WO 2023130866A1
Authority
WO
WIPO (PCT)
Prior art keywords
operating system
electronic device
running
state
screen
Prior art date
Application number
PCT/CN2022/135980
Other languages
English (en)
French (fr)
Inventor
陈龙
王照金
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2023130866A1 publication Critical patent/WO2023130866A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • G06F9/441Multiboot arrangements, i.e. selecting an operating system to be loaded
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present application relates to the technical field of electronic equipment, and in particular to an operating system switching method and device, electronic equipment, and a storage medium.
  • the embodiment of the present application discloses an operating system switching method and device, electronic equipment, and a storage medium, which can automatically switch the operating system when the display device is in a screen-off state, thereby improving the intelligence of the equipment.
  • the first aspect of the embodiment of the present application discloses a method for switching an operating system, which is applied to an electronic device, and the electronic device is capable of running a first operating system and a second operating system.
  • the method includes:
  • the electronic device When the display device of the electronic device is in the off-screen state for a first duration, the electronic device switches from running the first operating system to running the second operating system;
  • the second operating system is maintained.
  • the second aspect of the embodiment of the present application discloses an operating system switching device, which is applied to electronic equipment, and the electronic equipment can run a first operating system and a second operating system, and the device includes:
  • the first switching unit is configured to switch the electronic device from running the first operating system to running the second operating system when the display device of the electronic device is in a screen-off state for a first duration;
  • a holding unit configured to hold the second operating system when the display device is switched from the screen-off state to the screen-on state.
  • the third aspect of the embodiment of the present application discloses an electronic device, including:
  • a processor coupled to the memory
  • the processor invokes the executable program code stored in the memory to execute the operating system switching method disclosed in the first aspect of the embodiments of the present application.
  • the fourth aspect of the embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program causes the computer to execute the operating system switching method disclosed in the first aspect of the embodiment of the present application.
  • the fifth aspect of the embodiment of the present application discloses a computer program product.
  • the computer program product When the computer program product is run on a computer, the computer is made to execute part or all of the steps of any method of the first aspect of the embodiment of the present application.
  • the sixth aspect of the embodiment of the present application discloses an application release platform, the application release platform is used to release a computer program product, wherein, when the computer program product runs on a computer, the computer executes the first aspect of the embodiment of the present application. Part or all of the steps of any one method in one aspect.
  • FIG. 1 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of an operating system switching method disclosed in an embodiment of the present application
  • FIG. 3 is a schematic flow diagram of another operating system switching method disclosed in the embodiment of the present application.
  • FIG. 4 is a schematic flowchart of another operating system switching method disclosed in the embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of an operating system switching device disclosed in an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of another electronic device disclosed in an embodiment of the present application.
  • the embodiment of the present application discloses an operating system switching method and device, electronic equipment, and a storage medium, which can automatically switch the operating system when the display device is in a screen-off state, thereby improving the intelligence of the equipment.
  • an application scenario applicable to the operating system switching method is firstly introduced.
  • the method can be applied to various electronic devices including multiple operating systems, including but not limited to portable devices such as mobile phones and tablet computers, wearable devices such as smart watches and smart bracelets, and desktop devices such as TVs and desktop computers , is not limited here.
  • FIG. 1 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application.
  • the electronic device may include a plurality of different operating systems, and FIG. 1 only exemplarily shows two operating systems (namely, the first operating system 110 and the second operating system 120), which should not be used in the embodiment of the present application. constituting a limit.
  • the computing processing capability and operating power consumption of the first operating system 110 and the second operating system 120 may be different.
  • the first operating system 110 may include but not limited to Andorid (Android) operating system, Linux operating system
  • the second operating system 120 may include but not limited to real-time operating system (Real Time Operating System, RTOS), windows operating system .
  • RTOS Real Time Operating System
  • the electronic device may include a first processor and a second processor, and the first processor and the second processor may be central processing units (central processing unit, CPU), configured to perform various logical operations and controls.
  • the first operating system 110 can be installed on the first processor included in the electronic device
  • the second operating system 120 can be installed on the second processor included in the electronic device
  • signal transmission can be established between the first processor and the second processor.
  • the link enables communication interaction between the first processor and the second processor.
  • the electronic device can directly switch from the first operating system to the second operating system.
  • this invention does not require the user to manually switch the operating system, which improves the intelligence of the electronic device; and also avoids the switching of the operating system when the display device is in the bright state, thereby causing the display device to have a blurred screen.
  • the electronic device can continue to use the second operating system, so as to avoid frequently switching the operating system, thereby affecting the normal operation of the electronic device.
  • FIG. 2 is a schematic flowchart of an operating system switching method disclosed in an embodiment of the present application. The method can be applied to the above-mentioned electronic device, and the electronic device can run the first operating system and the second operating system, and the method can include the following steps:
  • the electronic device may include multiple different operating systems, for example, 3, 4, etc., which is not limited here. It can be understood that, for the switching between every two operating systems among the multiple different operating systems, the switching can be performed through the operating system switching method disclosed in the embodiment of the present application.
  • the first operating system may be the operating system currently used by the electronic device, that is, most of the logical operations that the electronic device currently needs to perform can be performed by the first operating system, and the first operating system may have peripheral devices included in the electronic device (including but not limited to display devices, buttons, speakers, etc.).
  • a display device especially a display device including a touch screen
  • the electronic device may switch from the first operating system to the second operating system when it is determined that the display device of the electronic device is in a screen-off state for a first duration.
  • the first duration may be 0 seconds, that is, the electronic device may immediately switch from the first operating system to the second operating system when it is determined that the display device is in a screen-off state, thereby increasing the switching speed.
  • the electronic device is switched to the second operating system as soon as the display device is turned off, and the electronic device needs to use the first operating system in a short period of time, the electronic device needs to be operated from the second operating system.
  • the system is switched to the first operating system, which will cause the electronic device to frequently switch operating systems in a short period of time, which may affect the normal operation of the electronic device.
  • the first duration may be greater than 0 seconds, such as 10 seconds, 20 seconds, etc., which is not limited herein. Therefore, after the screen of the display device is turned off, a certain buffer time can be given to the electronic equipment, thereby avoiding the situation of frequently switching operating systems in a short period of time.
  • the second operating system will be the main operating system used by the electronic device to perform most of the logic operations in the electronic device, and has The control rights of the peripheral devices included in the electronic equipment, so if the display device is switched from the off-screen state to the on-screen state, the electronic equipment is switched from the second operating system to the first operating system, which may cause the second operating system to be The work tasks performed are interrupted, thereby affecting the normal operation of electronic equipment.
  • the electronic device may keep running the second operating system after determining that the display device switches from the screen-off state to the screen-on state.
  • the electronic device may further switch the electronic device from the The second operating system is switched to the first operating system. Conversely, if the electronic device does not meet the first switching condition, the electronic device can maintain the second operating system, so as to avoid interruption of the work tasks being executed by the second operating system and avoid frequent switching of operating systems by the electronic device.
  • the first switching condition may include that the first operating system is in an idle state without performing work tasks, and/or the work tasks to be performed by the electronic device need to use the first operating system, which is not limited herein.
  • the electronic device when it is determined that the display device of the electronic device is in the off-screen state for a first duration, the electronic device can automatically switch from the first operating system to the second operating system without requiring manual switching by the user , improving the intelligence of the electronic equipment; in addition, it can also avoid the switching of the operating system when the display device is in the bright screen state, thereby causing the display device to have a blurred screen. Further, after the electronic device is switched from the first operating system to the second operating system, if it is detected that the display device is switched from the screen-off state to the screen-on state, the electronic device can maintain the second operating system, thereby avoiding frequent switching Operating system, which in turn affects the normal operation of electronic equipment.
  • FIG. 3 is a schematic flowchart of another method for switching an operating system disclosed in an embodiment of the present application.
  • the method can be applied to the above-mentioned electronic device, and the electronic device can run the first operating system and the second operating system, and the method can include the following steps:
  • the electronic device switches from running the first operating system to running the second operating system.
  • the work tasks being executed by the first operating system may be interrupted.
  • the electronic device may further switch the electronic device from the first operating system to the second operating system.
  • the second switching condition may include that the first operating system is in an idle state, and the idle state refers to a state in which the target work task is not executed. and display a specific interface.
  • the electronic device when the electronic device determines that the display device is in the off-screen state for a first duration and the first operating system satisfies the second switching condition, the electronic device may turn off the first operating system without shutting down the first operating system. Switch from the first operating system to the second operating system.
  • the display device of the electronic device when the display device of the electronic device is in the off-screen state for the first duration, it may be judged at intervals of the second duration whether the first operating system satisfies the second switching condition; and, if it is determined that the first If the operating system satisfies the second switching condition, the electronic device switches from running the first operating system to running the second operating system.
  • the electronic device may trigger a cycle detection mechanism, which is a mechanism for judging whether the first operating system satisfies the second switching condition every second time interval. Further, if it is determined through the cycle detection mechanism that the first operating system satisfies the second switching condition, the electronic device may switch from the first operating system to the second operating system.
  • the second duration may be determined by developers based on a large amount of development experience, and a typical value may be 1 second, 2 seconds, etc., which is not limited here.
  • the electronic device when the first operating system does not meet the second switching condition, can continuously detect whether the first operating system meets the second switching condition through a periodic detection mechanism, so that when the first operating system meets the second switching condition , switch the electronic device to the second operating system at the first time, thereby improving the intelligence of the electronic device.
  • the electronic device may exit the cycle detection mechanism to avoid running the first operating system.
  • the cycle detection mechanism detects that the first operating system meets the second switching condition and switches the electronic device from the first operating system to the second operating system, the work tasks being executed by the first operating system are interrupted Condition.
  • the display device of the electronic device when the display device of the electronic device is in the off-screen state for a first duration and the first operating system is executing the target task, then acquire the target task being executed by the first operating system;
  • the cycle detection mechanism is triggered; if the predicted duration is greater than or equal to the duration threshold, the trigger cycle detection mechanism is prohibited until the display device is switched to a bright screen state.
  • a trigger event for causing the display device to enter the screen-off state may be acquired, and the trigger event may include a manual trigger event and a timed screen-off trigger event.
  • the manual trigger event refers to the event that the user actively turns off the screen of the electronic device
  • the scheduled screen-off trigger event refers to the event that the electronic device does not detect any operation on the display device within a certain period of time, and then automatically turns off the display device.
  • the electronic device may adjust the first duration according to the trigger event that causes the display device to enter the screen-off state, to obtain the adjusted first duration.
  • the electronic device switches from running the first operating system to running the second operating system.
  • the first duration can be adjusted to 0 seconds, that is, the electronic device can immediately switch the electronic device from The first operating system is switched to the second operating system. It can be understood that the user actively turns off the screen of the display device, indicating that the user does not need to use the display device temporarily, so the electronic device can be switched from the first operating system to the second operating system immediately.
  • the first duration can be adjusted to be greater than 0 seconds, such as 10 seconds, 20 seconds, etc., which is not limited here. . It is understandable that after the electronic device enters the screen-off state due to the scheduled screen-off function, the user may use the display device and the first operating system again at any time, so after the display device is turned off, a certain buffer time is given to the electronic device to avoid The situation of switching operating systems frequently in a short period of time is eliminated.
  • the electronic device can further obtain the current system time of the electronic device and the user's physiological data; if the current system time is within the rest period , and the physiological data of the user matches the target data, the first duration is adjusted to 0 seconds, wherein the target data is corresponding physiological data when the user is in a sleep state.
  • the first duration can be set Adjust to 0 seconds to immediately switch the electronic device from the first operating system to the second operating system.
  • the operating power consumption of the second operating system may be lower than that of the first operating system
  • the first switching condition may include that the current power of the electronic device is greater than the first power threshold (the specific value can be set by the developer based on a large amount of development experience, Typical values are 20%, 25% and so on of the total battery capacity of the electronic device, which are not limited here). It can be understood that if the electronic device does not meet the first switching condition for switching to the first operating system, it means that the current power of the electronic device is less than or equal to the first power threshold and is in a low power state. This is to prolong the battery life of the electronic device For a period of time, the electronic device can continue to use the second operating system with low power consumption.
  • Implementing the methods disclosed in the above-mentioned embodiments can automatically switch the electronic device from the first operating system to the second operating system without the need for the user to manually switch, which improves the intelligence of the electronic device;
  • the operating system is switched when the screen is on, resulting in a blurry screen on the display device; and avoiding frequent switching of the operating system, thereby affecting the normal operation of the electronic device; and avoiding the switching of the electronic device from the first operating system
  • the work tasks currently being executed by the first operating system are interrupted, thereby affecting the normal operation of the electronic device; accurately detecting whether the first operating system satisfies the second switching condition, so that when the first operating system satisfies the second switching condition, the electronic device is switched to the second operating system at the first time, thereby improving the intelligence of the electronic device; and , it can avoid subsequent switching of the electronic device from the first operating system to the second operating system due to the cycle detection mechanism detecting that the first operating system satisfies the second switching condition during the running of the first
  • FIG. 4 is a schematic flowchart of another operating system switching method disclosed in an embodiment of the present application.
  • the method can be applied to the above-mentioned electronic device, and the electronic device can run the first operating system and the second operating system, and the method can include the following steps:
  • the electronic device switches from running the first operating system to running the second operating system.
  • the electronic device may include a first processor and a second processor, wherein the first processor and the second processor may be a central processing unit (central processing unit, CPU) for executing various logics operation and control.
  • the first operating system may be installed on the first processor, and the second operating system may be installed on the second processor.
  • the first processor and the computing processing capability may be greater than the computing processing capability of the second processor, so that when the electronic device uses the first operating system, the computing processing capability of the electronic device can be improved, thereby improving the performance of the electronic device, Including improving the running speed of the application, improving the picture quality, etc.
  • the operating power consumption of the second processor may be lower than that of the first processor, so that when the electronic device is switched from the first operating system to the second operating system, the power consumption of the electronic device may be reduced. consumption.
  • the electronic device can run more than two operating systems, and the operating power consumption corresponding to each operating system is different.
  • the electronic device can determine the operating system with the lowest power consumption as the second operating system among the operating systems that the electronic device can run, Furthermore, the electronic device can switch from the first operating system to the second operating system.
  • the electronic device when the electronic device is currently in low power, the electronic device can be switched to the operating system with the lowest power consumption, so as to prolong the battery life of the electronic device.
  • the control right of the display device may be switched from the first operating system to the second operating system.
  • the second operating system will handle most of the transportation control logic in the electronic device.
  • the display device's The control right is switched from the first operating system to the second operating system.
  • the first operating system may be controlled to enter a sleep state.
  • the dormant state refers to a state in which only some necessary functions are running and other functions except the necessary functions are turned off.
  • the necessary functions may include sensor functions, operating system wake-up functions, etc., which are not limited here.
  • the first operating system can be controlled to enter a dormant state, so as to close some unnecessary functions, thereby achieving the effect of reducing power consumption of the electronic device.
  • the electronic device can be automatically switched from the first operating system to the second operating system without the need for the user to manually switch, which improves the intelligence of the electronic device;
  • the operating system is switched, resulting in a blurred screen on the display device; and, avoiding frequent switching of the operating system, thereby affecting the normal operation of the electronic device; and, switching the first operating system to After the background, control the first operating system to enter the sleep state to turn off some unnecessary functions, so as to achieve the effect of reducing the power consumption of electronic devices; and, during the system switching process, it is possible to prohibit the playback of switching animations to avoid the first
  • the boot animation of the operating system and the shutdown animation of the second operating system are displayed on the display device to give the user the feeling that the system is switching, thereby achieving the effect of non-inductive switching; and, when switching the first operating system, the electronic device can be improved. computing and processing capabilities, thereby improving the performance of electronic devices, including increasing the running speed of applications,
  • FIG. 5 is a schematic structural diagram of an operating system switching device disclosed in an embodiment of the present application.
  • the device can be applied to the above-mentioned electronic device, and the electronic device can run the first operating system and the second operating system, and the device can include a first switching unit 501 and a holding unit 502, wherein:
  • the first switching unit 501 is configured to switch the electronic device from running the first operating system to running the second operating system when the display device of the electronic device is in a screen-off state for a first duration;
  • the holding unit 502 is configured to hold the second operating system when the display device switches from the screen-off state to the screen-on state.
  • the electronic device when the electronic device determines that the display device of the electronic device is in the off-screen state for the first duration, it can automatically switch the electronic device from the first operating system to the second operating system without the need for the user to manually switch, which improves the electronic performance.
  • the degree of intelligence of the equipment in addition, it can also avoid the switching of the operating system when the display device is in the bright screen state, which will cause the display device to have a blurry screen.
  • the electronic device can maintain the second operating system, thereby avoiding frequent switching of the operating system, thereby affecting the normal operation of the electronic device.
  • the device shown in FIG. 5 further includes a second switching unit not shown, wherein:
  • the second switching unit is configured to detect that the display device is switched from the screen-off state to the screen-on state after the electronic device is switched from running the first operating system to running the second operating system, and the electronic device meets the requirements for switching to the first operating system the first switching condition, the electronic device is switched from running the second operating system to running the first operating system.
  • the first switching unit 501 is further configured to switch the electronic device to Switch from running the first operating system to running the second operating system.
  • Implementing the above-mentioned device can prevent the interruption of the work tasks currently being executed by the first operating system when the electronic device is switched from the first operating system to the second operating system, thereby affecting the normal operation of the electronic device.
  • the first switching unit 501 is further configured to judge whether the first operating system satisfies the second duration at intervals of the second duration when the display device of the electronic device is in the off-screen state for the first duration. a switching condition; and, if the first operating system satisfies the second switching condition, the electronic device switches from running the first operating system to running the second operating system.
  • the first switching unit 501 is also configured to trigger the cycle detection mechanism when the display device of the electronic device is in the off-screen state for a first duration and the first operating system does not meet the second switching condition
  • the cycle detection mechanism is a mechanism for judging whether the first operating system satisfies the second switching condition every second time interval; The system switches to the second operating system.
  • the device shown in FIG. 5 also includes an unillustrated exit unit, wherein:
  • the exit unit is configured to exit the period detection mechanism if it is detected that the display device is switched from the screen-off state to the screen-on state during the process of triggering the cycle detection mechanism after the cycle detection mechanism is triggered.
  • Implementing the above-mentioned device can avoid subsequent switching of the electronic device from the first operating system to the second operating system due to the cycle detection mechanism detecting that the first operating system meets the second switching condition during the running of the first operating system. A condition that results in an interruption of a work task being performed by the first operating system.
  • the second switching condition includes that the first operating system is in an idle state, and the idle state refers to a state where the target work task is not executed.
  • Implementing the above-mentioned device can prevent the interruption of the work tasks currently being executed by the first operating system when the electronic device is switched from the first operating system to the second operating system, thereby affecting the normal operation of the electronic device.
  • the device shown in FIG. 5 also includes a control unit not shown, wherein:
  • the control unit is used for controlling the first operating system to enter a sleep state after switching the electronic device from the first operating system to the second operating system.
  • the first operating system can be controlled to enter a dormant state, so as to close some unnecessary functions, thereby achieving the effect of reducing power consumption of electronic equipment.
  • the device shown in FIG. 5 also includes an unillustrated prohibition unit, wherein:
  • the prohibiting unit is configured to prohibit triggering of the shutdown animation of the first operating system and the boot animation of the second operating system during the process of switching the electronic device from the first operating system to the second operating system.
  • the electronic device includes a first processor and a second processor, the first processor is used to run a first operating system, the second processor is used to run a second operating system, and the second processor runs The power consumption is less than the operating power consumption of the first processor.
  • Implementing the above-mentioned device can improve the computing and processing capability of the electronic device when switching the first operating system, thereby improving the performance of the electronic device, including increasing the running speed of the application program, improving the image quality, etc.; and when switching to the second operating system , reduce the power consumption of electronic equipment, thereby improving the flexibility of electronic equipment when performing work tasks.
  • the device shown in FIG. 5 may further include a third switching unit, wherein:
  • the third switching unit is configured to switch the control right of the display device from the first operating system to the second operating system after the electronic device switches from running the first operating system to running the second operating system.
  • FIG. 6 is a schematic structural diagram of another electronic device disclosed in an embodiment of the present application.
  • the electronic equipment may include:
  • a memory 601 storing executable program codes
  • processor 602 coupled to the memory 601;
  • the processor 602 invokes the executable program code stored in the memory 601 to execute the operating system switching method disclosed in the foregoing embodiments.
  • the embodiment of the present application discloses a computer-readable storage medium, which stores a computer program, wherein the computer program causes the computer to execute the operating system switching method disclosed in the foregoing embodiments.
  • the embodiment of the present application also discloses an application distribution platform, wherein the application distribution platform is used to distribute computer program products, wherein, when the computer program products are run on the computer, the computer is made to execute part of the method in the above method embodiments or all steps.
  • the units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, located in one place, or distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the above-mentioned integrated units are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-accessible memory.
  • the technical solution of the present application in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a memory , including several requests to make a computer device (which may be a personal computer, server, or network device, etc., specifically, a processor in the computer device) execute some or all of the steps of the above-mentioned methods in various embodiments of the present application.
  • ROM read-only Memory
  • RAM random access memory
  • PROM programmable read-only memory
  • EPROM Erasable Programmable Read Only Memory
  • OTPROM One-time Programmable Read-Only Memory
  • EEPROM Electronically Erasable Programmable Read-Only Memory
  • CD-ROM Compact Disc Read-Only Memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Power Sources (AREA)

Abstract

本申请实施例涉及电子设备技术领域,公开了操作系统的切换方法及装置、电子设备、存储介质,该方法应用于电子设备,该电子设备能够运行第一操作系统和第二操作系统,该方法包括:在电子设备的显示装置处于熄屏状态达到第一时长的情况下,电子设备由运行第一操作系统切换至运行第二操作系统;以及,若显示装置从熄屏状态切换至亮屏状态,则保持第二操作系统。实施本申请实施例,能够在显示装置处于熄屏状态时,自动切换操作系统,提高了设备的智能化程度。

Description

操作系统的切换方法及装置、电子设备、存储介质
本申请要求于2022年1月4日提交、申请号为202210002314.X、发明名称为“操作系统的切换方法及装置、电子设备、存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子设备技术领域,具体涉及一种操作系统的切换方法及装置、电子设备、存储介质。
背景技术
随着电子设备技术的快速发展,如今的电子设备可以同时安装有多个不同的操作系统,多个不同的操作系统可以分别用于执行不同的任务,从而提高了电子设备的运行处理能力。
在实践中发现,在如今的电子设备中,不同操作系统之间的切换通常需要用户手动进行,智能化程度低。
发明内容
本申请实施例公开了一种操作系统的切换方法及装置、电子设备、存储介质,能够在显示装置处于熄屏状态时,自动切换操作系统,提高了设备的智能化程度。
本申请实施例第一方面公开一种操作系统的切换方法,应用于电子设备,所述电子设备能够运行第一操作系统及第二操作系统,所述方法包括:
在所述电子设备的显示装置处于熄屏状态达到第一时长的情况下,所述电子设备由运行所述第一操作系统切换至运行所述第二操作系统;
若所述显示装置从所述熄屏状态切换至亮屏状态,则保持所述第二操作系统。
本申请实施例第二方面公开一种操作系统的切换装置,应用于电子设备,所述电子设备能够运行第一操作系统及第二操作系统,所述装置包括:
第一切换单元,用于在所述电子设备的显示装置处于熄屏状态达到第一时长的情况下,所述电子设备由运行所述第一操作系统切换至运行所述第二操作系统;
保持单元,用于在所述显示装置从所述熄屏状态切换至亮屏状态,保持所述第二操作系统。
本申请实施例第三方面公开一种电子设备,包括:
存储有可执行程序代码的存储器;
与所述存储器耦合的处理器;
所述处理器调用所述存储器中存储的所述可执行程序代码,执行本申请实施例第一方面公开的操作系统的切换方法。
本申请实施例第四方面公开一种计算机可读存储介质,其存储计算机程序,其中,所述计算机程序使得计算机执行本申请实施例第一方面公开的操作系统的切换方法。
本申请实施例第五方面公开一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行本申请实施例第一方面的任意一种方法的部分或全部步骤。
本申请实施例第六方面公开一种应用发布平台,所述应用发布平台用于发布计算机程序产品,其中,当所述计算机程序产品在计算机上运行时,使得所述计算机执行本申请实施例第一方面的任意一种方法的部分或全部步骤。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图进行简单的介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例公开的一种电子设备的结构示意图;
图2是本申请实施例公开的一种操作系统的切换方法的流程示意图;
图3是本申请实施例公开的另一种操作系统的切换方法的流程示意图;
图4是本申请实施例公开的又一种操作系统的切换方法的流程示意图;
图5是本申请实施例公开的一种操作系统的切换装置的结构示意图;
图6是本申请实施例公开的另一种电子设备的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整的描述,显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,本申请实施例的术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。此外可以理解,本申请实施例的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同的对象,而不是用于描述特定顺序。
本申请实施例公开了一种操作系统的切换方法及装置、电子设备、存储介质,能够在显示装置处于熄屏状态时,自动切换操作系统,提高了设备的智能化程度。
以下将结合具体实施例进行详细描述。
为了更加清楚地说明本申请实施例公开的操作系统的切换方法及装置、电子设备、存储介质,首先介绍一种适用该操作系统的切换方法的应用场景。可选的,该方法可以应用于各种包括多操作系统的电子设备,包括但不限于手机、平板电脑等便携式设备,智能手表、智能手环等可穿戴设备,以及电视、台式电脑等台式设备,在此不作限定。
请参阅图1,图1是本申请实施例公开的一种电子设备的结构示意图。可选的,该电子设备可以包括多个不同的操作系统,图1仅是示例性地示出两个操作系统(即第一操作系统110和第二操作系统120),不应对本申请实施例构成限定。其中,第一操作系统110与第二操作系统120的运算处理能力及运行功耗可以是不同的。可选的,第一操作系统110可以包括但不限于Andorid(安卓)操作系统、Linux操作系统,第二操作系统120可以包括但不限于实时操作系统(Real Time Operating System,RTOS)、windows操作系统。
可选的,电子设备可以包括第一处理器和第二处理器,第一处理器和第二处理器可以是中央处理器(central processing unit,CPU),用于执行各种逻辑运算和控制。第一操作系统110可以安装于电子设备包括的第一处理器,第二操作系统120可以安装于电子设备包括的第二处理器,第一处理器和第二处理器之间可以建立有信号传输链路,使得第一处理器和第二处理器之间可以进行通信交互。进一步的,在第一处理器和第二处理之间建立有信号传输链路的情况下,若电子设备的显示装置处于熄屏状态达到第一时长(例如0秒、5秒、10秒,在此不作限定),则电子设备可以直接从第一操作系统切换至第二操作系统。其中,在切换的过程中不需要先关闭第一操作系统,再启动第二操作系统,从而提高了电子设备从第一操作系统切换至第二操作系统的速度;此外相比较于相关技术,本申请实施 例不需要用户手动切换操作系统,提高了电子设备的智能化程度;以及,还可以避免在显示装置处于亮屏状态时进行操作系统的切换,进而导致显示装置出现花屏的情况。
进一步地,若电子设备的显示装置从熄屏状态切换至亮屏状态,则电子设备可以继续保持使用第二操作系统,以避免频繁地切换操作系统,进而影响电子设备的正常运行。
基于此,以下内容对本申请实施例公开的操作系统的切换方法进行介绍。
请参阅图2,图2是本申请实施例公开的一种操作系统的切换方法的流程示意图。该方法可以应用于上述的电子设备,该电子设备能够运行第一操作系统和第二操作系统,该方法可以包括以下步骤:
202、在电子设备的显示装置处于熄屏状态达到第一时长的情况下,电子设备由运行第一操作系统切换至运行第二操作系统。
本申请实施例中,电子设备可以包括多个不同的操作系统,例如3个、4个等,在此不作限定。可以理解的是,对于多个不同操作系统中每两个操作系统之间的切换,都可以通过本申请实施例公开的操作系统的切换方法进行切换。
其中,第一操作系统可以是电子设备当前正在使用的操作系统,即电子设备当前需要执行的大部分逻辑运算可以由第一操作系统执行,以及第一操作系统可以拥有电子设备包括的外设装置(包括但不限于显示装置、按键、扬声器等)的控制权。可以理解的是,显示装置(特别是包括触控屏幕的显示装置)是用户与电子设备进行交互的窗口,对此若显示装置处于熄屏状态,则说明用户可能未在使用电子设备,所以此时将第一操作系统切换至第二操作系统并不会中断用户在第一操作系统上执行的操作。对此可选的,电子设备可以在确定电子设备的显示装置处于熄屏状态达到第一时长的情况下,从第一操作系统切换至第二操作系统。
可选的,第一时长可以是0秒,即电子设备可以在确定显示装置处于熄屏状态时,立即从第一操作系统切换至第二操作系统,从而提高了切换的速度。
在另一种实施例中,考虑到如果显示装置一熄屏就将电子设备切换至第二操作系统,而短时间内电子设备又需要使用第一操作系统,则电子设备又需要从第二操作系统切换到第一操作系统,这种情况将导致电子设备在短时间内频繁地切换操作系统,从而可能影响电子设备的正常运行。对此可选的,第一时长可以大于0秒,例如10秒、20秒等,在此不作限定。从而可以在显示装置熄屏之后,给电子设备一定的缓冲时间,进而避免了在短时间内频繁地切换操作系统的情况。
204、若显示装置从熄屏状态切换至亮屏状态则保持第二操作系统。
可以理解的是,在将电子设备从第一操作系统切换至第二操作系统之后,第二操作系统将作为电子设备主要使用的操作系统,用于执行电子设备内大部分的逻辑运算,以及拥有电子设备包括的外设装置的控制权,所以若显示装置从熄屏状态切换为亮屏状态时,就将电子设备从第二操作系统切换至第一操作系统,则可能导致第二操作系统正在执行的工作任务中断,进而影响电子设备的正常运行。
对此可选的,电子设备在确定显示装置从熄屏状态切换至亮屏状态之后,可以保持运行第二操作系统。
在另一种实施例中,电子设备在确定示装置从熄屏状态切换至亮屏状态之后,可以进一步在确定电子设备满足切换至第一操作系统的第一切换条件时,才将电子设备从第二操作系统切换至第一操作系统。反之若电子设备不满足第一切换条件,则电子设备可以保持第二操作系统,以避免第二操作系统正在执行的工作任务中断,以及避免电子设备频繁地切换操作系统。
其中,第一切换条件可以包括第一操作系统处于未执行工作任务的空闲状态,和/或电 子设备将执行的工作任务需要使用第一操作系统,在此不作限定。
实施上述各实施例公开的方法,在确定电子设备的显示装置处于熄屏状态达到第一时长的情况下,电子设备可以自动从第一操作系统切换至第二操作系统,不需要用户手动进行切换,提高了电子设备的智能化程度;此外,还可以避免在显示装置处于亮屏状态时进行操作系统的切换,进而导致显示装置出现花屏的情况。进一步地,在将电子设备从第一操作系统切换至第二操作系统之后,若检测到显示装置从熄屏状态切换至亮屏状态,则电子设备可以保持第二操作系统,从而避免频繁地切换操作系统,进而影响电子设备正常运行的情况。
请参阅图3,图3是本申请实施例公开的另一种操作系统的切换方法的流程示意图。该方法可以应用于上述的电子设备,该电子设备能够运行第一操作系统和第二操作系统,该方法可以包括以下步骤:
302、在电子设备的显示装置处于熄屏状态达到第一时长,且第一操作系统满足第二切换条件的情况下,电子设备由运行第一操作系统切换至运行第二操作系统。
本申请实施例中,当电子设备正在使用第一操作系统时,如果此时将电子设备从第一操作系统切换至第二操作系统,则可能导致第一操作系统正在执行的工作任务中断。
所以可选的,电子设备在确定电子设备的显示正在处于熄屏状态达到第一时长之后,可以进一步在确定第一操作系统满足第二切换条件时,才将电子设备从第一操作系统切换至第二操作系统。
其中,第二切换条件可以包括第一操作系统处于空闲状态,空闲状态指的是未执行目标工作任务的状态,目标工作任务可以包括当不限于播放音乐、播放视频、执行定位功能,执行运行功能以及显示特定界面。
实施上方法,可以避免电子设备从第一操作系统切换至第二操作系统时,使得第一操作系统当前正在执行的工作任务中断,进而影响电子设备正常运行的情况。
在另一种实施例中,电子设备在确定显示装置处于熄屏状态达到第一时长,且第一操作系统满足第二切换条件时,可以在不关闭第一操作系统的情况下,将电子设备从第一操作系统切换至第二操作系统。
实施上述方法,可以提高从第一操作系统切换至第二操作系统的速度,此外不播放关机动画还可以不占用显示装置,达到无感切换的效果。
在另一种实施例中,在电子设备的显示装置处于熄屏状态达到第一时长的情况下,可以每间隔第二时长判断第一操作系统是否满足第二切换条件;以及,若确定第一操作系统满足第二切换条件,则电子设备由运行所述第一操作系统切换至运行第二操作系统。
在又一种实施例中,若电子设备的显示装置处于熄屏状态达到第一时长,且第一操作系统不满足第二切换条件,则说明此时不能将电子设备从第一操作系统切换至第二操作系统,对此电子设备可以触发周期检测机制,该周期检测机制是每间隔第二时长判断第一操作系统是否满足第二切换条件的机制。进一步地,若通过周期检测机制确定第一操作系统满足第二切换条件,则电子设备可以从第一操作系统切换至第二操作系统。
其中,第二时长可以由开发人员根据大量的开发经验确定,典型值可以是1秒、2秒等,在此不作限定。
实施上述方法,电子设备可以在第一操作系统不满足第二切换条件时,通过周期检测机制不断地检测第一操作系统是否满足第二切换条件,以在第一操作系统满足第二切换条件时,第一时间将电子设备切换至第二操作系统,从而提高了电子设备的智能化程度。
在另一种实施例中,在触发周期检测机制的过程中,若检测到显示装置从熄屏状态切换至亮屏状态,则电子设备可以退出周期检测机制,以避免后续在运行第一操作系统的过 程中,由于周期检测机制检测到第一操作系统满足第二切换条件,并将电子设备从第一操作系统切换至第二操作系统,进而导致第一操作系统正在执行的工作任务被中断的情况。
在另一种实施例中,在电子设备的显示装置处于熄屏状态达到第一时长,且第一操作系统正在执行目标工作任务的情况下,则获取第一操作系统正在执行的目标工作任务;
进一步地,预测第一操作系统执行目标工作任务所需要的预测时长,若预测时长小于时长阈值(具体数值可以由开发人员根据大量的开发经验设定,典型值为20分钟、30分钟等,在此不作限定),则触发周期检测机制;若预测时长大于或者等于时长阈值,则禁止触发周期检测机制直至显示装置切换为亮屏状态。
实施上述方法,如果预测到第一操作系统执行目标工作任务所需的时长过长,则说明短时间内电子设备无法切换至第二操作系统,对此可以禁止触周期检测机制,以节省执行周期检测机制的功耗,提高电子设备的续航。
可选的,在电子设备的显示装置处于熄屏状态时,可以获取使得显示装置进入熄屏状态的触发事件,触发事件可以包括手动触发事件,及定时熄屏触发事件。其中,手动触发事件是指用户主动将电子设备熄屏的事件,定时熄屏触发事件是指电子设备在一定时间内未检测到针对显示装置的操作,进而自动将显示装置熄屏的事件。进一步地,电子设备可以根据使得显示装置进入熄屏状态的触发事件调整第一时长,得到调整后的第一时长。
进一步地,在电子设备的显示装置处于熄屏状态达到调整后的第一时长的情况下,电子设备由运行第一操作系统切换至运行第二操作系统。
可选的,若使得显示装置进入熄屏状态的触发事件是手动触发事件,则可以将第一时长调整为0秒,即电子设备可以在确定显示装置处于熄屏状态时,立即将电子设备从第一操作系统切换至第二操作系统。可以理解的是,用户主动将显示装置熄屏,说明用户暂时不需要使用显示装置,所以可以立即将电子设备从第一操作系统切换至第二操作系统。
在另一种实施例中,若使得显示装置进入熄屏状态的触发事件是定时熄屏触发事件,则可以将第一时长调整为大于0秒,例如10秒、20秒等,在此不作限定。可以理解的是,电子设备由于定时熄屏功能进入熄屏状态之后,用户可能随时都会再次使用显示装置和第一操作系统,所以在显示装置熄屏之后,给电子设备一定的缓冲时间,进而避免了在短时间内频繁地切换操作系统的情况。
可选的,若使得显示装置进入熄屏状态的触发事件是定时熄屏触发事件,则电子设备可以进一步获取电子设备当前的系统时间以及用户的生理数据;若当前的系统时间处于休息时间段内,且用户的生理数据与目标数据相匹配,则将第一时长调整为0秒,其中,目标数据是用户处于睡眠状态时对应的生理数据。
实施上述方法,即使显示装置是由于定时熄屏功能进入熄屏状态,但是若用户处于睡眠状态,则用户短时间内是不会再使用显示装置和第一操作系统的,所以可以将第一时长调整为0秒,以立即将电子设备从第一操作系统切换至第二操作系统。
304、若显示装置从熄屏状态切换至亮屏状态,则保持第二操作系统。
可选的,第二操作系统的运行功耗可以小于第一操作系统,第一切换条件可以包括电子设备当前的电量大于第一电量阈值(具体数值可以由开发人员根据大量的开发经验设定,典型值为电子设备的电池总容量的20%、25%等,在此不作限定)。可以理解的是,若电子设备不满足切换至第一操作系统的第一切换条件,则说明电子设备当前的电量小于或等于第一电量阈值,处于低电量状态,对此为延长电子设备的续航时间,电子设备可以继续保持使用低功耗的第二操作系统。
实施上述各实施例公开的方法,可以自动将电子设备从第一操作系统切换至第二操作系统,不需要用户手动进行切换,提高了电子设备的智能化程度;此外,还可以避免在显 示装置处于亮屏状态时进行操作系统的切换,进而导致显示装置出现花屏的情况;以及,避免频繁地切换操作系统,进而影响电子设备正常运行的情况;以及,可以避免电子设备从第一操作系统切换至第二操作系统时,使得第一操作系统当前正在执行的工作任务中断,进而影响电子设备正常运行的情况;以及,可以在第一操作系统不满足第二切换条件时,通过周期检测机制不断地检测第一操作系统是否满足第二切换条件,以在第一操作系统满足第二切换条件时,第一时间将电子设备切换至第二操作系统,从而提高了电子设备的智能化程度;以及,可以避免后续在运行第一操作系统的过程中,由于周期检测机制检测到第一操作系统满足第二切换条件,并将电子设备从第一操作系统切换至第二操作系统,进而导致第一操作系统正在执行的工作任务被中断的情况。
请参阅图4,图4是本申请实施例公开的又一种操作系统的切换方法的流程示意图。该方法可以应用于上述的电子设备,该电子设备能够运行第一操作系统和第二操作系统,该方法可以包括以下步骤:
402、在电子设备的显示装置处于熄屏状态达到第一时长的情况下,电子设备由运行第一操作系统切换至运行第二操作系统。
本申请实施例中,电子设备可以包括第一处理器和第二处理器,其中,第一处理器和第二处理器可以是中央处理器(central processing unit,CPU),用于执行各种逻辑运算和控制。可选的,第一操作系统可以安装于第一处理器,第二操作系统可以安装于第二处理器。
可选的,第一处理器和运算处理能力可以大于第二处理器的运算处理能力,从而当电子设备使用第一操作系统时,可以提高电子设备的运算处理能力,从而提高电子设备的性能,包括提高应用程序的运行速度、提高画质等。
在另一种实施例中,第二处理器的运行功耗可以小于第一处理器的运行功耗,从而当电子设备从第一操作系统切换至第二操作系统之后,可以降低电子设备的功耗。
在一种实施例中,在将电子设备从第一操作系统切换至第二操作系统的过程中,为了避免第一操作系统的开机动画和第二操作系统的关机动画在显示装置中显示给用户带来系统在切换的感觉,可以禁止触发第一操作系统的关机动画以及第二操作系统的开机动画。
实施上述方法,可以在系统切换的过程中,禁止播放开关机动画,以避免第一操作系统的开机动画和第二操作系统的关机动画在显示装置中显示给用户带来系统在切换的感觉,从而达到无感切换的效果。
在一种实施例中,电子设备能够运行两个以上的操作系统,各个操作系统对应的运行功耗不同。可选的,在电子设备的显示装置处于熄屏状态达到第一时长,且电子设备当前的电量低于第二电量阈值(具体数值可以由开发人员根据大量的开发经验设定,典型值为电子设备的电池总容量的18%、20%等,在此不作限定)的情况下,电子设备可以在电子设备能够运行的操作系统中,确定出运行功耗最低的操作系统作为第二操作系统,进而电子设备可以从第一操作系统切换至第二操作系统。
实施上述方法,可以在电子设备当前处于低电量时,将电子设备切换至运行功耗最低的操作系统,以延长电子设备的续航时间。
在一种实施例中,电子设备由运行第一操作系统切换至运行第二操作系统之后,可以将显示装置的控制权由第一操作系统切换至第二操作系统。
可以理解的是,电子设备切换至第二操作系统之后,第二操作系统将处理电子设备内的大部分运输控制逻辑,对此为了方便第二操作系统对显示装置进行控制,可以将显示装置的控制权由第一操作系统切换至第二操作系统。
404、控制第一操作系统进入休眠状态。
本申请实施例中,电子设备在从第一操作系统切换至第二操作系统之后,为了进一步降低电子设备的功耗,可以控制第一操作系统进入休眠状态。其中,休眠状态指的是仅运行部分必要功能,并关闭除必要功能外的其他功能的状态。必要功能可以包括传感器功能,操作系统唤醒功能等,在此不作限定。
实施上述方法,可以在将第一操作系统切换至后台之后,控制第一操作系统进入休眠状态,以关闭部分非必要的功能,从而达到降低电子设备功耗的效果。
406、若显示装置从熄屏状态切换至亮屏状态,则保持第二操作系统。
实施上述各实施例公开的方法,,可以自动将电子设备从第一操作系统切换至第二操作系统,不需要用户手动进行切换,提高了电子设备的智能化程度;此外,还可以避免在显示装置处于亮屏状态时进行操作系统的切换,进而导致显示装置出现花屏的情况;以及,避免频繁地切换操作系统,进而影响电子设备正常运行的情况;以及,可以在将第一操作系统切换至后台之后,控制第一操作系统进入休眠状态,以关闭部分非必要的功能,从而达到降低电子设备功耗的效果;以及,可以在系统切换的过程中,禁止播放开关机动画,以避免第一操作系统的开机动画和第二操作系统的关机动画在显示装置中显示给用户带来系统在切换的感觉,从而达到无感切换的效果;以及,可以在切换第一操作系统时,提高电子设备的运算处理能力,从而提高电子设备的性能,包括提高应用程序的运行速度、提高画质等;以及在切换至第二操作系统时,降低电子设备的功耗,从而提高了电子设备在执行工作任务时的灵活性。
请参阅图5,图5是本申请实施例公开的一种操作系统的切换装置的结构示意图。该装置可以应用于上述的电子设备,该电子设备能够运行第一操作系统和第二操作系统,该装置可以包括第一切换单元501和保持单元502,其中:
第一切换单元501,用于在电子设备的显示装置处于熄屏状态达到第一时长的情况下,将电子设备由运行第一操作系统切换至运行第二操作系统;
保持单元502,用于在显示装置从熄屏状态切换至亮屏状态,保持第二操作系统。
实施上述装置,电子设备在确定电子设备的显示装置处于熄屏状态达到第一时长时,可以自动将电子设备从第一操作系统切换至第二操作系统,不需要用户手动进行切换,提高了电子设备的智能化程度;此外,还可以避免在显示装置处于亮屏状态时进行操作系统的切换,进而导致显示装置出现花屏的情况。进一步地,在将电子设备从第一操作系统切换至第二操作系统之后,若检测到显示装置从熄屏状态切换至亮屏状态,但电子设备不满足切换至第一操作系统的第一切换条件,则电子设备可以保持第二操作系统,从而避免频繁地切换操作系统,进而影响电子设备正常运行的情况。
作为一种可选的实施方式,图5所示的装置还包括未图示的第二切换单元,其中:
第二切换单元,用于在电子设备由运行第一操作系统切换至运行第二操作系统之后,若检测到显示装置从熄屏状态切换至亮屏状态,且电子设备满足切换至第一操作系统的第一切换条件,则将电子设备由运行第二操作系统切换至运行第一操作系统。
作为一种可选的实施方式,第一切换单元501,还用于在电子设备的显示装置处于熄屏状态达到第一时长,且第一操作系统满足第二切换条件的情况下,将电子设备由运行第一操作系统切换至运行第二操作系统。
实施上述装置,可以避免电子设备从第一操作系统切换至第二操作系统时,使得第一操作系统当前正在执行的工作任务中断,进而影响电子设备正常运行的情况。
作为一种可选的实施方式,第一切换单元501,还用于在电子设备的显示装置处于熄屏状态达到第一时长的情况下,每间隔第二时长判断第一操作系统是否满足第二切换条件;以及,若第一操作系统满足第二切换条件,则电子设备由运行第一操作系统切换至运行第 二操作系统。
作为一种可选的实施方式,第一切换单元501,还用于在电子设备的显示装置处于熄屏状态达到第一时长,且第一操作系统不满足第二切换条件时,触发周期检测机制,周期检测机制是每间隔第二时长判断第一操作系统是否满足第二切换条件的机制;以及,若通过周期检测机制确定第一操作系统满足第二切换条件,则将电子设备从第一操作系统切换至第二操作系统。
实施上述装置,可以在第一操作系统不满足第二切换条件时,通过周期检测机制不断地检测第一操作系统是否满足第二切换条件,以在第一操作系统满足第二切换条件时,第一时间将电子设备切换至第二操作系统,从而提高了电子设备的智能化程度。
作为一种可选的实施方式,图5所示的装置还包括未图示的退出单元,其中:
退出单元,用于在触发周期检测机制之后,若在触发周期检测机制的过程中,检测到显示装置从熄屏状态切换至亮屏状态,则退出周期检测机制。
实施上述装置,可以避免后续在运行第一操作系统的过程中,由于周期检测机制检测到第一操作系统满足第二切换条件,并将电子设备从第一操作系统切换至第二操作系统,进而导致第一操作系统正在执行的工作任务被中断的情况。
作为一种可选的实施方式,第二切换条件包括第一操作系统处于空闲状态,空闲状态指的是未执行目标工作任务的状态。
实施上述装置,可以避免电子设备从第一操作系统切换至第二操作系统时,使得第一操作系统当前正在执行的工作任务中断,进而影响电子设备正常运行的情况。
作为一种可选的实施方式,图5所示的装置还包括未图示的控制单元,其中:
控制单元,用于在将电子设备从第一操作系统切换至第二操作系统之后,控制第一操作系统进入休眠状态。
实施上述装置,可以在将第一操作系统切换至后台之后,控制第一操作系统进入休眠状态,以关闭部分非必要的功能,从而达到降低电子设备功耗的效果。
作为一种可选的实施方式,图5所示的装置还包括未图示的禁止单元,其中:
禁止单元,用于在将电子设备从第一操作系统切换至第二操作系统的过程中,禁止触发第一操作系统的关机动画以及第二操作系统的开机动画。
实施上述装置,可以在系统切换的过程中,禁止播放开关机动画,以避免第一操作系统的开机动画和第二操作系统的关机动画在显示装置中显示给用户带来系统在切换的感觉,从而达到无感切换的效果。
作为一种可选的实施方式,电子设备包括第一处理器和第二处理器,第一处理器用于运行第一操作系统,第二处理器用于运行第二操作系统,第二处理器的运行功耗小于第一处理器的运行功耗。
实施上述装置,可以在切换第一操作系统时,提高电子设备的运算处理能力,从而提高电子设备的性能,包括提高应用程序的运行速度、提高画质等;以及在切换至第二操作系统时,降低电子设备的功耗,从而提高了电子设备在执行工作任务时的灵活性。
作为一种可选的实施方式,图5所示的装置还可以包括第三切换单元,其中:
第三切换单元,用于在电子设备由运行第一操作系统切换至运行第二操作系统之后,将显示装置的控制权由第一操作系统切换至第二操作系统。
请参阅图6,图6是本申请实施例公开的另一种电子设备的结构示意图。如图6所示,该电子设备可以包括:
存储有可执行程序代码的存储器601;
与存储器601耦合的处理器602;
其中,处理器602调用存储器601中存储的可执行程序代码,执行上述各实施例公开的操作系统的切换方法。
本申请实施例公开一种计算机可读存储介质,其存储计算机程序,其中,该计算机程序使得计算机执行上述各实施例公开的操作系统的切换方法。
本申请实施例还公开一种应用发布平台,其中,应用发布平台用于发布计算机程序产品,其中,当计算机程序产品在计算机上运行时,使得计算机执行如以上各方法实施例中的方法的部分或全部步骤。
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定特征、结构或特性可以以任意适合的方式结合在一个或多个实施例中。本领域技术人员也应该知悉,说明书中所描述的实施例均属于可选实施例,所涉及的动作和模块并不一定是本申请所必须的。
在本申请的各种实施例中,应理解,上述各过程的序号的大小并不意味着执行顺序的必然先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物单元,即可位于一个地方,或者也可以分布到多个网络单元上。可根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。
另外,在本申请各实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
上述集成的单元若以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可获取的存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或者部分,可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干请求用以使得一台计算机设备(可以为个人计算机、服务器或者网络设备等,具体可以是计算机设备中的处理器)执行本申请的各个实施例上述方法的部分或全部步骤。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质包括只读存储器(Read-Only Memory,ROM)、随机存储器(Random Access Memory,RAM)、可编程只读存储器(Programmable Read-only Memory,PROM)、可擦除可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、一次可编程只读存储器(One-time Programmable Read-Only Memory,OTPROM)、电子抹除式可复写只读存储器(Electrically-Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储器、磁盘存储器、磁带存储器、或者能够用于携带或存储数据的计算机可读的任何其他介质。
以上对本申请实施例公开的一种操作系统的切换方法及装置、电子设备、存储介质进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (20)

  1. 一种操作系统的切换方法,其特征在于,应用于电子设备,所述电子设备能够运行第一操作系统及第二操作系统,所述方法包括:
    在所述电子设备的显示装置处于熄屏状态达到第一时长的情况下,所述电子设备由运行所述第一操作系统切换至运行所述第二操作系统;
    若所述显示装置从所述熄屏状态切换至亮屏状态,则保持所述第二操作系统。
  2. 根据权利要求1所述的方法,其特征在于,在所述电子设备由运行所述第一操作系统切换至运行所述第二操作系统之后,所述方法还包括:
    若所述显示装置从所述熄屏状态切换至亮屏状态,且所述电子设备满足切换至所述第一操作系统的第一切换条件,则所述电子设备由运行所述第二操作系统切换至运行所述第一操作系统。
  3. 根据权利要求2所述的方法,其特征在于,所述第一切换条件包括所述第一操作系统处于未执行工作任务的空闲状态,和/或所述电子设备将执行的工作任务需要使用所述第一操作系统。
  4. 根据权利要求1~3任一项所述的方法,其特征在于,所述在所述电子设备的显示装置处于熄屏状态达到第一时长的情况下,所述电子设备由运行所述第一操作系统切换至运行所述第二操作系统,包括:
    在所述电子设备的显示装置处于熄屏状态达到第一时长,且所述第一操作系统满足第二切换条件的情况下,所述电子设备由运行所述第一操作系统切换至运行所述第二操作系统。
  5. 根据权利要求1所述的方法,其特征在于,所述在所述电子设备的显示装置处于熄屏状态达到第一时长的情况下,所述电子设备由运行所述第一操作系统切换至运行所述第二操作系统,包括:
    在所述电子设备的显示装置处于熄屏状态达到第一时长的情况下,每间隔第二时长判断所述第一操作系统是否满足第二切换条件;
    若所述第一操作系统满足第二切换条件,则所述电子设备由运行所述第一操作系统切换至运行所述第二操作系统。
  6. 根据权利要求1所述的方法,其特征在于,所述在所述电子设备的显示装置处于熄屏状态达到第一时长的情况下,所述电子设备由运行所述第一操作系统切换至运行所述第二操作系统,包括:
    在所述电子设备的显示装置处于熄屏状态达到第一时长,且所述第一操作系统不满足第二切换条件的情况下,触发周期检测机制,所述周期检测机制是每间隔第二时长判断所述第一操作系统是否满足所述第二切换条件的机制;
    若通过所述周期检测机制确定所述第一操作系统满足所述第二切换条件,则所述电子设备由运行所述第一操作系统切换至运行所述第二操作系统。
  7. 根据权利要求1所述的方法,其特征在于,所述在所述电子设备的显示装置处于熄屏状态达到第一时长的情况下,所述电子设备由运行所述第一操作系统切换至运行所述第二操作系统,包括:
    在所述电子设备的显示装置处于熄屏状态达到第一时长,且所述第一操作系统正在执行目标工作任务的情况下,获取所述目标工作任务;
    确定所述第一操作系统执行所述目标工作任务所需要的预测时长,若所述预测时长小于时长阈值,则触发周期检测机制,所述周期检测机制是每间隔第二时长判断所述第一操作系统是否满足所述第二切换条件的机制;
    若通过所述周期检测机制确定所述第一操作系统满足所述第二切换条件,则所述电子设备由运行所述第一操作系统切换至运行所述第二操作系统。
  8. 根据权利要求6或7所述的方法,其特征在于,所述方法还包括:
    在触发所述周期检测机制的过程中,若检测到所述显示装置从所述熄屏状态切换至亮屏状态,则退出所述周期检测机制。
  9. 根据权利要求4~8任一项所述的方法,其特征在于,所述第二切换条件包括所述第一操作系统处于空闲状态,所述空闲状态指的是未执行目标工作任务的状态。
  10. 根据权利要求1所述的方法,其特征在于,在所述电子设备由运行所述第一操作系统切换至运行所述第二操作系统之后,所述方法还包括:
    控制所述第一操作系统进入休眠状态。
  11. 根据权利要求1所述的方法,其特征在于,在所述电子设备由运行所述第一操作系统切换至运行所述第二操作系统之后,所述方法还包括:
    将所述显示装置的控制权从所述第一操作系统切换至所述第二操作系统。
  12. 根据权利要求1~11任一项所述的方法,其特征在于,所述电子设备包括第一处理器和第二处理器,所述第一处理器用于运行所述第一操作系统,所述第二处理器用于运行所述第二操作系统,所述第二处理器的运行功耗小于所述第一处理器的运行功耗。
  13. 根据权利要求12所述的方法,其特征在于,所述第一处理器的运算处理能力大于所述第二处理器的运算处理能力。
  14. 根据权利要求12所述的方法,其特征在于,所述第一切换条件还包括所述电子设备当前的电量大于第一电量阈值。
  15. 一种操作系统的切换装置,其特征在于,应用于电子设备,所述电子设备能够运行第一操作系统及第二操作系统,所述装置包括:
    第一切换单元,用于在所述电子设备的显示装置处于熄屏状态达到第一时长的情况下,所述电子设备由运行所述第一操作系统切换至运行所述第二操作系统;
    保持单元,用于在所述显示装置从所述熄屏状态切换至亮屏状态时,保持所述第二操作系统。
  16. 根据权利要求15所述的装置,其特征在于,所述装置还包括第二切换单元,其中:
    所述第二切换单元,用于在所述电子设备由运行所述第一操作系统切换至运行所述第二操作系统之后,若检测到所述显示装置从所述熄屏状态切换至亮屏状态,且所述电子设备满足切换至所述第一操作系统的第一切换条件,则将所述电子设备由运行所述第二操作系统切换至运行所述第一操作系统。
  17. 根据权利要求15所述的装置,其特征在于,所述第一切换单元,还用于在所述电子设备的显示装置处于熄屏状态达到第一时长,且所述第一操作系统满足第二切换条件的情况下,将所述电子设备由运行所述第一操作系统切换至运行所述第二操作系统。
  18. 根据权利要求15所述的装置,其特征只在于,所述第一切换单元,还用于在所述电子设备的显示装置处于熄屏状态达到第一时长的情况下,每间隔第二时长判断所述第一操作系统是否满足第二切换条件;以及,若所述第一操作系统满足第二切换条件,则将所述电子设备由运行所述第一操作系统切换至运行所述第二操作系统。
  19. 一种电子设备,其特征在于,包括存储有可执行程序代码的存储器,以及与所述存储器耦合的处理器;其中,所述处理器调用所述存储器中存储的所述可执行程序代码,执行如权利要求1~14任一项所述的方法。
  20. 一种计算机可读存储介质,其存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1~14任一项所述的方法。
PCT/CN2022/135980 2022-01-04 2022-12-01 操作系统的切换方法及装置、电子设备、存储介质 WO2023130866A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210002314.XA CN116431226A (zh) 2022-01-04 2022-01-04 操作系统的切换方法及装置、电子设备、存储介质
CN202210002314.X 2022-01-04

Publications (1)

Publication Number Publication Date
WO2023130866A1 true WO2023130866A1 (zh) 2023-07-13

Family

ID=87073043

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/135980 WO2023130866A1 (zh) 2022-01-04 2022-12-01 操作系统的切换方法及装置、电子设备、存储介质

Country Status (2)

Country Link
CN (1) CN116431226A (zh)
WO (1) WO2023130866A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117154872B (zh) * 2023-08-01 2023-12-29 南京汤峰机电有限公司 一种锂电池充电控制方法及系统

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090063845A1 (en) * 2007-09-05 2009-03-05 High Tech Computer, Corp. System and electronic device having multiple operating systems and operating method thereof
US20150317185A1 (en) * 2014-05-05 2015-11-05 Pegatron Corporation Method for switching operating system and electronic device using the method
CN108319360A (zh) * 2018-01-26 2018-07-24 出门问问信息科技有限公司 一种显示装置、电子设备及屏幕显示控制方法
CN112988256A (zh) * 2019-12-02 2021-06-18 Oppo广东移动通信有限公司 应用启动方法、装置、存储介质及电子设备
CN112987986A (zh) * 2019-12-02 2021-06-18 Oppo广东移动通信有限公司 实现游戏应用的方法、装置、存储介质及电子设备
CN113031742A (zh) * 2019-12-09 2021-06-25 Oppo广东移动通信有限公司 电子设备
CN113031751A (zh) * 2019-12-09 2021-06-25 Oppo广东移动通信有限公司 电子设备

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090063845A1 (en) * 2007-09-05 2009-03-05 High Tech Computer, Corp. System and electronic device having multiple operating systems and operating method thereof
US20150317185A1 (en) * 2014-05-05 2015-11-05 Pegatron Corporation Method for switching operating system and electronic device using the method
CN108319360A (zh) * 2018-01-26 2018-07-24 出门问问信息科技有限公司 一种显示装置、电子设备及屏幕显示控制方法
CN112988256A (zh) * 2019-12-02 2021-06-18 Oppo广东移动通信有限公司 应用启动方法、装置、存储介质及电子设备
CN112987986A (zh) * 2019-12-02 2021-06-18 Oppo广东移动通信有限公司 实现游戏应用的方法、装置、存储介质及电子设备
CN113031742A (zh) * 2019-12-09 2021-06-25 Oppo广东移动通信有限公司 电子设备
CN113031751A (zh) * 2019-12-09 2021-06-25 Oppo广东移动通信有限公司 电子设备

Also Published As

Publication number Publication date
CN116431226A (zh) 2023-07-14

Similar Documents

Publication Publication Date Title
US11450052B2 (en) Display control method and apparatus for game screen, electronic device, and storage medium
CN107766128B (zh) 一种启动应用的方法及装置
TWI521341B (zh) 節流應用程式對資源之存取
CN109906437B (zh) 基于线程重要性的处理器核停止和频率选择
WO2019024642A1 (zh) 进程控制方法、装置、存储介质以及电子设备
US9207746B2 (en) Method and apparatus for controlling sleep mode in a portable terminal
CN108762831A (zh) 应用程序预加载方法、装置、存储介质及终端
WO2023130866A1 (zh) 操作系统的切换方法及装置、电子设备、存储介质
CN115576645B (zh) 一种虚拟处理器调度方法、装置、存储介质及电子设备
CN111290565A (zh) Doze模式的控制方法、装置、终端及存储介质
CN108549575B (zh) 退出分屏的处理方法、装置、存储介质及电子设备
WO2023078262A1 (zh) 应用的处理方法、装置和电子设备
CN102044201B (zh) 行动设备屏幕恒亮显示的装置与方法
CN110665224A (zh) 终端应用资源的处理方法及装置
CN114461360A (zh) 线程管控方法、线程管控装置、终端及存储介质
CN114546612A (zh) 一种系统模式切换方法及电子设备
CN114327714A (zh) 应用程序控制方法、装置、设备及介质
US10666789B2 (en) Control method and device for sensors of mobile terminal, storage medium and mobile terminal
CN111221633A (zh) 终端控制方法、装置、移动终端及存储介质
US10121001B1 (en) System and method for monolithic scheduling in a portable computing device using a hypervisor
JP3542409B2 (ja) 情報処理装置
CN109725978B (zh) 窗口刷新方法、装置、电子设备及存储介质
CN116382876A (zh) 任务管理方法、装置、电子设备及介质
CN116302485A (zh) Cpu调度方法、装置、电子设备及可读存储介质
CN115964180A (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: 22918318

Country of ref document: EP

Kind code of ref document: A1