Display method and electronic device

By automatically adjusting the screen brightness of the electronic device in a low brightness environment, the visual glare caused by excessive brightness changes during page switching is solved, and a better user experience and brightness adaptability is achieved.

CN118675486BActive Publication Date: 2025-04-04HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411007861.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2025-04-04
Estimated Expiration
2044-07-25

AI Technical Summary

Technical Problem

In low brightness scenarios, the user feels visually dazzling when the electronic device switches the page due to changes in screen brightness.

Method used

By automatically adjusting the screen brightness in a low brightness environment, ensure that the brightness changes moderately when switching pages, reducing the dazzling effect on user vision. The specific implementation method includes adjusting the backlight brightness according to the ambient light brightness and page brightness information when the brightness automatic adjustment function is turned on, ensuring the continuity of the screen brightness.

Benefits of technology

It effectively reduces the dazzling effect on user vision when switching pages, improves the comfort of use in low-brightness environments, and ensures adaptability to screen brightness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118675486B_ABST
    Figure CN118675486B_ABST
Patent Text Reader

Abstract

The present application proposes a display method and an electronic device, which relate to the field of electronic technology and are used to reduce the problem of visual glare to users when page switching occurs in low-brightness scenes. The method is applied to an electronic device and comprises the following steps: displaying a first page. When displaying the first page, the automatic brightness adjustment function of the electronic device is turned on, the ambient light brightness is the first brightness, and the screen brightness of the electronic device is the second brightness. In response to a first operation, the first page is switched to displaying the second page. When displaying the second page, the automatic brightness adjustment function of the electronic device is turned on, the ambient light brightness is still the first brightness, and the screen brightness becomes the third brightness. The second brightness is different from the third brightness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of electronic technology, and in particular to a display method and an electronic device. Background Art

[0002] At present, after the automatic brightness adjustment function is turned on, smart electronic devices such as mobile phones can automatically adjust the backlight brightness of electronic devices according to the ambient light brightness. When the ambient light brightness is brighter, the backlight brightness of the electronic device is automatically adjusted to be brighter, and when the ambient light brightness is darker, the backlight brightness of the electronic device will be adaptively adjusted to be darker to avoid the screen display brightness being too high to cause glare to the user.

[0003] When an electronic device, such as a mobile phone, switches display pages, the page brightness of the two pages before and after the switch may be different. When the backlight brightness is the same, the screen display brightness of pages with different page brightness is different, that is, the user sees different brightness of the two pages. For example, in a low-brightness environment, the page brightness before the switch is low, while the page brightness after the switch is high, which can easily cause a glare to the user. Summary of the invention

[0004] Embodiments of the present application provide a display method and an electronic device for reducing the problem of visual glare caused to a user when page switching occurs in a low-brightness scene.

[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, a display method is provided, which is applied to an electronic device, and the method includes:

[0007] The first page is displayed. When the first page is displayed, the automatic brightness adjustment function of the electronic device is turned on, the ambient light brightness is the first brightness, and the screen brightness of the electronic device is the second brightness. In response to the first operation, the first page is switched to display the second page. When the second page is displayed, the automatic brightness adjustment function of the electronic device is turned on, the ambient light brightness is still the first brightness, and the screen brightness is changed to the third brightness. Among them, the second brightness is different from the third brightness. That is to say, in this scenario, when the automatic brightness adjustment function is turned on, the ambient light brightness remains unchanged, and the screen brightness changes after the page switches. If in a low-brightness environment, if the brightness of the page after switching is higher or lower, the screen brightness can be adaptively adjusted after the page switches to reduce the problem of glare to the user due to the change in page brightness when switching pages.

[0008] In a possible implementation of the first aspect, the method further includes: displaying a third page. When displaying the third page, the automatic brightness adjustment function of the electronic device is turned on, the ambient light brightness is the fourth brightness, and the screen brightness is the fifth brightness. Wherein, the fourth brightness is greater than the first brightness. That is, the ambient light brightness when displaying the third page is higher than the ambient light brightness when displaying the first page. In response to the second operation, the third page is switched to displaying the fourth page. Wherein, when displaying the fourth page, the automatic brightness adjustment function of the electronic device is turned on, the ambient light brightness is still the fourth brightness, and the screen brightness is still the fifth brightness. Therefore, in this scheme, the screen brightness will only change when the ambient light brightness is low and unchanged. That is to say, when the ambient light brightness is high and unchanged, the screen brightness will not change when the page is switched. While ensuring that the problem of page switching causing glare to the user in a low-brightness environment is reduced, it is ensured that the screen brightness in a normal ambient brightness or high-brightness environment is affected by the ambient light brightness and is not affected by other factors.

[0009] In a possible implementation of the first aspect, the above-mentioned ambient light brightness satisfies a first preset condition. Exemplarily, the first preset condition may specifically include that the ambient light brightness is less than a second threshold; or, the backlight brightness determined by the electronic device according to the ambient light brightness is less than a first threshold. That is, the electronic device can obtain the ambient light brightness or the backlight brightness determined according to the ambient light brightness, and determine whether the first preset condition is met according to the ambient light brightness or the backlight brightness, and then determine whether the screen brightness is adjusted after the page is switched. Specifically, the screen brightness will only change after the page is switched when the ambient light brightness is low, or the backlight brightness determined according to the ambient light brightness is low. Thereby, in a low-brightness environment, the problem of page switching causing glare to the user is reduced.

[0010] That is, in the above scene, the first brightness is less than the second threshold.

[0011] In the above scenario, the fourth brightness is greater than or equal to the second threshold.

[0012] In a possible implementation of the first aspect, when displaying the first page, the system display mode of the electronic device is the dark mode. And, when displaying the second page, the system display mode of the electronic device is the dark mode. The dark mode is usually used more in low-brightness environments, and pages in the dark mode usually have lower page brightness. Therefore, in this solution, when the system display mode of the electronic device is the dark mode, the page switches, the ambient light brightness remains unchanged, and the screen brightness switches. The problem of glare caused by page switching to the user can also be reduced.

[0013] In a possible implementation of the first aspect, after displaying the first page, the method further includes: in response to a third operation, switching from the first page to displaying the fifth page. When displaying the first page, the system display mode of the electronic device is a light mode. When displaying the fifth page, the system display mode is a light mode, the ambient light brightness is still the first brightness, and the screen brightness is still the second brightness. Compared with the above-mentioned system display mode before and after the page switching is a dark mode, in this solution, the system display mode before and after the page switching is a light mode, but the ambient light brightness remains unchanged, and the screen brightness does not change. That is to say, in this solution, the ambient light brightness remains unchanged, and the screen brightness will only change in the dark mode. While ensuring that the problem of page switching causing glare to the user is reduced in the dark mode, it is ensured that the screen brightness in the light mode is affected by the ambient light brightness and not by other factors.

[0014] In a possible implementation of the first aspect, the method further includes: displaying the sixth page; when displaying the sixth page, the automatic brightness adjustment function of the electronic device is turned off, the ambient light brightness is the first brightness, and the screen brightness is the sixth brightness. In response to the fourth operation, the sixth page is switched to displaying the seventh page; when displaying the seventh page, the automatic brightness adjustment function of the electronic device is turned off, the ambient light brightness is still the first brightness, and the screen brightness is still the sixth brightness. That is, if the automatic brightness adjustment function of the electronic device is turned off, regardless of the ambient light brightness, the screen brightness will not change when the page is switched.

[0015] In a possible implementation of the first aspect, the difference between the page brightness of the first page and the page brightness of the second page satisfies a third preset condition. Exemplarily, the third preset condition may include being greater than a fifth threshold. In this solution, when the page brightness difference between the first page and the second page is large, after the page is switched, the ambient light brightness remains unchanged but the screen brightness changes.

[0016] In a possible implementation manner of the first aspect, the ambient light brightness satisfies a first preset condition; and a difference between the page brightness of the first page and the page brightness of the second page satisfies a third preset condition.

[0017] In a possible implementation of the first aspect, the above-mentioned ambient light brightness satisfies a first preset condition, the system display mode is a dark mode when displaying the first page, and the system display mode is a dark mode when displaying the second page; and the difference between the page brightness of the first page and the page brightness of the second page satisfies a third preset condition.

[0018] In a possible implementation of the first aspect, the screen brightness may specifically be backlight brightness. When the automatic brightness adjustment function is turned on, the mobile phone may adjust the backlight brightness adaptively according to the ambient light brightness. In an embodiment of the present application, when the ambient light brightness meets certain conditions, such as in a low-brightness environment, the initial backlight brightness determined by the electronic device according to the ambient light brightness is also optimized so that the backlight brightness of the electronic device can better adapt to the current ambient light brightness.

[0019] The screen display brightness is jointly determined by the screen backlight brightness and the page brightness of the currently displayed page. In a possible implementation of the first aspect, the above-mentioned screen brightness can specifically be the screen display brightness. The screen display brightness is the brightness that the user feels when seeing the page displayed on the electronic device. After the page is switched, if the ambient light brightness meets the corresponding conditions and remains unchanged, the initial backlight brightness determined by the electronic device according to the ambient light brightness will be optimized, and the backlight brightness of the electronic device will be set with the optimized backlight brightness. Thereby, the backlight brightness of the electronic device changes, and even if the page brightness of the two pages before and after the page switch is the same, the screen display brightness will also change.

[0020] In a possible implementation of the first aspect, the page brightness of the second page satisfies a second preset condition. Exemplarily, the second preset condition includes: the page brightness is not equal to a third threshold, or the normalized page brightness obtained after normalizing the page brightness is not equal to a fourth threshold. That is, in this solution, the change in screen brightness is associated with the page brightness of the page after switching (the second page), and the screen brightness will change only when the page brightness of the page after switching (the second page) satisfies the condition.

[0021] Wherein, the page brightness may be an average value of the pixel brightness of each pixel in the page. In a possible implementation of the first aspect, the third threshold value may be set to 256 / 2=128. That is, the second preset condition is satisfied when the page brightness of the page after switching is not exactly the middle brightness. The normalized page brightness is obtained by dividing the page brightness by 255, and the normalized page brightness is a value between (0,1), so the fourth threshold value may be set to 0.5.

[0022] In a possible implementation of the first aspect, the method further includes: in response to switching from the first page to displaying the second page, obtaining the initial backlight brightness determined by the electronic device based on the first brightness based on the automatic brightness adjustment function. After the page is switched, the electronic device will first determine whether the state of the electronic device meets the preset conditions. If the preset conditions are met, the page brightness of the second page is obtained. Among them, the preset conditions include: the automatic brightness adjustment function of the electronic device is turned on, and the first brightness meets the first preset condition; the first preset condition includes that the initial backlight brightness is less than the first threshold, or the first brightness is less than the second threshold. Finally, based on the initial backlight brightness and the page brightness of the second page, the backlight brightness of the electronic device is set, and the backlight brightness after setting is the same as or different from the initial backlight brightness.

[0023] In this solution, when the preset conditions are met, the backlight brightness is set based on the automatic brightness adjustment function in combination with not only the ambient light brightness but also the backlight brightness of the second page. In this way, the screen brightness determined by the backlight brightness of the electronic device and the page brightness can be more adapted to the current environment, reducing the problem of the screen irritating the user's eyes after page switching.

[0024] Specifically, if the backlight brightness after setting is the same as the initial backlight brightness, it means that the page brightness of the second page does not affect the backlight brightness setting. If the backlight brightness after setting is different from the initial backlight brightness, it means that the electronic device optimizes the initial backlight brightness in combination with the page brightness of the second page.

[0025] Wherein, obtaining the page brightness of the second page may specifically include: when the page brightness of the second page is stored in the page brightness data storage structure of the electronic device, obtaining the page brightness of the second page from the page brightness data storage structure.

[0026] Alternatively, when the page brightness of the second page is not stored in the page brightness data storage structure of the electronic device, the electronic device first takes a screenshot of the second page, and then analyzes the captured image to obtain the page brightness of the second page. Further, the electronic device can store the page brightness of the second page in the page brightness data storage structure.

[0027] In a possible implementation of the first aspect, the setting of the backlight brightness of the electronic device based on the initial backlight brightness and the page brightness of the second page may specifically include: generating a gain coefficient based on the page brightness of the second page, determining a target backlight brightness according to the gain coefficient and the initial backlight brightness, and setting the backlight brightness of the electronic device to the target backlight brightness.

[0028] In a possible implementation of the first aspect, the gain coefficient is a value between (0, 1). The target backlight brightness is determined according to the gain coefficient and the initial backlight brightness, and specifically, the product of the gain coefficient and the initial backlight brightness is determined as the target backlight brightness.

[0029] In a possible implementation of the first aspect, when the page brightness of the second page is less than the third threshold, or when the normalized page brightness obtained after normalizing the page brightness is less than the fourth threshold, the gain coefficient is greater than 1. That is, when the second page brightness is relatively small, the optimization of the initial backlight brightness by the generated gain coefficient may specifically be to increase the initial backlight brightness, that is, to increase the backlight brightness of the electronic device. Furthermore, the smaller the page brightness of the second page or the normalized page brightness is, the larger the gain coefficient is.

[0030] In a possible implementation of the first aspect, when the page brightness of the second page is greater than the third threshold, or when the normalized page brightness obtained after normalizing the page brightness is greater than the fourth threshold, the gain coefficient is greater than 0 and less than 1. That is, when the second page brightness is relatively large, the optimization of the initial backlight brightness by the generated gain coefficient may specifically be to reduce the initial backlight brightness, that is, to lower the backlight brightness of the electronic device. Moreover, the greater the page brightness of the second page or the normalized page brightness, the smaller the gain coefficient.

[0031] In a possible implementation of the first aspect, when the page brightness of the second page is equal to the third threshold value, or when the normalized page brightness obtained after normalizing the page brightness is equal to the fourth threshold value, the gain coefficient is equal to 1. That is, when the second page brightness is at the set value, the generated gain coefficient is not optimized for the initial backlight brightness. In this way, the electronic device sets the backlight brightness only according to the ambient light brightness.

[0032] In a possible implementation of the first aspect, the method further includes: when the state of the electronic device does not meet the preset condition, setting the gain coefficient to 1. Determining the target backlight brightness according to the gain coefficient and the initial backlight brightness. Setting the backlight brightness of the electronic device to the target backlight brightness. Alternatively, when the state of the electronic device does not meet the preset condition; setting the backlight brightness of the electronic device to the initial backlight brightness. In this way, it means that the gain coefficient will not optimize the initial backlight brightness, and the electronic device only sets the backlight brightness of the electronic device according to the ambient light brightness.

[0033] In a possible implementation of the first aspect, after the backlight brightness of the electronic device is set to the target backlight brightness, the method further includes: if the gain coefficient is not 1, then when the electronic device continues to display the second page, the gain coefficient is updated successively according to the preset step size, and the backlight brightness to be set is determined based on the updated gain coefficient, and the backlight brightness of the electronic device is set to the new target backlight brightness. The backlight brightness of the electronic device is set until the gain coefficient becomes 1. That is, if the electronic device continues to display the second page, the electronic device will still use the gain coefficient for optimization in the subsequent backlight brightness adjustment, and the gain coefficient will gradually change until it becomes 1. In this way, if the ambient light brightness remains unchanged, the backlight brightness of the electronic device will gradually become the initial backlight brightness. If the ambient light brightness changes, as long as the ambient light brightness still meets the first preset condition, the updated gain coefficient can also be used to optimize the re-determined initial backlight brightness to ensure that the change in backlight brightness is relatively mild.

[0034] In a possible implementation of the first aspect, when switching to the second page and continuously displaying the second page, if the electronic device detects that the state of the electronic device no longer satisfies a preset condition, the electronic device sets the gain coefficient to 1 or cancels setting the gain coefficient. That is, the gain coefficient is no longer used to optimize the initial backlight brightness determined according to the ambient light brightness.

[0035] In a possible implementation manner of the first aspect, the above-mentioned preset conditions also include: the system display mode of the electronic device is a dark mode; and / or the difference between the page brightness of the first page and the page brightness of the second page is greater than a fifth threshold.

[0036] In a second aspect, the present application further provides an electronic device. The electronic device may include: a display screen, an ambient light sensor, a processor, and a memory. The display screen, the ambient light sensor, and the memory are respectively coupled to the processor. The memory is used to store computer-executable instructions. When the electronic device is running, the processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the display method as described in any one of the first aspects above.

[0037] In a third aspect, the present application provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer can execute any display method in the first aspect.

[0038] In a fourth aspect, a computer program product comprising instructions is provided, which, when executed on an electronic device, enables the electronic device to execute any one of the display methods of the first aspect.

[0039] In a fifth aspect, a device (for example, the device may be a chip system) is provided, the device including a processor for supporting an electronic device to implement the functions involved in the first aspect. In a possible design, the device also includes a memory for storing program instructions and data necessary for the electronic device. When the device is a chip system, it may be composed of a chip, or may include a chip and other discrete devices.

[0040] Among them, the technical effects brought about by any design method in the second to fifth aspects can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A schematic diagram of brightness setting operation provided by an embodiment of the present application;

[0042] Figure 2 A schematic diagram of brightness setting operation provided by an embodiment of the present application;

[0043] Figure 3 A schematic diagram showing the display of the same page in dark mode and light mode provided in an embodiment of the present application;

[0044] Figure 4 A schematic diagram of displaying different pages in dark mode and light mode provided in an embodiment of the present application;

[0045] Figure 5 A hardware structure diagram of an electronic device provided in an embodiment of the present application;

[0046] Figure 6 A software architecture diagram of an electronic device provided in an embodiment of the present application;

[0047] Figure 7 A flow chart of a display method provided in an embodiment of the present application;

[0048] Figure 8 A histogram of two pages provided for an embodiment of the present application;

[0049] Fig. 9 A flow chart of a display method provided in an embodiment of the present application;

[0050] Fig.10 A schematic diagram of the internal flow of a display method provided in an embodiment of the present application;

[0051] Fig.11 A framework diagram of a chip system of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] The following is a brief description of the technical terms that may be involved in this application.

