A screen window redrawing method, electronic device and computer readable storage medium

By recognizing screen shape changes in the off state and completing window redrawing in advance, the problem of increased screen-on time after screen shape changes is solved, improving screen window redrawing efficiency and user experience.

CN114077468BActive Publication Date: 2026-01-23HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010833689.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-18
Publication Date
2026-01-23
Estimated Expiration
2040-08-18

AI Technical Summary

Technical Problem

In both single-screen and multi-screen scenarios, the screen window redrawing process leads to an increase in screen-on time, especially after a change in screen shape, where failure to redraw windows in advance results in a significant increase in screen-on time.

Method used

In the screen-off state, the window is redrawn in advance by detecting changes in screen shape, including recognizing changes in screen shape and determining the screen to be displayed, and redrawing the window according to the size of the display area.

Benefits of technology

It shortens screen-on time, improves screen window redrawing efficiency, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114077468B_ABST
    Figure CN114077468B_ABST
Patent Text Reader

Abstract

The technical scheme of the screen window redrawing method, the electronic device and the computer readable storage medium provided by the embodiment of the application comprises the following steps: detecting whether the current device is in a screen-off state; if it is detected that the current device is in the screen-off state, obtaining screen form information before screen-off and screen form information after screen-off, detecting whether the screen form of the current device has changed, if it is detected that the screen form has changed, determining a to-be-displayed screen according to the screen form information after screen-off, and performing window redrawing on the to-be-displayed screen according to the size of the display area of the to-be-displayed screen, so as to realize screen form change recognition in the screen-off state, complete window redrawing in advance, and thus shorten the screen-on time and improve the screen window redrawing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This invention relates to the field of mobile terminal technology, and more specifically to a screen window redrawing method, an electronic device, and a computer-readable storage medium. [Background Technology]

[0002] With the increasing popularity of multi-screen or foldable devices, users often encounter scenarios where the screen is unlocked via fingerprint or facial recognition, allowing the user to directly view the application window upon activation. However, in single-screen scenarios, the screen window redrawing process typically requires the previously unused application window to be redrawn before the screen can be turned on, increasing screen-on time. Furthermore, in multi-screen scenarios, the redrawing process often involves screen A being unused and the user changing the screen orientation. The next time screen is turned on, screen B needs to be activated. Since screens A and B differ, activating screen B can lead to a significant increase in screen-on time due to hardware size differences requiring window redrawing of screen B's display area. [Summary of the Invention]

[0003] In view of this, the present invention provides a screen window redrawing method, an electronic device, and a computer-readable storage medium, which can identify screen shape changes in the screen-off state and complete window redrawing in advance, thereby shortening the screen-on time and improving the screen window redrawing efficiency.

[0004] On one hand, embodiments of the present invention provide a screen window redrawing method, including:

[0005] Detect whether the current device is in a screen-off state;

[0006] If the current device is detected to be in a screen-off state, the screen shape information before and after the screen is turned off is obtained to detect whether the screen shape of the current device has changed.

[0007] If a change in the screen shape is detected, the screen to be displayed is determined based on the screen shape information after the screen is turned off;

[0008] The window of the screen to be displayed is redrawn based on the obtained display area size of the screen to be displayed.

[0009] In one possible implementation, detecting whether the screen appearance of the current device has changed by acquiring the screen appearance information before and after the screen is turned off includes:

[0010] Detect whether the screen shape information before the screen is turned off is the same as the screen shape information after the screen is turned off;

[0011] If the screen appearance information before the screen is turned off is detected to be different from the screen appearance information after the screen is turned off, it is determined that the screen appearance of the current device has changed.

[0012] In one possible implementation, the screen shape information after the screen is turned off includes the screen angle and the vertical component of gravity.

[0013] If a change in screen shape is detected, determining the screen to be displayed based on the screen shape information after the screen is turned off includes:

[0014] The current device state is determined based on the screen angle, including folded state, half-unfolded state, or fully unfolded state.

[0015] Based on the device status and the vertical component of gravity, the current screen orientation of the device is determined, and the display screen facing the user is identified as the screen to be displayed on the current device.

[0016] In one possible implementation, before redrawing the window of the screen to be displayed based on the obtained display area size of the screen to be displayed, the following steps are included:

[0017] Obtain the screen identifier corresponding to the screen to be displayed; determine whether the screen identifier is the same as the screen identifier of the screen before it was turned off;

[0018] If it is determined that the screen identifier is the same as the screen identifier of the display screen before the screen is turned off, the screen size of the display screen before the screen is turned off is determined as the screen size of the screen to be displayed.

[0019] Based on the obtained setting mode of the screen to be displayed and the screen size of the screen to be displayed, the display area size of the screen to be displayed is determined, and the step of redrawing the window of the screen to be displayed based on the obtained display area size of the screen to be displayed is continued. The setting mode is used to indicate the current operating scenario of the device.

[0020] If it is determined that the screen identifier is different from the screen identifier of the display screen before the screen is turned off, the screen size of the screen to be displayed is determined based on the screen identifier.

