Device wake-up method and related apparatus

By dividing peripherals into required and non-essential categories and entering the working state after the required peripheral process is restored, the rapid wake-up of the device is achieved, solving the problem of too long wake-up time in the prior art.

WO2025124464A1PCT designated stage expired Publication Date: 2025-06-19HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/138696
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-14
Filing Date
2024-12-12
Publication Date
2025-06-19

AI Technical Summary

Technical Problem

The existing device wake-up method requires the peripherals to wake up one by one, resulting in the device wake-up time too long, the user wait time too long, and the experience is poor.

Method used

By dividing the peripherals into required wake-up peripherals and non-necessary wake-up peripherals, and after the process scheduling of the first peripherals is restored, the control system enters the working state, and multiple peripherals are awakened in parallel.

Benefits of technology

It shortens the total time it takes for the device to wake up all peripherals, speeds up the device to wake up, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024138696_19062025_PF_FP_ABST
    Figure CN2024138696_19062025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are a device wake-up method and a related apparatus. In the method, peripherals in an electronic device can be divided into necessary wake-up peripherals and non-necessary wake-up peripherals. The method comprises: when an electronic device has detected a wake-up operation, waking up a necessary wake-up peripheral, so as to resume the process scheduling of the necessary wake-up peripheral, and waking up a non-necessary wake-up peripheral, so as to resume the process scheduling of the non-necessary wake-up peripheral; and after the process scheduling of the necessary wake-up peripheral is resumed, controlling a system to enter an operating state. In this way, as long as some of the peripherals are woken up and the process scheduling thereof is resumed, the electronic device can execute a subsequent wake-up procedure without waiting for the completion of the wake-up of all the peripherals, thereby reducing the number of peripherals that need to be woken up before the system enters the operating state, and accelerating the device wake-up speed.
Need to check novelty before this filing date? Find Prior Art

Description

Device wake-up method and related device

[0001] This application claims priority to the Chinese patent application with application number 202311724640.2 filed with the State Intellectual Property Office of China on December 14, 2023, and priority to the Chinese patent application with the invention name “Device wake-up method and related apparatus”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of computer technology, and in particular to a device wake-up method and related apparatus. Background Art

[0003] Currently, desktop computers, laptops, and other devices typically include a large number of peripherals, such as keyboards, mice, and displays. When waking up a device, it's usually necessary to first wake up the peripherals and restore system scheduling before the system can enter a working state. This can involve starting the display and logging into the desktop, for example. This can take a long time to wake up the device, causing users to wait for extended periods and a poor user experience. Summary of the Invention

[0004] The present application provides a device wake-up method and related apparatus, which can simultaneously wake up multiple peripherals in the system, and after the process scheduling of some peripherals is restored, control the system to enter the working state, thereby speeding up the device wake-up.

[0005] In a first aspect, an embodiment of the present application provides a device wake-up method, the method comprising: an electronic device detects a wake-up operation; the electronic device wakes up a first peripheral device, restores the process scheduling of the first peripheral device, and wakes up a second peripheral device, and restores the process scheduling of the second peripheral device; after the process scheduling of the first peripheral device is restored, the electronic device controls the system to enter a working state.

[0006] By implementing the method provided in the embodiment of the present application, the electronic device can wake up multiple devices at the same time when starting to wake up, which can shorten the total time spent by the electronic device to wake up all peripherals. After the process scheduling of the first peripheral is restored, the system can be controlled to enter the working state, thereby speeding up the device wake-up.

[0007] In combination with the first aspect, in a possible implementation, the system enters the working state without waiting for the process scheduling of the second peripheral device to be restored.

[0008] That is to say, the electronic device does not need to complete the restoration of the process scheduling of the second peripheral before the system enters the working state, which reduces the work content that needs to be completed before the system enters the working state, speeds up the speed at which the system enters the working state, and thus speeds up the speed at which the device wakes up.

[0009] In combination with the first aspect, in a possible implementation, the first peripheral device includes a peripheral device that must be awakened when the system enters a working state.

[0010] The first peripheral device may refer to a peripheral device that must be awakened. Therefore, after the electronic device starts awakening, it may prioritize waking up the peripheral device that must be awakened and restore the process scheduling of the peripheral device that must be awakened to ensure that the system can enter the working state as soon as possible.

[0011] In combination with the first aspect, in a possible implementation, the second peripheral device includes a peripheral device that is not necessarily awakened when the system enters a working state.

[0012] The second peripheral may refer to a non-essential wake-up peripheral. It can be seen that after the electronic device starts the wake-up, it can give priority to ensuring that the necessary wake-up peripherals are woken up and restore the process scheduling of the necessary wake-up peripherals. For non-essential wake-up peripherals, there is no need to limit them to completing the restoration of process scheduling before the system enters the working state, and the system wake-up of the non-essential wake-up peripherals is decoupled from the main process of the system wake-up.

[0013] In combination with the first aspect, in a possible implementation, the electronic device controls the system to enter a working state, specifically including: the electronic device lights up the screen or displays a login interface of a system account or displays a user interface before hibernation or sleep.

[0014] It can be seen that after the electronic device completes the awakening of the first peripheral and the restoration of the process scheduling of the first peripheral, it can light up the screen, or display the login interface of the system account, or display the hibernation or light sleep user interface, which speeds up the awakening of the device from the user's perspective.

[0015] In combination with the first aspect, in one possible implementation, the first peripheral includes one or more of the following: a clock, a power management unit PMU, a direct memory access DMA controller, an inter-core communication module IPC, a system memory management unit SMMU, an input and output microcontroller unit IOMCU, a general input and output port GPIO controller, a high-speed serial computer expansion bus standard PCIE controller, a universal flash storage UFS controller, a graphics processor GPU, a data processor DPU, and a display screen.

[0016] In combination with the first aspect, in one possible implementation, the second peripheral includes one or more of the following: a universal serial bus USB controller, a universal serial bus USB extender, a keyboard, a mouse, a memory, a network card, a Wi-Fi chip, a Bluetooth chip, and a camera.

[0017] In combination with the first aspect, in one possible implementation, the first peripheral includes a first sub-peripheral, the awakening of the first sub-peripheral depends on the awakening of the second sub-peripheral, the second sub-peripheral belongs to the first peripheral or the second peripheral, and the electronic device wakes up the first peripheral, specifically including: the electronic device wakes up the first sub-peripheral after the second sub-peripheral wakes up.

[0018] It can be seen that if the peripherals that need to be awakened include peripherals that depend on other peripherals to be awakened, when waking up the peripherals, priority can be given to ensuring that the other peripherals that depend on them are awakened first, thereby ensuring successful awakening of the peripheral that needs to be awakened.

[0019] In combination with the first aspect, in one possible implementation, the first peripheral includes a third sub-peripheral, the second peripheral includes a fourth sub-peripheral, the awakening of the fourth sub-peripheral depends on the awakening of the third sub-peripheral, and the electronic device awakens the second peripheral, specifically including: the electronic device wakes up the fourth sub-peripheral after the third sub-peripheral wakes up.

[0020] It can be seen that if the required wake-up peripherals and the non-required wake-up peripherals include peripherals that are mutually dependent on each other, and the peripherals included in the non-required wake-up peripherals depend on the peripherals included in the required wake-up peripherals, then the electronic device can wake up the dependent peripherals in the non-required wake-up peripherals after being awakened by the dependent peripherals in the required wake-up peripherals. Moreover, since the electronic device does not need to wait for the awakening of the non-required wake-up peripherals, even if the non-required wake-up peripherals and the required wake-up peripherals include peripherals that are mutually dependent on each other, the electronic device does not need to wait for all the mutually dependent devices to be awakened, which weakens the wake-up dependency between the peripherals that support synchronous wake-up and effectively shortens the time taken for the electronic device 100 to enter the working state.