[0053] Backlight refers to the light source behind the screen. The brightness level of the entire screen is controlled by adjusting the brightness of the backlight. Increasing the backlight brightness will brighten the entire screen, while reducing the backlight brightness will make the screen darker. The adjustment of backlight brightness is usually used to make the overall brightness of the screen adapt to different ambient lighting conditions. At present, the common automatic brightness adjustment function in electronic devices is mainly achieved by adjusting the backlight brightness. The brightness value of the backlight brightness can be adjusted in the range of 0-255.

[0054] Image brightness refers to the brightness of an image, that is, the light-dark contrast of each area in the image. By adjusting the image brightness, the overall brightness and darkness of the image can be changed. Increasing the image brightness can make the image brighter, while reducing the image brightness will make the image darker. In the embodiments of the present application, the page brightness refers to the image brightness of the image corresponding to the page currently displayed by the electronic device.

[0055] An image histogram is a graphical representation method used to analyze image features. It graphically displays the distribution of pixels at various brightness levels in an image.

[0056] Ambient light refers to the light in the surrounding environment, and ambient light can be represented by light intensity, that is, ambient light brightness. Some electronic devices have the ability to detect ambient light brightness, for example, they can detect ambient light brightness through sensors. For example, two common implementation methods for electronic devices to detect ambient light brightness are the under-screen ambient light brightness detection solution and the non-under-screen ambient light brightness detection solution.

[0057] Among them, the specific implementation of the under-screen ambient light brightness detection solution is: the ambient light sensor (ALS) is located below the screen; the ALS detection channel value includes: the residual energy of the external ambient light passing through the screen, and the energy of the local pixel light on the screen reflected to the device. The specific implementation of the non-under-screen ambient light brightness detection solution is: embedding the ambient light sensor in the electronic device by opening a hole or the like; the ALS detection channel value is the residual energy of the external ambient light passing through the hole. The display method proposed in the embodiment of the present application can be applied to electronic devices that adopt the under-screen ambient light brightness detection solution, and can also be applied to electronic devices that adopt the non-under-screen ambient light brightness detection solution.

[0058] ‌Currently, most electronic devices such as smartphones are equipped with an automatic brightness adjustment function, which enables electronic devices to automatically adjust the backlight brightness of electronic devices according to changes in ambient light brightness. Taking mobile phones as an example, users can enable this function in the settings app. Figure 1As shown, the mobile phone displays a desktop 101, which includes multiple application icons, such as an icon of a setting application. In response to a user triggering operation on the icon of the setting application, the mobile phone displays a setting application interface 102. The setting interface 102 includes a display and brightness setting option 103. In response to a user triggering operation on the display and brightness setting option 103, the mobile phone displays a "display and brightness" setting interface 104.

[0059] The display and brightness setting interface 104 includes a light mode option 105 a and a dark mode option 105 b . Figure 1 As shown, the light mode is currently selected. The display and brightness setting interface 104 also includes an automatic switching switch 106 between the light mode and the dark mode. Figure 1 In some examples, when the automatic switch 106 is turned on, the mobile phone can adaptively select the light mode or the dark mode. It is understandable that after the automatic switch 106 is turned off, the mobile phone will not automatically change the system display mode to the light mode or the dark mode.

[0060] The display and brightness setting interface 104 also includes a brightness setting option 107. The brightness setting option 107 includes a brightness setting bar 107a and an automatic adjustment switch 107b. The brightness setting bar 107a can be used by the user to manually adjust the backlight brightness. From left to right, the corresponding brightness of the brightness setting bar 107a gradually increases from low to high. The automatic adjustment switch 107b is used for the user to set whether to allow the mobile phone to automatically adjust the backlight brightness. Usually, after the automatic adjustment switch 107b is turned on, the mobile phone can automatically adjust the backlight brightness to a suitable brightness according to the ambient light brightness of the current environment. For example, when the ambient light brightness is high, the mobile phone automatically adjusts the backlight brightness to a higher level, and when the ambient light brightness is low, the mobile phone can automatically adjust the backlight brightness to a lower level. After the automatic adjustment switch 107b is turned off, the mobile phone will not automatically adjust the backlight brightness.

[0061] In other examples, the brightness of the phone can also be set in the control center. Figure 2 As shown, when the mobile phone displays any interface, such as the desktop, in response to the user sliding down at the top of the screen, the control center 201 is displayed. The control center 201 may include shortcut switches such as WLAN, Bluetooth, mobile data, mute, lock screen, and a backlight brightness setting option 202. The backlight brightness setting option 202 may include a setting bar for the user to manually adjust the backlight brightness, and a selection box for automatic adjustment of the backlight brightness. It can be understood that after checking the selection box for automatic adjustment of the backlight brightness, it means turning on the automatic brightness adjustment switch, allowing the mobile phone to automatically adjust the backlight brightness of the mobile phone.

[0062] It can be seen from the above description that mobile phones usually automatically adjust the brightness according to the ambient light brightness. Then, after the mobile phone turns on the automatic adjustment switch in response to the user's operation, the mobile phone will not adjust the brightness when the ambient light brightness remains unchanged. However, the brightness felt by the user when watching the screen is determined by the backlight brightness and the page brightness of the currently displayed page. In some embodiments, the brightness felt by the user when watching the screen can be referred to as the display brightness of the screen, the perceived brightness of the screen, or other names. The embodiments of the present application are described below using the brightness felt by the user when watching the screen as the display brightness of the screen.

[0063] For example, when the displayed page remains unchanged (i.e., the page brightness remains unchanged), the backlight brightness of the mobile phone is increased, and the display brightness of the screen increases accordingly. When the ambient light brightness remains unchanged, the backlight brightness of the mobile phone remains unchanged, and the displayed page switches from page 1 with a lower page brightness to page 2 with a higher page brightness, the display brightness of the screen will also increase. Figure 3 a in the figure is the setting interface 301 in dark mode. Figure 3 b in FIG. 3 is the setting interface 302 displayed in the light mode. The page brightness of the setting interface in the light mode is higher than the page brightness of the setting interface in the dark mode. Figure 3 The setting interface 302 shown in b in FIG. Figure 3 The display brightness of the screen of the setting interface 301 shown in a in FIG.

