Method and apparatus for waking up computer from sleep state
Abstract
A method for waking up a computer from a sleep state is provided, the method includes: before controlling a computer to enter a sleep state, a CPU stores picture information currently displayed on a display screen, obtains the stored picture information in a process in which the computer is woken up from the sleep state, displays the picture information on the display screen, and then starts an operating system. According to a manner of the embodiments of the present invention, before the computer starts the operating system, the display screen has lighted up, and a black screen state of the display screen in a process of waking up the computer from the sleep state is ended relatively early, to further reduce a waiting time of a user and improve user experience.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method for waking up a computer from a sleep state, wherein the method comprises:
after detecting a first instruction used for instructing the computer to enter the sleep state, storing, by a central processing unit (CPU) in the computer in a memory that is applied for in advance, picture information currently displayed on a display screen of the computer, and controlling the computer to enter the sleep state; after detecting a second instruction used for instructing the computer to switch from the sleep state to an awake state, obtaining, by the CPU, the picture information from the memory that is applied for in advance, and displaying the picture information on the display screen; and starting, by the CPU, an operating system, and controlling the computer to switch from the sleep state to the awake state, wherein the starting an operating system comprises loading an external device driver of the computer, so that the CPU recognizes an operation performed by a user on the picture information displayed on the display screen.
2 . The method according to claim 1 , wherein the obtaining, by the CPU, the picture information from the memory that is applied for in advance comprises:
starting, by the CPU, a pre-configured extensible firmware interface initialization PEI stage of a basic input/output system BIOS; and after initializing a graphics card in the PEI stage, obtaining, by the CPU, the picture information from the memory that is applied for in advance.
3 . The method according to claim 1 , wherein the displaying, by the CPU, the picture information on the display screen is performed before the starting an operating system.
4 . The method according to claim 1 , wherein the memory that is applied for in advance is applied for by the CPU when the computer is started.
5 . The method according to claim 1 , wherein before the storing, by a CPU in a memory that is applied for in advance, picture information currently displayed on a display screen of the computer, the method further comprises:
calling, by the CPU, a pre-configured Windows management instrumentation WMI interface to obtain address information of the memory that is applied for in advance; and the storing, by a CPU in a memory that is applied for in advance, picture information currently displayed on a display screen of the computer comprises: storing, by the CPU based on the address information of the memory that is applied for in advance and in the memory that is applied for in advance, the picture information currently displayed on the display screen of the computer.
6 . The method according to claim 1 , wherein the method further comprises:
when storing, in the memory that is applied for in advance, the picture information currently displayed on the display screen of the computer, setting, by the CPU, a first status bit in the memory that is applied for in advance, wherein the first status bit is used to indicate that the picture information is stored in the memory; or when a second status bit is stored in the memory that is applied for in advance, and when storing, in the memory that is applied for in advance, the picture information currently displayed on the display screen of the computer, setting, by the CPU, the second status bit to a specified value, wherein the specified value indicates that the picture information is stored in the memory.
7 . The method according to claim 6 , wherein before the obtaining, by the CPU, the picture information from the memory that is applied for in advance, the method further comprises:
determining, by the CPU, that the first status bit is stored in the memory that is applied for in advance, or that the second status bit is stored in the memory that is applied for in advance and a value of the second status bit is the specified value.
8 . A computer, comprising a storage device, an input apparatus, a display screen, a memory, and a processor, wherein
the storage device stores a software program; the input apparatus is configured to receive a first instruction used for instructing the computer to enter a sleep state and a second instruction used for instructing the computer to switch from the sleep state to an awake state, and transmit the first instruction and the second instruction to the processor; the display screen is configured to display picture information of a task currently processed by the computer; the memory is applied for in advance by the processor, and is configured to store the picture information displayed on the display screen; the processor is configured to call a program stored in the storage device, and perform the following operations: after detecting the first instruction transmitted by the input apparatus and used for instructing the computer to enter the sleep state, storing, in the memory, picture information currently displayed on the display screen, and controlling the computer to enter the sleep state; after detecting the second instruction transmitted by the input apparatus and used for instructing the computer to switch from the sleep state to the awake state, obtaining the stored picture information from the memory, and displaying the picture information on the display screen; and starting an operating system to control the computer to switch from the sleep state to the awake state, wherein the starting an operating system comprises loading an external device driver of the computer, so that the processor recognizes an operation performed by a user on the picture information displayed on the display screen.
9 . The computer according to claim 8 , wherein the processor is specifically configured to:
start a PEI stage of a BIOS, and after initializing a graphics card in the PEI stage, obtain the picture information from the memory that is applied for in advance.
10 . The computer according to claim 8 , wherein the processor displays the picture information on the display screen before starting the operating system.
11 . The computer according to claim 8 , wherein the memory is applied for by the processor when the computer is started.
12 . The computer according to claim 8 , wherein the processor is further configured to:
call a pre-configured WMI interface to obtain address information of the memory; and when storing, in the memory, the picture information currently displayed on the display screen, the processor is specifically configured to: store, in the memory based on the address information of the memory, the picture information currently displayed on the display screen.
13 . The computer according to claim 8 , wherein the processor is further configured to:
when storing, in the memory, the picture information currently displayed on the display screen, set a first status bit in the memory, wherein the first status bit is used to indicate that the picture information is stored in the memory; or when a second status bit is stored in the memory, and when storing, in the memory, the picture information currently displayed on the display screen, set the second status bit to a specified value, wherein the specified value indicates that the picture information is stored in the memory.
14 . The computer according to claim 13 , wherein before obtaining the picture information from the memory, the processor is further configured to:
determine that the first status bit is stored in the memory, or that the second status bit is stored in the memory and a value of the second status bit is the specified value.
15 . A computer readable storage medium, wherein the computer readable storage medium stores a software program, and when being read and executed by one or more processors, the software program can implement the method including:
after detecting a first instruction used for instructing the computer to enter the sleep state, storing, by a central processing unit (CPU) in the computer in a memory that is applied for in advance, picture information currently displayed on a display screen of the computer, and controlling the computer to enter the sleep state; after detecting a second instruction used for instructing the computer to switch from the sleep state to an awake state, obtaining, by the CPU, the picture information from the memory that is applied for in advance, and displaying the picture information on the display screen; and starting, by the CPU, an operating system, and controlling the computer to switch from the sleep state to the awake state, wherein the starting an operating system comprises loading an external device driver of the computer, so that the CPU recognizes an operation performed by a user on the picture information displayed on the display screen.
16 . The computer readable storage medium according to claim 15 , wherein the obtaining, by the CPU, the picture information from the memory that is applied for in advance comprises:
starting, by the CPU, a pre-configured extensible firmware interface initialization PEI stage of a basic input/output system BIOS; and after initializing a graphics card in the PEI stage, obtaining, by the CPU, the picture information from the memory that is applied for in advance.
17 . The computer readable storage medium according to claim 15 , wherein the displaying, by the CPU, the picture information on the display screen is performed before the starting an operating system.
18 . The computer readable storage medium according to claim 15 , wherein the memory that is applied for in advance is applied for by the CPU when the computer is started.
19 . The computer readable storage medium according to claim 15 , wherein before the storing, by a CPU in a memory that is applied for in advance, picture information currently displayed on a display screen of the computer, the method further comprises:
calling, by the CPU, a pre-configured Windows management instrumentation WMI interface to obtain address information of the memory that is applied for in advance; and the storing, by a CPU in a memory that is applied for in advance, picture information currently displayed on a display screen of the computer comprises: storing, by the CPU based on the address information of the memory that is applied for in advance and in the memory that is applied for in advance, the picture information currently displayed on the display screen of the computer.
20 . The computer readable storage medium according to claim 15 , wherein the method further comprises:
when storing, in the memory that is applied for in advance, the picture information currently displayed on the display screen of the computer, setting, by the CPU, a first status bit in the memory that is applied for in advance, wherein the first status bit is used to indicate that the picture information is stored in the memory; or when a second status bit is stored in the memory that is applied for in advance, and when storing, in the memory that is applied for in advance, the picture information currently displayed on the display screen of the computer, setting, by the CPU, the second status bit to a specified value, wherein the specified value indicates that the picture information is stored in the memory.Join the waitlist — get patent alerts
Track US2020183704A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.