[0021] In combination with the first aspect, in one possible implementation, the second peripheral includes a fifth sub-peripheral and a sixth sub-peripheral, the awakening of the sixth sub-peripheral depends on the awakening of the fifth sub-peripheral, and the electronic device awakens the second peripheral, specifically including: the electronic device first awakens the fifth sub-peripheral, and then awakens the sixth sub-peripheral.

[0022] That is to say, if the non-essential wake-up peripherals include mutually dependent wake-up peripherals, even if these mutually dependent peripherals can only be woken up serially one by one, the electronic device does not need to wait for their serial wake-up process. It only needs to restore the process scheduling of the necessary wake-up peripherals before the system can enter the working state.

[0023] In combination with the first aspect, in a possible implementation, the electronic device wakes up the second peripheral device, specifically including: the electronic device wakes up multiple peripheral devices in the second peripheral device in parallel.

[0024] It can be seen that the electronic device can wake up multiple peripherals in the non-essential wake-up peripherals in parallel, thereby speeding up the speed of waking up the peripherals.

[0025] In combination with the first aspect, in a possible implementation, the wake-up order of each peripheral in the second peripheral is determined by the electronic device according to the user's frequency of use of the peripheral, wherein the more frequently the user uses the peripheral, the earlier the wake-up order.

[0026] In this way, it can be ensured as much as possible that peripherals with higher user frequency can be awakened first. Even if the electronic device does not wake up all peripherals, it can also ensure that the user can use the electronic device 100 normally as much as possible.

[0027] In combination with the first aspect, in a possible implementation, the electronic device wakes up the first peripheral device, specifically including: the electronic device wakes up the first peripheral device through the main thread; the electronic device wakes up the second peripheral device, specifically including: the electronic device wakes up the second peripheral device through an asynchronous thread.

[0028] Asynchronous threads are different from the main thread. Asynchronous threads are new threads created separately by the kernel and are specifically used to handle asynchronous transactions. They are at the same level as the main thread and can run at the same time as the main thread. The asynchronous thread will not block the operation of the main thread, so that the electronic device can prioritize the wake-up of the first peripheral.

[0029] In combination with the first aspect, in a possible implementation manner, the first peripheral device is determined by the electronic device according to a white list, and the white list is preset with multiple peripheral device types belonging to the first peripheral device.

[0030] In this way, electronic devices can use whitelists to implement peripheral classification, quickly dividing non-essential wake-up peripherals and required wake-up peripherals. Moreover, developers can modify the whitelist again later to achieve flexible division of non-essential wake-up peripherals and required wake-up peripherals in electronic devices, and dynamically adjust the peripherals included in non-essential wake-up peripherals and required wake-up peripherals.

[0031] In combination with the first aspect, in a possible implementation, the electronic device is a tablet computer, a laptop computer, or a desktop computer.

[0032] In a second aspect, an embodiment of the present application provides an electronic device comprising a memory, one or more processors, and one or more programs; when the one or more processors execute the one or more programs, the electronic device implements the method described in the first aspect or any one of the implementation methods of the first aspect.

[0033] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, including a computer program, which is composed of instructions and is a collection of instructions. When the computer program runs on an electronic device, the electronic device executes the method described in the first aspect or any one of the implementation methods of the first aspect.

[0034] In a fourth aspect, an embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method described in the first aspect or any one of the implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] FIG1 is a schematic diagram of a device wake-up method according to an embodiment of the present application and other wake-up timing diagrams of other technologies;

[0036] FIG2 is a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of the present application;

[0037] FIG3 is a schematic diagram of the system architecture of the electronic device 100 provided in an embodiment of the present application;

[0038] 4A-4D are schematic diagrams of application scenarios of the device wake-up method provided in an embodiment of the present application;

[0039] FIG5 is a schematic diagram of the overall process of the device wake-up method provided in an embodiment of the present application;

[0040] FIG6 is a flow chart of a device wake-up method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] The following is a clear and detailed description of the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship between related objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0042] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0043] The term "user interface (UI)" in the following embodiments of this application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is a source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on an electronic device and finally presented as content that the user can recognize. The commonly used form of user interface is graphical user interface (GUI), which refers to a user interface related to computer operations that is displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.

[0044] In order to speed up the device wake-up, an asynchronous wake-up method is to divide the peripherals into peripherals that support asynchronous wake-up and peripherals that support synchronous wake-up. When the electronic device triggers wake-up, the wake-up process of the peripherals that do not support asynchronous wake-up can be executed in the main thread, and the wake-up process of the peripherals that support asynchronous wake-up can be executed in the asynchronous thread. After that, after the peripherals that do not support asynchronous wake-up are awakened, the main thread waits for the peripherals that support asynchronous wake-up to be awakened. After all peripherals are awakened, the subsequent processes are executed, including unfreezing the kernel threads, work queues, user-mode processes, etc. of the peripherals, starting the display to light up, displaying the user interface, etc.

[0045] Asynchronous wakeup is relative to synchronous wakeup. Synchronous wakeup refers to serial wakeup of devices one by one, while asynchronous wakeup refers to devices that can be woken up in parallel. Peripherals that support asynchronous wakeup can refer to peripherals that have no dependencies on other peripherals and do not need to wait for other peripherals to wake up before waking up. For example, high-speed serial computer expansion bus standard (Peripheral Component Interconnect Express, PCIE) network cards, universal serial bus (USB) controllers, USB keyboards, USB mice, display screens, etc. Peripherals that support synchronous wakeup can refer to peripherals that have dependencies on other peripherals and need to wait for other peripherals to wake up before waking up, such as inter-integrated circuit (I2C) controllers and universal asynchronous receiver transmitter (UART) controllers.

[0046] It can be seen that compared with waking up peripherals without distinguishing between them, dividing peripherals into those that support asynchronous wakeup and those that do not support asynchronous sleep wakeup, and waking up these two types of devices separately, can speed up device wakeup to a certain extent. However, the benefits are small. Electronic devices still need to wait for all peripherals to wake up before they can start executing subsequent wakeup processes, such as resuming peripheral process scheduling, starting the screen, displaying the login interface of the system account, etc. The time users wait for the device to wake up has not been significantly improved.

[0047] An embodiment of the present application provides a device wake-up method, which can divide peripherals in an electronic device into necessary wake-up peripherals and non-necessary wake-up peripherals. When the electronic device triggers wake-up, the necessary wake-up peripherals can be woken up, and the process scheduling of the necessary wake-up peripherals can be restored. The non-necessary wake-up peripherals can also be woken up, and the process scheduling of the non-necessary wake-up peripherals can be restored. After the process scheduling of the necessary wake-up peripherals is restored, the system enters a working state.

[0048] The system entering the working state may include any of the following: starting the display screen to light up, displaying the login interface of the system account, displaying the user interface before hibernation or sleep, etc.

[0049] In this way, the electronic device can wake up multiple devices at the same time after the wake-up is triggered, shortening the total time taken by the electronic device to wake up all peripherals. There is no need to wait for all peripherals to wake up and resume process scheduling before allowing the system to enter the working state. Instead, the system can enter the working state after the process that must wake up the peripherals resumes scheduling, reducing the work content that needs to be completed before the system enters the working state and speeding up the device wake-up.

[0050] Peripherals, or external devices, refer to devices outside the integrated circuit chip. External devices can be connected to the integrated circuit chip through dedicated circuits and buses.

[0051] Among them, according to the positional relationship between the device and the integrated circuit chip, the peripherals may include: on-chip peripherals and off-chip peripherals. On-chip peripherals refer to devices that are integrated on the integrated circuit chip but do not belong to the chip itself, such as universal flash storage (UFS) controllers, data processing units (DPUs), graphics processing units (GPUs), clocks, etc. Off-chip peripherals may refer to devices that are not located on the integrated circuit chip but are externally connected to the integrated circuit chip, such as keyboards, mice, displays, USB flash drives, network cards, cameras, etc.