[0064] After turning on the switch to automatically switch between light mode and dark mode, the phone will set the system display mode to dark mode when certain conditions are met. Usually, the page display of the phone's system applications can be adjusted according to the system display mode; for example, Figure 4 As shown in a in FIG, after the system display mode is set to dark mode, the setting interface 303 after the mobile phone opens the setting application automatically displays the page brightness of the dark mode. However, some non-system applications (such as third-party applications, video applications, etc.) may not be able to adjust the page brightness of the page according to the system display mode set by the system, such as Figure 4The message interface 304 of the video application b in the figure still has the page brightness in the light mode. When the ambient light brightness is low and the ambient light brightness remains unchanged, the mobile phone switches from the settings application to other applications in response to user operations (such as sliding the gesture prompt line at the bottom of the screen to the left or right). The page brightness of the settings interface 303 is the page brightness in the dark mode, and the page brightness of the message interface 304 of other applications is the page brightness in the light mode. In the dark mode, the user's eyes are usually adapted to the current brightness, and the pupils are usually enlarged to receive more light. If the page is switched to the light mode at this time, if the backlight brightness remains unchanged, the page after switching will be more irritating to the user's eyes. That is, for a period of time after switching pages, it will cause a glaring effect to the user.

[0065] Based on this, an embodiment of the present application proposes a display method, which is applied to an electronic device. The electronic device supports automatic adjustment of the backlight brightness according to the ambient light brightness. The method includes: when the automatic brightness adjustment function is turned on, displaying the first page; when the first page is displayed, the ambient light brightness is the first brightness and the screen brightness is the second brightness. The ambient light brightness is still the first brightness, and after switching from the first page to the second page, the screen brightness changes to the third brightness. That is to say, in this scheme, when the ambient light brightness remains unchanged, the page of the electronic device switches, and the screen brightness also changes, so that the screen brightness can better adapt to the current environment, reducing the problem of too large a change in screen brightness due to page switching, causing glare to the user.

[0066] Optionally, as an example, the above-mentioned ambient light brightness satisfies the first preset condition. That is, when the ambient light brightness satisfies a certain condition and remains unchanged, the screen brightness of the electronic device changes in response to page switching.

[0067] Optionally, as an example, the ambient light brightness satisfies the first preset condition and can be specifically set to be less than a threshold value 1. That is, when the ambient light brightness is low, even if the ambient light brightness does not change, if a page switch occurs, the electronic device can also adjust the backlight brightness. Thus, the screen brightness of the electronic device can better adapt to the current environment.

[0068] It can be seen from the above description that the automatic brightness adjustment function of the electronic device specifically adjusts the backlight brightness of the electronic device according to the ambient light brightness. Therefore, as another example, the above-mentioned ambient light brightness satisfies the first preset condition and can also be set to: the initial backlight brightness determined by the electronic device according to the ambient light brightness is less than threshold 2.

[0069] Optionally, as another example, after the electronic device switches from the first page to the second page, the ambient light brightness remains unchanged, and the screen brightness can be adjusted according to the page information of the second page. Exemplarily, the page information can specifically include an image histogram of the page, such as a grayscale histogram.

[0070] Optionally, the electronic device adjusts the screen brightness according to the page information of the second page, which may specifically include: determining the page brightness of the second page according to the image histogram of the second page, and determining the gain coefficient according to the page brightness of the second page. Finally, the backlight brightness is adjusted according to the gain coefficient. Exemplarily, the product of the gain coefficient and the initial backlight brightness can be determined as the target backlight brightness, and then the backlight brightness is adjusted to the target backlight brightness. Among them, the initial backlight brightness can be the backlight brightness determined by the electronic device according to the current ambient light brightness. Since the display brightness of the screen is jointly determined by the backlight brightness and the page brightness, the page brightness cannot be adjusted. By adjusting the backlight brightness, the display brightness of the screen can be adjusted, reducing the problem of visual glare to the user.

[0071] Optionally, as an example, when it is determined according to the page information that the page brightness of the second page meets the second preset condition, the electronic device will adjust the screen brightness according to the page information of the second page. Exemplarily, the page brightness meets the second preset condition, which can be specifically set to be too high or too low. For example, the page brightness is greater than threshold 3, or the page brightness is less than threshold 4. Among them, threshold 3 and threshold 4 can be set to be the same or different according to actual conditions.

[0072] Next, the electronic device to which the display method proposed in this application is applied is briefly introduced. Figure 5 The hardware structure diagram of the electronic device in some embodiments is shown.

[0073] like Figure 5 The figure shows a schematic diagram of the structure of an electronic device 400 provided in an embodiment of the present application. The electronic device 400 may include a processor 410, an external memory interface 420, an internal memory 421, a universal serial bus (USB) interface 430, a charging management module 440, a power management module 441, a battery 442, an antenna 1, an antenna 2, a mobile communication module 450, a wireless communication module 460, an audio module 470, a sensor module 480, a button 490, a motor 491, a camera 492, a display screen 493, a backlight source 493A, and a subscriber identification module (SIM) card interface 494. Among them, the sensor module 480 may include a pressure sensor 480A, a touch sensor 480B, and an ambient light sensor 480C.

[0074] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 400. In other embodiments of the present application, the electronic device 400 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0075] The processor 410 may include one or more processing units, for example, the processor 410 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. For example, the processor 410 is used to execute the display method in the embodiment of the present application.

[0076] The controller may be the nerve center and command center of the electronic device 400. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0077] The processor 410 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 410 is a cache memory. The memory may store instructions or data that the processor 410 has just used or cyclically used. If the processor 410 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 410, and thus improves the efficiency of the system.

[0078] The USB interface 430 is an interface that complies with USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 430 may be used to connect a charger to charge the electronic device 400, and may also be used to transmit data between the electronic device 400 and a peripheral device.

[0079] The external memory interface 420 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 400. The external memory card communicates with the processor 410 through the external memory interface 420 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0080] The internal memory 421 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 410 executes various functional applications and data processing of the electronic device 400 by running the instructions stored in the internal memory 421. The internal memory 421 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system and an application required for at least one function (such as a sound playback function, an image playback function, etc.).

[0081] In addition, the internal memory 421 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), and the like.

[0082] The charging management module 440 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 440 may receive charging input from the wired charger through the USB interface 430.

[0083] The power management module 441 is used to connect the battery 442, the charging management module 440 and the processor 410. The power management module 441 receives input from the battery 442 and / or the charging management module 440 to power the processor 410, the internal memory 421, the external memory, the display screen 493, the camera 492, and the wireless communication module 460.

[0084] In some other embodiments, the power management module 441 may also be disposed in the processor 410. In some other embodiments, the power management module 441 and the charging management module 440 may also be disposed in the same device.

[0085] The wireless communication function of the electronic device 400 can be implemented through the antenna 1, the antenna 2, the mobile communication module 450, the wireless communication module 460, the modem processor and the baseband processor.

[0086] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 400 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0087] The mobile communication module 450 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 400. The mobile communication module 450 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 450 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 450 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1.

[0088] The wireless communication module 460 can provide wireless communication solutions including wireless local area networks (WLAN) (such as Wi-Fi), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 400. The wireless communication module 460 can be one or more devices integrating at least one communication processing module. The wireless communication module 460 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and filters it, and sends the processed signal to the processor 410. The wireless communication module 460 can also receive the signal to be sent from the processor 410, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0089] In some embodiments, antenna 1 of electronic device 400 is coupled to mobile communication module 450, and antenna 2 is coupled to wireless communication module 460, so that electronic device 400 can communicate with the network and other devices through wireless communication technology.

[0090] The electronic device 400 can implement audio functions such as music playing and recording through the audio module 470 and the application processor.

[0091] The audio module 470 is used to convert digital audio signals into analog audio signals for output, and is also used to convert analog audio inputs into digital audio signals. The audio module 470 can also be used to encode and decode audio signals. In some embodiments, the audio module 470 can be arranged in the processor 410, or some functional modules of the audio module 470 can be arranged in the processor 410.

[0092] The pressure sensor 480A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 480A can be set on the display screen 493. There are many types of pressure sensors 480A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 480A, the capacitance between the electrodes changes. The electronic device 400 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 493, the electronic device 400 detects the intensity of the touch operation based on the pressure sensor 480A. The electronic device 400 can also calculate the position of the touch based on the detection signal of the pressure sensor 480A.

[0093] The touch sensor 480B is also called a "touch panel". The touch sensor 480B can be arranged on the display screen 493, and the touch sensor 480B and the display screen 493 form a touch screen, also called a "touch screen". The touch sensor 480B 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 493. In other embodiments, the touch sensor 480B can also be arranged on the surface of the electronic device 400, which is different from the position of the display screen 493.

[0094] The ambient light sensor 480C can be used to sense the ambient light brightness. In the embodiment of the present application, the electronic device 400 can adaptively adjust the backlight brightness of the backlight source 493A according to the ambient light brightness sensed by the ambient light sensor 480C. The ambient light sensor 480C can also be used to automatically adjust the white balance when taking pictures.

[0095] The key 490 includes a power key, a volume key, etc. The key 490 may be a mechanical key or a touch key. The electronic device 400 may receive key input and generate key signal input related to user settings and function control of the electronic device 400.

[0096] Motor 491 can generate vibration prompts. Motor 491 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.

[0097] The camera 492 is used to capture still images or videos. In some embodiments, the electronic device 400 may include 1 or N cameras 492, where N is a positive integer greater than 1.

[0098] The electronic device 400 implements the display function through a GPU, a display screen 493, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 493 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 410 may include one or more GPUs, which execute program instructions to generate or change display information.

[0099] The display screen 493 is used to display images, videos, etc. In some embodiments, the electronic device 400 may include 1 or N display screens 493, where N is a positive integer greater than 1. The backlight source 493A is used to emit light, which is transmitted or reflected in the molecular layer of the display screen, so that the display screen 493 can display images.

[0100] The SIM card interface 494 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 400 by inserting into or removing from the SIM card interface 494. The electronic device 400 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.

[0101] The display methods in the following embodiments can all be implemented in the electronic device 500 having the above hardware structure.

[0102] Figure 6 A software framework of an electronic device in some embodiments is shown.

[0103] The framework of the electronic device includes the application layer, the application framework layer (framework), the hardware abstraction layer (HAL) and the kernel layer.

[0104] The application layer can include a series of application packages, such as settings, videos, and desktop launchers. Among them, the launcher is used to execute system animations involving the desktop.

[0105] The application framework layer may include system server, advanced graphic platform (AGP), surface flinger, sensor manager and display manager service.

[0106] Among them, system server is the main system process of the electronic device, the provider of basic system services, and the entry point for the system to start various services. AGP is used to perform system animations that do not involve the desktop; for example, animations when switching pages within an application. Surface flinger is responsible for managing and rendering graphics windows, and displaying applications and system interfaces on the screen. Surface flinger also handles input events, such as touching the screen, and passes them to the correct application or system component. Surface flinger is also responsible for handling screen rotation, resolution adjustment, and other aspects of display output, thereby providing smooth graphics display and user interface interaction on electronic devices. The sensor management module is used to manage sensors. The display management service is responsible for managing the device's display and system display mode.

[0107] The hardware abstraction layer runs in user space, encapsulates the kernel layer driver, and provides a calling interface to the upper layer. The hardware abstraction layer includes display module, audio service module, camera module, Bluetooth module, etc.

[0108] The kernel layer is the layer between hardware and software. The kernel layer can contain screen drivers, sensor drivers, etc.