[0021] Based on the obtained setting mode and screen size of the screen to be displayed, the display area size of the screen to be displayed is determined, and the step of redrawing the window of the screen to be displayed based on the obtained display area size of the screen to be displayed is continued.

[0022] In a second aspect, embodiments of the present invention provide an electronic device, the device comprising:

[0023] A display screen; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the device, cause the device to perform the following steps:

[0024] Detect whether the current device is in a screen-off state;

[0025] If the current device is detected to be in a screen-off state, the screen shape information before and after the screen is turned off is obtained to detect whether the screen shape of the current device has changed.

[0026] If a change in the screen shape is detected, the screen to be displayed is determined based on the screen shape information after the screen is turned off;

[0027] The window of the screen to be displayed is redrawn based on the obtained display area size of the screen to be displayed.

[0028] In one possible implementation, when the instruction is executed by the device, the device specifically performs the following steps:

[0029] Detect whether the screen shape information before the screen is turned off is the same as the screen shape information after the screen is turned off;

[0030] If the screen appearance information before the screen is turned off is detected to be different from the screen appearance information after the screen is turned off, it is determined that the screen appearance of the current device has changed.

[0031] In one possible implementation, the screen shape information after the screen is turned off includes the screen angle and the vertical component of gravity.

[0032] When the instruction is executed by the device, the device specifically performs the following steps:

[0033] The current device state is determined based on the screen angle, including folded state, half-unfolded state, or fully unfolded state.

[0034] Based on the device status and the vertical component of gravity, the current screen orientation of the device is determined, and the display screen facing the user is identified as the screen to be displayed on the current device.

[0035] In one possible implementation, when the instruction is executed by the device, the device specifically performs the following steps:

[0036] Obtain the screen identifier corresponding to the screen to be displayed;

[0037] Determine whether the screen identifier is the same as the screen identifier of the display screen before the screen went out;

[0038] If it is determined that the screen identifier is the same as the screen identifier of the display screen before the screen is turned off, the screen size of the display screen before the screen is turned off is determined as the screen size of the screen to be displayed.

[0039] Based on the obtained setting mode of the screen to be displayed and the screen size of the screen to be displayed, the display area size of the screen to be displayed is determined, and the step of redrawing the window of the screen to be displayed based on the obtained display area size of the screen to be displayed is continued. The setting mode is used to indicate the current operating scenario of the device.

[0040] If it is determined that the screen identifier is different from the screen identifier of the display screen before the screen is turned off, the screen size of the screen to be displayed is determined based on the screen identifier.

[0041] Based on the obtained setting mode and screen size of the screen to be displayed, the display area size of the screen to be displayed is determined, and the step of redrawing the window of the screen to be displayed based on the obtained display area size of the screen to be displayed is continued.

[0042] Thirdly, embodiments of the present invention provide a computer-readable storage medium for program code executed by a device, the program code including instructions for performing the method in the first aspect or any possible implementation of the first aspect.

[0043] In the technical solution provided by this invention, it is detected whether the current device is in a screen-off state. If the current device is detected to be in a screen-off state, the screen shape information before and after the screen is turned off is obtained to detect whether the screen shape of the current device has changed. If the screen shape has changed, the screen to be displayed is determined according to the screen shape information after the screen is turned off. The window of the screen to be displayed is redrawn according to the obtained display area size of the screen to be displayed. This enables the recognition of screen shape changes in the screen-off state and the early completion of window redrawing, thereby shortening the screen-on time and improving the efficiency of screen window redrawing. [Attached Image Description]

[0044] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 A flowchart for screen window redrawing provided for related technologies;

[0046] Figure 2 This is a flowchart of a screen window redrawing method provided in an embodiment of the present invention;

[0047] Figure 3 This is a flowchart of an LCD power-on process provided in an embodiment of the present invention;

[0048] Figure 4 a-4c is a schematic diagram illustrating the effect of screen window redrawing according to an embodiment of the present invention;

[0049] Figure 5 This is a schematic block diagram of an electronic device provided in an embodiment of the present invention;

[0050] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.

Detailed Implementation Methods

[0051] To better understand the technical solution of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0052] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0053] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0054] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0055] Figure 1 A flowchart for screen window redrawing provided for related technologies, such as Figure 1As shown, when a terminal device switches from a screen-on state to a screen-off state, the user can change the screen shape of the terminal device as needed, such as flipping or folding the display screen. When the user triggers a screen-on command again, the terminal device receives the user's screen-on command, determines the size of the screen to be displayed based on the screen shape, and redraws the window to the size of the screen to be displayed until the application window from the previous screen-off state is drawn, and then lights up the screen. The screen-on command can include fingerprint unlock command and button unlock command.