[0052] Among them, the necessary wake-up peripherals include the peripherals that must be woken up during the system wake-up process, and the non-essential wake-up peripherals include the peripherals that are not necessary to wake up during the system wake-up process. Peripherals that are necessary for system wake-up refer to peripherals that have an impact on the system entering the working state. If these peripherals are not in the working state, the system cannot enter the working state. Peripherals that are not necessary for system wake-up refer to peripherals that have no impact on the system entering the working state. If these peripherals are not in the working state, the system can still enter the working state. In this way, when the electronic device wakes up, it can give priority to ensuring that the devices that are necessary for system wake-up complete the wake-up, ensure the normal execution of the system wake-up, and speed up the system wake-up.

[0053] Before the electronic device is awakened, the electronic device is in a sleep or hibernation state, and the peripherals in the electronic device are in a suspended state.

[0054] In the sleep state, the central processing unit (CPU) in the electronic device stops executing instructions, and the data in the memory remains in the memory. In the hibernation state, the CPU in the electronic device stops executing instructions, and the data generated in the original working state is written to the hard disk. After switching to the working state (waking up), the data written to the hard disk is loaded into the memory as is, and the system resumes operation.

[0055] For example, the electronic device may detect a user-initiated wake-up operation and initiate device wake-up. For example, the electronic device may detect a click operation on the power button and initiate device wake-up. For details on how the electronic device initiates wake-up, please refer to the subsequent method embodiments and will not be described in detail here.

[0056] After the electronic device starts to wake up, the system can continue to execute from the instruction that was stopped during the last hibernation or sleep state, and start the wake-up process, including: enabling the CPU, waking up on-chip and off-chip peripherals, restoring kernel threads, work queues, process scheduling, etc. The display subsystem restarts the display sending process. The system sends display data to the display through the display driver and lights up the display. After that, the login interface of the system account is displayed. After the user authentication is passed, the user enters the desktop and can use the system normally, completing the wake-up of the electronic device.

[0057] In order to better understand the difference between this solution and other technologies, Figure 1 shows a schematic diagram of the wake-up timing of the device wake-up method provided in an embodiment of the present application and other technologies.

[0058] Among them, (a) in Figure 1 shows a wake-up timing diagram that does not distinguish between peripherals, (b) in Figure 1 shows a wake-up timing diagram that divides peripherals into peripherals that support synchronous wake-up and peripherals that support asynchronous wake-up and wakes them up, and (c) in Figure 1 shows a wake-up timing diagram of the device wake-up method provided in an embodiment of the present application.

[0059] As can be seen from Figure 1, if the peripherals are woken up according to the wake-up sequence in (a), the electronic device can only wake up each peripheral step by step, and the subsequent wake-up process can only be executed after all peripherals are woken up. The device wake-up time is too long. If the peripherals are woken up according to the wake-up sequence in (b), the electronic device can wake up the peripherals that support synchronous wake-up and the peripherals that support asynchronous wake-up at the same time. However, the electronic device still needs to wait until all peripherals are woken up before executing the subsequent wake-up process. The number of peripherals that support asynchronous wake-up is much greater than the number of peripherals that support synchronous wake-up, and the improvement on the device wake-up time is limited. If the peripherals are woken up according to the wake-up sequence in (c), the electronic device can not only wake up the necessary and unnecessary peripherals at the same time, but also does not need to wait until all peripherals are woken up before starting the subsequent wake-up process, which greatly shortens the device wake-up time.

[0060] Among them, executing the subsequent wake-up process may include restoring the process scheduling of the peripheral after the peripheral is woken up, such as unfreezing the kernel thread, work queue, user mode process, etc. of the peripheral, and starting the display screen to light up, displaying the user interface, etc.

[0061] In general, the device wake-up method provided in the embodiment of the present application can wake up multiple peripherals in parallel, shortening the time spent waking up the peripherals. In addition, the electronic device does not need to wait for all peripherals to wake up or for all peripherals to resume process scheduling, thereby speeding up the system wake-up.

[0062] FIG2 is a schematic diagram of the hardware structure of the electronic device 100 provided in an embodiment of the present application.

[0063] As shown in FIG2 , the electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, a mixed reality (MR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device, and / or a smart city device. The embodiments of the present application do not impose any special restrictions on the specific type of the electronic device 100.

[0064] Optionally, in some embodiments of the present application, the electronic device 100 may be a desktop computer, a laptop computer, a handheld computer, a notebook computer, etc.

[0065] As shown in FIG2 , the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, and a display screen 194. The sensor module 180 may include, but is not limited to, a pressure sensor 180A, a fingerprint sensor 180B, a temperature sensor 180C, a touch sensor 180D, and an ambient light sensor 180E.

[0066] It should be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0067] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0068] In some embodiments, the processor 110 can be used to trigger the wake-up of the device when a user's wake-up operation is detected, which may specifically include waking up the peripherals included in the electronic device 100 and restoring the process scheduling of the peripherals. In addition, the processor 110 can be used to divide the peripherals in the electronic device 100 into necessary wake-up peripherals and non-necessary wake-up peripherals, and start the screen of the electronic device 100 after the necessary wake-up peripherals are woken up and the process scheduling is restored.

[0069] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0070] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0071] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0072] In some embodiments, the electronic device 100 can identify one or more peripheral devices connected to the electronic device 100 through one or more interfaces in the processor 110 .

[0073] The wireless communication function of the electronic device 100 can be implemented through an antenna, a wireless communication module 160, a modem processor, a baseband processor, and the like.

[0074] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0075] The display screen 194 is used to display images, videos, etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.

[0076] In some embodiments, display screen 194 can be used to activate the screen after waking up peripheral devices and resuming process scheduling. After waking up the screen, it can display a login interface for a system account. After a user logs in to a system account on the login interface, it can display the desktop or the user interface displayed before the electronic device 100 is dormant or in sleep mode. For details about the content displayed on display screen 194 after the electronic device 100 wakes up, please refer to the subsequent description of Figures 4A-4D and will not be repeated here.

[0077] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.

[0078] Among them, the internal memory 121 can be used to store computer executable program code, and the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0079] In some embodiments, the internal memory 121 can be used to store a whitelist, which can be pre-set with device types belonging to required wake-up peripherals and / or non-required wake-up peripherals. The electronic device 100 can use this whitelist to classify peripherals in the electronic device 100 as non-required wake-up peripherals and required wake-up peripherals. A detailed description of the whitelist can be found in the subsequent Figures 3 and 5, which will not be expanded here.

[0080] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0081] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0082] FIG3 is a schematic diagram of the system architecture of the electronic device 100 provided in an embodiment of the present application.

[0083] The electronic device 100 may be a portable terminal device running Harmony, iOS, Android, Microsoft, Linux, or other operating systems, such as a mobile phone, tablet computer, wearable device, etc., or a non-portable terminal device such as a laptop computer with a touch-sensitive surface or touch panel, or a desktop computer with a touch-sensitive surface or touch panel. This embodiment of the present application uses the Linux operating system as an example to illustrate the system architecture of the electronic device 100.

[0084] User state and kernel state refer to the two operating levels of the Linux operating system. When a program runs at privilege level 3, it is said to be running in user state, and when it runs at privilege level 0, it is said to be running in kernel state. In other words, user state refers to the form of resources that can be manipulated by users, while kernel state refers to the form of resources that can be manipulated by the system kernel. User state runs the basic unit of program execution—the process. A process has multiple threads. User state uses user threads, while kernel state uses kernel threads.

[0085] As shown in Figure 3, user state processes are running in the user state, and the kernel state may include modules such as power management module, device management driver, and bus driver.