[0109] In the display method proposed in the present application, the electronic device turns on the automatic brightness adjustment function in the setting application in response to the user operation. After the automatic brightness adjustment function is turned on, the sensor driver reports the collected ambient light brightness to the display management service through the sensor management module. In an embodiment of the present application, the sensor driver may specifically include an ambient light sensor driver. Since the automatic brightness adjustment function is turned on, the display management service can calculate the target value to which the backlight brightness needs to be adjusted based on the ambient light brightness, which is recorded as backlight brightness 1.

[0110] When the electronic device switches from page 1 to page 2 (which may be a page switch between applications or an interface switch within an application), a notification message is sent to the AGP by the desktop launcher or the system service. The notification message is used to indicate that a page switching animation has been executed, that is, the page has been switched. In response to receiving the notification message, the AGP can obtain backlight brightness 1; the backlight brightness 1 is determined by calculation based on the ambient light brightness. Exemplarily, the AGP can obtain backlight brightness 1 from the display management service. In addition, the AGP can also obtain the state of the brightness automatic adjustment function switch to determine whether the current brightness automatic adjustment function switch is turned on. When it is determined that the brightness automatic adjustment function switch is turned on, if the backlight brightness 1 meets certain conditions, the AGP can obtain the page information of the current display page (i.e., page 2) and determine the gain coefficient based on the page information of page 2. Then, the AGP sends the gain coefficient to the display management service. After receiving the gain coefficient, the display management service can set or update the gain coefficient in the cache of the display management service. When adjusting the backlight brightness, the display management service determines the backlight brightness that needs to be adjusted in the end, such as backlight brightness 2, based on the backlight brightness 1 and the gain coefficient in the cache of the above-mentioned display management service. Finally, the display management service controls the backlight brightness to be adjusted to backlight brightness 2 through the screen driver.

[0111] When AGP obtains the page information of the currently displayed page (i.e., page 2), it can first query whether the page information of page 2 is stored in the page brightness data storage structure (activity map). If the page information of page 2 is stored in the activity map, AGP directly obtains the page information of page 2 from it. If the page information of page 2 is not stored in the activity map, AGP can call the relevant interface of surface flinger to take a screenshot of page 2. After obtaining the screenshot of page 2, surface flinger sends the image of page 2 to AGP. AGP analyzes the image of page 2, obtains the page information of page 2, and updates the page information of page 2 to the activity map. Therefore, AGP can obtain the page information of page 2 from the activity map next time.

[0112] Next, the display method proposed in the embodiment of the present application is described in detail with reference to the accompanying drawings.

[0113] Figure 7 The flowchart of the display method in some embodiments of the present application is shown. In the following embodiments, the electronic device is a mobile phone as an example for description.

[0114] S501. In response to the first operation, the mobile phone turns on the automatic brightness adjustment function.

[0115] For example, the user operation may correspond to the case where the mobile phone does not turn on the automatic brightness adjustment function. Figure 1 In the display and brightness setting interface 104, the trigger operation of the automatic adjustment switch 107b; or Figure 2 The control center 201 is shown, and a selection box 202 for setting the backlight brightness is used to trigger the operation.

[0116] S502. Display page 1.

[0117] S503. In response to the second operation, the display of page 1 is switched to page 2.

[0118] S504. In response to the page switching, obtain the initial backlight brightness.

[0119] The initial backlight brightness may be the backlight brightness to be set determined by the mobile phone according to the current ambient light, which is recorded as backlight brightness 1. As can be seen from S501, the mobile phone has turned on the automatic brightness adjustment function, so the mobile phone will automatically adjust the backlight brightness according to the ambient light brightness.

[0120] Furthermore, in an embodiment of the present application, in some scenarios where specific conditions (also referred to as preset conditions) are met, the automatic brightness adjustment function of the mobile phone will be optimized. In some embodiments, after the mobile phone determines the above-mentioned initial backlight brightness according to the ambient light brightness, it will not directly adjust the backlight brightness to the initial backlight brightness, but first determine whether the specific conditions are met. If the specific conditions are met, the mobile phone will also determine the gain coefficient that needs to be adjusted for the initial backlight brightness in combination with the brightness-related information. In some examples, the judgment of the specific conditions is such as S505.

[0121] S505: Determine whether the automatic brightness adjustment function is turned on and whether the initial backlight brightness is less than a threshold value of 5.

[0122] Since the mobile phone has turned on the automatic brightness adjustment function in S501, if the initial backlight brightness is less than threshold 5, the judgment result of S505 is yes. On the contrary, if the initial backlight brightness is greater than or equal to threshold 5, the judgment result of S505 is no. In S505, the automatic brightness adjustment function is turned off, or the initial backlight brightness is greater than or equal to threshold 5, which is regarded as a judgment result of no. Threshold 5 can be set according to actual conditions. For example, it is set to 20%*maximum backlight brightness. Among them, the maximum backlight brightness is the highest backlight brightness value that the mobile phone can set. For example, if the maximum backlight brightness is 255, then threshold 5 can be set to 20%*255=5.1. It can be understood that this value is only an example and can be set to other values ​​in other examples. For example, threshold 5 is directly set to a specific brightness value, such as 5, 5.1, 6 or 10. Threshold 5 corresponds to the first threshold. Among them, the maximum backlight brightness is pre-defined in the mobile phone.

[0123] As can be seen from the above description, the display method proposed in the embodiment of the present application is for the case where the ambient light brightness is low, and the page brightness changes greatly before and after the page switch, which is easy to cause visual glare to the user. Therefore, in response to the page switching, it can be determined whether the initial backlight brightness meets the corresponding conditions, that is, the initial backlight brightness is low. In addition, only when the user chooses to turn on the automatic brightness adjustment function, the mobile phone can automatically adjust the brightness of the mobile phone, so it is also necessary to determine whether the automatic brightness adjustment function is turned on.

[0124] As an example, the mobile phone determines whether the automatic brightness adjustment function is turned on, which can be achieved by obtaining the switch value of the automatic brightness adjustment function. For example, the mobile phone can set the switch value to 1 after the automatic brightness adjustment function is turned on. That is, when the switch value of the automatic brightness adjustment function is set to 1, it indicates that the automatic brightness adjustment function is turned on. After the automatic brightness adjustment function is turned off, the mobile phone sets the switch value to 0. That is, when the switch value of the automatic brightness adjustment function is set to 0, it indicates that the automatic brightness adjustment function is turned off. It can be understood that the above switch values ​​are only examples. In other examples, the switch value indicating whether the automatic brightness adjustment function is turned on or off can also be set to other values.

[0125] As another example, the mobile phone can determine whether the automatic brightness adjustment function is turned on by obtaining the on mark of the automatic brightness adjustment function. For example, the mobile phone can set the on mark in the mobile phone after the automatic brightness adjustment function is turned on. That is, if it is found that the on mark is set, it means that the automatic brightness adjustment function is currently turned on. The mobile phone can cancel the on mark in the mobile phone after the automatic brightness adjustment function is turned on. If the on mark is not found at present, it means that the automatic brightness adjustment function is in the off state.

[0126] The mobile phone obtains the switch value of the automatic brightness adjustment function, or obtains the opening mark corresponding to the automatic brightness adjustment function, which can be obtained from a database corresponding to the setting application.

[0127] If the judgment result of S505 is yes (the automatic brightness adjustment function is turned on, and the initial backlight brightness is less than the threshold 5), the gain coefficient determination process is triggered to determine the gain coefficient and optimize the automatic brightness adjustment according to the gain coefficient. For example, the following is performed: S506-S509.

[0128] S506. Obtain page information of page 2.

[0129] S507 . Generate a gain coefficient according to the page information of page 2 .

[0130] In some embodiments, the mobile phone may specifically calculate the gain coefficient according to the page brightness of page 2 .

[0131] As an example, the page information may include the brightness value of each pixel in the page. After obtaining the brightness value of each pixel in page 2, the mobile phone may calculate the page brightness of page 2. Exemplarily, the mobile phone may calculate the average value of the brightness value of each pixel in page 2 and use the average value as the page brightness of page 2.

[0132] As another example, the page information may include an image histogram of the page. The image histogram may graphically display the distribution of pixels at various brightness levels in the image. Therefore, by obtaining the image histogram of the page, the page brightness of the page may also be determined.

[0133] The mobile phone obtains the page information of page 2, specifically by capturing an image of page 2, and then performing image processing on the captured image corresponding to page 2 to obtain the page information of page 2. The mobile phone captures the image of page 2 by calling the screenshot interface of the system. The image processing on the image corresponding to page 2 can be implemented by any method in the relevant technology; for example, a histogram is extracted from the image corresponding to page 2.

[0134] by Figure 3 a and Figure 3 The two pages in dark mode and light mode are shown in b as an example. Figure 8 The a in Figure 3 The image histogram of the image corresponding to the dark mode page shown in a; Figure 8 b in corresponds to Figure 3 The image histogram of the image corresponding to the page in light color mode shown in b. Figure 8It can be clearly seen that there are more dark pixels (closer to 0, such as brightness less than 128) in the image histogram of the page in dark mode, and more light pixels (closer to 255, such as brightness greater than 128) in the image histogram of the page in light mode. Under the same backlight brightness, the page with more light pixels (such as the page in light mode) has a higher page brightness, and the screen display brightness will also be higher. On the other hand, the page with more dark pixels (such as the page in dark mode) has a lower page brightness, and the screen display brightness will also be lower. That is, under the same backlight brightness, the page in light mode looks brighter, while the page in dark mode looks darker.

[0135] In other embodiments, the page information may further include other information of the page, wherein the brightness of the dark-level pixel is less than the middle brightness, and the brightness of the bright-level pixel is greater than the middle brightness; the middle brightness may be 256 / 2=128.

[0136] When the page information is the brightness value of each pixel in the page or the image histogram of the page, the above S507 may specifically include: determining the page brightness of page 2 according to the page information of page 2, and then calculating the gain coefficient according to the page brightness of page 2. For the specific implementation process of determining the page brightness of page 2 according to the page information of page 2, refer to the description of the previous embodiment.

[0137] Further, as an example, calculating the gain coefficient according to the page brightness of page 2 may specifically include: calculating the gain coefficient according to the page brightness of page 2 and the first preset formula. Exemplarily, the first preset formula may be: gain coefficient = 1 + (0.5-X), wherein X represents the value obtained after normalizing the page brightness, which may be recorded as the normalized page brightness. Normalizing the page brightness may specifically include determining the ratio of the brightness value of the page brightness to 255 as the normalized page brightness; normalized page brightness = brightness value of the page brightness / 255. The gain coefficient is determined using the first preset formula. When the page brightness is high, a gain coefficient of (0,1) may be set to facilitate lowering the initial backlight brightness. When the page brightness is low, a gain coefficient greater than 1 may be set to facilitate increasing the initial backlight brightness. In this way, the brightness automatically adjusted by the mobile phone can be more adapted to the current environment.

[0138] As another example, calculating the gain coefficient according to the page brightness of page 2 may specifically include: calculating the gain coefficient according to the page brightness of page 2 and a second preset formula. Exemplarily, the second preset formula may include: gain coefficient=[256+(128-Y)] / 256; wherein Y represents the page brightness of page 2 (i.e., the page after switching).

[0139] As another example, the calculation of the gain coefficient according to the page brightness of page 2 can also be implemented in the following manner: searching for the gain coefficient corresponding to the page brightness of page 2 in the mapping relationship between page brightness and gain coefficient. In this scheme, the mapping relationship between page brightness and gain coefficient can be pre-stored in the mobile phone. Optionally, the mapping relationship may include a plurality of corresponding relationships between page brightness and gain coefficient; such as: page brightness A corresponds to gain coefficient a, page brightness B corresponds to gain coefficient b, etc. Alternatively, the mapping relationship may also include a corresponding relationship between the range of page brightness and gain coefficient; such as: page brightness value range (AB), corresponding to gain coefficient c, page brightness value range (CD), corresponding to gain coefficient d, etc. Alternatively, the mapping relationship may include a plurality of corresponding relationships between normalized page brightness and gain coefficient; such as: normalized page brightness E corresponds to gain coefficient e, normalized page brightness F corresponds to gain coefficient f, etc. Alternatively, the mapping relationship may also include a corresponding relationship between the range of normalized page brightness and gain coefficient; such as: normalized page brightness value range (EF), corresponding to gain coefficient g, page brightness value range (GH), corresponding to gain coefficient h, etc.