[0056] However, in related technologies, when a user triggers screen wake-up, the application window from the previous screen-off state needs to be redrawn before the screen can be turned on, thus increasing screen-on time. In other words, the process from the user triggering the screen-on command to the screen turning on takes a long time. Furthermore, in the screen window redrawing process of related technologies, multi-screen scenarios can also easily lead to increased screen-on time. Specifically, for example, taking a terminal device with two screens, screen A and screen B, as an example, when the screen is off on screen A, and the user flips the terminal device and triggers the screen-on command, the screen to be displayed has changed after the user flips the device; for example, the screen to be displayed is now screen B. Because screen B is different from the previous display screen (screen A), when the user triggers screen wake-up, the window redrawing due to the hardware screen size difference will cause the screen-on time to increase exponentially. In summary, in scenarios where the screen of a terminal device needs to be turned on after changing the screen shape in a screen-off state, the screen window redrawing technology, due to the lack of prior window redrawing, causes an increase in screen-on time. At the same time, due to the differences in display screen layout, the window redrawing is complicated, causing the screen-on time to increase exponentially, thus seriously affecting the user experience.

[0057] To address the aforementioned problems, this invention provides a screen window redrawing method that solves the problem of increased screen-on time caused by failure to redraw windows in advance in related technologies. It also solves the problem that screen-on time is further increased exponentially due to differences in hardware screen size when redrawing windows, thus shortening screen-on time and improving screen window redrawing efficiency.

[0058] Figure 2 A flowchart of a screen window redrawing method provided in an embodiment of the present invention is shown below. Figure 2 As shown, the method includes:

[0059] Step 102: Check if the current device is in a screen-off state. If yes, proceed to step 104; otherwise, the process ends.

[0060] In this embodiment of the invention, the current device can be a terminal device, such as a mobile phone, tablet computer, laptop computer, augmented reality (AR) / virtual reality (VR) device, or in-vehicle terminal, or it can be a server or cloud device. It should be noted that the terminals in this invention are all electronic devices with the function of changing screen shape, such as foldable phones or flip-screen phones.

[0061] In this embodiment of the invention, the current device may be in a powered-off state, a screen-off state, or a screen-on state, wherein the screen-off state is used to indicate that the current device is in a background working state. When the current device is detected to be in a screen-off state, it indicates that the condition for changing the screen form is met, and the subsequent step 104 can continue to be executed to detect whether the screen form of the current device has changed. When the current device is detected not to be in a screen-off state, it indicates that the condition for changing the screen form is not met, and the process ends until the current device is detected to be in a screen-off state again, triggering the process.

[0062] Step 104: Using the obtained screen shape information before and after the screen is turned off, detect whether the screen shape of the current device has changed. If yes, proceed to step 106; otherwise, continue to step 102.

[0063] In this embodiment of the invention, the screen shape information includes screen angle and vertical gravity component. The screen angle indicates the angle between display screens. The vertical gravity component indicates the projection size of the gravity G component onto the Z-axis in the spatial coordinate system. The screen shape indicates the current screen posture and screen size ratio changes of the device, wherein the screen posture may include inward folding, outward folding, flipping, etc.

[0064] The method for determining the vertical component of gravity may include: in the initial state, the direction of gravity G points towards the Earth's center, that is, vertically downward. By establishing a spatial coordinate system on the screen, the projection size of the gravity G component on the Z-axis is calculated. The vertical component of gravity may include positive G and negative G.

[0065] Furthermore, in this embodiment of the invention, the current screen orientation of the device can also be determined by obtaining the vertical component of gravity. Specifically, in the initial state, the direction of gravity G points towards the Earth's center, i.e., vertically downwards. By establishing a spatial coordinate system on the screen, the current screen orientation of the device is determined based on the calculated projection of the gravity G component onto the Z-axis. The process of establishing the spatial coordinate system on the screen may include establishing the X-axis, Y-axis, and Z-axis at positions relative to the upper left corner of the screen, where the Z-axis is vertically upwards. When the gravity G component, projected onto the Z-axis, has a magnitude of negative G, the current screen orientation of the device can be determined to be towards the user; when the gravity G component, projected onto the Z-axis, has a magnitude of G, the current screen orientation of the device can be determined to be downwards.

[0066] It should be noted that after determining the current screen orientation of the device by acquiring the vertical component of gravity, it is also necessary to determine whether the current screen orientation is facing the user, so that subsequent steps can confirm the screen facing the user as the display screen. The method for determining whether the current screen orientation is facing the user can be achieved by capturing a face with the front-facing camera and combining this with the user's eye angle. This invention will not elaborate on the facial recognition technology and the method of determining eye angle; existing related technologies can be used to implement the above determination process.

[0067] In this embodiment of the invention, before executing step 104, the method further includes: registering a detection component, for example, registering HAL and sensor-related events through the SensorManager tool to set up a detection component capable of detecting changes in screen angle. When a change in the screen shape of the current device is detected, for example, when the current device undergoes a change in screen posture such as folding inward, folding outward, or flipping, and when the user selects a specific screen to turn on, the size of the screen to be displayed on the current terminal has changed compared to the screen displayed when the screen was turned off last time. Therefore, the detection component can detect changes in the screen shape of the current device based on the acquired shape information.