[0086] The power management module is used to control device wakeup, specifically by waking up required and non-required peripherals in electronic device 100, and executing subsequent wakeup procedures after the required peripherals have been woken up. Furthermore, the power management module can establish and maintain a device list that records required and / or non-required peripherals in electronic device 100. This allows the power management module to wake up different types of peripherals in parallel based on the device list.

[0087] A whitelist may be pre-set in the device management driver, and the electronic device 100 may use the whitelist to classify peripherals in the electronic device 100 that are not required to be awakened and peripherals that must be awakened.

[0088] The bus driver can be used to identify all peripherals in the electronic device 100, including pluggable peripherals and non-pluggable peripherals. Pluggable peripherals refer to peripherals that can be manually disconnected and connected to the main part of the electronic device 100 by the user, such as a USB flash drive, a mouse, a keyboard, etc. Correspondingly, non-pluggable peripherals may refer to peripherals that cannot be manually disconnected and connected to the main part of the electronic device 100 by the user. In addition, the bus driver can also update the peripherals identified on the electronic device 100 in real time based on the connection and disconnection of the peripherals. Taking a pluggable peripheral as an example, when a pluggable peripheral is connected to the main part of the electronic device 100, the bus driver can recognize the connection of the peripheral, read the device information of the peripheral, call the interface for adding the device to register the peripheral in the device list maintained by the power management module, and if the peripheral is disconnected from the main part of the electronic device 100, the bus driver can recognize the disconnection of the peripheral and delete the peripheral from the device list.

[0089] In a specific implementation, the bus driver can identify all peripherals connected to the electronic device 100 and register all currently connected peripherals in the device list. The device management driver can classify the peripherals registered in the device list according to the white list. For example, different labels can be added to peripherals that are required wake-up peripherals and non-required wake-up peripherals, so that the power management module can wake up the required wake-up peripherals and non-required wake-up peripherals in the electronic device 100 separately.

[0090] For example, the whitelist may be a list preset in the electronic device 100 by a developer in advance, and the whitelist may list various devices that are required to be awakened and / or various devices that are not required to be awakened.

[0091] In addition, the hardware in the electronic device 100 may include a system on chip (SoC), wherein the peripherals integrated in the SoC may include: on-chip peripheral 1, on-chip peripheral 2...on-chip peripheral N, and the peripherals located outside the SoC may include off-chip peripheral 1, off-chip peripheral 2...off-chip peripheral M.

[0092] Specific descriptions of on-chip peripherals and off-chip peripherals can be found in the above content and will not be repeated here. It is understandable that FIG3 is only an exemplary description of the system architecture of the electronic device 100. In other embodiments, the electronic device 100 may also include more or less hardware and software structures, and the embodiments of the present application do not limit this.

[0093] Taking the electronic device 100 as a laptop computer as an example, the application scenario of the device wake-up method according to the embodiment of the present application is described with reference to FIG. 4A to FIG. 4D .

[0094] FIG4A is a schematic diagram of the electronic device 100 in a dormant or sleeping state.

[0095] As shown in FIG4A , when the electronic device 100 is in a dormant or sleeping state, the display screen of the electronic device 100 is in a black screen state. When the electronic device 100 detects a user operation on the power button, such as a click operation, the electronic device 100 may initiate device wake-up in response to the operation. The device wake-up may include waking up peripherals included in the electronic device 100 and resuming system process scheduling until the display screen turns on and a user interface is displayed on the display screen.

[0096] It is understood that in addition to triggering the awakening of the electronic device 100 by the power button of the electronic device 100, the awakening of the electronic device 100 can also be achieved by other methods. For example, the electronic device 100 can detect the awakening operation acting on the mouse or keyboard and initiate the awakening of the electronic device 100. The specific method for initiating the awakening of the electronic device 100 can be found in the subsequent embodiments and will not be described in detail here.

[0097] During the wake-up process, the electronic device 100 can divide the peripherals into necessary wake-up peripherals and non-necessary wake-up peripherals, start the wake-up of the necessary wake-up peripherals and non-necessary wake-up peripherals respectively, and after the wake-up of the necessary wake-up peripherals is completed, restore the process scheduling of the necessary wake-up peripherals, and after the process scheduling of the necessary wake-up is restored, put the system into working state, such as starting the screen of the electronic device 100 to light up.

[0098] FIG4B is a schematic diagram of starting to light up the screen during the wake-up process of the electronic device 100. FIG.

[0099] Furthermore, after the electronic device 100 turns on the screen, the electronic device 100 may continue to wake up the non-essential wake-up peripherals that have not completed the wake-up, and resume the process scheduling of the non-essential wake-up peripherals.

[0100] For example, after the electronic device 100 turns on the screen, the electronic device 100 may display a login interface 01 as shown in FIG4C . The login interface 01 may display the system account login page that the electronic device 100 displays before entering the desktop. The user may enter the account and password on the login interface, or select a login account, so that the electronic device 100 can control user permissions, record user behavior, and protect operational security through the logged-in account during operation.

[0101] In some embodiments, the electronic device 100 can complete waking up non-essential peripheral devices and resume process scheduling for waking up non-essential peripheral devices before displaying the login interface 01 shown in FIG4C . In this way, the electronic device 100 can complete all preparations for waking up peripheral devices before entering the desktop, ensuring that the user can use the electronic device 100 normally.

[0102] For example, after the electronic device 100 completes the account login through the login interface 01 shown in FIG4C , the electronic device 100 may be restored to the user interface displayed before hibernation or sleep, such as the desktop main interface 02 shown in FIG4D .

[0103] In other embodiments, the electronic device 100 can complete the awakening of non-essential peripheral devices and resume the process scheduling of non-essential peripheral devices after displaying the login interface 01 shown in FIG. 4C and before displaying the desktop main interface 02 shown in FIG. 4D . In this way, not only can all preparations for waking up the peripheral devices be completed before the user officially starts using the electronic device 100, ensuring that the user can use the electronic device 100 normally, but it can also speed up the speed at which the electronic device 100 displays the login interface, further speeding up the device awakening speed from the user's perspective.

[0104] It is understandable that, in addition to completing the awakening of all peripherals and resuming the process scheduling of all peripherals before displaying the login interface 01 shown in FIG4C and before displaying the dormant or light sleep user interface, such as the desktop main interface 02 shown in FIG4D , the electronic device 100 may also awaken some non-essential wake-up peripherals in the electronic device 100 at other nodes. For example, assuming that the camera is a non-essential wake-up peripheral, since the user will not use the camera when there is no need to take pictures, the electronic device 100 does not need to wake up the camera when detecting the user's wake-up operation, but wakes up the camera when the user needs to use the camera. The embodiment of the present application does not limit the timing of waking up non-essential wake-up peripherals.

[0105] It is understandable that FIG. 4A to FIG. 4D are only for facilitating the understanding of the present solution and do not constitute a limitation to the present solution.

[0106] FIG5 is a schematic diagram of the overall flow of the device wake-up method provided in an embodiment of the present application.

[0107] As shown in FIG5 , the device wake-up method provided in the embodiment of the present application may include but is not limited to the following steps:

[0108] S101. The electronic device 100 detects a wake-up operation.

[0109] The wake-up operation may be used to trigger the awakening of the device, switching the electronic device 100 from a dormant or sleeping state to a working state.

[0110] Before the electronic device 100 detects the wake-up operation, the peripheral devices in the electronic device 100 are all in the suspended state. After the electronic device 100 detects the wake-up operation, the electronic device 100 can wake up the peripheral devices and switch them from the suspended state to the working state.