[0140] Further, in some embodiments, in the mapping relationship between the page brightness and the gain coefficient, when the page brightness is less than the threshold value 6, the corresponding gain coefficient is greater than 1; when the page brightness is greater than the threshold value 6, the corresponding gain coefficient is a value between (0, 1). Exemplarily, the threshold value 6 can be set to an intermediate value of 0-255, such as 128. Alternatively, in the mapping relationship between the normalized page brightness and the gain coefficient, when the normalized page brightness is less than the threshold value 7, the corresponding gain coefficient is greater than 1; when the normalized page brightness is greater than the threshold value 7, the corresponding gain coefficient is a value between (0, 1). Exemplarily, the threshold value 7 can be set to 0.5. In this embodiment, the mapping relationship is used to search for the gain coefficient according to the page brightness or the normalized page brightness. Similarly, when the page brightness or the normalized page brightness is high, a gain coefficient of (0, 1) can be set to facilitate lowering the initial backlight brightness. When the page brightness or the normalized page brightness is low, a gain coefficient greater than 1 can be set to facilitate raising the initial backlight brightness. In this way, the brightness automatically adjusted by the mobile phone can be more adapted to the current environment. In addition, when the page brightness is equal to the above threshold 6 or the normalized page brightness is equal to the threshold 7, the gain coefficient can be set to 1, or no gain coefficient is set. Threshold 6 corresponds to the third threshold, and threshold 7 corresponds to the fourth threshold.

[0141] Usually, the page brightness of the same page does not change at different times. In an embodiment of the present application, when a page switch occurs, if a specific condition is met, the gain coefficient can be set in combination with the page information of the switched page. Therefore, in some embodiments, in the above method, after obtaining the page information of page 2, the mobile phone can also store the page information of page 2. In this way, the mobile phone detects again that the mobile phone switches from other pages to page 2, and meets the specific conditions, then the mobile phone can directly obtain the page information of page 2 from the stored page information. That is, in some embodiments, when the judgment result of the above S505 is yes (the automatic brightness adjustment function is turned on, and the initial backlight brightness is less than the threshold 5), before S506, the above method can also include: the mobile phone searches for whether there is page information of page 2 in the stored page information, and if so, directly obtains the page information of page 2 from it. If the stored page information does not include the page information of page 2, the mobile phone can take a screenshot of page 2 and analyze to obtain the page information of page 2. Exemplarily, the above page information can be stored in the activity map. The page information stored in the activity map can be maintained in any way. For example, if the storage time of the page information in the activity map exceeds a certain period of time, the page information will be deleted. For another example, if the remaining storage space in the activity map is insufficient, the part of the page information first stored in the activity map will be deleted. For another example, if the application to which the corresponding page of the page information stored in the activity map exits, the page information will be deleted.

[0142] It can be seen from the description of the above embodiment that in the embodiment of the present application, the mobile phone will optimize the initial backlight brightness when certain conditions are met. The gain coefficient generated according to the page information of page 2 is used to optimize the initial backlight brightness.

[0143] S508. Determine the target backlight brightness according to the gain coefficient and the initial backlight brightness.

[0144] The gain coefficient can be used as the weight of the initial backlight brightness. When determining the target backlight brightness, the initial backlight brightness is weighted by the gain coefficient to obtain the target backlight brightness. In an example, S508 specifically includes: calculating the product of the gain coefficient and the initial backlight brightness as the target backlight brightness.

[0145] In addition, the gain coefficient can be set for a duration of action, and the duration of action of the gain coefficient can be set according to actual conditions.

[0146] In some embodiments, the mobile phone can set the effective duration of the gain coefficient to a preset duration, so that when the page is switched and specific conditions are met, the mobile phone can optimize the initial backlight brightness according to the gain coefficient within the preset duration. Thus, the initial backlight brightness can be optimized using the gain coefficient within the preset duration after switching to page 2. After the preset duration, the gain coefficient is no longer effective, and the mobile phone can set the backlight brightness according to the initial backlight brightness. The user is usually able to adapt to this brightness, which can reduce the irritation to the user's eyes.

[0147] It should be noted that if the set gain coefficient has not been in effect for a preset period of time and the phone switches from page 2 to other pages (such as page 3), then under certain conditions, the phone will recalculate the new gain coefficient based on the page information of the new page (page 3) and optimize the initial backlight brightness determined at that time based on the new gain coefficient.

[0148] In other embodiments, the gain coefficient can be changed according to a preset rule. When the gain coefficient is not 1, the gain coefficient is effective; after the gain coefficient becomes 1, it is equivalent to the gain coefficient not being effective. Exemplarily, the above preset rule can be set as follows: if the gain coefficient is not 1, the mobile phone can set a preset step length, and after switching from page 1 to page 2, gradually increase or decrease the gain coefficient according to the preset step length until the gain coefficient becomes 1. In other words, the mobile phone can set the effect time of the gain coefficient to the time required for the gain coefficient to change from the initial value to 1 according to the preset step length. Specifically, when the gain coefficient determined by the mobile phone according to the page information of page 2 is less than 1, the mobile phone can gradually increase the gain coefficient according to the preset step length until the gain coefficient becomes 1. If the mobile phone determines that the gain coefficient is greater than 1 according to the page information of page 2, the mobile phone can gradually reduce the gain coefficient according to the preset step length until the gain coefficient becomes 1. Among them, each time the gain coefficient is increased or decreased according to the preset step length, the target backlight brightness is determined with the initial backlight brightness, and then the mobile phone can automatically set the backlight brightness once according to the target backlight brightness.

[0149] For example, after the mobile phone switches to page 2, the gain coefficient determined according to the page information of page 2 is 0.9, and the preset step size is set to 0.001. When the mobile phone stays on page 2, the mobile phone sets the backlight brightness based on the automatic brightness adjustment function as follows: For the first time, the first ambient light brightness reported by the sensor is received, the first initial backlight brightness is determined, the gain coefficient is 0.9, the target backlight brightness = 0.9 * the first initial backlight brightness, and the backlight brightness is set once according to the target backlight brightness determined at this time. For the second time, the second ambient light brightness reported by the sensor is received, the second initial backlight brightness is determined, the gain coefficient = 0.9 + 0.001 = 0.9001, the target backlight brightness = 0.9001 * the second initial backlight brightness, and the backlight brightness is set again according to the target backlight brightness determined at this time. For the third time, the target backlight brightness = (0.9001 + 0.001) * the third initial backlight brightness, and the backlight brightness is set once according to the target backlight brightness determined at this time. And so on, until the gain coefficient becomes 1, stop increasing the gain coefficient. After stopping increasing the gain coefficient, the mobile phone can directly set the backlight brightness to the initial backlight brightness. In other words, the gain coefficient is 1, the target backlight brightness = 1*initial backlight brightness, and then the mobile phone can set the backlight brightness once according to the target backlight brightness determined at this time.

[0150] It should be noted that the specific time when the mobile phone receives the ambient light brightness reported by the sensor for the second time, the third time, etc., can be defined by the automatic brightness adjustment function. For example, the automatic brightness adjustment function is set to report the ambient light brightness once every preset time interval, and the second time the second ambient light brightness is received can be after the first time the first ambient light brightness is received. The interval of the preset time.

[0151] Similarly, after the mobile phone switches to page 2, the gain coefficient determined according to the page information of page 2 is 1.1, and the preset step size is set to 0.001. As an example, when the mobile phone stays on page 2, the mobile phone sets the backlight brightness based on the automatic brightness adjustment function as follows: For the first time, the first ambient light brightness reported by the sensor is received, the first initial backlight brightness is determined, the gain coefficient is 1.1, the target backlight brightness = 1.1 * the first initial backlight brightness, and the backlight brightness is set once according to the target backlight brightness determined at this time. For the second time, the second ambient light brightness reported by the sensor is received, the second initial backlight brightness is determined, the gain coefficient = 1.1-0.001 = 1.099, the target backlight brightness = 1.099 * the second initial backlight brightness, and the backlight brightness is set once according to the target backlight brightness determined at this time. For the third time, the target backlight brightness = (1.099 + 0.001) * the third initial backlight brightness, and the backlight brightness is set once according to the target backlight brightness determined at this time. And so on, until the gain coefficient becomes 1, stop reducing the gain coefficient. After stopping reducing the gain coefficient, the mobile phone can directly set the backlight brightness to the initial backlight brightness. In other words, the gain coefficient is 1, the target backlight brightness = 1*initial backlight brightness, and then the mobile phone can set the backlight brightness according to the target backlight brightness determined at this time.

[0152] It should be noted that if the mobile phone switches from page 2 to other pages (such as page 3) during the process of increasing or decreasing the gain coefficient, then if certain conditions are met, the mobile phone will recalculate the new gain coefficient based on the page information of the new page (page 3) and optimize the initial backlight brightness determined at that time based on the new gain coefficient.

[0153] In the technical solution proposed in the embodiment of the present application, the gain coefficient gradually changes according to a preset step size until it becomes 1. When the mobile phone stays on page 2 and does not change, in the process of gradually changing the gain coefficient, the target backlight brightness determined by the mobile phone gradually changes toward the initial backlight brightness, until it finally becomes the initial backlight brightness, and the gain coefficient is no longer effective. Since the gain coefficient gradually changes, the change in the gain coefficient also gradually changes the adjustment of the initial backlight brightness. For the user, this process has small changes and is difficult to detect. Moreover, compared with a sudden change in brightness, a gradual change in brightness causes less stimulation to the user's eyes.

[0154] In order to optimize the initial backlight brightness using the gain coefficient within a period of time after switching to page 2, the mobile phone can store the gain coefficient after determining the gain coefficient according to the page information of page 2. Afterwards, if the effect duration of the gain coefficient is set according to a preset duration, a timer can be set. After the timing duration of the timer reaches the preset duration, the set gain coefficient is cleared, or the gain coefficient is adjusted to 1. If the gain coefficient is adjusted according to a preset step length, the mobile phone can determine the time required for the gain coefficient to change from the initial value to 1 according to the preset step length according to the initial value and the preset step length of the gain coefficient, and then set the timer according to the duration. After the timing duration of the timer reaches the preset duration, the set gain coefficient is cleared, or the gain coefficient is adjusted to 1. Alternatively, if the gain coefficient is adjusted according to a preset step length, each time the mobile phone receives the ambient light brightness reported by the sensor, the stored gain coefficient can be updated based on the preset step length, and the updated gain coefficient can be used to optimize the initial backlight brightness; until the gain coefficient becomes 1.

[0155] In addition, in the above two embodiments, when the mobile phone switches to page 2 and stays on page 2, the initial backlight brightness determined by the mobile phone based on the ambient light brightness will be optimized by the gain coefficient for a period of time. However, since the mobile phone will set the gain coefficient only when specific conditions are met, after setting the gain coefficient, the optimization of the initial backlight brightness using the gain coefficient also needs to be performed under the condition of meeting specific conditions. As time goes by, before the gain coefficient becomes 1, the state of the mobile phone may change (such as the change of ambient light brightness) and no longer meet the above specific conditions. Therefore, in some embodiments, before the above S508, the mobile phone can re-determine whether the current state meets the above specific conditions. If so, S508 is executed, that is, the target backlight brightness is determined using the gain coefficient, and then the backlight brightness is set according to the target backlight brightness. If the current state no longer meets the above specific conditions, the mobile phone can no longer use the gain coefficient to optimize the initial backlight brightness; for example, the mobile phone can directly update the gain coefficient to 1; or, if the current state no longer meets the above specific conditions, the mobile phone can directly set the backlight brightness according to the initial backlight brightness determined based on the ambient light brightness.

