Screen bright processing method, device, chip, electronic device and medium
By parallelizing the underlying and upper-layer processing when requesting the device to light up the screen, including state switching and multi-threaded synchronization, the problem of long device screen lighting time is solved and the user experience is improved.
Patent Information
- Application Number
- CN202410486749.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-22
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-04-22
AI Technical Summary
The device takes a long time to turn on the screen after the user presses the power button, resulting in a poor user experience.
After receiving a screen-on request, it executes state switching in advance and parallelizes the underlying and upper-layer processing, including creating multiple threads to synchronize the screen refresh rate and frame rate, and issuing screen-on instructions before state switching to draw images and backlight brightness.
It shortens the device screen lighting time, optimizes screen lighting performance, and improves user experience.
Smart Images

Figure CN119271280B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic equipment, and in particular to a method, device, chip, electronic equipment and medium for bright screen processing. Background Art
[0002] When the device system is in sleep mode, the device screen is off and may be displayed as a black screen. The user can wake up the device system by pressing the power button or other operations, and the device screen will light up and display the bright screen image.
[0003] Currently, after a user performs an operation such as pressing the power button, the device takes a long time to turn on the screen, resulting in a poor user experience. Summary of the Invention
[0004] The present application provides a screen-lighting processing method, device, chip, electronic device and medium, which can shorten the time taken to light up the device screen.
[0005] In a first aspect, an embodiment of the present application provides a screen light processing method, comprising: receiving a device screen light request; in response to the device screen light request, sequentially executing the steps of issuing a screen light instruction and alignment processing, the alignment processing being used to synchronize the screen refresh rate and frame rate; before the alignment processing step is completed, switching the information of the screen status parameter to the first information to trigger the image sending process, the first information being used to indicate that the display screen of the electronic device is in the on state.
[0006] Alternatively, a screen-lighting instruction may be sent to a display driver of the electronic device, and the display driver may process the screen-lighting instruction to drive the display screen to power on and start initialization. For example, the steps of executing the screen-lighting instruction may include: Figures 5 to 7 As shown, after the HWC creates a new thread, the thread is driven by the display to trigger the process of powering on and initializing the display screen.
[0007] Exemplarily, the steps of performing the alignment process may include: Figures 5 and 6 As shown, after the HWC creates a new thread, the thread performs the alignment process to avoid the screen tearing problem through the alignment process.
[0008] Optionally, the image sending process may include drawing an image and sending the drawn image to a display screen. Figures 5 to 7 The process shown is that the application layer sends images to the display screen layer by layer.
[0009] After the image sending process, the backlight brightness sending process can be executed to send the backlight brightness to the display screen. For example, the backlight brightness sending process may include the following: Figures 5 to 7The application layer sends the backlight brightness to the display screen layer by layer. After receiving the backlight brightness and image, the display screen can display the screen accordingly.
[0010] In this application, after receiving the device screen light-up request, the state switching process is performed before completing the alignment process to realize the state switching in advance. Since the application layer can execute the processing of sending pictures and sending backlight brightness after the state switching, based on the early execution of the state switching, the upper layer can accordingly execute the processing of sending pictures and sending backlight brightness in advance, without having to wait until the bottom layer completes the screen initialization, etc. before proceeding to the next step. In this way, the bottom layer processing and the upper layer processing can be executed in parallel. Compared with the serial processing method of screen light-up processing, this application is based on the parallel processing of the upper and bottom layers, which can shorten the time it takes to light up the device screen.
[0011] Optionally, before the alignment processing step is completed, the information of the screen state parameter is switched to the first information, including: before executing the step of issuing the screen light-up instruction, the information of the screen state parameter is switched to the first information.
[0012] Compared with executing the state switch in advance after issuing the screen-lighting command, by executing the state switch first and then issuing the screen-lighting command, that is, advancing the state switch to before issuing the screen-lighting command, the state switch can be completed as early as possible, corresponding to the earlier start of upper-level processing, thereby helping to shorten the time it takes to light up the device screen to a greater extent.
[0013] Optionally, the electronic device includes an HWC; the screen light processing method further includes: the HWC creates and starts a first thread (for example Figure 5 or Figure 7 The first thread is used to execute the steps of issuing a screen light instruction, aligning the screen, and switching the screen status parameter information to the first information.
[0014] Optionally, the HWC may create and start a thread after receiving a screen-on instruction, which may be obtained based on a device screen-on request. For example, the electronic device may include a PMS and SurfaceFlinger, and the PMS may send a screen-on instruction to the HWC via SurfaceFlinger based on the device screen-on request.
[0015] By performing multi-threaded screen-brightening processing in HWC, upper and lower layer parallelization can be achieved, which can shorten the device screen-brightening time and optimize the device screen-brightening performance.
[0016] Optionally, the electronic device further includes SurfaceFlinger; the step of performing the alignment process includes: the first thread reports a first signal to SurfaceFlinger to trigger SurfaceFlinger to perform signal calibration according to the first signal; the first signal is used to describe the screen refresh rate of the display screen, and the signal calibration is used to synchronize the screen refresh rate and the frame rate; the first thread receives a completion message returned by SurfaceFlinger after performing the signal calibration. Based on this, before the alignment process step is completed, the information of the screen status parameters is switched to the first information, including: before the first thread receives the completion message, the information of the screen status parameters is switched to the first information. Feasibly, the first thread can receive the first signal reported by the display driver.
[0017] The first thread switches the information of the screen status parameters at least before receiving the completion message, so that the upper layer can execute the processing of sending pictures and sending backlight brightness in advance accordingly, which helps to shorten the time it takes to light up the device screen.
[0018] Optionally, the electronic device further includes a PMS; receiving the device screen light-up request includes: the PMS receives the device screen light-up request, and sends a screen light-up notification to the HWC to trigger the HWC to create a first thread.
[0019] For example, the PMS may receive a device screen light-up request from an input device node in the electronic device, and send a screen light-up notification to the HWC in response to the received device screen light-up request. In other examples, the PMS may also receive device screen light-up requests from other components.
[0020] Optionally, the display screen is a touch screen, and the electronic device also includes an input device node; the device screen lighting method also includes: the input device node receives a screen lighting request event, the screen lighting request event is an event of operating a button of the electronic device or a display screen; the input device node responds to the screen lighting request event and sends a device screen lighting request to the PMS.
[0021] For example, when a user touches (or single-clicks) or double-clicks the display screen while the device is black, the touchscreen driver of the electronic device can write the corresponding touchscreen event to the input device node, which can then report a notification message of the touchscreen event to the PMS. The PMS's receipt of this notification message can indicate that the PMS has received a request to light up the device screen.
[0022] Based on the device node and PMS, it can respond to the screen-lighting request issued by the user by operating the device buttons and the device screen, thereby meeting the user's device screen-lighting needs in the corresponding usage scenario.
[0023] Optionally, the above-mentioned screen light request event is any one of the following events: an event of clicking the power button of the electronic device when the display screen is in a sleep state, an event of touching the display screen, and an event of double-clicking the display screen.
[0024] Optionally, the electronic device also includes: a first module located in the application framework layer; the step of receiving a device screen-lighting request includes: the first module detects a screen-lighting request operation (which may indicate that the first module receives a device screen-lighting request), and sends a screen-lighting notification to the HWC; the screen-lighting request operation is an operation that causes the data of the electronic device's sensors (such as posture sensors, camera sensors, distance sensors, etc.) to change.
[0025] In one embodiment, the first module may be a PMS. For example, if a user performs an under-screen fingerprint unlocking operation or makes a screen-lighting request gesture when the device screen is black, the PMS may detect changes in the corresponding sensor data.
[0026] In other embodiments, the first module may be other functional modules in the application framework layer that are different from the PMS.
[0027] Based on the application framework layer, it can respond to other types of screen-lighting requests issued by users without operating device buttons or operating the device screen, thereby meeting the user's device screen-lighting needs in corresponding usage scenarios.
[0028] Optionally, the above-mentioned screen light request operation includes at least one of the following operations: performing an under-screen fingerprint unlocking operation when the display screen is in a sleep state, performing a screen light request gesture operation when the display screen is in a sleep state, lifting the display screen when the display screen is in a sleep state, moving away from the display screen when the display screen is in a sleep state, and non-blocking the display screen when the display screen is in a sleep state.
[0029] Optionally, the electronic device is installed with a first application; the screen light processing method further includes: when the information of the screen status parameter is switched to the first information, the first application executes the step of drawing an image and sending the drawn image to the display screen.
[0030] Based on real-time monitoring of screen status parameter changes, it supports timely and advanced execution of image drawing, which helps to shorten the time it takes to light up the device screen. Figure 5 , the first application may include Figure 5 The image drawing module in the image drawing module is used to draw the bright screen image.
[0031] In a second aspect, an embodiment of the present application provides a device for processing a bright screen, the device including a unit for executing the method described in the first aspect above. The method described in the first aspect above can be implemented by hardware, or by hardware executing corresponding software implementations. The hardware or software includes one or more modules or units corresponding to the functions of the above method, such as processing modules or units.
[0032] In a third aspect, an embodiment of the present application provides a chip, comprising: a processor for executing computer program instructions stored in a memory, wherein when the computer program instructions are executed by the processor, the chip is triggered to execute a method as described in any one of the first aspects.
[0033] In a fourth aspect, an embodiment of the present application provides an electronic device, which includes one or more memories for storing computer program instructions, and one or more processors, wherein when the computer program instructions are executed by one or more processors, the electronic device is triggered to execute a method as described in any one of the first aspects.
[0034] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program runs on a computer, the computer executes any method as in the first aspect.
[0035] In a sixth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is run on a computer, it enables the computer to execute any method as described in the first aspect.
[0036] The technical effects of the aforementioned aspects can be referenced with each other and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments.
[0038] Figure 1 A schematic diagram of the screen-lighting process of a device system provided as an example;
[0039] Figure 2 A schematic diagram of the software architecture of an electronic device provided as an example;
[0040] Figure 3 A schematic diagram of the time consumption of a screen-lighting processing method provided for an example;
[0041] Figure 4 A schematic diagram of a device system screen lighting process provided in an embodiment of the present application;
[0042] Figure 5A schematic diagram of the software architecture of an electronic device provided in an embodiment of the present application;
[0043] Figure 6 A timing diagram of a screen-lighting processing method provided in an embodiment of the present application;
[0044] Figure 7 A schematic diagram of the time consumption of a screen-lighting processing method provided in an embodiment of the present application;
[0045] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0047] It should be clear that the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0048] The terms used in the embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. The singular forms "a", "an", "the" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise.
[0049] It should be understood that the term "at least one" used in this article refers to one or more, and "plurality" refers to two or more. The term "and / or" used in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. Among them, A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0050] It should be understood that although the terms "first," "second," etc. may be used to describe the set thresholds in the embodiments of the present application, these set thresholds should not be limited to these terms. These terms are merely used to distinguish the set thresholds from each other. For example, without departing from the scope of the embodiments of the present application, the first set threshold may also be referred to as the second set threshold, and similarly, the second set threshold may also be referred to as the first set threshold.
[0051] When a device system (such as the Android system installed on a mobile phone) is in sleep mode, the device screen turns off and may appear black. When the device system is in sleep mode, the device's power supply module may power off the device screen, causing each pixel on the device screen to turn off and appear black, resulting in the device screen appearing black. Users can wake up the device system by pressing the power button, for example, to turn on the device screen and display the bright screen image.
[0052] In one example (referred to as Example 1), the screen-lighting process of the device system includes: when the device screen is off and displayed as a black screen, if the user requests to wake up the device system, the screen is initialized first, and after the bottom layer completes the screen initialization and alignment processing, the upper layer sends the image and backlight instructions to the bottom layer, thereby realizing the screen light display. For details, please refer to Figure 1 The device system screen lighting process of this example 1 may include the following steps 101 to 105.
[0053] Step 101: In response to a device screen-on request, a screen-on instruction is sent to a display driver of the electronic device. The display driver processes the screen-on instruction and instructs the display screen to power on and initialize.
[0054] Step 102: Perform alignment processing to synchronize the screen refresh rate and frame rate.
[0055] The screen refresh rate (or vertical refresh rate) can indicate the number of times the image displayed on the display screen is refreshed per second. The higher the screen refresh rate, the smoother the picture. The frame rate can indicate the number of frames of image generated by the graphics card (graphics processor) per second. A high frame rate can produce smoother and more realistic animations. However, if the frame rate exceeds the screen refresh rate and the two are out of sync, then because the display screen cannot be updated at the same speed, the high frame rate will cause screen tearing. By performing alignment processing to synchronize the screen refresh rate and frame rate, the problem of screen tearing can be avoided.
[0056] Step 103: Switch the screen status parameter information to information indicating an on state (eg, from OFF to ON).
[0057] Figure 1 In the example 1 shown, the screen status parameter information is switched to ON only after the screen initialization and alignment processing are completed. That is, the screen has completed initialization at this time and it can be considered that the screen is ready for bright screen display.
[0058] Step 104: draw an image and send the image to the display screen of the electronic device.
[0059] Step 105: Send the backlight brightness to the display screen. The display screen can display the image in a bright screen according to the backlight brightness and the image.
[0060] It can be seen that in the device system screen-lighting process of the above Example 1, the electronic device sequentially executes the steps of issuing a screen-lighting instruction, alignment processing, state switching, image sending, and issuing backlight brightness.
[0061] based on Figure 1 The device system screen lighting process shown, Figure 2 The software architecture of an electronic device provided in the above example 1 is shown. Figure 2 As shown in the figure, taking the Android operating system of an electronic device as an example, the Android system can be divided into multiple layers, from top to bottom: application layer (APP), application framework layer (FW), native service layer (native), hardware abstraction layer (HAL), and driver layer. The lower layer of the driver layer is the hardware layer (HW).
[0062] Among them, the application layer may include an image drawing module and a backlight brightness setting module, the application framework layer may include a power management service module (power manager service, PMS), the local service layer may include a surface drawing service module (SurfaceFlinger, SF), the hardware abstraction layer may include a hardware synthesis module (hwcomposer, HWC), the driver layer includes device nodes (or input device nodes) and display drivers, and the hardware layer may include a display screen and buttons (such as a power button, etc.).
[0063] refer to Figure 2 For example, if a user clicks the power button to turn the device screen on while the device screen is black, a corresponding button click event can be written to the corresponding device node based on the power button information. The device node can then report the button click event notification information to the PMS, thereby reporting the device screen turn-on request to the PMS. In response to the notification message, the PMS can perform the logic processing corresponding to the button click event and send a screen turn-on notification to the HWC via the SF.
[0064] After receiving the screen light notification, HWC can send a screen light instruction to the display driver. By processing the screen light instruction, the display driver can drive the display screen to power on and start initialization. Feasibly, the display driver can return a completion message to HWC after driving the display screen to initialize. After the display screen is initialized, HWC can perform an alignment process to synchronize the screen refresh rate and frame rate, and after completing the alignment process, switch the information of the screen status parameter to information indicating the on state (for example, switching from OFF to ON) to switch the display state.
[0065] When the screen status parameter information switches to information indicating the on state, the image drawing module in the application program can draw a bright screen image, and the application program then sends the drawn bright screen image layer by layer to the display screen. Figure 2 As shown, the bright screen image can be transmitted to the display screen via PMS, SF, HWC, and display driver in sequence.
[0066] After sending the bright screen image to the display screen, the backlight brightness setting module can send the backlight brightness to the display screen layer by layer, so that the display screen can display the bright screen according to the backlight brightness and image. Figure 2 As shown, the backlight brightness can be transmitted to the display screen through PMS, SF, HWC, and display driver in sequence.
[0067] based on Figure 1 and Figure 2 The content shown, Figure 3 The figure shows the time consumption of the screen bright processing method provided in the above example 1.
[0068] like Figure 3 As shown, the user can request the device to turn on the screen by clicking a button (such as the device's power button) while the device screen is black. After the user clicks the button, the device node can report notification information about the button click event to the PMS. In response to the notification message, the PMS can perform key logic processing to send a screen turn-on notification to the HWC via the SF.
[0069] After receiving the screen-on notification, the HWC can issue a screen-on command to the display driver, which processes the screen-on command to power on and initialize the display. After initialization, the HWC can perform alignment to synchronize the screen refresh rate and frame rate. After alignment is complete, the HWC switches the screen status parameter information to indicate the on state.
[0070] When this switching occurs, the application layer can draw a bright screen image and then send the drawn bright screen image layer by layer to the display screen. After sending the bright screen image to the display screen, the application layer sends the backlight brightness to the display screen layer by layer. The display screen then displays the bright screen based on the backlight brightness and image.
[0071] refer to Figures 1 to 3 It can be seen that in the above example 1, the device system screen-lighting process is a serial process (that is, the electronic device sequentially executes the steps of issuing screen-lighting instructions, alignment processing, state switching, sending pictures, and sending backlight brightness). That is, after the user requests the device to light up the screen, the upper layer will proceed to the next step after the bottom layer completes screen initialization, etc., to send pictures and send backlight brightness.
[0072] So, reference Figure 3For the serial processing mode of bright screen, the electronic device goes through the black screen stage, initialization stage, image refresh stage, and bright screen stage in sequence. The time taken to brighten the screen of the device is the time taken in the black screen stage after the user clicks the button, the time taken in the initialization stage (such as Figure 3 t1 in the figure), and the total time spent in the refresh phase (as shown in Figure 3 (As shown in t2 in the figure), there is a problem that it takes a long time for the device to light up the screen, and the user experience is poor.
[0073] In order to solve the above-mentioned problem of long screen lighting time, the present application parallelizes the bottom layer screen initialization with the upper layer drawing and backlight sending, thereby shortening the device screen lighting time based on the parallel processing of the upper and bottom layers. In order to achieve parallel processing, unlike the above-mentioned Example 1 of "switching the state after sending the screen lighting instruction and performing the alignment process", the present application advances the state switching process to be executed before the alignment process is completed. Since the application layer can execute the processing of sending the image and sending the backlight brightness after the state is switched, based on the early execution of the state switch, the upper layer can accordingly execute the processing of sending the image and sending the backlight brightness in advance, without having to wait until the bottom layer completes the screen initialization, etc. before the upper layer executes the above processing. In this way, the bottom layer processing and the upper layer processing can be executed in parallel.
[0074] Thus, the device system screen-lighting process provided by the embodiment of the present application may include: in response to a device screen-lighting request, issuing a screen-lighting instruction to the display driver of the electronic device, and after issuing the screen-lighting instruction, performing alignment processing, the alignment processing being used to synchronize the screen refresh rate and frame rate; before completing the alignment processing, switching the information of the screen status parameter to information indicating the on state; after the information of the screen status parameter is switched to information indicating the on state, drawing an image and sending the image to the display screen of the electronic device; after sending the image to the display screen, sending the backlight brightness to the display screen. The display screen is used to display the screen on according to the backlight brightness and the image.
[0075] By executing the state switch in advance, after the state switch is completed, the bottom layer screen initialization structure may not be completed, while the upper layer can send the image and send the backlight brightness, so that the bottom and upper layers can be processed in parallel. Compared with the serial processing screen lighting processing method, the screen lighting processing method provided by the embodiment of the application can shorten the screen lighting time and optimize the screen lighting performance, thereby improving the user experience.
[0076] Exemplarily, the screen light processing method provided in the embodiments of the present application can be applicable to simple sleep and wake-up scenarios, sleep and wake-up scenarios with screen off display function, sleep and wake-up scenarios with fingerprint function and no screen off display, sleep and wake-up scenarios with fingerprint function and screen off display, sleep and wake-up scenarios in multi-screen collaborative scenarios, sleep and wake-up scenarios in projection scenarios, sleep and wake-up scenarios in car scenarios, etc.
[0077] In one embodiment, upon receiving a screen-on notification from an upper layer (e.g., PMS) based on a device screen-on request, the HWC creates and starts a new thread. This new thread is used to perform the following steps: issuing a screen-on instruction to the display driver; performing alignment processing after issuing the screen-on instruction; and switching the screen status parameter information to information indicating an on state before completing the alignment processing (e.g., before issuing the screen-on instruction to the display driver). By performing multi-threaded screen-on processing in the HWC, upper and lower layer parallelization can be achieved, which can shorten the device screen-on time and optimize the device screen-on performance.
[0078] In a feasible implementation, the application framework layer of the device system can respond to the device screen light request and send a screen light notification to the HWC via the SF.
[0079] For example, if a user operates a button or displays the display (e.g., clicking the device power button, clicking or double-clicking the touch screen, etc.) to request the device to turn on the screen when the device screen is black, the PMS at the application framework layer can receive notification information of the operation event (e.g., power button click event, touch screen event, etc.) reported by the device node at the driver layer, i.e., receive the device screen turn-on request. In response to the notification information, the PMS can perform logical processing to send a screen turn-on notification to the HWC via the SF.
[0080] In other examples, the application framework layer can also send a screen light notification to the HWC via the SF based on other types of screen light request operations (such as fingerprint unlocking, screen light request gestures, and lifting, moving away, and non-blocking the display screen). Feasibly, if there is a screen light request gesture or an under-screen fingerprint unlocking operation when the device screen is black, the PMS can send a screen light notification to the HWC via the SF.
[0081] Compared to executing the state switch in advance after issuing the screen-on command, by executing the state switch first and then issuing the screen-on command, that is, advancing the state switch to before issuing the screen-on command, the state switch can be completed as early as possible, corresponding to an earlier start of upper-layer processing, thereby helping to shorten the device screen-on time to a greater extent. Figure 4 , an embodiment of the present application provides a device system screen lighting process, which may include the following steps 401 to 405.
[0082] In step 401, in response to a device screen-on request, the screen status parameter information is switched to information indicating the device is in the on state, and steps 402 and 404 are executed. That is, after the user requests the device screen to turn on, the status switch is performed first. After the status switch is completed, the bottom layer can initialize the screen, and the upper layer can send the image and send the backlight brightness. The bottom and upper layers process in parallel.
[0083] In one embodiment, the state switching purpose can be achieved by calling the native setPowerState interface of the operating system to switch the display state.
[0084] For example, when the device system is in sleep mode, the user can request the device to turn on the screen by clicking the device power button, lightly touching the device's touch screen, double-clicking the device's touch screen, lifting the device screen (for example, the user holds the device and performs a hand-raising action), fingerprint unlocking action, screen-lighting request gesture, moving away from the device screen (for example, the user moves the phone screen away from the head during a call), and non-blocking the device screen (for example, the user opens the flip-up leather case of the phone).
[0085] Optionally, the user may record the fingerprint through a touch screen or a touch button, where the touch button may be a power button of the device or a fingerprint recording button of the device that is different from the power button.
[0086] For example, when a user requests the device to light up the screen, the device screen may be black.
[0087] The screen status parameter information can be used to indicate the screen display state. When a user requests the device to turn on the screen, the screen status parameter information can be information indicating an off state (such as OFF). In response to the device screen-on request, the electronic device can switch the screen status parameter information from information indicating an off state to information indicating an on state (such as ON).
[0088] Figure 1 In the example 1 shown, when the screen status parameter information switches to ON, the display screen has been initialized. Figure 4 In the embodiment of the present application shown, the state is switched first, and then the screen-on command is issued to start initializing the display screen. When the screen state parameter information switches to ON, the display screen has not yet completed initialization. That is, step 401 only switches the screen state parameter information to ON, but this does not mean that the display screen is now in the on state.
[0089] Step 402: Send a screen-lighting instruction to the display driver of the electronic device. The display driver processes the screen-lighting instruction to drive the display screen to power on and start initialization.
[0090] In one embodiment, the screen light-up instruction may be issued by calling the native setPowerMode interface of the operating system.
[0091] It is feasible to power on and initialize the display screen by controlling the display screen IC (display driver integrated chip).
[0092] Step 403: Perform alignment processing to synchronize the screen refresh rate and frame rate.
[0093] In practice, the process of displaying an image on a device may involve APP drawing and rendering, SF synthesis, and display screen refresh. By performing alignment processing, the synchronization of APP drawing and rendering, SF synthesis, and display screen refresh can be achieved.
[0094] The Android system's display principle is based on the vertical synchronization (Vsync) mechanism. Under the Vsync mechanism, the Android system can have two types of Vsync signals: hardware-generated Vsync signals (Vsync-HW signals) and software-simulated Vsync signals (Vsync-APP signals and Vsync-SF signals). The signal period of the Vsync-HW signal is equal to the inverse of the display screen's refresh rate. App drawing and rendering can be triggered by the Vsync-APP signal, SF synthesis can be triggered by the Vsync-SF signal, and display screen refresh can be triggered by the Vsync c-HW signal.
[0095] It is feasible that based on the screen refresh rate of the display screen, the display driver can periodically report the Vsync-HW signal to the HAL layer, and the HAL layer can then report the received Vsync-HW signal to the SF to trigger the SF to perform signal calibration. The SF can then perform Vsync signal calibration based on the Vsync-HW signal reported by the HAL layer, and periodically generate a software-simulated Vsync signal based on this, so that the two Vsync signals maintain periodic synchronization, thereby achieving alignment processing.
[0096] In one embodiment, the alignment can be achieved by calling the Android system's native SetVsyncEnabled interface to align Vsync. Since the output display is interrupted by tearing effect (TE) after the screen is initialized for the first time, the upper SF aligns Vsync once to ensure synchronization between the upper and lower layers, thus avoiding the problem of screen tearing.
[0097] In a feasible implementation, after the SF performs signal calibration, it may return a completion message to the HAL layer. When the HAL layer receives the completion message, it may indicate that the alignment process is completed.
[0098] In one embodiment, the HWC may create a thread after receiving a screen-on notification. After the thread is started, the three operations of state switching, issuing a screen-on instruction, and alignment processing may be performed in sequence.
[0099] Step 404: draw an image and send the image to the display screen of the electronic device.
[0100] Feasibly, when the information of the screen status parameter is switched to information indicating an on state, the application layer may draw a bright screen image and send the drawn image.
[0101] For example, the application layer may sequentially pass through the PMS, SF, HWC, and display driver to send the drawn bright screen image to the display screen.
[0102] In one feasible implementation, an application program at the application layer may monitor information changes of screen status parameters, and when it is detected that, for example, the screen status parameter information switches from OFF to ON, it may draw a bright screen image and send the drawn image.
[0103] In another feasible implementation, the application framework layer of the electronic device may include a monitoring module, which can monitor the information changes of the screen status parameters and notify the application application of the application layer when it detects that the information switches from OFF to ON, so as to trigger the application to draw a bright screen image and send down the drawn image.
[0104] Step 405: Send the backlight brightness to the display screen. The display screen can display the screen brightly according to the backlight brightness and the image.
[0105] Feasibly, the application layer may send the backlight brightness to the display screen after the bright screen image is sent to the display screen based on the set processing logic.
[0106] For example, the application layer may sequentially pass through PMS, SF, HWC, and display driver to send the backlight brightness to the display screen.
[0107] It can be seen that the embodiment of the present application provides Figure 4 In the device system screen-lighting process shown, after the electronic device completes the state switching, on the one hand, it sequentially executes the bottom-level processing steps of issuing screen-lighting instructions and alignment processing; on the other hand, it sequentially executes the upper-level processing steps of sending images and issuing backlight brightness. The bottom-level processing and the upper-level processing can be executed in parallel.
[0108] based on Figure 4 The device system screen lighting process of the embodiment of the present application shown in FIG. Figure 5 The following is a block diagram of the software structure of an electronic device provided by one embodiment of the present application. The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system can be divided into multiple layers, from top to bottom, namely the application layer (APP), application framework layer (FW), local service layer (native), hardware abstraction layer (HAL), driver layer and hardware layer (HW).
[0109] The application layer may include an image drawing module and a backlight brightness setting module, and may also include Figure 5A series of application packages not shown in the figure, such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
[0110] The image drawing module can be used to draw a bright screen image when the screen status parameter information switches to information indicating the on state (for example, switching from OFF to ON). The drawn bright screen image can then be sent to the PMS and transmitted layer by layer to the display screen via the SF, HWC, and display driver.
[0111] In one embodiment, the bright screen image may be an interface image of an application, and the image drawing module in the application may draw the application interface image. In another embodiment, the bright screen image may be a system main interface image, and the image drawing module in the desktop management software of the application layer may draw the system main interface image.
[0112] The backlight brightness setting module can be used to send the backlight brightness to the PMS after the bright screen image is sent to the display screen, and the backlight brightness can be transmitted to the display screen layer by layer through the SF, HWC, and display driver in sequence.
[0113] In one possible implementation, the timing of sending the backlight brightness can be determined based on a preset logic process. For example, after the application layer starts sending the image, if a set time period has elapsed, indicating that the image has been sent to the display screen, the backlight brightness setting module can start sending the backlight brightness.
[0114] In another feasible implementation, the system service of the application framework layer can monitor the timing of sending the image to the display screen and notify the backlight brightness setting module to trigger the backlight brightness setting module to send the backlight brightness.
[0115] After the display screen is initialized, it can display the bright screen according to the bright screen image and backlight brightness sent from the upper layer.
[0116] The application framework layer provides the application programming interface (API) and programming framework for the application layer. The application framework layer includes some predefined functions. Figure 5 As shown, the application framework layer may include a power management service module (PMS), and may also include Figure 5 The view system, resource manager, content provider, etc. are not shown.
[0117] The PMS manages the powering on and off of the display. The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. The resource manager provides applications with various resources, such as localized strings, icons, images, layout files, and video files. Content providers store and retrieve data and make it accessible to applications.
[0118] The local service layer can include a surface graphics service (SF). The SF can be used to receive graphics display data from multiple sources, synthesize it, and send it to the display device. Image display can be achieved through the collaboration of multiple classes such as the SF, HWC, and display screen.
[0119] The Hardware Abstraction Layer (HAL) bridges the gap between software and hardware, encapsulating the underlying hardware drivers and providing a common interface for application frameworks to call these drivers. The HAL abstracts the device kernel driver, providing the higher-level Java API framework with an application programming interface (API) for accessing the underlying device. The HAL can contain multiple library modules, each of which implements an interface for a specific type of hardware component.
[0120] The hardware abstraction layer may include a hardware composition module (HWC). The HWC has the function or ability to use hardware to complete image data combination and display, providing hardware support for SF services.
[0121] In one embodiment of the present application, after receiving the screen light notification, the HWC can create a new thread. After starting, the new thread can sequentially perform processing operations such as switching display status, issuing screen light instructions, and alignment processing.
[0122] The driver layer is the layer between hardware and software. Figure 5 As shown, the driver layer may include display drivers and device nodes, and may also include Figure 5 The camera driver, Bluetooth driver, audio driver and sensor driver, etc. are not shown.
[0123] The hardware layer may include hardware such as a display screen and buttons. For example, the display screen may be an LCD, and the display driver may be an LCD driver. The buttons may include a power button, etc.
[0124] refer to Figure 5 If the user clicks the power button to request the device to turn on the screen while the device screen is black, a corresponding button click event can be written to the corresponding device node based on the power button key information. The device node can then report the button click event notification information to the PMS. In response to the notification message, the PMS can perform button logic processing and send a screen turn-on notification to the HWC via the SF.
[0125] Unlike the implementation method in Example 1 above, where the HWC sequentially executes the screen-on instruction, alignment, and display state switching after receiving the screen-on notification, in this embodiment of the application, the HWC can create a new thread after receiving the screen-on notification. After the new thread is started, it can first switch the display state, then issue the screen-on instruction, and then perform the alignment. In other words, compared to Example 1 above, the state switching step is executed earlier, thereby executing the image sending and backlight brightness issuance steps relatively earlier.
[0126] In one example, after the HWC creates a new thread, it can return a completion message to the PMS via the SF. After the new thread starts, it can switch the screen status parameter from OFF to ON and then issue a screen-on command to the display driver. The display driver processes the screen-on command to power on and initialize the display. After screen initialization, the display driver can return a completion message to the new thread, which can then perform alignment processing.
[0127] It is feasible that the display screen takes a preset amount of time to power on and initialize. In one feasible implementation, after receiving the screen-on command, the display driver can send a setup command to the display screen to trigger the display screen to begin initialization. After the preset amount of time, another setup command can be sent to the display screen to indicate that the display screen has completed initialization. A completion message can then be returned to the new thread. After the display screen completes initialization, it can execute the display task issued by the display driver.
[0128] Since the monitoring module in the electronic device can monitor the information changes of the screen status parameters in real time, and the image drawing module in the application program can draw a bright screen image and send the bright screen image when the monitoring module detects the above switching situation, Figure 5 As shown, after the new thread completes the state switch, the image drawing module can execute the image sending process without waiting for the display screen to be initialized. After sending the screen light image to the display screen layer by layer, the backlight brightness setting module can send the backlight brightness to the display screen layer by layer, so that the display screen can display the screen light according to the backlight brightness and image.
[0129] It is understandable that Figure 5 The layers in the illustrated software structure and the components contained in each layer do not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer layers than shown, and each layer may include more or fewer components, and this application does not limit this.
[0130] based on Figure 4 and Figure 5 The content shown, Figure 6 A timing diagram of a screen-lighting processing method provided in an embodiment of the present application is shown, which may include the following steps.
[0131] Step 1: If the user clicks the power button when the device screen is black, the device node performs a node operation according to the button information of the button click operation and reports notification information to the PMS.
[0132] Step 2: PMS executes key logic processing according to the notification information reported by the device node and sends a screen light notification to SF.
[0133] Step 3: After receiving the screen light notification from PMS, SF sends the screen light notification to HWC.
[0134] Step 4: After receiving the screen light notification from SF, HWC creates and starts a new thread (referred to as thread 1), and then returns a completion message to PMS via SF.
[0135] In step 5, thread 1 switches the display state by switching the information of the screen state parameter from OFF to ON.
[0136] After step 5, steps 6 to 8 and steps 9 to 10 can be executed in parallel. That is, after the state of thread 1 is switched, thread 1 and the application layer can be processed in parallel.
[0137] Step 6: Thread 1 sends a screen-lighting instruction to the display driver.
[0138] In step 7, the display driver processes the screen-on instruction issued by thread 1, drives the display screen to power on and initialize, and then returns a completion message to thread 1.
[0139] Step 8: Thread 1 performs alignment processing.
[0140] In step 9, after the screen status parameter information is switched from OFF to ON, the application layer draws the image and transmits the drawn image layer by layer to the display screen.
[0141] In step 10, the application layer performs logic processing for sending backlight brightness to transmit the backlight brightness to the display screen layer by layer.
[0142] Step 11: After the display screen is initialized, the screen is brightly displayed according to the received backlight brightness and image.
[0143] Figure 6 In the embodiment shown, based on the early execution of state switching, the upper layer can accordingly execute the processing of sending images and sending backlight brightness in advance, without having to wait until the bottom layer completes screen initialization before proceeding to the next step. In this way, the bottom layer processing and the upper layer processing can be executed in parallel. Compared with the serial processing of the bright screen processing method, Figure 6 The illustrated embodiment is based on parallel processing of the upper layer and the bottom layer, which can shorten the time it takes to light up the device screen.
[0144] based on Figures 4 to 6 The content shown, Figure 7 The figure shows the time consumption of a screen-lighting processing method provided in an embodiment of the present application.
[0145] See also Figure 7 When the device screen is black, the user can request the device to turn on the screen by clicking a button (such as the power button). After the user clicks the button, the corresponding button click event can be written to the corresponding device node, and the device node can report the button click event to the PMS. In response to the button click event, the PMS can perform button logic processing and send a screen turn-on notification to the HWC via the SF.
[0146] After receiving the screen light notification, HWC can create a thread (such as Figure 7 The new thread shown in the figure is started and the thread is started, and then the corresponding completion message is returned to the upper layer. After the thread is started, the three operations of state switching, issuing a screen light instruction, and alignment processing can be performed in sequence.
[0147] In one embodiment, after the HWC creates and starts a thread, the thread can call the operating system's native setPowerState interface to switch the display state (for example, switching the screen state parameter information from OFF to ON), and then call the operating system's native setPowerMode interface to issue a screen-on instruction to the display driver, and then perform operations for Vsync alignment. The implementation of Vsync alignment may involve calling the Android system's native SetVsyncEnabled interface.
[0148] Optionally, after receiving the screen-on command from the thread, the display driver can process the screen-on command to power on and initialize the display screen, and report a corresponding completion message to the thread after the screen is initialized. The thread can align Vsync after the screen is initialized.
[0149] After the thread switches the display state to the on state, the application layer can draw the bright screen image, and then send the drawn bright screen image to the display screen layer by layer.
[0150] After sending the bright screen image, the application layer can send the backlight brightness to the display screen layer by layer, so that the display screen can display the bright screen according to the backlight brightness and image. Figure 7 The initialization phase duration (t1) can be a set duration. If the initialization phase has not yet ended when the display driver receives the backlight brightness from the HWC, the display driver can wait until the initialization phase ends before sending the backlight brightness to the display screen. After the display screen receives the backlight brightness, it can display the screen accordingly, and the electronic device enters the screen-on phase.
[0151] refer to Figures 1 to 7It can be seen that, unlike the device system screen-lighting process in the above-mentioned Example 1, which is a serial processing (i.e., the electronic device sequentially executes the steps of issuing screen-lighting instructions, alignment processing, state switching, sending pictures, and sending backlight brightness), the device system screen-lighting process in the embodiment of the present application is a parallel processing of the bottom layer and the upper layer, that is, after the user requests the device to light up the screen, the upper layer does not need to wait until the bottom layer completes screen initialization before proceeding to the next step. Instead, during the process of screen initialization at the bottom layer, the upper layer is able to send pictures and send backlight brightness.
[0152] So, see Figure 7 For the parallel processing of the screen-on processing method, the electronic device goes through the black screen stage, the initialization stage (including the parallel image refresh stage), and the screen-on stage in sequence. The device screen-on time is the black screen stage time after the user clicks the button, the initialization stage time (such as Figure 7 As shown in t1, Figure 3 The sum of t1 in Figure 7 As shown in t3). Figure 3 and Figure 7 As shown, the time taken for the device to light up the screen in the above example 1 is t2, and the time taken for the device to light up the screen in the embodiment of the present application is t3, t2>t3, that is, the time taken for the device to light up the screen in the embodiment of the present application is shorter, and there is a period of time ( Figure 7 The duration of the optimized part shown, that is, the optimization of the screen-on time (t2-t3), can respond to the user's screen-on request more promptly.
[0153] Figure 7 The duration of the optimized part shown is usually 90 to 110 ms. Compared with the above example 1, the device screen lighting method of the embodiment of the present application can start lighting the device screen 90 to 110 ms in advance after the user presses the power button.
[0154] Figures 5 to 7 It shows that in the device black screen scenario, when the user clicks the power button to request the device to turn on the screen, the electronic device uses a parallel processing method to realize the technical implementation of the device screen turning on processing. This parallel processing method is also applicable to the device screen turning on processing in other scenarios and / or other screen turning on request operations, which will not be repeated here.
[0155] The screen brightening processing method provided in any embodiment of the present application can be applicable to electronic devices such as mobile phones, tablet computers, personal digital assistants (PDAs), desktop computers, laptop computers, notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, and wearable devices. The present application does not impose any special restrictions on the specific forms of the above-mentioned electronic devices.
[0156] The bright screen processing method provided in any embodiment of the present application can be applied to Figure 8 In the electronic device 100 shown. Figure 8 A schematic structural diagram of the electronic device 100 is shown.
[0157] The electronic device 100 may include a processor 110, an internal memory 121, a sensor module 180, a button 190, a motor 191, a camera 193, a display screen 194, etc. The sensor module 180 may include a pressure sensor, a gyroscope sensor, an acceleration sensor, a distance sensor, a proximity light sensor, an ambient light sensor, a fingerprint sensor, a touch sensor, etc.
[0158] It should be understood that the structures illustrated in the embodiments of the present application do 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.
[0159] 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. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.
[0160] In some embodiments, the processor 110 may be a system on chip (SOC), which may include a central processing unit (CPU) or other types of processors. In some embodiments, the processor 110 may be a PWM control chip.
[0161] The processor 110 may also include necessary hardware accelerators or logic processing hardware circuits, such as ASICs, or one or more integrated circuits for controlling the execution of the technical solution program. In addition, the processor 110 may have the function of operating one or more software programs, which may be stored in a storage medium.
[0162] 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.
[0163] In some embodiments, the memory of the electronic device 100 may be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), or any computer-readable medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer.
[0164] In some embodiments, the processor 110 and the memory may be combined into a single processing device or may be independent components. The processor 110 may be configured to execute program code stored in the memory. In specific implementations, the memory may also be integrated into the processor 110 or may be independent of the processor 110.
[0165] 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.
[0166] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0167] 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.
[0168] Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.
[0169] Electronic device 100 can implement a camera function using an ISP, camera 193, video codec, GPU, display 194, and application processor. The ISP processes data fed back by camera 193. Camera 193 is used to capture still images or video. The lens generates an optical image of an object and projects it onto a photosensitive element. For example, using a mobile phone as an example, if camera 193 captures a user's gesture to request a screen turn-on when the phone's screen is black, the phone can then turn on the screen.
[0170] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may 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 may 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. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.
[0171] The pressure sensor is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor can be provided on the display screen 194. There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. When a touch operation is applied to the display screen 194, the electronic device 100 detects the intensity of the touch operation based on the pressure sensor. The electronic device 100 can also calculate the location of the touch based on the detection signal of the pressure sensor. In some embodiments, touch operations applied to the same touch location but with different touch operation intensities can correspond to different operation instructions.
[0172] The gyroscope sensor can be used to determine the motion posture of the electronic device 100. The accelerometer can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). Taking a mobile phone as an example, based on the data collected by the gyroscope and accelerometer, if the user is detected to have lifted the phone when the phone screen is black, the phone can be turned on to display the screen.
[0173] A distance sensor for measuring distance. The electronic device 100 can measure distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use a distance sensor to measure distance to achieve fast focusing. The proximity light sensor may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. Feasibly, taking a mobile phone as an example, based on the data collected by the distance sensor or the proximity light sensor, if it is detected that the user's face is close to the mobile phone screen during a call, the mobile phone can automatically enter a black screen state to prevent accidental touches and save power. If it is detected that the user's face is away from the mobile phone screen during a call, the mobile phone can automatically switch to a bright screen display.
[0174] The ambient light sensor is used to sense the ambient light brightness. Preferably, the electronic device 100 can automatically adjust the backlight brightness of the device when the screen is on based on the ambient light brightness sensed in real time by the ambient light sensor to adapt to the real-time changing ambient light brightness.
[0175] The fingerprint sensor is used to collect fingerprints. Electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc. Taking a mobile phone as an example, if a user uses fingerprint unlocking when the phone screen is black, the phone can then light up the screen if the unlock is successful.
[0176] Touch sensor, also known as "touch control device". The touch sensor can be set on the display screen 194, and the touch sensor and the display screen 194 form a touch screen, also known as a "touch screen". The touch sensor is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194. Feasibly, taking a mobile phone as an example, if the user clicks or double-clicks the touch screen when the mobile phone screen is black, or performs an under-screen fingerprint unlock through the touch screen, the mobile phone can light up the screen.
[0177] Buttons 190 include a power button, a volume button, and the like. Buttons 190 can be mechanical or touch-sensitive. Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, using a mobile phone as an example, if a user presses the power button when the phone's screen is black, the phone's screen can be illuminated.
[0178] In addition, the electronic device runs an operating system on top of the above components. operating system, operating system, Operating system, etc. Applications can be installed and run on the operating system.
[0179] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In one embodiment, taking the Android system of the layered architecture as an example, the software structure of the electronic device 100 can be as follows: Figure 5 shown.
[0180] An embodiment of the present application also provides a chip, which is installed in an electronic device. The chip includes: a processor, which is used to execute computer program instructions stored in a memory, wherein when the computer program instructions are executed by the processor, the chip is triggered to execute the method steps provided by any method embodiment of the present application.
[0181] An embodiment of the present application also proposes a terminal device, which includes a communication module, a memory for storing computer program instructions, and a processor for executing program instructions, wherein when the computer program instructions are executed by the processor, the terminal device is triggered to execute the method steps provided by any method embodiment of the present application.
[0182] An embodiment of the present application also provides an electronic device, which includes multiple antennas, a memory for storing computer program instructions, a processor for executing the computer program instructions, and a communication device (such as a communication module that can implement 5G communication based on the NR protocol), wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method steps provided by any method embodiment of the present application.
[0183] Specifically, in an embodiment of the present application, one or more computer programs are stored in the above-mentioned memory, and the one or more computer programs include instructions. When the instructions are executed by the above-mentioned device, the above-mentioned device executes the method steps described in the embodiment of the present application.
[0184] Furthermore, the devices, apparatuses, and modules described in the embodiments of the present application may be implemented by computer chips or entities, or by products having certain functions.
[0185] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, apparatus, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0186] In the several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of this application.
[0187] Specifically, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer-readable storage medium is run on a computer, the computer executes the method steps provided in the embodiment of the present application.
[0188] An embodiment of the present application also provides a computer program product, which includes a computer program. When the computer program product is run on a computer, it enables the computer to execute the method steps provided in the embodiment of the present application.
[0189] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.
[0190] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0191] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0192] The integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disk, etc., various media that can store program code.
[0193] In the embodiments of the present application, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, commodity, or apparatus comprising the element.
[0194] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0195] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments of the present application can be implemented using a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0196] Those skilled in the art will clearly understand that for the sake of convenience and brevity, the same or similar parts between the various embodiments of this application can be referred to in detail. For example, the specific working processes of the systems, devices, and units described in the embodiments of this application can refer to the corresponding processes in the method embodiments of this application, and will not be repeated here.
[0197] The above description is merely a specific embodiment of the present application and is not intended to limit the present application. The scope of protection of the present application shall be subject to the claims.
Claims
1. A screen bright processing method, characterized in that: include: Receive device screen-lighting request; In response to the device screen-on request, sequentially executing the steps of issuing a screen-on instruction and performing an alignment process, wherein the screen-on instruction is used to drive the display screen of the electronic device to power on and initialize, and the alignment process is used to synchronize the screen refresh rate and frame rate; Before the alignment processing step is completed, the information of the screen status parameters is switched to the first information to trigger the image sending process. The first information is used to indicate that the display screen is in the on state. The image sending process includes drawing an image and sending the drawn image to the display screen. The display screen is used to display the screen on according to the image.
2. The method according to claim 1, characterized in that Before the alignment processing step is completed, switching the information of the screen state parameter to the first information includes: Before executing the step of issuing the screen-lighting instruction, the information of the screen status parameter is switched to the first information.
3. The method according to claim 1 or 2, characterized in that The electronic device includes a hardware synthesis module HWC; The method further includes: the HWC creating and starting a first thread; The first thread is used to execute the steps of issuing the screen light-up instruction, the alignment processing, and switching the information of the screen status parameter to the first information.
4. The method according to claim 3, characterized in that The electronic device further includes a surface drawing service module SurfaceFlinger; The performing alignment process includes: The first thread reports a first signal to the SurfaceFlinger to trigger the SurfaceFlinger to perform signal calibration according to the first signal; the first signal is used to describe the screen refresh rate of the display screen, and the signal calibration is used to synchronize the screen refresh rate and the frame rate; The first thread receives a completion message returned by the SurfaceFlinger after performing the signal calibration; Before the alignment processing step is completed, switching the information of the screen state parameter to the first information includes: Before the first thread receives the completion message, the information of the screen status parameter is switched to the first information.
5. The method according to claim 3, characterized in that The electronic device further comprises: a power management service module PMS; The receiving device screen-lighting request includes: The PMS receives the device screen light-up request and sends a screen light-up notification to the HWC.
6. The method according to claim 5, characterized in that The display screen is a touch screen, and the electronic device further comprises: an input device node; The method further comprises: The input device node receives a screen-lighting request event, where the screen-lighting request event is an event of operating a key of the electronic device or the display screen; The input device node sends the device screen-on request to the PMS in response to the screen-on request event.
7. The method according to claim 6, characterized in that The screen light request event is any one of the following events: when the display screen is in a sleep state, an event of clicking the power button of the electronic device, an event of touching the display screen, and an event of double-clicking the display screen.
8. The method according to claim 3, characterized in that The electronic device further comprises: a first module located at the application framework layer; The receiving device screen-lighting request includes: The first module detects a screen light-up request operation and sends a screen light-up notification to the HWC; the screen light-up request operation is an operation that causes the sensor data of the electronic device to change.
9. The method according to claim 8, characterized in that The screen light-up request operation includes at least one of the following operations: performing an under-screen fingerprint unlocking operation when the display screen is in a sleep state, performing a screen light-up request gesture operation when the display screen is in a sleep state, lifting the display screen when the display screen is in a sleep state, moving away from the display screen when the display screen is in a sleep state, and non-blocking the display screen when the display screen is in a sleep state.
10. The method according to claim 1 or 2, characterized in that The electronic device is installed with a first application; The method further includes: when the information of the screen state parameter is switched to the first information, the first application executes the step of drawing an image and sending the drawn image to the display screen.
11. A chip, characterized in that: include: A processor configured to execute computer program instructions stored in a memory, wherein when the computer program instructions are executed by the processor, the chip is triggered to execute the method according to any one of claims 1 to 10.
12. An electronic device, characterized in that: The electronic device comprises a display screen, one or more memories for storing computer program instructions, and one or more processors, wherein when the computer program instructions are executed by the one or more processors, the electronic device is triggered to execute the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is run on a computer, the computer is enabled to execute the method according to any one of claims 1 to 10.
14. A computer program product, characterized in that The computer program product comprises a computer program, which, when run on a computer, causes the computer to perform the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Screen brightening method and relevant equipment
CN108762814A
Method for controlling screen-off display, electronic equipment and storage medium
CN117707319A