[0111] Among them, putting a peripheral into a suspended state means suspending the peripheral's operation and putting it into a dormant state, such as stopping tasks in the work queue, disabling interrupts, turning off the clock, and putting the peripheral into a low-power state in the device driver. Correspondingly, waking up the peripheral and switching it from a suspended state to a working state means resuming the peripheral's operation, such as resuming the peripheral from a low-power state, turning on the clock, reinitializing registers, and resuming tasks in the work queue in the device driver. In addition, when a peripheral enters a suspended state or wakes up a peripheral, the peripheral's device driver can transmit data through physical connection channels such as PCIE, USB, I2C, or a serial peripheral interface (SPI).

[0112] Exemplarily, the wake-up operation may occur in the following situations:

[0113] 1) The wake-up operation may refer to a wake-up operation performed by the user on a wake-up source such as a mouse, keyboard, or power button.

[0114] When the user performs a wake-up operation on a wake-up source such as a mouse, keyboard or power button, such as a click operation, the electronic device 100 can obtain a wake-up instruction generated by the electronic device 100 in response to the wake-up operation, thereby triggering the wake-up of the device.

[0115] 2) The wake-up operation may refer to the user plugging in or unplugging a USB drive.

[0116] For example, the electronic device 100 may generate a wake-up instruction to trigger the wake-up of the device when a USB flash drive is inserted into a USB port on the electronic device 100 .

[0117] 3) If the electronic device 100 is a laptop computer, the wake-up operation may be the user opening the upper and lower covers of the laptop computer.

[0118] It is understandable that the embodiments of the present application do not limit the wake-up operation. In addition, in addition to the wake-up operation initiated by the user to wake up the electronic device 100, the electronic device 100 can also trigger wake-up in other ways. For example, if a scheduled task or a scheduled wake-up event is set in the electronic device 100, the electronic device 100 will generate a wake-up instruction at the set time point to trigger the wake-up of the device. For example, other devices can also send wake-up instructions to the electronic device 100 through the network to remotely control the wake-up of the electronic device 100. The embodiments of the present application do not limit the method of waking up the electronic device 100.

[0119] S102. The electronic device 100 wakes up the first peripheral device and resumes the process scheduling of the first peripheral device, and wakes up the second peripheral device and resumes the process scheduling of the second peripheral device.

[0120] Since the electronic device 100 backs up the data in the peripherals of the electronic device 100 before entering hibernation or sleep, and puts the peripherals into a suspended state, waking up the peripherals may include rewriting the data backed up in the peripherals before the electronic device 100 enters hibernation or sleep into the peripherals.

[0121] That is, waking up the first peripheral device may include rewriting the data backed up in the first peripheral device before the electronic device 100 enters hibernation or sleep into the first peripheral device, and waking up the second peripheral device may include rewriting the data backed up in the second peripheral device before the electronic device 100 enters hibernation or sleep into the second peripheral device.

[0122] Because the electronic device 100 will traverse all kernel threads, work queues, user-mode processes and other work tasks in the system before entering hibernation or sleep, and freeze all freezable work tasks, therefore, after waking up the peripheral device, it is also necessary to restore the process scheduling of the peripheral device, that is, to unfreeze the frozen work tasks of the peripheral device.

[0123] Freezing can refer to the system placing user-mode processes, kernel threads, and the like in a controllable "pause" state. Thawing kernel threads, work queues, and user-mode processes that rely on peripherals can put them into a working state, restoring system access to the peripherals. The kernel threads, work queues, and user-mode processes that rely on peripherals can refer to kernel threads, work queues, and user-mode processes that accessed the peripherals before the electronic device 100 entered hibernation or sleep mode.

[0124] That is, restoring the process scheduling of the first peripheral device may include unfreezing the kernel threads, work queues, and user-state processes that the first peripheral device depends on, and restoring the process scheduling of the second peripheral device may include unfreezing the kernel threads, work queues, and user-state processes that the second peripheral device depends on.

[0125] The first peripheral device may be the aforementioned required wake-up peripheral device, which may be a peripheral device that must be woken up before the system enters the working state. In other words, the peripheral device must be involved in the system entering the working state of the electronic device 100. If the peripheral device is in a suspended state or a closed state, the system cannot enter the working state.

[0126] Exemplarily, the first peripheral may include any one or more of the following: clock, PMU, direct memory access (DMA) controller, inter-processor communication module (IPC), system memory management unit (SMMU), input output microcontroller unit (IOMCU), general purpose input output port (GPIO) controller, PCIE controller, UFS controller, DPU, GPU, display, etc.

[0127] In some embodiments, in order to speed up the speed at which the electronic device 100 wakes up the first peripheral device, the electronic device 100 may wake up multiple devices in the first peripheral device in parallel.

[0128] Among them, the second peripheral may refer to the aforementioned non-essential wake-up peripheral, and the required wake-up peripheral may refer to a peripheral that is not required to be woken up when the system enters the working state. In other words, the system of the electronic device 100 does not require the participation of the peripheral to enter the working state. Even if the peripheral is in a suspended state or a closed state, the system can still enter the working state.

[0129] Exemplarily, the second peripheral device may include any one or more of the following: a USB controller, a keyboard, a mouse, a USB flash drive, a network card, a camera, a USB extender, a Wi-Fi chip, and a Bluetooth chip.

[0130] For example, the electronic device 100 can wake up the second peripheral device at the same time as waking up the first peripheral device, thereby enabling the electronic device 100 to wake up multiple peripheral devices in parallel and speeding up the device wake-up.

[0131] In one embodiment, the electronic device 100 can wake up the first peripheral device and the second peripheral device at the same time by multi-threaded wake-up. For example, the electronic device 100 can wake up the first peripheral device through the main thread and wake up the second peripheral device through the asynchronous thread. The main thread is a thread that is turned on by default after a program is run. Asynchronous threads are other threads different from the main thread. Asynchronous threads are new threads created separately by the kernel, which are specifically used to handle asynchronous transactions. They are at the same level as the main thread and can run at the same time as the main thread. The asynchronous thread will not block the operation of the main thread, so that the electronic device 100 can give priority to waking up the first peripheral device.

[0132] In some embodiments, when waking up the second peripheral device, the electronic device 100 may further wake up multiple peripheral devices in the second peripheral device in parallel. This is because the second peripheral device typically includes some peripheral devices that take a long time to wake up. Waking up multiple peripheral devices in the second peripheral device in parallel can further reduce the time spent waking up the peripheral devices.

[0133] Furthermore, the electronic device 100 can divide the peripherals in the second peripheral device into groups to be woken up in parallel according to their wake-up times. For example, a device with a longer wake-up time in the second peripheral device can be separated and woken up in parallel with other peripherals in the second peripheral device, thereby effectively shortening the total wake-up time of the peripheral devices.

[0134] In one embodiment, the electronic device 100 can determine the first peripheral and the second peripheral based on a whitelist. The whitelist can be determined by the developer, and the whitelist can be pre-set with multiple peripheral types belonging to the first peripheral and / or the second peripheral. In this way, the electronic device 100 can use the whitelist to implement peripheral classification, quickly divide non-essential wake-up peripherals and required wake-up peripherals, and later the developer can modify the whitelist again, thereby achieving flexible division of non-essential wake-up peripherals and required wake-up peripherals in the electronic device 100, and dynamically adjusting the peripherals included in the non-essential wake-up peripherals and required wake-up peripherals.

[0135] For example, the whitelist may be pre-set with multiple peripheral types belonging to the first peripheral, including: clock, UFS controller, DPU, GPU, display, etc. In this way, the electronic device 100 can search for the peripherals contained in the whitelist and determine them as the first peripherals, and determine the remaining peripherals not in the whitelist as the second peripherals.

[0136] For another example, the whitelist may be pre-set with multiple types of second peripherals, including keyboards, mice, USB flash drives, network cards, cameras, USB extenders, Wi-Fi chips, Bluetooth chips, etc. In this way, the electronic device 100 can search for peripherals in the whitelist and determine them as second peripherals, and determine the remaining peripherals not in the whitelist as first peripherals.