[0156] S509. Set the backlight brightness to the target backlight brightness.

[0157] When setting the backlight brightness, the target backlight brightness may be sent to the screen driver, and the screen driver adjusts the backlight brightness according to the brightness value of the target backlight brightness.

[0158] If the judgment result of the above S505 is no (the automatic brightness adjustment function is turned off, or the initial backlight brightness is greater than or equal to the threshold 5), the gain coefficient determination process may not be triggered, that is, there is no need to optimize the automatic brightness adjustment; such as executing the following S510.

[0159] S510. Set the backlight brightness to the initial backlight brightness.

[0160] It should be noted that the above S504, S505, S506-S509 and S510 are all executed when the mobile phone stays on page 2. After switching to page 2, the mobile phone may switch to other pages, such as page 3. After S503, if the mobile phone detects that page 2 is switched to other pages, the mobile phone can re-trigger a new round of processes such as obtaining the initial backlight brightness and determining whether specific conditions are met.

[0161] In an embodiment of the present application, when page switching occurs, if the automatic brightness adjustment function of the mobile phone is turned on and the initial backlight brightness or ambient light brightness is low, the mobile phone will optimize the initial backlight brightness determined based on the ambient light brightness, that is, trigger the setting of a gain coefficient. Finally, when adjusting the backlight brightness, the target backlight brightness that needs to be set will be determined in combination with the gain coefficient and the initial backlight brightness. In this way, when the backlight brightness is automatically adjusted, the adjusted backlight brightness can be more adapted to the current environment. At the same time, the problem of too much change in backlight brightness due to page switching, which in turn causes the display brightness of the screen to change too much and causes glare to the user, is reduced. The gain coefficient is determined based on the page information of the page after switching, and the display brightness of the screen determined by the backlight brightness adjusted by the gain coefficient and the page information is more suitable for the current environment, which can reduce the possibility of causing glare to the user.

[0162] exist Figure 7 In the illustrated embodiment, the specific condition is described by taking the case where the automatic brightness adjustment function is turned on and the initial backlight brightness is less than the threshold value 5. In other embodiments, the specific condition may also be set to other conditions.

[0163] In some embodiments, after the mobile phone turns on the automatic brightness adjustment function, an automatic adjustment flag is set. Only when the automatic adjustment flag is set, the initial backlight brightness is obtained when the page is switched and whether the specific condition is met is determined. If the adjustment flag is not set, the initial backlight brightness will not be obtained and whether the specific condition is met when the page is switched. In this embodiment, the specific condition may specifically include whether the initial backlight brightness is less than a threshold value of 5. When the initial backlight brightness is less than the threshold value of 5, it is determined that the specific condition is met.

[0164] Combined with the above description, it can be seen that the page brightness in dark mode is low. In scenes such as dark ambient light, such as at night, in a room without lights and opaque, or in an underground garage, in order to avoid the screen irritating the eyes when watching the mobile phone screen, users usually choose to use dark mode in their mobile phones. However, after the system display mode of some mobile phones is set to dark mode, the dark mode cannot cover all applications, that is, not all pages of applications installed on the mobile phone will automatically adjust to display dark mode following the system display mode. For example, when the system display mode of the mobile phone is dark mode, the page brightness of some third-party application pages is still displayed as the page brightness in light mode. Therefore, when the mobile phone turns on dark mode, it is easy for the user to switch from one application to another, and the page displayed as the page brightness in dark mode is switched to the page with page brightness in light mode. In this case, the page switching that occurs, after switching, the page displayed in light mode, is easy to cause eye irritation to the user. Based on this, the above-mentioned specific conditions may also include: a judgment on whether the system display mode of the mobile phone is dark mode. That is, the above-mentioned specific conditions may include: whether the automatic brightness adjustment function is turned on, whether the display mode is dark mode, and whether the initial backlight brightness is less than the threshold value 5. Exemplarily, in response to a page switch, the mobile phone determines whether the automatic brightness adjustment function is turned on, whether the current system display mode is in dark mode, and whether the initial backlight brightness is less than a threshold value of 5. If the automatic brightness adjustment function is turned on, the system display mode is in dark mode, and the initial backlight brightness is less than the threshold value 5, the process of setting the gain coefficient is triggered, and the gain coefficient is used to optimize the initial backlight brightness. However, if the automatic brightness adjustment function is not currently turned on when the page switches, or the system display mode is in light mode, or the initial backlight brightness is greater than or equal to the threshold value 5, the process of setting the gain coefficient is not triggered, that is, the initial backlight brightness is not optimized. Fig. 9 , which shows the implementation process in this embodiment. In this example, S501-S504 and S506-S510 are all Figure 7 The process is the same, but S505 is replaced by S505a:

[0165] S505a. Determine whether the automatic brightness adjustment function is turned on, whether the system display mode is dark mode, and whether the initial backlight brightness is less than a threshold value of 5.

[0166] In the technical solution proposed in the embodiment of the present application, when a page switch occurs, the mobile phone needs to trigger the setting of the gain coefficient to optimize the initial backlight brightness only when the automatic brightness adjustment function is turned on, the system display mode is dark mode, and the initial backlight brightness is less than the threshold value 5. Since the dark mode is usually turned on in a low-brightness environment, by judging whether the system display mode is dark mode, in the page switching scenario, it is possible to better identify situations that may cause irritation to the user's eyes. Thereby, the process of setting the gain coefficient to optimize the initial backlight brightness can be better started. In addition, when the mobile phone system display mode is dark mode, if the pages of some applications do not follow the system to adjust the display interface to dark mode, then when the dark mode page is switched to the application page, the irritation to the user's eyes can be reduced.

[0167] In the embodiment of the present application, it is determined whether a specific condition is met, and it can be triggered when a page switch occurs. That is, only when a page switch occurs, it is determined whether the initial backlight brightness needs to be optimized. It can be seen from the above description that if the ambient light brightness remains unchanged, the initial backlight brightness determined based on the ambient light remains unchanged. When a page switch occurs when the initial backlight brightness remains unchanged, if the page brightness difference between the two pages before and after the switch is large, it is also easy to cause irritation to the user's eyes. Optionally, as an example, the above specific conditions may include: whether the automatic brightness adjustment function is turned on, whether the initial backlight brightness is less than the threshold 5, and whether the page brightness difference between the two pages before and after the switch is greater than the threshold 8. When the automatic brightness adjustment function is turned on, the initial backlight brightness is less than the threshold 5, and the page brightness difference between the two pages before and after the switch is greater than the threshold 8, it is determined that the specific condition is met. Exemplarily, after the mobile phone detects a page switch, if the automatic brightness adjustment function is turned on, the initial backlight brightness is less than the threshold 5, and the page brightness difference between the two pages before and after the switch is greater than the threshold 8, the process of setting the gain coefficient is triggered, and the initial backlight brightness is optimized using the gain coefficient. If the initial backlight brightness is greater than or equal to threshold 5, or the page brightness difference between the two pages before and after switching is less than or equal to threshold 8, the process of setting the gain coefficient is not triggered, that is, the initial backlight brightness is not optimized. Among them, threshold 8 corresponds to the fifth threshold.

[0168] In the technical solution proposed in the embodiment of the present application, when a page switch occurs, the mobile phone needs to trigger the setting of the gain coefficient to optimize the initial backlight brightness only when the initial backlight brightness is less than the threshold value 5 and the brightness difference between the pages before and after the switch is large. In this way, the mobile phone can reduce the problem of irritation to the user's eyes caused by the large difference in display brightness before and after the page switch in a low-brightness environment.

[0169] As another example, the above-mentioned specific conditions may also include: whether the automatic brightness adjustment function is turned on, whether the system display mode is dark mode, whether the initial backlight brightness is less than the threshold value 5, and whether the page brightness difference between the two pages before and after the switch is greater than the threshold value 8. Exemplarily, after the mobile phone detects a page switch, if the automatic brightness adjustment function is turned on, the current system display mode is dark mode, the initial backlight brightness is less than the threshold value 5, and the page brightness difference between the two pages before and after the switch is greater than the threshold value 8, then the process of setting the gain coefficient is triggered, and the initial backlight brightness is optimized using the gain coefficient. If, when a page switch occurs, the current system display mode is light mode, or the initial backlight brightness is greater than or equal to the threshold value 5, or the page brightness difference between the two pages before and after the switch is less than or equal to the threshold value 8, then the process of setting the gain coefficient will not be triggered, that is, the initial backlight brightness will not be optimized.

[0170] In the technical solution proposed in the embodiment of the present application, when a page switch occurs, the mobile phone can trigger the setting of a gain coefficient to optimize the initial backlight brightness under the conditions that the system display mode is dark mode, the initial backlight brightness is less than a threshold value of 5, and the brightness difference of the pages before and after the switch is large. In this way, the mobile phone can better identify scenes that may cause eye irritation to the user in a low-brightness environment in combination with the system display mode, and can reduce the problem of eye irritation caused by page switching in combination with the page brightness before and after the switch.

[0171] In addition, the specific conditions in the above embodiments all include that the initial backlight brightness is less than the threshold value 5, that is, the above process of setting the gain coefficient to optimize the initial backlight brightness will only be executed when the ambient light brightness is low. Optionally, as another example, the above specific conditions may also include: whether the automatic brightness adjustment function is turned on, and whether the page brightness difference between the two pages before and after the switch is greater than the threshold value 8. Exemplarily, after the mobile phone detects a page switch, if the automatic brightness adjustment function is turned on and the page brightness difference between the two pages before and after the switch is greater than the threshold value 8, the process of setting the gain coefficient is triggered, and the gain coefficient is used to optimize the initial backlight brightness. If the page brightness difference between the two pages before and after the switch is less than or equal to the threshold value 8, the process of setting the gain coefficient is not triggered, that is, the initial backlight brightness is not optimized.

[0172] In the technical solution proposed in the embodiment of the present application, when a page switch occurs, the mobile phone can trigger the setting of a gain coefficient to optimize the initial backlight brightness when the difference in page brightness before and after the switch is greater than a threshold of 8. In this way, as long as a page switch occurs on the mobile phone, and the difference in page brightness before and after the page switch is large, the mobile phone will trigger the setting of a gain coefficient to optimize the initial backlight brightness.

[0173] In the above embodiments, the implementation process of the display method proposed in the embodiments of the present application is described by taking the mobile phone as the execution subject. Next, the above display method is described in several different specific scenarios.

[0174] Scenario 1: Displaying the first page. When the first page is displayed, the ambient light brightness is the first brightness, the automatic brightness adjustment function is turned on, and the screen brightness is the second brightness. When the ambient light brightness remains unchanged and the automatic brightness adjustment function remains turned on, in response to a user operation, the first page is switched to displaying the second page. After the user operation, the screen brightness changes to the third brightness.

[0175] The second brightness is not equal to the third brightness. That is, when the ambient light brightness remains unchanged, the screen brightness will change when the mobile phone switches from the first page to the second page.

[0176] As some examples, the first brightness in the above scenario 1 meets certain conditions. Exemplarily, the first brightness is less than a certain value, such as threshold 9; that is, the ambient light brightness is low. Alternatively, the initial backlight brightness determined by the mobile phone based on the first brightness is less than threshold 5; that is, the initial backlight brightness determined by the mobile phone based on the ambient light brightness is low. That is, when the ambient light brightness remains unchanged, the mobile phone will adjust the backlight brightness in response to the page switching, and the display brightness of the screen will change only when the ambient light brightness is low. Threshold 9 corresponds to the second threshold.

[0177] Optionally, in scenario 1, the first page and the second page display the same content. For example, the first page displays a solid color image (such as a white or black image or other color image), and the second page displays a solid color image of the same color and brightness. In other words, the contents displayed on the two pages before and after the page switch are completely consistent. It can be understood that the page brightness of two pages with the same display content is usually the same. That is, in this solution, when the ambient light brightness is the first brightness and remains unchanged, the first page is switched to the second page, even if the display content of the pages before and after the switch is the same, the mobile phone can optimize the initial backlight brightness.