[0068] In this embodiment of the invention, as an optional solution, a sensor algorithm can be used to detect whether the screen shape of the current device has changed based on the acquired shape information. Specifically, a detection component can be registered using the function `SensorManager.registerListener()`. This detection component is used to detect the screen angle and the vertical component of gravity. Specifically, the screen angle information can be calculated using the `SensorHub` detection component. Further, the `OnSensorChanged()` function monitors the screen shape of the current device in real time. When the screen angle changes, it receives the screen angle and the vertical component of gravity reported by the detection component, and determines whether the screen shape of the current device has changed based on the reported screen angle and the vertical component of gravity. The specific determination process can be found in the two solutions described in the following embodiments.

[0069] In this embodiment of the invention, step 104 may specifically include:

[0070] Step 1041: Check if the screen appearance information before and after the screen is turned off are the same. If yes, proceed to step 1042; otherwise, the process ends.

[0071] In this embodiment of the invention, if the screen shape information before and after the screen is turned off is the same, it indicates that the screen shape of the current device has not changed and the execution conditions of this embodiment of the invention are not met. Therefore, the process ends or step 1041 is executed to detect whether the screen shape information before and after the screen is turned off is the same. If the screen shape information before and after the screen is turned off is not the same, it indicates that the screen shape of the current device has changed and the window redrawing conditions are met, and subsequent steps can be executed.

[0072] Step 1042: Determine that the screen shape of the current device has changed, and continue to execute step 106. In one optional embodiment of the present invention, for example, the screen shape information before the screen is turned off includes a screen angle of 0° and a vertical component of gravity of negative G, meaning the screen of the current device is facing upwards, while the screen shape information after the screen is turned off includes a screen angle of 180° and a vertical component of gravity of negative G, meaning the screen of the current device is facing upwards. By executing step 104, it can be determined that the screen shape of the current device has changed, that is, the screen angle has changed. In practical applications, this is equivalent to the current device being in a folded state (folded inwards or outwards) before the screen is turned off, and in a fully unfolded state after the screen is turned off. After the current device is unfolded, the screen orientation and screen size ratio change. For example, taking a current device that includes two display screens, screen A and screen B, when the current device changes from a folded state to a fully unfolded state, the angle between screen A and screen B can vary between 0° and 180°. At this point, since the screen angle has changed, it can be determined that the screen shape of the current device has changed. Specifically, the change in screen shape can be manifested as a change in screen posture and a change in screen size ratio.

[0073] In another alternative scheme, for example, the screen shape information before the screen is turned off includes a screen angle of 0° and a vertical component of gravity of G, that is, the current device screen is facing down, while the screen shape information after the screen is turned off includes a screen angle of 180° and a vertical component of gravity of negative G, that is, the current device screen is facing up. By executing step 104, it can be determined that the current device screen shape has changed, that is, the screen angle has changed and the vertical component of gravity has also changed.

[0074] It should be noted that a change in either the screen angle or the vertical component of gravity indicates a change in the screen shape of the device. In this embodiment of the invention, the inclusion of the screen angle and the vertical component of gravity as screen shape information is merely illustrative; other parameters may also be included in the screen shape information, and this invention does not limit the scope of such inclusions.

[0075] Step 106: Determine the screen to be displayed based on the screen shape information after the screen is turned off.

[0076] In this embodiment of the invention, the screen shape after the screen is turned off includes the screen angle and the vertical component of gravity.

[0077] In this embodiment of the invention, step 106 may specifically include:

[0078] Step 1061: Determine the current device status based on the screen angle. The device status includes folded state, semi-unfolded state, or fully unfolded state.

[0079] In this embodiment of the invention, the screen angle range is 0° ≤ 180°. The screen angle is determined based on the smallest particle detected by the detection component. When the detection accuracy is 2 degrees, anything less than 3 degrees is considered to be in a folded state. That is, when 0° ≤ screen angle < 3°, the current device state is determined to include a folded state; when 3° ≤ screen angle < 177°, the current device state is determined to include a semi-open state; and when 177° ≤ screen angle ≤ 180°, the current device state is determined to include a fully open state.

[0080] In this embodiment of the invention, the folding state may include an outward folding state and an inward folding state.

[0081] Step 1062: Determine the current screen orientation of the device based on the device status and the vertical component of gravity, and determine the screen facing the user as the display screen to be displayed on the current device. In this embodiment of the invention, the vertical component of gravity can be obtained to determine the current screen orientation of the device. In an optional solution, for example, taking a device including screen A and screen B as an example, when the device is in a fully unfolded state, for example, when the angle between screen A and screen B is 180°, the vertical component of gravity determines that screen A is facing upwards and screen B is facing downwards, and at this time, the screen facing the user is screen A, therefore screen A is determined as the display screen to be displayed on the current device.