[0137] In the internal implementation of the electronic device 100 waking up the first peripheral and the second peripheral, a device list can be established and maintained inside the electronic device 100. The device list can record all the peripherals connected to the electronic device 100. The electronic device 100 can traverse all the peripherals recorded in the list through the white list to find the first peripheral and the second peripheral contained in the electronic device 100. Among them, when a peripheral is connected to the electronic device 100, a device node corresponding to the peripheral is added to the device list. The device node can store the peripheral type of the peripheral. When a peripheral is disconnected from the electronic device 100, the device node of the peripheral recorded in the device list disappears. In this way, the necessary wake-up peripherals and non-essential wake-up peripherals in the electronic device 100 are searched through the device list. Even if the user plugs in or unplugs the peripherals, the electronic device 100 can accurately record the peripherals connected to the electronic device 100 in real time and realize accurate wake-up of different peripherals.

[0138] It is understandable that for some of the second peripherals, the electronic device 100 does not need to wake up the peripheral at the same time as waking up the first peripheral. For example, for peripherals that are not related to the bright screen, the electronic device 100 can wake up the peripheral when the user needs to use the peripheral according to the user's usage needs. For example, taking the camera as an example, the electronic device 100 does not need to wake up the camera when it detects the user's wake-up operation, but wakes up the camera when the user needs to use the camera, such as when it detects the user's operation to open the camera application. In this way, not only can the number of peripherals awakened by the electronic device 100 when starting the wake-up be reduced, speeding up the wake-up of the device, but also the power consumption of some peripherals can be reduced.

[0139] Since the peripherals include peripherals that support synchronous wake-up and peripherals that support asynchronous wake-up, the wake-up of the peripherals that support synchronous wake-up needs to depend on the wake-up of other peripherals. In other words, the peripherals that support synchronous wake-up need to be woken up serially one by one. Correspondingly, the peripherals that support asynchronous wake-up do not need to depend on the wake-up of other peripherals. The peripherals that support asynchronous wake-up can be woken up in parallel. Then, in the process of the electronic device 100 waking up the first peripheral and the second peripheral, if there is a peripheral that supports synchronous wake-up among the first peripheral and the second peripheral, the device that supports synchronous wake-up needs to be awakened according to the dependency relationship of their wake-up.

[0140] For example, if the first peripheral device includes a first sub-peripheral device, and the awakening of the first sub-peripheral device depends on the awakening of a second sub-peripheral device, and the second sub-peripheral device can belong to the first peripheral device or the second peripheral device, then, when the electronic device 100 awakens the first peripheral device, the process may include: the electronic device 100 awakens the first sub-peripheral device after the second sub-peripheral device awakens.

[0141] That is, if the peripherals that need to be awakened include peripherals that depend on other peripherals to be awakened, when waking up the peripherals, priority can be given to ensuring that the other peripherals that depend on them are awakened first, thereby ensuring successful awakening of the peripheral that needs to be awakened.

[0142] For another example, if the first peripheral device includes a third sub-peripheral device, the second peripheral device includes a fourth sub-peripheral device, and the awakening of the fourth sub-peripheral device depends on the awakening of the third sub-peripheral device, then when the electronic device 100 awakens the second peripheral device, the electronic device 100 may awaken the fourth sub-peripheral device after the third sub-peripheral device is awakened.

[0143] That is to say, if the required wake-up peripherals and the non-required wake-up peripherals include peripherals that are awakened from each other, and the peripherals included in the non-required wake-up peripherals depend on the peripherals included in the required wake-up peripherals, then the electronic device 100 can wake up the dependent awakening peripherals in the non-required wake-up peripherals after being awakened by the dependent peripherals in the required wake-up peripherals. Moreover, since the electronic device 100 does not need to wait for the awakening of the non-required wake-up peripherals, even if the required wake-up peripherals and the non-required wake-up peripherals include peripherals that are awakened from each other, the electronic device 100 can only wake up these mutually dependent awakening peripherals one by one, and the electronic device 100 does not need to wait for all mutually dependent devices to be awakened, thereby weakening the wake-up dependency between peripherals that support synchronous wake-up and effectively shortening the time taken for the electronic device 100 to enter the working state.

[0144] For another example, if the second peripheral device includes a fifth sub-peripheral device and a sixth sub-peripheral device, and the awakening of the sixth sub-peripheral device depends on the awakening of the fifth sub-peripheral device, then when the electronic device 100 awakens the second peripheral device, the fifth sub-peripheral device may be awakened first, and then the sixth sub-peripheral device.

[0145] That is to say, if the non-essential wake-up peripherals include mutually dependent wake-up peripherals, even if these mutually dependent peripherals can only be awakened serially one by one, the electronic device 100 does not need to wait for their serial wake-up process. It only needs to restore the process scheduling of the necessary wake-up peripherals before the system can enter the working state.

[0146] It can be understood that the sub-devices mentioned above are only used to refer to the devices included in the first device or the second device, and are not used to limit the "parent-child relationship" or "subordinate relationship" between the devices in terms of function, connection, location, etc.

[0147] S103. After the process scheduling of the first peripheral device is restored, the electronic device 100 controls the system to enter the working state without waiting for the completion of the restoration of the process scheduling of the second peripheral device.

[0148] Because the first peripheral device includes a device that is essential for system wakeup, and the second peripheral device includes a device that is not essential for system wakeup, after waking up the first peripheral device and resuming its process scheduling, the electronic device 100 can control the system to enter the working state without waiting for the second peripheral device to wake up and resume its process scheduling. This can speed up the process of the electronic device 100 entering the working state.

[0149] The electronic device 100 entering the working state may include: lighting up the screen, displaying a login interface for a system account, displaying a user interface before dormancy or sleep, and the like.

[0150] In one embodiment, since the user-initiated wake-up operation may be a wake-up operation on a peripheral device in the electronic device 100, the user is likely to want to use the peripheral device. Therefore, if the wake-up source of the wake-up operation is a peripheral device in the electronic device 100, the first peripheral device also includes the peripheral device affected by the wake-up operation. For example, the peripheral device affected by the wake-up operation may be a keyboard, a mouse, etc. In this way, after detecting the user's wake-up operation on a peripheral device, the electronic device 100 can wake up the peripheral device before the control system enters the working state, ensuring normal use of the peripheral device by the user.

[0151] In one embodiment, whether a peripheral device is required to be awakened during the system wake-up process can be classified based on whether it is related to turning on the screen. In this case, the peripheral devices that must be awakened may include peripherals related to turning on the screen, and the peripheral devices that are not required to be awakened may include peripherals that are not related to turning on the screen. Among them, peripherals related to turning on the screen refer to peripherals that have an impact on turning on the screen. If these peripherals are not in a working state, the electronic device cannot normally turn on the screen. Peripherals that are not related to turning on the screen refer to peripherals that have no impact on turning on the screen. If these peripherals are not in a working state, the electronic device can still normally turn on the screen.

[0152] In one embodiment, in addition to determining the first peripheral and the second peripheral based on whether they are peripherals that must be awakened during the system wake-up process, the electronic device 100 can also determine the first peripheral and the second peripheral based on the peripheral wake-up duration. For example, if the wake-up duration of a peripheral is short, then even if the peripheral is a peripheral that is not necessary for the system wake-up process, the electronic device 100 can still classify it as the first peripheral. In this case, in addition to the peripherals that must be awakened during the system wake-up process, the first peripheral may also include peripherals that are not necessary to be awakened during the system wake-up process and whose wake-up duration is less than a threshold. Then the peripherals included in the second peripheral may refer to peripherals that are not necessary to be awakened during the system wake-up process and whose wake-up duration is greater than or equal to the threshold.