[0178] It should be noted that in the above scenario, screen brightness may refer to backlight brightness or screen display brightness.

[0179] In the above scenario 1, the automatic brightness adjustment function specifically means that the mobile phone automatically adjusts the backlight brightness according to the ambient light brightness. In some examples, after the mobile phone switches the displayed page in response to the user operation, the mobile phone can optimize the initial backlight brightness. In combination with the description of the above embodiment, it can be seen that the mobile phone can set the gain coefficient in combination with the page brightness of the switched page (ie, the second page) when certain conditions are met. When adjusting the backlight brightness later, the backlight brightness that needs to be adjusted can be determined based on the gain coefficient and the initial backlight brightness. When the backlight brightness changes, the display brightness of the corresponding screen will also change. The specific setting method of adjusting the gain coefficient, and the implementation method of the mobile phone optimizing the initial backlight brightness according to the gain coefficient, can all refer to the description of the previous embodiment.

[0180] Scenario 2: The first page is displayed, the ambient light brightness is the fourth brightness, the automatic brightness adjustment function is turned on, and the screen brightness is the fifth brightness. When the ambient light brightness remains unchanged and the automatic brightness adjustment function remains turned on, in response to a user operation, the second page is displayed, and after the user operation, the screen brightness is the fifth brightness. The fourth brightness is greater than the first brightness in Scenario 1.

[0181] The difference between Scenario 2 and Scenario 1 is that the ambient light brightness in Scenario 2 is higher than that in Scenario 1. In Scenario 1, when the mobile phone switches pages, the screen brightness may still change even if the ambient light brightness before and after the page switch remains unchanged. In Scenario 2, when the mobile phone switches pages, the ambient light brightness before and after the page switch remains unchanged, and the screen brightness does not change. In other words, when the ambient light brightness remains unchanged, the mobile phone will adjust the backlight brightness in response to the page switch only when the ambient light brightness is low, and the display brightness of the corresponding screen will also change. When the ambient light brightness is high, the ambient light brightness remains unchanged, and the mobile phone will not adjust the backlight brightness after the page switch occurs, and the display brightness of the corresponding screen will not change.

[0182] Optionally, as an example, the fourth brightness in the above scenario 2 is greater than or equal to a certain value, such as threshold 9. Or the initial backlight brightness determined by the mobile phone according to the fourth brightness is greater than or equal to threshold 5.

[0183] Scenario 3: The system display mode of the mobile phone is dark mode, the first page is displayed, the ambient light brightness is the first brightness, the automatic brightness adjustment function is turned on, and the screen brightness is the sixth brightness. When the ambient light brightness remains unchanged and the automatic brightness adjustment function remains turned on, in response to a user operation, the second page is displayed. After the user operation, the screen brightness changes to the seventh brightness.

[0184] Among them, the sixth brightness is not equal to the seventh brightness. That is to say, in scene 3, when the mobile phone is in dark mode and the page is switched while the ambient light brightness remains unchanged, the mobile phone can adjust the backlight brightness, and accordingly, the display brightness of the screen will change.

[0185] Scenario 4: The system display mode of the mobile phone is in light mode, the first page is displayed, the ambient light brightness is the first brightness, the automatic brightness adjustment function is turned on, and the screen brightness is the sixth brightness. When the ambient light brightness remains unchanged and the automatic brightness adjustment function remains turned on, in response to a user operation, the second page is displayed. After the user operation, the screen brightness changes to the eighth brightness.

[0186] In the above scenario 3 and scenario 4, the seventh brightness is not equal to the eighth brightness. The eighth brightness can be equal to the sixth brightness. That is, when the system display mode is light color mode, the mobile phone switches pages without changing the ambient light brightness, and the backlight brightness will not be adjusted; accordingly, the display brightness of the screen will not change.

[0187] The difference between Scenario 4 and Scenario 3 is that the system display mode in Scenario 4 is light mode, while the system display mode in Scenario 3 is dark mode. In Scenario 3, when the phone switches pages, the screen brightness may still change even if the ambient light brightness before and after the page switch remains unchanged. In Scenario 4, the ambient light brightness of the phone remains unchanged before and after the page switch, and the screen brightness remains unchanged. Therefore, by comparing Scenario 3 and Scenario 4, it can be seen that in this example, the ambient light brightness remains unchanged, and the phone will only adjust the backlight brightness in response to the page switch in dark mode, and accordingly, the display brightness of the screen will also change. In light mode, the ambient light brightness remains unchanged, and the phone will not adjust the backlight brightness after the page switch occurs, and accordingly, the display brightness of the screen will not change.

[0188] Similar to scenario 1 and scenario 2, in scenario 3 and scenario 4, the display contents of the first page and the second page may be the same or different.

[0189] Scenario 5: The automatic brightness adjustment function is turned on, the first page is displayed, the ambient light brightness is the first brightness, and the screen brightness is the second brightness. When the ambient light brightness remains unchanged and the automatic brightness adjustment function remains turned on, in response to a user operation, the second page is displayed. After the user operation, the screen brightness changes to the third brightness.

[0190] Scenario 6: The automatic brightness adjustment function is turned off, the first page is displayed, the ambient light brightness is the first brightness, and the screen brightness is the second brightness. When the ambient light brightness remains unchanged and the automatic brightness adjustment function remains turned off, in response to a user operation, the second page is displayed, and after the user operation, the screen brightness is the fourth brightness. The fourth brightness of scenario 6 is not equal to the third brightness in scenario 5.

[0191] In scene 6, the automatic brightness adjustment function is turned off, and the mobile phone will not automatically adjust the screen brightness, so the second brightness is equal to the fourth brightness in scene 6. In other words, in scene 6, the mobile phone will not set the gain coefficient in response to page switching, nor will it automatically adjust the backlight brightness, and accordingly, the display brightness of the screen will not change.

[0192] By comparing scene 5 and scene 6, it can be seen that in the embodiment of the present application, the mobile phone will automatically adjust the backlight brightness only when the automatic brightness adjustment function is turned on, and the display brightness of the screen will change accordingly. When the automatic brightness adjustment function is turned off, even if the state of the mobile phone meets the specific conditions in the embodiment of the present application, the mobile phone will not adjust the backlight brightness. Therefore, when the automatic brightness adjustment function is turned off, the mobile phone does not need to set the gain coefficient.

[0193] Next, the internal interaction process of the display method proposed in the embodiment of the present application is described in conjunction with the accompanying drawings. Fig.10 , in this example, combined with Figure 6 As shown, the mobile phone includes a module for executing motion effects, an advanced graphics processing platform, a display engine, a display management service, a sensor management module, a screen driver and a sensor driver. From the description of the above embodiments, it can be known that the module for executing motion effects can be a system server or a launcher.

[0194] S1. The sensor driver reports the ambient light brightness to the sensor management module.

[0195] S2. The sensor management module reports the ambient light brightness to the display management service.

[0196] S3. The display management service determines the initial backlight brightness according to the ambient light brightness.

[0197] Exemplarily, the initial backlight brightness determined by the display management service according to the ambient light brightness may be specifically represented by mScreenAutoBrightness.

[0198] It should be noted that after the automatic brightness adjustment function of the mobile phone is turned on, S1-S3 can be executed periodically, and the order of S1-S3 and S4 and subsequent steps is not limited.

[0199] S4. The mobile phone switches from page 1 to page 2.

[0200] S5. The module for executing the animation effect executes the page switching animation effect in response to the page switching.

[0201] Exemplarily, the page switching animation effect may specifically be SCENE_LAUNCHER_ANIMATION or SCENE_ANIMATION.

[0202] S6. The module executing the animation sends a notification message to the advanced graphics processing platform.

[0203] The notification message is used to indicate that a page switch has occurred (or that a page switch animation has occurred). Exemplarily, the notification message can be represented by notifyAGPAnimation.

[0204] S7. The advanced graphics processing platform obtains the initial backlight brightness from the display management service.

[0205] Optionally, as an example, in S7, the advanced graphics processing platform may specifically obtain the initial backlight brightness by calling an interface provided by the display management service, such as calling the interface provided by the display management service may be expressed as getRawScreenAutoBrightness().

[0206] As another example, in S7, the advanced graphics processing platform may also first send an acquisition instruction to the display management service, and the display management service returns the initial backlight brightness to the advanced graphics processing platform in response to the acquisition instruction.

[0207] S8. The advanced graphics processing platform obtains the on / off status of the automatic brightness adjustment function.

[0208] S9. The advanced graphics processing platform determines whether the automatic brightness adjustment function is turned on and whether the initial backlight brightness is less than a threshold value 5.

[0209] If the automatic brightness adjustment function is turned off or the initial backlight brightness is greater than or equal to the threshold value 5 in the judgment result of S9, it means that the specific condition is not met and the initial backlight brightness does not need to be optimized temporarily. In some embodiments, in the judgment result of S9, if the automatic brightness adjustment function is turned off or the initial backlight brightness is greater than or equal to the threshold value 5, the advanced graphics processing platform can send feedback information to the display management service, and the feedback information is used to indicate that the gain coefficient is not set. In this way, the display management service can directly adjust the backlight brightness to the initial backlight brightness through the screen driver.

[0210] In other embodiments, when the automatic brightness adjustment function is turned off in the judgment result of S9, or the initial backlight brightness is greater than or equal to the threshold value 5, the advanced graphics processing platform can generate a gain coefficient with a value of 1 and send the gain coefficient to the display management service. In this way, the display management service can determine the target backlight brightness, that is, the initial backlight brightness, based on the gain coefficient (that is, 1) and the initial backlight brightness, and then adjust the backlight brightness to the target backlight brightness, that is, the initial backlight brightness, through the screen driver. It should be noted that in Fig.10 In the example shown, in the judgment result of S9, the situation where the automatic brightness adjustment function is turned off or the initial backlight brightness is greater than or equal to the threshold 5 is not shown.

[0211] If, in the judgment result of S9, the automatic brightness adjustment function is turned on, and the initial backlight brightness is less than the threshold value 5, it means that the initial backlight brightness needs to be optimized, such as executing S10-S20.

[0212] S10. The advanced graphics processing platform determines whether the page information of page 2 is stored in the page brightness data storage structure.

[0213] If the judgment result of S10 is yes, the page information of page 2 can be directly obtained from the page brightness data storage structure for use, that is, S15 can be directly executed. If the judgment result of S10 is no, it is necessary to first analyze page 2 to obtain page information, such as S11-S14.

[0214] S11. The advanced graphics processing platform sends a screenshot instruction to the display engine.

[0215] For example, the screenshot instruction may be specifically represented by CaptureDisplay. After receiving the screenshot instruction, the display engine may take a screenshot of the currently displayed page in response to the screenshot instruction, such as S12.

[0216] S12. The display engine takes a screenshot of page 2.

[0217] S13. The display engine sends the image of page 2 to the advanced graphics processing platform.

[0218] S14. The advanced graphics processing platform analyzes the image of page 2, obtains page information of page 2, and updates the page brightness data storage structure.

[0219] The page brightness data storage structure may be stored in a cache of an advanced graphics processing platform.

[0220] S15. The advanced graphics processing platform determines a gain coefficient based on the page information of page 2.

[0221] The gain coefficient is used to optimize the initial backlight brightness. Therefore, after generating the gain coefficient, the advanced graphics processing platform can send the gain coefficient to the display management service, and the display management service adjusts the initial backlight brightness according to the gain coefficient and then sets the backlight brightness.

[0222] The specific implementation of the above S15 can refer to the description of the previous embodiment.

[0223] S16. The advanced graphics processing platform sends the gain factor to the display management service.

[0224] S17. Display management service setting gain coefficient.

[0225] As an example, the display management service sets the gain coefficient, and specifically the display management service stores the gain coefficient in a cache.

[0226] S18. The display management service determines the target backlight brightness according to the gain coefficient and the initial backlight brightness.