[0082] In another alternative solution, for example, taking a device that includes screen A and screen B, screen A is the inner screen and screen B is the outer screen. When the device is in an outward folded state, that is, when the screen angle between screen A and screen B is 0°, since the device is in an outward folded state, the screen facing the user is determined to be the inner screen, i.e., screen A, by the vertical component of gravity. Therefore, screen A is determined as the screen to be displayed on the current device.

[0083] In another alternative solution, for example, taking a device that includes screen A and screen B, screen A is the inner screen and screen B is the outer screen. When the device is in an inward folded state, that is, when the screen angle between screen A and screen B is 0°, since the device is in an inward folded state, the screen facing the user is determined to be the outer screen, i.e., screen B, by the vertical component of gravity. Therefore, screen B is determined as the screen to be displayed on the current device.

[0084] Step 108: Obtain the screen identifier corresponding to the screen to be displayed.

[0085] In this embodiment of the invention, the screen identifier is unique, meaning that each screen to be displayed has a different screen identifier. For example, when the device is in a folded state, it may include multiple display screens, and the ID value of the physical screen corresponding to each display screen is different. For example, the screen identifier corresponding to screen A is 1, and the screen identifier corresponding to screen B is 2.

[0086] Step 110: Determine whether the screen identifier is the same as the screen identifier of the display screen before the screen went out. If yes, proceed to step 112; otherwise, proceed to step 114.

[0087] In this embodiment of the invention, if the screen identifier is determined to be the same as the screen identifier of the display screen before the screen went out, it indicates that the screen to be displayed is the same as the display screen before the screen went out. If the screen identifier is determined to be different from the screen identifier of the display screen before the screen went out, it indicates that the screen to be displayed is different from the display screen before the screen went out. For example, the display screen before the screen went out includes screen A and screen B, where the screen identifier corresponding to screen A is 1 and the screen identifier corresponding to screen B is 2. If the obtained screen identifier of the screen to be displayed is 2, it indicates that the screen identifier of the screen to be displayed is different from the screen identifier of the display screen before the screen went out.

[0088] Step 112: Determine the screen size of the display screen before the screen goes out as the screen size of the screen to be displayed, and continue to execute 116.

[0089] In this embodiment of the invention, if it is determined that the screen identifier is the same as the screen identifier of the display screen before the screen went out, it indicates that the screen to be displayed is the same as the display screen before the screen went out. Therefore, the screen size of the display screen before the screen went out is determined as the screen size of the screen to be displayed. By determining the screen size of the screen to be displayed, subsequent steps can determine the display area size of the screen to be displayed.

[0090] It's important to note that screen size refers to the actual size of the display screen. Display area size refers to the size limited by user settings or device conditions. In other words, the screen size of the screen to be displayed must be greater than or equal to the display area size. For example, with a mobile phone screen, the screen size is typically larger than the display area size.

[0091] Step 114: Determine the screen size of the screen to be displayed based on the screen identifier, and continue to step 116.

[0092] In this embodiment of the invention, each display screen has a different screen identifier, so the screen size of each screen to be displayed can be queried through the screen identifier.

[0093] Step 116: Based on the obtained setting mode and screen size of the screen to be displayed, determine the display area size of the screen to be displayed, and continue to execute step 118.

[0094] In this embodiment of the invention, the screen size of the screen to be displayed can be understood as the physical screen size, and the display area size of the screen to be displayed can be understood as the specific display area size, and the display area size is within the range of the physical screen size.

[0095] In this embodiment of the invention, the setting mode is used to indicate the current operating scenario of the device. The setting mode of the screen to be displayed may include one-handed mode, selfie collaboration mode, interactive mode, or game mode, etc. In an optional approach, for example, when the obtained setting mode of the screen to be displayed includes one-handed mode, the display area size of the screen to be displayed is determined to be 2 / 3 of the screen size.

[0096] It should be noted that the above settings are only examples. For different settings modes, users can set the size of the display area of ​​the screen to be displayed according to their needs.

[0097] Step 118: Redraw the window of the screen to be displayed based on the obtained display area size of the screen to be displayed.

[0098] In one embodiment of the present invention, an optional solution is to set the function KeyguardDraw / WindowDraw, which can redraw the window of the screen to be displayed according to the size of the display area of ​​the screen to be displayed, and display the redrawn content on the display area.

[0099] In addition, before executing step 118, the process includes: starting the power-on process of the liquid crystal display (LCD) by activating SetPowerModeOn(true), locking the screen to be displayed, and continuing to execute step 118.

[0100] In this embodiment of the invention, Figure 3 A schematic diagram of the LCD power-on process, such as Figure 3 As shown, the LCD power-on process includes steps 301-303: setting up the LCD -> starting LCD power-on -> LCD power-on complete. It should be noted that this LCD power-on process and the window redrawing process in step 118 are processed separately, i.e., processed in parallel using multiple threads. Parallel processing of the LCD power-on process and the window redrawing process in step 118 improves redrawing efficiency and saves window redrawing time.

[0101] After executing step 118, the process also includes: initiating the LCD power-down procedure by calling SetPowerModeOn(false).