[0153] In this way, even if the peripherals are not required to be awakened during the system wake-up process, but the wake-up time is short, they can be classified as peripherals that must be awakened. This can reduce the number of peripherals in the non-essential wake-up peripherals, reduce the pressure of waking up non-essential wake-up devices, avoid the electronic device 100 spending too much time waking up non-essential wake-up devices, and reduce the total time spent by the electronic device 100 to wake up all peripherals.

[0154] In some embodiments, the electronic device 100 may further adjust the wake-up order of each peripheral in the second peripheral device based on the frequency of use of the peripheral device. Peripherals that are more frequently used by the user may be awakened earlier in the order, while peripherals that are less frequently used by the user may be awakened later in the order. This ensures that peripherals that are more frequently used by the user are awakened first, and even if the electronic device 100 does not wake up all peripherals, it can still ensure that the user can use the electronic device 100 normally.

[0155] FIG6 is a flow chart of a device wake-up method provided in an embodiment of the present application.

[0156] As shown in FIG6 , the device wake-up method may include the following steps:

[0157] S201. The electronic device 100 starts waking up.

[0158] After detecting a user's wake-up operation on a wake-up source, the electronic device 100 can initiate wake-up in response to the operation. Taking the electronic device 100 shown in Figures 4A-4D as an example, the wake-up source can be a power button, a keyboard, a laptop cover, etc.

[0159] For example, when the electronic device 100 is in a sleep state, it may detect that the user has pressed the power button and initiate wake-up.

[0160] For details about how the electronic device 100 starts waking up, please refer to the detailed content in the aforementioned step S101, which will not be elaborated here.

[0161] Among them, after the electronic device 100 starts to wake up, it is necessary to wake up the peripherals contained in the electronic device 100. In order to speed up the wake-up speed of the peripherals, the peripherals in the electronic device 100 can be divided into necessary wake-up peripherals and non-necessary wake-up peripherals, and after starting the wake-up, the necessary wake-up peripherals and non-necessary wake-up peripherals are woken up at the same time.

[0162] That is, the system wake-up process of the electronic device 100 may include two branches: steps S202-S203, S206-S207, and steps S204-S205. Among them, steps S202-S203 and S206-S207 are the main process of system wake-up, which are used to wake up the necessary peripheral devices, restore the process scheduling of the necessary peripheral devices, and realize the screen lighting. Steps S204-S205 are the branch process of system wake-up, which are used to wake up the non-essential peripheral devices and restore the process scheduling of the non-essential peripheral devices.

[0163] S202. When the electronic device 100 wakes up, it is necessary to wake up the peripheral device.

[0164] The peripherals that must be woken up may include peripherals that must be woken up during the system wake-up process. After starting the wake-up, the electronic device 100 may start waking up the peripherals that must be woken up.

[0165] More specifically, the peripherals that must be woken up may include peripherals related to turning on the screen. The peripherals related to turning on the screen refer to peripherals that have an impact on turning on the screen. If these peripherals are not in a working state, the electronic device cannot normally turn on the screen.

[0166] Waking up the necessary-to-wake-up peripheral device may include rewriting the data backed up in the necessary-to-wake-up peripheral device into the necessary-to-wake-up peripheral device before the electronic device 100 enters hibernation or sleep mode.

[0167] S203. The electronic device 100 unfreezes the kernel threads, work queues, and user-mode processes that are necessary to wake up the peripherals.

[0168] After the necessary peripherals are awakened, the electronic device 100 can unfreeze the kernel threads, work queues, and user-mode processes of the necessary peripherals, thereby restoring the process scheduling of the necessary peripherals, that is, restoring the system's access to the necessary peripherals.

[0169] S204. The electronic device 100 wakes up non-essential peripheral devices.

[0170] The non-essential wake-up peripherals may include peripherals that are not required to be woken up during the system wake-up process.

[0171] More specifically, the non-essential wake-up peripherals may include peripherals that are not related to turning on the screen. Peripherals that are not related to turning on the screen refer to peripherals that have no effect on turning on the screen. If these peripherals are not in working state, the electronic device can still turn on the screen normally.

[0172] Waking up the non-essential wake-up peripheral device may include rewriting the data backed up in the non-essential wake-up peripheral device into the non-essential wake-up peripheral device before the electronic device 100 enters hibernation or sleep mode.

[0173] After initiating the wake-up, the electronic device 100 can start waking up the non-essential wake-up peripherals. That is, step S202 and step S204 can be performed simultaneously. In this way, after initiating the wake-up, the electronic device 100 can wake up both the required and non-essential wake-up peripherals, thereby shortening the time it takes to wake up all peripherals in the electronic device 100.

[0174] In one implementation, the electronic device 100 may wake up necessary peripherals in the main thread and wake up unnecessary peripherals in other threads, such as asynchronous threads. Detailed descriptions of the main thread and the asynchronous thread can be found in the relevant content of step S102 above, which will not be repeated here.

[0175] S205. The electronic device 100 unfreezes kernel threads, work queues, and user-mode processes that are not necessary for waking up peripherals.

[0176] After the non-essential wake-up peripheral is awakened, the electronic device 100 can unfreeze the kernel thread, work queue, and user-mode process of the non-essential wake-up peripheral, thereby restoring the process scheduling of the non-essential wake-up peripheral, that is, restoring the system's access to the non-essential wake-up peripheral.

[0177] It should be noted that the electronic device 100 may execute step S208 after executing step S205.

[0178] S206. The electronic device 100 executes display driving and displaying.

[0179] The electronic device 100 can execute the display driver and send the display after the kernel threads, work queues, and user-mode processes that are required to wake up the peripheral devices are unfrozen. Furthermore, the display driver and send the display can be executed without waiting for the awakening of the non-essential peripheral devices or the unfreezing of the kernel threads, work queues, and user-mode processes that are required to wake up the peripheral devices. This can reduce the number of operations that the electronic device 100 needs to perform before step S206, shortening the time it takes from the start of the wake-up process to the execution of the display driver and send the display.

[0180] S207. The electronic device 100 turns on the screen.

[0181] The electronic device 100 can start to light up the screen after the display driver sends the display.

[0182] Combining steps S203 and S204, it can be seen that the electronic device 100 can turn on the screen without waiting for the awakening of non-essential wake-up peripherals and the restoration of their process scheduling. In this way, after the electronic device starts waking up, it only needs to wait until the process scheduling of the necessary wake-up devices is restored before the electronic device can turn on the screen normally. This speeds up the speed of the electronic device 100 turning on the screen, avoids the user waiting for a long time during the wake-up period of the electronic device 100, and speeds up the wake-up speed of the electronic device 100 from the user's perspective.

[0183] S208. The electronic device 100 displays the login interface of the system account.

[0184] The login interface of the system account may refer to the interface that is first displayed after the screen of the electronic device 100 turns on, and the user may choose to log in to the system account on the electronic device 100 through this interface.

[0185] Exemplarily, the login interface of the system account may refer to the login interface 01 shown in FIG. 4C .

[0186] Among them, the electronic device 100 can display the login interface of the system account after the screen is turned on and the kernel threads, work queues, and user-mode processes that are not necessary to wake up peripherals are unfrozen.

[0187] That is, the electronic device 100 can complete the awakening of all peripherals and restore the process scheduling of all peripherals before displaying the login interface of the system account. In this way, it can be ensured that the user can use the electronic device 100 normally after the electronic device 100 displays the login interface of the system account.

[0188] This is because after the user logs in to a system account through the login interface, the user can start using the electronic device 100. If all or most of the peripherals of the electronic device 100 are restored to the working state before the user starts using the electronic device 100, the user's normal use of the electronic device 100 can be guaranteed in time, avoiding the situation where the peripheral has not yet woken up or is still in the wake-up diagram when the user needs to use a certain peripheral, affecting the user's usage experience.