[0227] As an example, after receiving the gain coefficient, when the display management service optimizes the initial backlight brightness based on the gain coefficient for the first time, the product of the gain coefficient and the initial backlight brightness can be directly determined as the target backlight brightness. After the first optimization, when the display management service determines the target backlight brightness, it can first compare the gain coefficient with 1, and update the gain coefficient based on the comparison result, and then determine the target backlight brightness based on the updated gain coefficient and the initial backlight brightness.

[0228] The updating of the gain coefficient may specifically include: if the gain coefficient is greater than 1, gradually reducing the gain coefficient based on a preset step length until it reaches 1. If the gain coefficient is less than 1, gradually increasing the gain coefficient based on a preset step length until it reaches 1. Exemplarily, updating the gain coefficient may be implemented by calling an update function, which may specifically be updateAutoBrightness().

[0229] S19. The display management service sends the target backlight brightness to the screen driver.

[0230] S20. The screen driver sets the backlight brightness to the target backlight brightness.

[0231] In an embodiment of the present application, for an advanced graphics processing platform, when a page switch occurs, it is necessary to determine whether a specific condition is met, and when the specific condition is met, a gain coefficient is generated and sent to a display management service.

[0232] It should be noted that in the related art, if the ambient light brightness changes, the display management service can adjust the backlight brightness to the initial backlight brightness through the screen driver after determining the initial backlight brightness according to the ambient light brightness. In an embodiment of the present application, in order to reduce the problem of the brightness of the mobile phone irritating the user's eyes when a page switch occurs, the initial backlight brightness is optimized when a page switch occurs and certain conditions are met. It can be seen from the description of the above embodiment that if the initial backlight brightness needs to be optimized, a gain coefficient will be generated and set. For the display management service, after obtaining the ambient light brightness and determining the initial backlight brightness, it is queried whether a gain coefficient is currently set. If a gain coefficient is currently set, the initial backlight brightness is optimized according to the gain coefficient to obtain the target backlight brightness, and then the backlight brightness is adjusted based on the target backlight brightness.

[0233] In other embodiments, before the above S18, a judgment step (such as S18a) is further included: the display management service judges whether the automatic brightness adjustment function is turned on and whether the initial backlight brightness is less than the threshold value 5. And, when the automatic brightness adjustment function is turned on and the initial backlight brightness is less than the threshold value 5 in the judgment result of S18a, S18 is executed. If the automatic brightness adjustment function is turned off in the judgment result of S18a, or the initial backlight brightness is greater than or equal to the threshold value 5, the mobile phone can directly update the gain coefficient to 1, and then perform the operations of determining the target backlight brightness and setting the backlight brightness through the screen driver.

[0234] Fig.10 In the example shown, the specific conditions for determining whether to trigger setting the gain coefficient include whether the automatic brightness adjustment switch is turned on and whether the initial backlight brightness is less than a threshold value of 5. It can be seen from the above description of the embodiment with the electronic device as the execution subject that in other implementations, the specific conditions may include: whether the automatic brightness adjustment switch is turned on, whether the initial backlight brightness is less than a threshold value of 5, and whether the system display mode is a dark mode. In this example, after S6 and before S9, the method further includes: the advanced graphics processing platform obtains the current system display mode of the mobile phone. In addition, the judgment condition in S9 is replaced by whether the automatic brightness adjustment switch is turned on, whether the initial backlight brightness is less than a threshold value of 5, and whether the system display mode is a dark mode.

[0235] Among them, obtaining the system display mode and determining whether it is a dark mode can be performed together, that is, the advanced graphics processing platform obtains whether the identifier corresponding to the dark mode is a preset value, and the preset value indicates that the dark mode is turned on, that is, the system display mode is a dark mode. Exemplarily, obtaining the identifier corresponding to the dark mode can be implemented by calling the application compatibility interface APPCompatibilityDelegate.getDefaultNightMode() to obtain the default dark mode.

[0236] In addition, the specific conditions may include: whether the automatic brightness adjustment switch is turned on, whether the initial backlight brightness is less than the threshold value 5, and whether the page brightness difference between the pages before and after the switch is greater than the threshold value 8. In this example, after S6 and before S9, the method further includes: the advanced graphics processing platform obtains the page brightness of page 1 and the page brightness of page 2, and calculates the page brightness difference between page 2 and page 1. In addition, the judgment condition in S9 is replaced by whether the automatic brightness adjustment switch is turned on, whether the initial backlight brightness is less than the threshold value 5, and whether the page brightness difference between the pages before and after the switch is greater than the threshold value 8.

[0237] Alternatively, the specific conditions may include: whether the automatic brightness adjustment switch is turned on, whether the initial backlight brightness is less than a threshold value 5, whether the system display mode is a dark mode, and whether the page brightness difference between the pages before and after the switch is greater than a threshold value 8.

[0238] It should be noted that Fig.10 The execution subject processing modules of each step of the mobile phone in the example shown are only examples. In other embodiments, each step can also be executed by other processing modules. For example, the advanced graphics processing platform can be replaced by a graphics processing module, an image processing module, etc. The display engine and the display management service can be replaced by a display service module, and the sensor management module can be replaced by a sensor service module, etc.

[0239] Some other embodiments of the present application provide an electronic device (such as a mobile phone). The electronic device may include: an ambient light sensor, a display screen, a memory, and one or more processors. The ambient light sensor, the display screen, and the memory are coupled to the processor respectively. The ambient light sensor is used to obtain the ambient light brightness; the display screen is used to display pages; the memory is also used to store computer program codes; the computer program codes include computer instructions. When the processor executes the computer instructions, the electronic device can execute the various functions or steps executed by the mobile phone in the above method embodiment. The structure of the electronic device can refer to Figure 5 The structure of the electronic device 400 is shown.

[0240] The present application also provides a chip system, such as Fig.11As shown, the chip system 1000 includes at least one processor 1001 and at least one interface circuit 1002. The processor 1001 and the interface circuit 1002 can be interconnected through lines. For example, the interface circuit 1002 can be used to receive signals from other devices (such as a computer memory). For another example, the interface circuit 1002 can be used to send signals to other devices (such as the processor 1001). Exemplarily, the interface circuit 1002 can read instructions stored in the memory and send the instructions to the processor 1001. When the instruction is executed by the processor 1001, the computer can execute the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, which are not specifically limited in the embodiments of the present application.

[0241] An embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device (such as a mobile phone), the electronic device executes each function or step executed by the mobile phone in the above-mentioned method embodiment.

[0242] The present application also provides a computer program product, which, when executed on a computer, enables the computer to execute the functions or steps executed by the mobile phone in the above method embodiment. The computer may be an electronic device, such as a mobile phone.

[0243] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0244] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0245] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0246] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0247] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0248] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A display method, characterized in that: Applied to electronic equipment, the method comprises: Displaying a first page; when displaying the first page, the automatic brightness adjustment function of the electronic device is turned on, the ambient light brightness is the first brightness, and the screen brightness of the electronic device is the second brightness; In response to a first operation, a second page is displayed, wherein the first page and the second page are different; when the second page is displayed, the ambient light brightness is still the first brightness; When the first page and the second page are displayed, the current system display mode of the electronic device is a dark mode, and the automatic brightness adjustment function is turned on, the screen brightness is set to a third brightness; the second brightness is different from the third brightness; When the first page and the second page are displayed and the current system display mode of the electronic device is the light mode, the screen brightness is not adjusted and the screen brightness is the second brightness.

2. The method according to claim 1, characterized in that The method further comprises: displaying a third page; when displaying the third page, the automatic brightness adjustment function of the electronic device is turned on, the ambient light brightness is a fourth brightness, and the screen brightness is a fifth brightness; the fourth brightness is greater than the first brightness; In response to the second operation, the third page is switched to display the fourth page; when displaying the fourth page, the automatic brightness adjustment function of the electronic device is turned on, the ambient light brightness is still the fourth brightness, and the screen brightness is still the fifth brightness.

3. The method according to claim 2, characterized in that The first brightness satisfies a first preset condition; the first preset condition includes: the initial backlight brightness of the electronic device corresponding to the first brightness is less than a first threshold; or the first brightness is less than a second threshold; the initial backlight brightness is determined by the electronic device according to the first brightness based on the automatic brightness adjustment function; The fourth brightness does not satisfy the first preset condition.

4. The method according to claim 1 or 2, characterized in that: The step of switching from the first page to displaying the second page in response to the first operation includes: In response to the first operation, when the page brightness of the second page meets a second preset condition, the second page is displayed with the screen brightness as the third brightness; the second preset condition includes: the page brightness is not equal to the third threshold, or the normalized page brightness obtained after normalizing the page brightness is not equal to the fourth threshold.

5. The method according to claim 1, characterized in that The method further comprises: In response to switching from the first page to displaying the second page, obtaining an initial backlight brightness determined by the electronic device according to the first brightness based on an automatic brightness adjustment function; If the state of the electronic device meets a preset condition, the page brightness of the second page is obtained; the preset condition includes: the automatic brightness adjustment function of the electronic device is turned on, and the first brightness meets a first preset condition; the first preset condition includes that the initial backlight brightness is less than a first threshold, or the first brightness is less than a second threshold; The backlight brightness of the electronic device is set based on the initial backlight brightness and the page brightness of the second page, and the backlight brightness after setting is the same as or different from the initial backlight brightness.

6. The method according to claim 5, characterized in that The step of setting the backlight brightness of the electronic device based on the initial backlight brightness and the page brightness of the second page includes: generating a gain coefficient based on the page brightness of the second page; Determining a target backlight brightness according to the gain coefficient and the initial backlight brightness; The backlight brightness of the electronic device is set to the target backlight brightness.

7. The method according to claim 6, characterized in that: When the page brightness of the second page is less than a third threshold, or when the normalized page brightness obtained after normalizing the page brightness is less than a fourth threshold, the gain coefficient is greater than 1; The smaller the page brightness of the second page or the normalized page brightness is, the larger the gain coefficient is; When the page brightness of the second page is greater than the third threshold, or when the normalized page brightness obtained by normalizing the page brightness is greater than the fourth threshold, the gain coefficient is greater than 0 and less than 1; And the greater the page brightness of the second page or the normalized page brightness is, the smaller the gain coefficient is; When the page brightness of the second page is equal to the third threshold, or when the normalized page brightness obtained by normalizing the page brightness is equal to the fourth threshold, the gain coefficient is equal to 1.

8. The method according to claim 6, characterized in that After setting the backlight brightness of the electronic device to the target backlight brightness, the method further includes: If the gain coefficient is not 1, then while the electronic device continues to display the second page, the gain coefficient is updated successively according to a preset step size, and a new target backlight brightness is determined based on the updated gain coefficient, and the backlight brightness of the electronic device is set to the new target backlight brightness until the gain coefficient becomes 1.

9. The method according to any one of claims 5 to 8, characterized in that: The method further comprises: If the state of the electronic device does not satisfy the preset condition, the gain coefficient is set to 1; a target backlight brightness is determined according to the gain coefficient and the initial backlight brightness; the backlight brightness of the electronic device is set to the target backlight brightness; or, When the state of the electronic device does not satisfy the preset condition; setting the backlight brightness of the electronic device to the initial backlight brightness.

10. The method according to any one of claims 5 to 8, characterized in that: The preset condition also includes: the system display mode of the electronic device is a dark mode; and / or the difference between the page brightness of the first page and the page brightness of the second page is greater than a fifth threshold.

11. An electronic device, characterized in that: The electronic device comprises: a display screen, an ambient light sensor, a processor, a memory, and a computer program stored in the memory; the display screen, the ambient light sensor, and the memory are respectively coupled to the processor; When the electronic device is running, the processor executes the computer program to implement the method according to any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor of an electronic device, the method according to any one of claims 1 to 10 is implemented.

13. A computer program product, characterized in that The method comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Interface brightness adjusting method, interface brightness adjusting device, and equipment

    CN106710570A

  • Interface display method, electronic equipment and storage medium

    CN115941836A