[0102] Furthermore, after executing step 110, a function called ScreenOff needs to be set. This function is used to call the power-down process directly after the window redraw is completed without setting the backlight, waiting for the next screen to light up. In other words, after executing step 110, the backlight of the screen to be displayed is not set, making the screen visible to the user completely black, so that the redrawn content can be displayed on the screen to be displayed when the screen lights up again. This solves the problem in related technologies where the lack of prior redrawing increases the screen-on time, and also solves the problem that window redrawing due to differences in hardware screen size further doubles the screen-on time. This shortens the screen-on time, improves the efficiency of screen window redrawing, and greatly improves the user experience of current foldable and flip-screen devices.

[0103] In this embodiment of the invention, after step 118, the method further includes: displaying the redrawn content on the screen to be displayed. For example, displaying the same image on display screens of different sizes.

[0104] In this embodiment of the invention, by executing the above-described screen window redrawing method, such as... Figure 4 a- Figure 4 As shown in c, Figure 4 In scenario a, the screen is off. Figure 4 Process b is the process of executing the screen window redrawing method provided in this embodiment of the invention. It should be noted that during the execution of the screen window redrawing method, the LCD needs to be set to not have backlight brightness, and the process should wait for the window redrawing to complete. Figure 4 As shown in c, the display screen is in a screen-off state, waiting to directly display the redrawn content after the screen is turned on again, thus relative to... Figure 1 Regarding screen window redrawing in the related technologies shown, the screen window redrawing method of this embodiment can identify screen shape changes in the screen-off state and complete window redrawing in advance. This solves the problem of increased screen-on time caused by failure to redraw windows in advance in the related technologies. It also solves the problem that screen-on time is further increased due to differences in hardware screen size when window redrawing is performed. This shortens screen-on time and improves screen window redrawing efficiency.

[0105] In this embodiment of the invention, it is detected whether the current device is in a screen-off state. If the current device is detected to be in a screen-off state, the screen shape information before and after the screen is turned off is obtained to detect whether the screen shape of the current device has changed. If the screen shape has changed, the screen to be displayed is determined according to the screen shape information after the screen is turned off. The window of the screen to be displayed is redrawn according to the display area size of the screen to be displayed. This enables the recognition of screen shape changes in the screen-off state and the early completion of window redrawing, thereby shortening the screen-on time and improving the efficiency of screen window redrawing.

[0106] In this embodiment of the invention, the screen window redrawing process of the present invention can be further verified through the following process:

[0107] Step 1: Install a verifiable application on the current device and run the application on the top visible screen, then turn off the screen using the screen-off command.

[0108] Step 2: The user changes the screen mode of the current device, records the time, waits for a period of time, records the time again, wakes the screen with fingerprint, and captures the log.

[0109] In this step, screen changes are recorded by logging to detect whether a redraw is triggered. Waiting for a period of time is to investigate interference separately over time.

[0110] Step 3: Verify the application's lifecycle status and time based on the logs, and determine whether to trigger a window redraw when the screen is off.

[0111] In this step, log verification is used to check whether the application's lifecycle has changed and whether the time of the change matches the time of the screen folding state change, in order to determine whether a window redraw is triggered when the screen is off. The application's lifecycle refers to the entire display process of the application interface (activity), that is, the application's display process is used to determine whether a redraw has occurred.

[0112] Figure 5 This is a schematic block diagram of an electronic device 110 according to an embodiment of the present invention. It should be understood that the electronic device 110 is capable of performing... Figure 2 The steps in the screen window redrawing method will not be detailed here to avoid repetition. Figure 5 As shown, the electronic device 110 includes a detection unit 401 and a processing unit 402.

[0113] The detection module 401 is used to detect whether the current device is in a screen-off state; if the current device is detected to be in a screen-off state, the detection module 401 uses the screen shape information before and after the screen is turned off to detect whether the screen shape of the current device has changed.

[0114] The processing unit 402 is used to determine the screen to be displayed based on the screen shape information after the screen is turned off if a change in the screen shape is detected; and to redraw the window of the screen to be displayed based on the obtained display area size of the screen to be displayed.

[0115] In this embodiment of the invention, the detection module 401 is further configured to detect whether the screen shape information before the screen is turned off and the screen shape information after the screen is turned off are the same; if the screen shape information before the screen is turned off and the screen shape information after the screen is turned off are not the same, it is determined that the screen shape of the current device has changed.

[0116] In this embodiment of the invention, the screen shape information after the screen is turned off includes the screen angle and the vertical component of gravity; the processing unit 402 is further configured to determine the current device state based on the screen angle, the device state including a folded state, a half-unfolded state, or a fully unfolded state; determine the screen orientation of the current device based on the device state and the vertical component of gravity, and determine the display screen facing the user as the screen to be displayed on the current device.