[0189] It is understood that in other embodiments of the present application, the electronic device 100 may also wake up all peripheral devices in the electronic device 100 and resume process scheduling for all peripheral devices before displaying the user interface before dormancy or sleep. The embodiment of the present application does not limit the time point when the electronic device 100 resumes process scheduling for all peripheral devices.

[0190] For details about the contents not described in detail in steps S201-S208, please refer to the relevant contents of the aforementioned steps S101-S103, which will not be repeated here.

[0191] In general, the device wake-up method provided in the embodiment of the present application can wake up the necessary wake-up peripherals and non-necessary wake-up peripherals at the same time after the electronic device starts to wake up, and restore the process scheduling of these peripherals. However, the system wake-up process does not need to wait for the wake-up of non-necessary wake-up peripherals or the restoration of process scheduling. It only needs to wake up the necessary wake-up peripherals and restore the process scheduling of the necessary wake-up peripherals before starting to light up the screen. This not only speeds up the device wake-up speed, but also speeds up the screen lighting speed of the electronic device.

[0192] It should be understood that each step in the above method embodiment can be completed by hardware integrated logic circuits in a processor or by software instructions. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.

[0193] The present application also provides an electronic device, which may include a memory and a processor. The memory may be used to store a computer program, and the processor may be used to call the computer program in the memory so that the electronic device executes the method executed by the electronic device 100 in any of the above embodiments.

[0194] The present application also provides a chip system, which includes at least one processor for implementing the functions involved in the method performed by the electronic device 100 in any of the above embodiments.

[0195] In one possible design, the chip system further includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.

[0196] The chip system can be composed of chips, or can include chips and other discrete devices.

[0197] Optionally, there may be one or more processors in the chip system. The processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.

[0198] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be provided separately from the processor, which is not limited in the embodiments of the present application. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or provided on different chips. The embodiments of the present application do not specifically limit the type of memory or the configuration of the memory and the processor.

[0199] Exemplarily, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.

[0200] The present application also provides a computer program product, which includes: a computer program (also referred to as code, or instructions), which, when executed, enables a computer to execute any method executed by the electronic device 100 in any of the above embodiments.

[0201] The present application also provides a computer-readable storage medium storing a computer program (also referred to as code or instructions), wherein the computer program is composed of instructions and is a collection of instructions. When the computer program is executed, the computer executes the method executed by any one of the electronic devices 100 in any of the above embodiments.

[0202] It should be understood that the processor in the embodiments of the present application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above-mentioned method embodiment can be completed by hardware integrated logic circuits in the processor or by software instructions. The above-mentioned processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above-mentioned method.

[0203] In addition, embodiments of the present application further provide a device. Specifically, the device may be a component or module, and may include one or more processors and a memory connected to each other. The memory is configured to store a computer program. When the computer program is executed by one or more processors, the device performs the methods described in each of the above method embodiments.

[0204] The apparatus, computer-readable storage medium, computer program product, or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0205] The various implementation modes of this application can be combined arbitrarily to achieve different technical effects.

[0206] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described herein are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0207] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0208] In short, the above description is only an embodiment of the technical solution of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made based on the disclosure of the present invention should be included in the scope of protection of the present invention.

Claims

1. A device wake-up method, characterized in that: The method comprises: The electronic device detects a wake-up operation; The electronic device wakes up the first peripheral device, restores the process scheduling of the first peripheral device, wakes up the second peripheral device, and restores the process scheduling of the second peripheral device; After the process scheduling of the first peripheral device is restored, the electronic device control system enters a working state.

2. The method according to claim 1, characterized in that The system enters the working state without waiting for the process scheduling recovery of the second peripheral device to be completed.

3. The method according to claim 1 or 2, characterized in that: The first peripheral device includes a peripheral device that must be awakened when the system enters a working state.

4. The method according to claim 3, characterized in that The second peripheral device includes a peripheral device which is not necessarily awakened when the system enters a working state.

5. The method according to any one of claims 1 to 4, characterized in that: The electronic equipment control system enters a working state, specifically including: The electronic device lights up the screen or displays a login interface of a system account or displays a user interface before hibernation or sleep.

6. The method according to any one of claims 1 to 5, characterized in that: The first peripheral includes one or more of the following: clock, power management unit PMU, direct memory access DMA controller, inter-core communication module IPC, system memory management unit SMMU, input and output microcontroller unit IOMCU, general input and output port GPIO controller, high-speed serial computer expansion bus standard PCIE controller, universal flash storage UFS controller, graphics processor GPU, data processor DPU, display screen.

7. The method according to any one of claims 1 to 6, characterized in that: The second peripheral device includes one or more of the following: a universal serial bus (USB) controller, a universal serial bus (USB) extender, a keyboard, a mouse, a memory, a network card, a Wi-Fi chip, a Bluetooth chip, and a camera.

8. The method according to any one of claims 1 to 7, characterized in that: The first peripheral device includes a first sub-peripheral device, the awakening of the first sub-peripheral device depends on the awakening of a second sub-peripheral device, the second sub-peripheral device belongs to the first peripheral device or the second peripheral device, and the electronic device awakens the first peripheral device, specifically including: The electronic device wakes up the first sub-peripheral device after the second sub-peripheral device wakes up.

9. The method according to any one of claims 1 to 8, characterized in that: The first peripheral device includes a third sub-peripheral device, the second peripheral device includes a fourth sub-peripheral device, and the awakening of the fourth sub-peripheral device depends on the awakening of the third sub-peripheral device. The electronic device waking up the second peripheral device specifically includes: The electronic device wakes up the fourth sub-peripheral device after the third sub-peripheral device wakes up.

10. The method according to any one of claims 1 to 9, characterized in that: The second peripheral device includes a fifth sub-peripheral device and a sixth sub-peripheral device, and the awakening of the sixth sub-peripheral device depends on the awakening of the fifth sub-peripheral device. The electronic device waking up the second peripheral device specifically includes: The electronic device first wakes up the fifth peripheral sub-device, and then wakes up the sixth peripheral sub-device.

11. The method according to any one of claims 1 to 10, characterized in that: The electronic device waking up the second peripheral device specifically includes: The electronic device wakes up multiple peripherals in the second peripherals in parallel.

12. The method according to any one of claims 1 to 11, characterized in that: The wake-up order of each peripheral in the second peripheral is determined by the electronic device according to the frequency of use of the peripheral by the user, wherein the more frequently the user uses the peripheral, the earlier the wake-up order.

13. The method according to any one of claims 1 to 12, characterized in that: The electronic device waking up the first peripheral device specifically includes: The electronic device wakes up the first peripheral device through the main thread; The electronic device waking up the second peripheral device specifically includes: The electronic device wakes up the second peripheral device through an asynchronous thread.

14. The method according to any one of claims 1 to 13, characterized in that: The first peripheral device is determined by the electronic device according to a white list, and the white list is preset with a plurality of peripheral device types belonging to the first peripheral device.

15. The method according to any one of claims 1 to 14, characterized in that: The electronic device is a tablet computer, a notebook computer or a desktop computer.

16. An electronic device, characterized in that: The electronic device comprises a memory, one or more processors, and one or more programs; when the one or more processors execute the one or more programs, the electronic device implements the method as claimed in any one of claims 1 to 15.

17. A computer-readable storage medium comprising a computer program, characterized in that: When the computer program is executed on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 15.

18. A computer program product, comprising a computer program, characterized in that When the computer program product is executed on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 15.

Citation Information

Patent Citations

  • Equipment wakeup method and related device

    CN120162086A

  • Multicore-based screen awakening method and device as well as mobile terminal

    CN105892629A

  • Terminal screen awakening method and device, terminal and storage medium

    CN110209428A

  • Risk monitoring method and device, equipment and storage medium

    CN114003367A

  • Remote wake-up method, host to be remotely awaked, and wake-up management server

    US20100262681A1