[0117] In this embodiment of the invention, the processing unit 402 is further configured to obtain the screen identifier corresponding to the screen to be displayed; determine whether the screen identifier is the same as the screen identifier of the display screen before the screen went out; if it is determined that the screen identifier is the same as the screen identifier of the display screen before the screen went out, determine the screen size of the display screen before the screen went out as the screen size of the screen to be displayed; determine the display area size of the screen to be displayed according to the obtained setting mode of the screen to be displayed and the screen size of the screen to be displayed, and continue to execute the step of redrawing the window of the screen to be displayed according to the obtained display area size of the screen to be displayed, wherein the setting mode is used to indicate the current operating scene of the device; if it is determined that the screen identifier is not the same as the screen identifier of the display screen before the screen went out, determine the screen size of the screen to be displayed according to the screen identifier; determine the display area size of the screen to be displayed according to the obtained setting mode of the screen to be displayed and the screen size of the screen to be displayed, and continue to execute the step of redrawing the window of the screen to be displayed according to the obtained display area size of the screen to be displayed.

[0118] In this embodiment of the invention, it is detected whether the current device is in a screen-off state. If the current device is detected to be in a screen-off state, the screen shape information before and after the screen is turned off is obtained to detect whether the screen shape of the current device has changed. If the screen shape has changed, the screen to be displayed is determined according to the screen shape information after the screen is turned off. The window of the screen to be displayed is redrawn according to the display area size of the screen to be displayed. This enables the recognition of screen shape changes in the screen-off state and the early completion of window redrawing, thereby shortening the screen-on time and improving the efficiency of screen window redrawing.

[0119] It should be understood that the electronic device 110 here is embodied in the form of a functional unit. The term "unit" here can be implemented in software and / or hardware, without specific limitation. For example, a "unit" can be a software program, a hardware circuit, or a combination of both that implements the above-described functions. The hardware circuit may include application-specific integrated circuits (ASICs), electronic circuits, a processor (e.g., a shared processor, a proprietary processor, or a group processor, etc.) and memory for executing one or more software or firmware programs, integrated logic circuits, and / or other suitable components that support the described functions.

[0120] Therefore, the units of the various examples described in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the present invention.

[0121] This invention also provides an electronic device, which can be a current device or a circuit device built into the current device. This device can be used to perform the functions / steps described in the method embodiments above.

[0122] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, as shown below. Figure 6 As shown, the electronic device 900 includes a processor 910 and a transceiver 920. Optionally, the electronic device 900 may also include a memory 930. The processor 910, transceiver 920, and memory 930 can communicate with each other via internal connection paths to transmit control and / or data signals. The memory 930 is used to store computer programs, and the processor 910 is used to retrieve and run the computer programs from the memory 930.

[0123] Optionally, the electronic device 900 may also include an antenna 940 for transmitting the wireless signal output by the transceiver 920.

[0124] The processor 910 and memory 930 can be combined into a single processing device, but more commonly they are independent components. The processor 910 executes the program code stored in the memory 930 to achieve the aforementioned functions. In specific implementations, the memory 930 can be integrated into the processor 910, or it can be independent of the processor 910. The processor 910 can be combined with... Figure 5 This corresponds to the processing unit 402 in the electronic device 110.

[0125] In addition, to further enhance the functionality of the electronic device 900, it may also include one or more of the following: an input unit 960, a display unit 970, an audio circuit 980, a camera 990, and a sensor 901. The audio circuit may also include a speaker 982, a microphone 984, etc. The display unit 970 may include a display screen.

[0126] Optionally, the aforementioned electronic device 900 may also include a power supply 950 for providing power to various devices or circuits in the current device.

[0127] It should be understood that Figure 6 The electronic device 900 shown can achieve Figure 2 The various processes of the method embodiments shown are illustrated. The operations and / or functions of each unit in the electronic device 900 are respectively for implementing the corresponding processes in the above method embodiments. For details, please refer to the descriptions in the above method embodiments; to avoid repetition, detailed descriptions are appropriately omitted here.

[0128] It should be understood that Figure 6 The processor 910 in the illustrated electronic device 900 can be a system-on-a-chip (SOC). This processor 910 may include a central processing unit (CPU), and may further include other types of processors. The CPU can be called the main CPU. The neural network processor NPU 30 is mounted as a coprocessor on the main CPU (Host CPU), and tasks are assigned by the Host CPU. The various processors work together to implement the previously described process flow, and each processor can selectively execute a portion of the software drivers.

[0129] In summary, the various processors or processing units inside the processor 910 can work together to implement the previous method flow, and the corresponding software programs of each processor or processing unit can be stored in the memory 930.

[0130] The present invention also provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the actions described above. Figure 2 The steps in the screen window redrawing method shown.

[0131] In the above embodiments, the processor 910 may include, for example, a central processing unit (CPU), a microprocessor, a microcontroller, or a digital signal processor, and may also include a GPU, an NPU, and an ISP. The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present invention. Furthermore, the processor may have the function of operating one or more software programs, which may be stored in memory.

[0132] The memory can be read-only memory (ROM), other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types of dynamic storage devices that can store information and instructions. It can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices. Alternatively, it can be any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.

[0133] In this embodiment of the invention, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related 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 represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0134] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0135] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0136] In the several embodiments provided by this invention, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0137] The above description is merely a specific embodiment of the present invention. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this invention should be included within the protection scope of this invention. The protection scope of this invention should be determined by the scope of the claims.

Claims

1. A method for redrawing a screen window, characterized in that, include: Detect whether the current device is in a screen-off state; If the current device is detected to be in a screen-off state, the screen shape information before and after the screen is turned off is obtained to detect whether the screen shape of the current device has changed. The screen shape includes a folded state, a half-open state, or a fully open state. If a change in the screen shape is detected, the screen to be displayed is determined based on the screen shape information after the screen is turned off; The window of the screen to be displayed is redrawn based on the obtained display area size of the screen to be displayed; When the current device screen is on, the redrawn window is displayed in the display area; Before redrawing the window of the screen to be displayed based on the obtained display area size of the screen to be displayed, the following steps are included: Based on the obtained setting mode and screen size of the screen to be displayed, the display area size of the screen to be displayed is determined. The setting mode is used to indicate the current operating scenario of the device.

2. The method according to claim 1, characterized in that, The step of detecting whether the screen appearance of the current device has changed by acquiring the screen appearance information before and after the screen is turned off includes: Detect whether the screen shape information before the screen is turned off is the same as the screen shape information after the screen is turned off; If the screen appearance information before the screen is turned off is detected to be different from the screen appearance information after the screen is turned off, it is determined that the screen appearance of the current device has changed.

3. The method according to claim 2, characterized in that, The screen shape information after the screen is turned off includes the screen angle and the vertical component of gravity. If a change in screen shape is detected, determining the screen to be displayed based on the screen shape information after the screen is turned off includes: The current device state is determined based on the screen angle, including folded state, half-unfolded state, or fully unfolded state. Based on the device status and the vertical component of gravity, the current screen orientation of the device is determined, and the display screen facing the user is identified as the screen to be displayed on the current device.

4. The method according to claim 3, characterized in that, Before determining the display area size of the screen to be displayed based on the obtained setting mode and screen size of the screen to be displayed, the process includes: Obtain the screen identifier corresponding to the screen to be displayed; Determine whether the screen identifier is the same as the screen identifier of the display screen before the screen went out; If it is determined that the screen identifier is the same as the screen identifier of the display screen before the screen is turned off, the screen size of the display screen before the screen is turned off is determined as the screen size of the screen to be displayed. If it is determined that the screen identifier is different from the screen identifier of the display screen before the screen is turned off, the screen size of the screen to be displayed is determined based on the screen identifier.

5. An electronic device, characterized in that, include: Display screen; One or more processors; Memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs including instructions that, when executed by the device, cause the device to perform the following steps: Detect whether the current device is in a screen-off state; If the current device is detected to be in a screen-off state, the screen shape information before and after the screen is turned off is obtained to detect whether the screen shape of the current device has changed. The screen shape includes a folded state, a half-open state, or a fully open state. If a change in the screen shape is detected, the screen to be displayed is determined based on the screen shape information after the screen is turned off; The window of the screen to be displayed is redrawn based on the obtained display area size of the screen to be displayed; When the current device screen is on, the redrawn window is displayed in the display area; Before redrawing the window of the screen to be displayed based on the obtained display area size of the screen to be displayed, the following steps are included: Based on the obtained setting mode and screen size of the screen to be displayed, the display area size of the screen to be displayed is determined. The setting mode is used to indicate the current operating scenario of the device.

6. The device according to claim 5, characterized in that, When the instruction is executed by the device, the device specifically performs the following steps: Detect whether the screen shape information before the screen is turned off is the same as the screen shape information after the screen is turned off; If the screen appearance information before the screen is turned off is detected to be different from the screen appearance information after the screen is turned off, it is determined that the screen appearance of the current device has changed.

7. The device according to claim 6, characterized in that, The screen shape information after the screen is turned off includes the screen angle and the vertical component of gravity. When the instruction is executed by the device, the device specifically performs the following steps: The current device state is determined based on the screen angle, including folded state, half-unfolded state, or fully unfolded state. Based on the device status and the vertical component of gravity, the current screen orientation of the device is determined, and the display screen facing the user is identified as the screen to be displayed on the current device.

8. The device according to claim 7, characterized in that, When the instruction is executed by the device, the device specifically performs the following steps: Obtain the screen identifier corresponding to the screen to be displayed; Determine whether the screen identifier is the same as the screen identifier of the display screen before the screen went out; If it is determined that the screen identifier is the same as the screen identifier of the display screen before the screen is turned off, the screen size of the display screen before the screen is turned off is determined as the screen size of the screen to be displayed. If it is determined that the screen identifier is different from the screen identifier of the display screen before the screen is turned off, the screen size of the screen to be displayed is determined based on the screen identifier.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the screen window redrawing method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Display method of electronic device with flexible screen and the electronic device

    CN109981839A