Screen brightness adjustment method and related device
By acquiring users' brightness preferences and the average grayscale of the displayed image, and adjusting the screen brightness in conjunction with ambient light intensity, the problem of mobile devices being unable to accurately adjust brightness has been solved, enabling personalized brightness adjustment and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2026-03-24
AI Technical Summary
Mobile devices are unable to accurately adjust screen brightness due to the inaccuracy of their ambient light sensors, which fails to meet users' personalized screen brightness needs and affects user experience and visual comfort.
By acquiring the user's brightness preferences and the average grayscale of the displayed image, the screen brightness ratio is calculated, and the screen brightness is dynamically adjusted in conjunction with the ambient light intensity, providing a personalized brightness adjustment method.
It improves screen brightness and display effect, meets users' personalized needs under different ambient light intensities, and enhances user experience and comfort.
Smart Images

Figure CN120472859B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of terminal devices, and relates to communication technology, in particular to a screen brightness adjustment method and related equipment. BACKGROUND
[0002] With the development of the Internet and smart terminals, the interface functions of application programs have become increasingly rich. These interfaces include a variety of elements and components, such as text boxes, images, video players, etc. At the same time, in order to receive user input, there are also various control components, such as buttons and input boxes. The diversity of these components and elements makes the interface of the application program more flexible and colorful.
[0003] In the related art, a mobile device usually adjusts the brightness of the screen due to changes in the intensity of the ambient light. However, due to the precision problem of the ambient light sensor device of the mobile device, the ambient light report value of the ambient light sensor device cannot truly restore the environment in which the user is located, and different users have different preferences for screen brightness, which causes the screen brightness adjusted by the mobile device to be unable to meet the individualized screen brightness needs of the user, thereby affecting the user experience to some extent and possibly causing visual fatigue and reducing the comfort of use. SUMMARY
[0004] In view of the above, it is necessary to provide a screen brightness adjustment method and related equipment, which can individualize the adjustment of screen brightness according to the brightness preference of the user and the average gray scale of the display picture, improve the screen brightness display effect of the electronic device, and thereby improve the user experience.
[0005] In a first aspect, the present application provides a screen brightness adjustment method applied to an electronic device, which can include: in response to a first operation of a user, running an application and displaying an application interface of the application; obtaining a first screen brightness when the electronic device displays the application interface, and an initial brightness value and a first brightness multiplier of the application, the initial brightness value representing the screen brightness value adjusted by the user after entering the application, and the first brightness multiplier being determined according to the average gray scale of the display picture of the application; obtaining the intensity of the ambient light of the electronic device and the actual brightness of the ambient light corresponding to the intensity of the ambient light; calculating a second brightness multiplier according to the initial brightness value, the intensity of the ambient light, the actual brightness of the ambient light, and the first screen brightness, the second brightness multiplier being used to represent the degree of brightness preference of the user under different intensities of the ambient light; calculating a target screen brightness preference value according to the initial brightness value, the first brightness multiplier, and the second brightness multiplier, and adjusting the screen brightness of the electronic device displaying the application interface according to the target brightness value.
[0006] By adopting the technical solutions, the electronic device can determine the favorite brightness of the user under the application, that is, the initial brightness value, when displaying the application interface, and can also determine the first brightness multiplier of the application. By acquiring the ambient light intensity of the electronic device in real time, whether the ambient light intensity where the electronic device is located changes can be perceived, and when the ambient light intensity changes, the second brightness multiplier under the current ambient light intensity is calculated based on the initial brightness value. Since the first brightness multiplier is determined according to the average gray scale of the display screen of the application, and the second brightness multiplier is used to represent the brightness preference degree of the user under different ambient light intensities, the target brightness value calculated by the initial brightness value, the first brightness multiplier and the second brightness multiplier can accurately represent the required brightness of the user under the ambient light intensity, thereby providing a more comfortable application scene experience for the user.
[0007] In a possible implementation, the initial brightness value is acquired in the following manner: in response to a second operation of the user, a second screen brightness when the electronic device displays the application interface is acquired; and the initial brightness value is determined according to a difference between the second screen brightness and the first screen brightness. By adopting the technical solution, the second operation can be a drag operation of the user on the brightness bar, so that the initial brightness value can accurately reflect the screen brightness requirement of the user when using the application.
[0008] In a possible implementation, the second brightness multiplier is calculated according to the initial brightness value, the ambient light intensity, the actual ambient light brightness and the first screen brightness, including: determining a brightness preference type of the user according to the initial brightness value; determining an ambient light brightness change type of the ambient light according to a change value of the ambient light intensity; determining a multiplier calculation strategy of the second brightness multiplier according to the brightness preference type and the ambient light brightness change type, and calculating the second brightness multiplier according to the ambient light intensity, the actual ambient light brightness, the first screen brightness and the multiplier calculation strategy. By adopting the technical solution, the multiplier calculation strategy is determined according to different brightness preference types and different ambient light brightness change types, so that the calculated second brightness multiplier can comprehensively consider the screen brightness requirement of the user and the current ambient light intensity change, thereby further improving the accuracy of the target brightness value calculated based on the second brightness multiplier, so that the screen brightness of the electronic device adjusted according to the target brightness value can better meet the screen brightness requirement of the user, thereby improving the user's use comfort.
[0009] In a possible implementation, the brightness preference type of the user is determined according to the initial brightness value, including: when the initial brightness value is a positive value, determining that the brightness preference type is positive preference; and when the initial brightness value is a negative value, determining that the brightness preference type is negative preference. By adopting the technical solution, the brightness preference type can be accurately determined, thereby further improving the accuracy of the target brightness value calculated subsequently.
[0010] In a possible implementation, the environment light brightness change type of the environment light is determined according to the change value of the environment light intensity, including: when the change value of the environment light intensity is a positive value, determining that the environment light brightness change type is brightness increase; and when the change value of the environment light intensity is a negative value, determining that the environment light brightness change type is brightness decrease. By using the above technical solution, the environment light brightness change type can be accurately determined, thereby further improving the accuracy of the target brightness value calculated subsequently.
[0011] In a possible implementation, the second brightness ratio is calculated according to the environment light intensity, the actual brightness of the environment light, the first screen brightness and the ratio calculation strategy determined according to the brightness preference type and the environment light brightness change type, including: in the case where the environment light brightness change type is brightness increase, determining a first preset light intensity threshold interval in which the environment light intensity is located, and obtaining a first actual brightness of the environment light corresponding to the first preset light intensity threshold interval; and calculating the second brightness ratio according to the following formula: BrightenRatio = (N1-D) / (N1-A), where BrightenRatio is the second brightness ratio, N1 is the first actual brightness of the environment light, D is the actual brightness of the environment light, and A is the first screen brightness. By using the above technical solution, the greater the first actual brightness of the environment light N1 is, the smaller the value of the second brightness ratio BrightenRatio is, thereby reducing the target brightness value subsequently, so that the screen brightness of the electronic device when displaying the application interface is not too bright, and the comfort of the user is improved.
[0012] In a possible implementation, the second brightness ratio is calculated according to the environment light intensity, the actual brightness of the environment light, the first screen brightness and the ratio calculation strategy determined according to the brightness preference type and the environment light brightness change type, including: in the case where the brightness preference type is negative preference and the environment light brightness change type is brightness decrease, calculating the second brightness ratio according to the following formula: DarkenRatio = (D-4) / (A-4), where DarkenRatio is the second brightness ratio, D is the actual brightness of the environment light, and A is the first screen brightness. By using the above technical solution, since the brightness preference type of the user is negative preference and the environment light brightness change type is brightness decrease, the change of the actual brightness of the environment light conforms to the brightness preference type of the user, so the size of the second brightness ratio DarkenRatio is irrelevant to the first actual brightness of the environment light N1, and the accuracy of the second brightness ratio DarkenRatio is improved.
[0013] In a possible implementation, the ratio calculation strategy of the second brightness ratio is determined according to the brightness preference type and the ambient light brightness change type, and the second brightness ratio is calculated according to the ambient light intensity, the actual ambient light brightness, the first screen brightness and the ratio calculation strategy, including: in the case that the brightness preference type is positive preference and the ambient light brightness change type is brightness reduction, determining the second preset light intensity threshold interval in which the ambient light intensity is located, and obtaining the second ambient light brightness corresponding to the second preset light intensity threshold interval; the second brightness ratio is calculated according to the following formula: BrightenRatio = (D-N2) / (A), wherein BrightenRatio is the second brightness ratio, N2 is the second ambient light brightness, D is the actual ambient light brightness, and A is the first screen brightness. According to the above technical solution, since the brightness preference type of the user is positive preference and the ambient light brightness change type is brightness reduction, and since the user needs brighter screen brightness, a larger second brightness ratio BrightenRatio is set to obtain a larger target brightness value, which can meet the screen brightness requirement of the user.
[0014] In a possible implementation, the determination manner of the first brightness ratio includes: collecting a plurality of target images of the application; calculating a gray level histogram of each target image, and calculating an average gray level histogram of the application according to the gray level histogram of each target image; and calculating the first brightness ratio according to the average gray level histogram. According to the above technical solution, since the average gray level histogram can intuitively reflect the overall brightness distribution of the application, the first brightness ratio calculated based on the average gray level histogram can accurately reflect the brightness requirement of the application itself, thereby improving the accuracy of the target brightness value calculated based on the first brightness ratio, and the screen brightness of the electronic device adjusted according to the target brightness value can better meet the screen brightness requirement of the user, thereby improving the use comfort of the user.
[0015] In a possible implementation, the first brightness ratio is calculated according to the average gray level histogram, including: calculating the average gray level of the application according to the average gray level histogram; determining a gray level interval range in which the average gray level is located, and calculating the corresponding relationship between the gray level in the gray level interval range and the preference ratio according to the preset preference ratio corresponding to the two end point values of the gray level interval range; and calculating the first brightness ratio according to the average gray level and the corresponding relationship. According to the above technical solution, the first brightness ratio can be accurately calculated, thereby further improving the accuracy of the target brightness value calculated based on the first brightness ratio.
[0016] In a possible implementation, the electronic device is installed with a preset application, the preset application comprises a brightness adjustment interface, and the method further comprises: adjusting the screen brightness when the electronic device displays the application interface based on a plurality of controls in the brightness adjustment interface. By using the above technical solution, the brightness adjustment function can be performed in the preset application when the electronic device displays the application interface.
[0017] In a possible implementation, the preset application is connected with the electronic device through an F interface. By using the above technical solution, since the F interface is a third-party interface, the screen brightness of the electronic device when displaying the application interface can be adjusted through the preset application even when the electronic device is in a brightness-locked state, the independence of the electronic device brightness adjustment and the application scene brightness adjustment is realized, and the use experience of the user is further improved.
[0018] In a possible implementation, the target brightness value is calculated according to the initial brightness value, the first brightness multiplier and the second brightness multiplier, comprising: calculating the target brightness value according to the following formula: target brightness value = initial brightness value × (first brightness multiplier × k + second brightness multiplier × (1-k)), wherein k is a weight. By using the above technical solution, by configuring different weights for the first brightness multiplier and the second brightness multiplier, the accuracy of the target brightness value calculated based on the first brightness multiplier and the second brightness multiplier can be further improved, the screen brightness of the electronic device adjusted according to the target brightness value can better meet the screen brightness demand of the user, and the use comfort of the user is improved.
[0019] In a second aspect, the present application provides an electronic device, comprising a display screen, a memory and a processor; a microphone, the display screen and the memory are coupled with the processor; the memory is used for storing program instructions; the processor is used for reading the program instructions stored in the memory to realize the screen brightness adjustment method of the first aspect and possible implementation manners thereof.
[0020] In a third aspect, the present application provides a computer readable storage medium, the computer readable storage medium stores computer readable instructions, and the computer readable instructions are executed by a processor to realize the screen brightness adjustment method of the first aspect and possible implementation manners thereof.
[0021] In a fourth aspect, the present application provides a computer program product, the computer program product contains computer readable instructions, and the computer readable instructions are executed by a processor to realize the screen brightness adjustment method of the first aspect and possible implementation manners thereof.
[0022] In addition, the technical effects brought by the second aspect to the fourth aspect can be referred to the description of the method related to the method of each design in the above method part, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0023] Figure 1 A scene diagram of a screen brightness adjustment method provided by an embodiment of the present application is shown in FIG. 1.
[0024] Figure 2 A scene diagram of a screen brightness adjustment method provided by an embodiment of the present application is shown in FIG. 1.
[0025] Figure 3 A user interface diagram provided by an embodiment of the present application is shown in FIG. 2.
[0026] Figure 4 A software architecture diagram of an electronic device provided by an embodiment of the present application is shown in FIG. 3.
[0027] Figure 5 A software architecture diagram of an electronic device for implementing game manager version switching provided by an embodiment of the present application is shown in FIG. 4.
[0028] Figure 6 An interaction flow diagram of internal software and hardware modules of an electronic device provided by an embodiment of the present application is shown in FIG. 5.
[0029] Figure 7 A flow diagram of a screen brightness adjustment method provided by an embodiment of the present application is shown in FIG. 6.
[0030] Figure 8 A hardware architecture diagram of an electronic device provided by an embodiment of the present application is shown in FIG. 7. DETAILED DESCRIPTION
[0031] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0032] Hereinafter, the terms "first" and "second" are used only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the words "exemplary", "or", "for example" are used to mean as an example, illustration or description. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the words "exemplary", "or", "for example" are intended to present the relevant concepts in a specific manner.
[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used in this application's specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. It should be understood that, unless otherwise stated, " / " in this application means "or". For example, A / B can mean A or B. "And / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. "At least one" means one or more. "More than one" means two or more. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, and a, b, and c. It should be understood that the order of steps shown in the flowcharts herein can be changed, and some can be omitted.
[0034] To facilitate understanding of the embodiments of this application, the technical terms involved in this application will first be introduced:
[0035] A user interface (UI) is the medium through which an application or operating system interacts and exchanges information with the user. It converts the internal form of information into a form that the user can understand. The user interface is written in specific computer languages such as Java or Extensible Markup Language (XML). This source code is parsed and rendered on the electronic device, ultimately presenting content that the user can recognize. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be visible interface elements displayed on the screen of an electronic device, such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.
[0036] Application (APP): A software program that can perform one or more specific functions. Examples include calling applications, instant messaging applications, video applications, audio applications, image capture applications, cloud desktop applications, etc.
[0037] The F interface is defined as the interface between the Mobile Switching Center (MSC) and the Equipment Identifier Register (EIR). It is used to exchange relevant International Mobile Equipment Identity (IMEI) management information. The physical link of the F interface is implemented through a standard 2.048 Mbits PCM digital transmission link between the MSC and the EIR.
[0038] As shown in Figure 1 A screen display scenario provided by an embodiment of the present application includes an electronic device 100. The electronic device 100 can be a device with a display function, and the device type of the electronic device 100 is not limited in the embodiment of the present application. For example, the electronic device 100 can be a mobile phone, a tablet computer, a personal computer, a Voice over Internet Protocol (VoIP) phone, etc. Figure 1 Taking the electronic device 100 as a smart phone for example, a user A uses the electronic device 100, for example, Figure 1 The screen display scenario shown in FIG. 1C is a display interface of the electronic device 100 in a game scenario. The user A controls the screen brightness in the game scenario by clicking the “brightness adjustment” control of the application and then dragging the brightness bar. Since the brightness adjustment function is set to a manual adjustment state at this time, the game brightness does not change with the ambient light, but always maintains the brightness adjusted by the user. This situation leads to that, during the game process of the user A, if the ambient light intensity changes, the electronic device 100 cannot adaptively change the screen brightness in the game scenario according to the ambient light intensity, which affects the user's use comfort. That is Figure 1 The screen display scenario shown in FIG. 1D exists a demand for the electronic device 100 to adaptively adjust the screen brightness based on the change of the ambient light intensity, in order to provide the user with a better game experience.
[0039] In order to improve the display effect of the electronic device, the electronic device generally defaults to turn on the ambient light adjustment algorithm to automatically adjust the screen brightness based on different ambient light intensities. However, there is a lack of personalized adjustment of the screen brightness in different applications, and the screen brightness demand of the user when entering different applications cannot be met.
[0040] Therefore, an embodiment of the present application provides a screen brightness adjustment method, so that the electronic device can dynamically adjust the screen brightness according to the ambient light intensity, the user's brightness preference and the average gray scale of the display screen of the current application, and meet the screen brightness demand of the user when entering different applications.
[0041] Please refer to Figure 2 A scene schematic diagram of a screen brightness adjustment method applicable to an embodiment of the present application. The scene includes an electronic device 100. The electronic device 100 can be a device with a display function, and the device type of the electronic device 100 is not limited in the embodiment of the present application. For example, the electronic device 100 can be a mobile phone, a tablet computer, a personal computer, a VoIP phone, etc.
[0042] Taking a smartphone as an example, the electronic device 100 has a first application installed. The electronic device 100 can respond to the first user's first operation, run the first application and display the application interface of the first application. The first user can adjust the screen brightness of the electronic device 100 when displaying the application interface through a second application.
[0043] Specifically, electronic devices can provide a second application UI for selecting screen brightness adjustment, making it easy for users to switch the screen brightness adjustment mode of the electronic device, such as setting the screen brightness adjustment mode of the electronic device to manual adjustment or automatic adjustment.
[0044] For example, such as Figure 3 As shown, taking a mobile phone as the electronic device and a game manager as the second application, the electronic device responds to the operation of clicking the game manager application icon and displays the main settings interface 101 of the game manager application. The main settings interface 101 may include one or more controls, such as a "brightness adjustment" control, a "do not disturb" control, a "prevent accidental touch" control, a "network acceleration" control, a "frame rate enhancement" control, and a "image quality enhancement" control.
[0045] The electronic device responds to the operation of clicking the "Brightness Adjustment" control in the main settings interface 101, and sets the screen brightness adjustment mode of the electronic device to manual adjustment or automatic adjustment.
[0046] In some embodiments, a text description of the corresponding function may be displayed below the "brightness adjustment" control to help users understand the function of the control. For example, the text description may be displayed on... Figure 3 The description box below the "Brightness Adjustment" control is shown. For example, the text "The device automatically adjusts the screen brightness when enabled" can be displayed below the "Brightness Adjustment" control.
[0047] To better understand the implementation details of the above screen brightness adjustment method on electronic devices, the following section will combine... Figure 4 to Figure 5 This section describes the process by which various software and hardware components in an electronic device work together to achieve the screen brightness adjustment method described above. Details are as follows:
[0048] The operating system of an electronic device can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application uses the layered architecture Android system as an example to illustrate the software structure of the electronic device. Figure 4As shown, the layered architecture divides software into several layers, each of which has a clear role and division of labor. Layers communicate with each other through software interfaces. Taking the Android system as an example, in some embodiments, the Android system is divided into three layers, from top to bottom, the application layer (Apk), the application framework layer (Framework), and the hardware abstraction layer (HAL).
[0049] The application layer can include a series of application packages. For example, the application packages can include a game manager 1.0 version application, a game manager 2.0 version application, a system application, and the like. The game manager 1.0 version application can include a first control that supports screen brightness adjustment. The game manager 2.0 version application can include a second control that supports screen brightness adjustment, and the second control supports adjusting the screen brightness by dragging the brightness bar when the screen brightness adjustment function is in a locked state. The system application can include a settings application.
[0050] The application framework layer provides an application programming interface (API) and a programming framework for the applications of the application layer. For example, the application framework layer can include a display effect module, a brightness module, a decision platform, and an F interface module.
[0051] The display effect module can be used to be responsible for the version adaptation capability of the game manager application of the electronic device, such as detecting that the game manager application adapted by the electronic device 1 is the game manager 1.0 version application, and detecting that the game manager application adapted by the electronic device 2 is the game manager 2.0 version application.
[0052] The brightness module can be used to manage the screen display brightness of the electronic device, such as being responsible for managing the locking and unlocking of the screen brightness adjustment, the maximum screen display brightness setting, and the screen brightness adjustment.
[0053] The decision platform can be used to be responsible for the version switching of the game manager application, such as switching the game manager 1.0 version application to the game manager 2.0 version application.
[0054] The game manager 1.0 version application is connected with the display effect module, and when the electronic device runs the game manager 1.0 version application, the adjustment of the screen brightness can only be realized by the user dragging the brightness bar.
[0055] The game manager 2.0 version application is connected with the power supply of the electronic device through the F interface module, so that the screen display brightness of the electronic device can be directly managed through the game manager 2.0 version application, such as being responsible for managing the locking and unlocking of the screen brightness adjustment, the maximum screen display brightness setting, and the screen brightness adjustment.
[0056] It is worth mentioning that the game manager 2.0 version application can adjust the screen brightness of the electronic device through the F interface module connected to the power supply of the electronic device, and the game manager 2.0 version application and the brightness module can adjust the screen brightness of the electronic device, and the game manager 2.0 version application and the brightness module are decoupled, that is, the system brightness of the electronic device and the screen brightness of the electronic device when displaying the application interface are independent of each other. When the system brightness of the electronic device is in a locked state, that is, the screen brightness of the electronic device cannot be adjusted by the brightness module, the game manager 2.0 version application can automatically adjust the screen brightness of the electronic device when displaying the application interface, thereby improving the user experience.
[0057] For ease of understanding, the following will specifically describe how to adjust the screen brightness of the electronic device when displaying the application interface when the electronic device runs the game manager 1.0 version application and the game manager 2.0 version application.
[0058] Taking that the electronic device is running a game as an example, when the electronic device runs the game manager 1.0 version application, if the user clicks the "brightness adjustment" control, the screen brightness of the electronic device when displaying the game picture is in a locked state, and the user cannot adjust the screen brightness by dragging the brightness bar, at this time, the game brightness does not change with the ambient light, but always maintains the brightness, and when the game is exited, the electronic device returns to the automatic brightness. When the user clicks the "brightness adjustment" control again, that is, the "brightness adjustment" control is in an inoperative state, the user can adjust the screen brightness by dragging the brightness bar.
[0059] When the electronic device runs the game manager 2.0 version application, if the user clicks the "brightness adjustment" control, the user can still adjust the screen brightness by dragging the brightness bar, and when the user does not adjust the screen brightness by dragging the brightness bar, the game brightness will be automatically adjusted based on the aforementioned screen brightness adjustment method.
[0060] In some embodiments, the brightness module is configured to calculate a second brightness ratio according to the obtained parameters, and send the second brightness ratio to the game manager 2.0 version application. It should be noted that the calculation method of the second brightness ratio is described in detail below, and will not be repeated here.
[0061] In some embodiments, the calculation of the second brightness ratio can also be performed in the game manager 2.0 version application.
[0062] The hardware abstraction layer includes a histogram processing module and the like. The histogram processing module is configured to generate an average gray histogram of each application, and upload the average gray histogram to the display effect module.
[0063] In some embodiments, the display effect module includes a histogram unit, which can be used to calculate the first brightness multiplier of each application according to the average gray histogram uploaded by the histogram processing module.
[0064] In some embodiments, the histogram unit uploads the calculated first brightness multiplier to the game manager 2.0 version application, and the game manager 2.0 version application calculates the target brightness value based on the first brightness multiplier, the second brightness multiplier and the initial brightness value pre-stored by itself, and then adjusts the screen brightness of the electronic device display application interface according to the target brightness value. In some embodiments, the display effect module further includes a platform switching unit and a capability support unit. The capability support unit is used to detect the version adaptation capability of the game manager application of the electronic device, and the platform switching unit is used to send version switching information to the decision hub according to the detection result of the capability support unit, so as to realize the version switching of the game manager application of the electronic device.
[0065] For example, as shown in Figure 5 When the capability support unit detects that the electronic device adapts to the game manager 1.0 version application, and the current electronic device is the game manager 2.0 version application, the capability support unit sends the detection result that the electronic device adapts to the game manager 1.0 version application to the platform switching unit, the platform switching unit sends the version switching information to the decision hub, and the decision hub switches the game manager 2.0 version application installed in the electronic device to the game manager 1.0 version application after receiving the version switching information. Through the above-mentioned version switching mode of the game manager application, the compatibility of the historical version and the new version of the game manager is realized, so that the version of the game manager application can be flexibly managed, and the reliability of the electronic device when running the game manager application is improved.
[0066] In some embodiments, the automatic upgrade of the game manager application version is realized through the cloud, for example, when the current game manager application version installed in the electronic device is the game manager 1.0 version, the cloud automatically upgrades the game manager 1.0 version to the game manager 2.0 version, and after the game manager application version is upgraded to the game manager 2.0 version, the game manager application sends an upgrade reminder to the electronic device through the F interface, and the game manager 2.0 version application writes the permanent attributes such as "brightness bar" and "brightness adjustment" in the electronic device. It should be noted that, in order to avoid the influence of the related functions of the electronic device, only when the user performs the restart operation of the game manager application, the application version switching is completed, and the electronic device provides a support capability interface for the game manager application to query, so as to realize the stability and interlocking of the functions.
[0067] In some embodiments, in order to prevent the game manager application from abnormally crashing and causing the brightness adjustment function to be abnormal, the game manager application is exited and restored through the game whitelist recognition capability when the user turns off the screen.
[0068] In some embodiments, in order to prevent the user from being confused about the determination of the target brightness value and the intelligent adjustment of the screen brightness, the target brightness value is discounted and cleaned up by setting a game re-entry time interval. At the same time, the game manager application sets to clear the channel.
[0069] It can be understood that the above software structure is only exemplary and does not constitute a limitation on the software structure of the electronic device. In other embodiments, the electronic device can also have more or less structure, which is not limited in the present application.
[0070] In order to more intuitively understand the process of cooperation between the above-mentioned software modules to realize the screen brightness adjustment of the electronic device, the following will take the interactive diagram shown in Figure 6 As an example to introduce the screen brightness adjustment process of the electronic device when running the game application under different ambient light brightness change types.
[0071] As shown in Figure 6 , it is the interactive process of each software and hardware module when the ambient light brightness change type is brightness increase or brightness decrease.
[0072] 601: The histogram processing module calculates the first brightness multiplier of the game application.
[0073] In some embodiments, the electronic device runs the game application in response to the user's click operation on the game application, and displays the game screen of the game application, and the histogram processing module calculates the first brightness multiplier of the game application.
[0074] 602: The game manager application obtains the first screen brightness when the electronic device displays the game screen, and the initial brightness value and the first brightness multiplier of the game application.
[0075] In some embodiments, the game manager application is the game manager 2.0 version application shown in Figure 4 . After the game manager 2.0 version application obtains the initial brightness value and the first brightness multiplier, the game manager 2.0 version application stores the initial brightness value and the first brightness multiplier in the local, and when the electronic device runs the application next time, the game manager 2.0 version application directly obtains the initial brightness value and the first brightness multiplier from the local, thereby reducing the load of the electronic device.
[0076] Specifically, the initial brightness value represents the screen brightness value manually adjusted by the user when entering the application, and the first brightness multiplier is determined according to the average gray scale of the display screen of the application.
[0077] In some embodiments, the initial brightness value is obtained according to the following manner: in response to a second operation of the user, obtaining a second screen brightness when the electronic device displays the application interface; determining the initial brightness value according to the difference between the second screen brightness and the first screen brightness.
[0078] As shown in Figure 2 The game butler 2.0 version application has a "brightness bar" control. Taking the application currently running on the electronic device as the game application A, when the electronic device displays the game screen of the game application A, the user adjusts the screen brightness by dragging the brightness bar. The operation of dragging the brightness bar is the second operation.
[0079] For example, before the user drags the brightness bar, the screen brightness when the electronic device displays the game screen is brightness 1, which is the first screen brightness. The first screen brightness is the default value of the screen brightness when the electronic device runs the game application A. The default value of the screen brightness can be determined by the ambient light intensity of the electronic device, and the embodiment does not make specific limitation on the determination method of the default value of the screen brightness.
[0080] After the user drags the brightness bar, the screen brightness when the electronic device displays the game screen is brightness 2, which is the second screen brightness. Since the second screen brightness is adjusted and set by the user, the second screen brightness can be regarded as the favorite brightness of the user when the electronic device runs the game application A. The difference between brightness 2 and brightness 1 is taken as the initial brightness value, so that the initial brightness value can truly reflect the favorite type of the user for the screen brightness. For example, if the initial brightness value is positive, it indicates that the user prefers brighter screen brightness when the electronic device runs the game application A. If the initial brightness value is negative, it indicates that the user prefers darker screen brightness when the electronic device runs the game application A.
[0081] In some embodiments, the first brightness multiplier is determined according to the average gray scale of the display screen of the application.
[0082] Similarly, taking the application currently running on the electronic device as the game application A, the electronic device collects a plurality of target images of the game application A. For example, when the game application A is running, the electronic device can collect a target image of the game application A every 100 frames, until the electronic device collects 100 target images of the game application A. It can be understood that the embodiment does not make specific limitation on the collection method and the number of target images, which can be set according to actual needs.
[0083] The electronic device calculates the gray scale histogram of each target image, and calculates the average gray scale histogram of the game application A according to the gray scale histogram of each target image.
[0084] In some embodiments, the step of calculating the average gray scale histogram can be performed when Figure 4The first brightness ratio is calculated according to the average gray value of the game application A and the corresponding relationship between the gray value in the gray interval range and the favorite ratio.
[0085] For example, assuming that the average gray value of the game application A is Ax, the gray interval range in which Ax is located is (A1, A2), the preset favorite ratio corresponding to A1 is a1, and the preset favorite ratio corresponding to A2 is a2, then the first brightness ratio corresponding to hist is ax=(a2-a1)(Ax-A1) / (A2-A1)+a1.
[0086] In some embodiments, after the first brightness ratio is obtained by the histogram processing module, the first brightness ratio is sent to the game manager 2.0 version application.
[0087] In some embodiments, if the version of the game application A is iterated, the electronic device reacquires the target image of the game application A, so that the first brightness ratio of the game application A is corrected by the histogram processing module, to further ensure the accuracy of the subsequent target brightness value.
[0088] 603: The ambient light sensor acquires the ambient light intensity of the electronic device and the ambient light actual brightness corresponding to the ambient light intensity.
[0089] 604: The brightness module calculates a second brightness ratio according to the initial brightness value, the ambient light intensity, the ambient light actual brightness, and the first screen brightness.
[0090] In some embodiments, the brightness module determines the brightness favorite type of the user according to the initial brightness value, determines the ambient light brightness change type of the ambient light according to the change value of the ambient light intensity, determines the ratio calculation strategy of the second brightness ratio according to the brightness favorite type and the ambient light brightness change type, and calculates the second brightness ratio according to the ambient light intensity, the ambient light actual brightness, the first screen brightness, and the ratio calculation strategy.
[0091] Specifically, when the initial brightness value is positive, the brightness favorite type is determined to be positive favorite; when the initial brightness value is negative, the brightness favorite type is determined to be negative favorite; the ambient light brightness change type of the ambient light is determined according to the change value of the ambient light intensity, including: when the change value of the ambient light intensity is positive, the ambient light brightness change type is determined to be brightness increase; when the change value of the ambient light intensity is negative, the ambient light brightness change type is determined to be brightness decrease.
[0092] In a case where the brightness preference type is positive preference or negative preference, and the ambient light brightness change type is brightness increase, a first preset light intensity threshold interval in which the ambient light intensity is located is determined, and a first ambient light brightness corresponding to the first preset light intensity threshold interval is obtained;
[0093] The second brightness ratio is calculated according to the following formula:
[0094] BrightenRatio = (N1-D) / (N1- A), wherein BrightenRatio is the second brightness ratio, N1 is the first ambient light brightness, D is the actual ambient light brightness, and A is the first screen brightness. It can be seen from the above formula that the greater the first ambient light brightness N1 is, the smaller the value of the second brightness ratio BrightenRatio is, thereby reducing the subsequent target brightness value, so that the screen brightness of the electronic device when displaying the application interface is not too bright, and the comfort of the user is improved.
[0095] In a case where the brightness preference type is negative preference, and the ambient light brightness change type is brightness decrease, the second brightness ratio is calculated according to the following formula:
[0096] DarkenRatio = (D-4) / (A-4), wherein DarkenRatio is the second brightness ratio, D is the actual ambient light brightness, and A is the first screen brightness. It can be seen from the above formula that, in a case where the brightness preference type of the user is negative preference, and the ambient light brightness change type is brightness decrease, since the change of the ambient light brightness conforms to the brightness preference type of the user, the size of the second brightness ratio DarkenRatio is irrelevant to the first ambient light brightness N1.
[0097] In a case where the brightness preference type is positive preference, and the ambient light brightness change type is brightness decrease, a second preset light intensity threshold interval in which the ambient light intensity is located is determined, and a second ambient light brightness corresponding to the second preset light intensity threshold interval is obtained;
[0098] The second brightness ratio is calculated according to the following formula:
[0099] BrightenRatio = (D-N2) / (A), where BrightenRatio is the second brightness ratio, N2 is the second ambient light brightness, D is the actual brightness of the ambient light, and A is the first screen brightness. As can be seen from the above formula, the smaller the second ambient light brightness N2, the larger the second brightness ratio BrightenRatio, and the larger the target brightness value calculated subsequently. This is because the user's brightness preference type is positive preference, and the ambient light brightness change type is brightness reduction. Since the user needs a brighter screen brightness, a larger second brightness ratio BrightenRatio is set to obtain a larger target brightness value, which can meet the user's screen brightness requirement.
[0100] 605: The game manager application calculates a target brightness value according to the initial brightness value, the first brightness ratio, and the second brightness ratio.
[0101] In some embodiments, the target brightness value is calculated according to the following formula:
[0102] Target brightness value = initial brightness value x (first brightness ratio x k + second brightness ratio x (1-k)), where k is a weight.
[0103] In some embodiments, the size of k is not specifically limited and can be set according to actual needs.
[0104] 606: The game manager application adjusts the screen brightness of the electronic device when displaying the game picture according to the target brightness value.
[0105] In some embodiments, the game manager 2.0 version application takes the sum of the target brightness value and the first screen brightness as the screen brightness of the electronic device.
[0106] By adopting the technical solution, the electronic device can determine the favorite brightness of the user under the application, that is, the initial brightness value, and also determine the first brightness multiplier of the application when displaying the application interface. By acquiring the ambient light intensity of the electronic device in real time, whether the ambient light intensity where the electronic device is located changes can be perceived, and when the ambient light intensity changes, the second brightness multiplier under the current ambient light intensity is calculated based on the initial brightness value. Since the first brightness multiplier is determined according to the average gray scale of the display screen of the application, and the second brightness multiplier is used to represent the brightness preference degree of the user under different ambient light intensities, the target brightness value calculated by the initial brightness value, the first brightness multiplier and the second brightness multiplier can accurately represent the required brightness of the user under the ambient light intensity, thereby providing the user with a more comfortable application scene experience. By adopting the technical solution, the electronic device can determine the favorite brightness of the user under the application, that is, the initial brightness value, and also determine the first brightness multiplier of the application when displaying the application interface. By acquiring the ambient light intensity of the electronic device in real time, whether the ambient light intensity where the electronic device is located changes can be perceived, and when the ambient light intensity changes, the second brightness multiplier under the current ambient light intensity is calculated based on the initial brightness value. Since the first brightness multiplier is determined according to the average gray scale of the display screen of the application, and the second brightness multiplier is used to represent the brightness preference degree of the user under different ambient light intensities, the target brightness value calculated by the initial brightness value, the first brightness multiplier and the second brightness multiplier can accurately represent the required brightness of the user under the ambient light intensity, thereby providing the user with a more comfortable application scene experience.
[0107] Referring to Figure 7 FIG. 1 is a flowchart of a screen brightness adjustment method provided by an embodiment of the present application, and the embodiment can be applied to the electronic device 100 described above, and includes the following steps:
[0108] 701: In response to a first operation of a user, an application is run and an application interface of the application is displayed.
[0109] 702: A first screen brightness when the electronic device displays the application interface, and an initial brightness value and a first brightness multiplier of the application are acquired.
[0110] 703: An ambient light intensity of the electronic device and an ambient light actual brightness corresponding to the ambient light intensity are acquired.
[0111] 704: A second brightness multiplier is calculated according to the initial brightness value, the ambient light intensity, the ambient light actual brightness and the first screen brightness.
[0112] 705: A target brightness value is calculated according to the initial brightness value, the first brightness multiplier and the second brightness multiplier.
[0113] 706: The screen brightness of the electronic device displaying the application interface is adjusted according to the target brightness value.
[0114] Steps 702 to 706 of this embodiment are similar to steps 601 to 606 of the foregoing embodiment, and thus are not described again here to avoid repetition.
[0115] Referring to Figure 8 As shown in FIG. 1, the electronic device 100 according to an embodiment of the disclosure is described below. The electronic device 100 according to an embodiment of the disclosure can be a device including a touch screen, such as a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a large screen, a smart television, a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) \ virtual reality (VR) device, and the like. The electronic device according to an embodiment of the disclosure is not limited to a specific form. Figure 8 Figure 8 FIG. 1 is a structural diagram of an electronic device 100 according to an embodiment of the disclosure.
[0116] The electronic device 100 can include an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (audio / video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111, and the like. Those skilled in the art can understand that the electronic device 100 can include more or less components than those shown in FIG. 1, or some components can be combined, or different components can be arranged. Figure 1 The mobile terminal structure shown in FIG. 1 does not constitute a limitation on the mobile terminal, and the mobile terminal can include more or less components than those shown, or combine certain components, or arrange different components.
[0117] The radio frequency unit 101 can be used for receiving and transmitting signals in the process of transmitting or receiving information or a call. Specifically, the radio frequency unit 101 receives the downlink information of the base station and provides the received information to the processor 110 for processing. In addition, the radio frequency unit 101 transmits the uplink data to the base station. Generally, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can communicate with a network and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to the Global System for Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access 2000 (CDMA2000), Wideband Code Division Multiple Access (WCDMA), Time Division-Synchronous Code Division Multiple Access (TD-SCDMA), Frequency Division Duplexing-Long Term Evolution (FDD-LTE) and Time Division Duplexing-Long Term Evolution (TDD-LTE), and the like.
[0118] The WiFi belongs to a short-range wireless transmission technology. The WiFi module 102 can help the user to send and receive e-mails, browse web pages, and access streaming media, and the like. The WiFi module 102 provides the user with wireless broadband Internet access. Although the WiFi module 102 is shown, it is understood that it does not belong to the essential components of the mobile terminal, and can be omitted as needed without changing the essence of the application. Figure 1 The WiFi module 102 is shown, but it is understood that it does not belong to the essential components of the mobile terminal, and can be omitted as needed without changing the essence of the application.
[0119] The audio output unit 103 can convert voice data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output it as sound when the mobile terminal 100 is in a call signal receiving mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, and the like. In addition, the audio output unit 103 can also provide audio output related to a particular function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, and the like). The audio output unit 103 can include a speaker, a buzzer, and the like.
[0120] The A / V input unit 104 is configured to receive audio or video signals. The A / V input unit 104 can include a graphics processor (GPU) 1041 and a microphone 1042. The graphics processor 1041 processes image data of a still picture or a video obtained by an image capture device (e.g., a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 106. The image frame processed by the graphics processor 1041 can be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (voice data) via the microphone 1042 in a telephone call mode, a recording mode, a voice recognition mode, or the like, and can process such sound into voice data. The processed audio (voice) data can be converted into a format that can be transmitted to a mobile communication base station via the radio frequency unit 101 in the case of the telephone call mode. The microphone 1042 can implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the process of receiving and transmitting audio signals.
[0121] The electronic device 100 further includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1061 and / or the backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), and can detect the magnitude and direction of gravity when at rest, and can be used for applications of recognizing the posture of the mobile phone (such as switching between landscape and portrait screens, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometers, taps), and the like. As for the fingerprint sensor, pressure sensor, iris sensor, molecular sensor, gyroscope, barometer, hygrometer, thermometer, infrared sensor, and other sensors that can be configured to the mobile phone, they are not described here.
[0122] The display unit 106 is configured to display information input by a user or information provided to the user. The display unit 106 can include a display panel 1061, which can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. The number of display units 106 of the mobile terminal of the present application can be one or multiple. For example, a dual-screen terminal has two screens and is located on the front and back of the terminal body, respectively.
[0123] The user input unit 107 can be used to receive input numerals or character information, and to generate key signal inputs related to user settings of the mobile terminal and control of functions. Specifically, the user input unit 107 can include a touch panel 1071 and other input devices 1072. The touch panel 1071, also called a touch screen, can collect a touch operation of a user on or proximate thereto (such as an operation of the user using a finger, a stylus, or any suitable object or accessory on or proximate to the touch panel 1071), and can drive a corresponding connection device according to a pre-set program. The touch panel 1071 can include two parts, a touch detecting device and a touch controller. The touch detecting device detects a user's touch position and detects a signal resulting from a touch operation, and transmits the signal to the touch controller. The touch controller receives touch information from the touch detecting device, converts it into a touch coordinate, and transmits it to the processor 110, and can receive a command from the processor 110 and execute it. In addition, the touch panel 1071 can be implemented in various types such as a resistive type, a capacitive type, an infrared type, a surface acoustic wave type, and the like. In addition to the touch panel 1071, the user input unit 107 can include other input devices 1072. Specifically, the other input devices 1072 can include one or more of, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, a joystick, and the like.
[0124] Further, the touch panel 1071 can cover the display panel 1061, and when the touch panel 1071 detects a touch operation on or proximate thereto, it can transmit the same to the processor 110 to determine a type of the touch event, and then the processor 110 can provide a corresponding visual output on the display panel 1061 according to the type of the touch event. Although in the above description, the touch panel 1071 and the display panel 1061 are implemented as two separate components to achieve the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to achieve the input and output functions of the mobile terminal, without being limited thereto. Figure 1
[0125] The interface unit 108 serves as an interface through which at least one external device can be connected with the mobile terminal 100. For example, the external device can include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio I / O (input / output) port, a video I / O port, an earphone port, or the like. The interface unit 108 can be used to receive input (e.g., data information, power, or the like) from an external device and to transmit the received input to one or more elements within the mobile terminal 100, or can be used to transmit data between the mobile terminal 100 and the external device.
[0126] The memory 109 can be used to store software programs and various data. The memory 109 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required by at least one function (such as a sound playing function, an image playing function, etc.), etc.; and the data storage area can store data created according to the use of the mobile phone (such as voice data, a phone book, etc.), etc. In addition, the memory 109 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one disk storage device, a flash memory device, or other volatile solid-state memory device.
[0127] The processor 110 is the control center of the mobile terminal, connects all parts of the mobile terminal through various interfaces and lines, executes various functions of the mobile terminal and processes data by running or executing software programs and / or modules stored in the memory 109 and calling data stored in the memory 109, thereby overall monitoring the mobile terminal. The processor 110 can include one or more processing units; preferably, the processor 110 can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 110.
[0128] The memory 109 can include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs).
[0129] The random access memory can include a static random memory (SRAM), a dynamic random memory (DRAM), a synchronous dynamic random memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation of DDR SDRAM is generally referred to as DDR5 SDRAM), etc.
[0130] The non-volatile memory can include a disk storage device, a flash memory.
[0131] The flash memory can include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operation principle, and can include single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential order, and can include universal flash storage (UFS) and embedded multi media Card (eMMC), etc. according to the storage specification.
[0132] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of an operating system or other programs running, and can also be used to store data of users and application programs, etc.
[0133] The non-volatile memory can also store executable programs and data of users and application programs, etc., and can be loaded into the random access memory in advance for direct reading and writing by the processor 110.
[0134] The external memory interface can be used to connect an external non-volatile memory to realize the expansion of the storage capacity of the first electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface to realize the data storage function.
[0135] The screen brightness adjustment method in the above embodiments can be implemented in the electronic device 100 with the above hardware structure.
[0136] The embodiment also provides a computer readable storage medium, which stores computer instructions. When the computer instructions run on the electronic device 100, the electronic device 100 executes the related method steps to realize the screen brightness adjustment method in the above embodiments.
[0137] The embodiment also provides a computer program product, which makes the computer execute the related steps to realize the screen brightness adjustment method in the above embodiments when the computer program product runs on the computer.
[0138] The embodiment also provides a chip system, which is coupled with the memory and is used to read and execute the computer program stored in the memory to realize the screen brightness adjustment method in the above embodiments.
[0139] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is exemplified, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0140] In several embodiments provided in the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiment described above is only illustrative, for example, the division of the module or unit is only a logical function division, and actual implementation can have another division way, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0141] The unit described as a separate component can or can not be physically separated, and the component shown as a unit can be one physical unit or a plurality of physical units, that is, it can be located in one place or distributed to a plurality of different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0142] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0143] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical scheme of the embodiment of the present application essentially or the part that contributes to the prior art or all or part of the technical scheme can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing an apparatus (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various storage medium that can store program codes.
[0144] The above examples are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacements for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A screen brightness adjustment method, applied to electronic devices, characterized in that, The method includes: In response to the user's first action, the application is run and the application interface of the application is displayed; The device obtains the first screen brightness when the electronic device displays the application interface, as well as the initial brightness value and the first brightness multiplier of the application. The initial brightness value represents the screen brightness value adjusted by the user after entering the application. The first brightness multiplier is determined based on the average grayscale of the application's display screen. The first screen brightness is the screen brightness before the screen brightness value is adjusted. Obtain the ambient light intensity of the electronic device and the actual ambient light brightness corresponding to the ambient light intensity; A second brightness ratio is calculated based on the initial brightness value, the ambient light intensity, the actual ambient light brightness, and the first screen brightness. The second brightness ratio is used to characterize the user's brightness preference under different ambient light intensities. Calculate a target brightness value based on the initial brightness value, the first brightness multiplier, and the second brightness multiplier, and adjust the screen brightness of the electronic device displaying the application interface based on the target brightness value; The calculation of the second brightness ratio based on the initial brightness value, the ambient light intensity, the actual ambient light brightness, and the first screen brightness includes: The user's brightness preference type is determined based on the initial brightness value; The type of ambient light brightness change is determined based on the change value of the ambient light intensity. Based on the brightness preference type and the ambient light brightness change type, a calculation strategy for the second brightness multiplier is determined, and the second brightness multiplier is calculated based on the ambient light intensity, the actual ambient light brightness, the first screen brightness, and the multiplier calculation strategy.
2. The screen brightness adjustment method as described in claim 1, characterized in that, The initial brightness value is obtained through the following methods: In response to the user's second operation, a second screen brightness is obtained when the electronic device displays the application interface; The initial brightness value is determined based on the difference between the brightness of the second screen and the brightness of the first screen.
3. The screen brightness adjustment method as described in claim 1, characterized in that, Determining the user's brightness preference type based on the initial brightness value includes: When the initial brightness value is positive, the brightness preference type is determined to be a positive preference. When the initial brightness value is negative, the brightness preference type is determined to be negative preference.
4. The screen brightness adjustment method as described in claim 3, characterized in that, Determining the type of ambient light brightness change based on the change in ambient light intensity includes: When the change in ambient light intensity is positive, the type of change in ambient light brightness is determined to be an increase in brightness; When the change in ambient light intensity is negative, the type of change in ambient light brightness is determined to be a decrease in brightness.
5. The screen brightness adjustment method as described in claim 4, characterized in that, The step of determining the second brightness multiplier based on the brightness preference type and the ambient light brightness change type, and calculating the second brightness multiplier based on the ambient light intensity, the actual ambient light brightness, the first screen brightness, and the multiplier calculation strategy, includes: When the ambient light intensity change type is an increase in brightness, the first preset light intensity threshold range of the ambient light intensity is determined, and the first ambient light intensity corresponding to the first preset light intensity threshold range is obtained. The second brightness magnification is calculated using the following formula: BrightenRatio = (N1-D) / (N1-A), where BrightenRatio is the second brightness ratio, N1 is the first ambient light brightness, D is the actual ambient light brightness, and A is the first screen brightness.
6. The screen brightness adjustment method as described in claim 4, characterized in that, The step of determining the second brightness multiplier based on the brightness preference type and the ambient light brightness change type, and calculating the second brightness multiplier based on the ambient light intensity, the actual ambient light brightness, the first screen brightness, and the multiplier calculation strategy, includes: When the brightness preference type is negative and the ambient light brightness change type is brightness reduction, the second brightness multiplier is calculated according to the following formula: DarkenRatio = (D-4) / (A-4), where DarkenRatio is the second brightness ratio, D is the actual ambient light brightness, and A is the first screen brightness.
7. The screen brightness adjustment method as described in claim 4, characterized in that, The step of determining the second brightness multiplier based on the brightness preference type and the ambient light brightness change type, and calculating the second brightness multiplier based on the ambient light intensity, the actual ambient light brightness, the first screen brightness, and the multiplier calculation strategy, includes: When the brightness preference type is positive and the ambient light brightness change type is brightness decrease, the second preset light intensity threshold range of the ambient light intensity is determined, and the second ambient light brightness corresponding to the second preset light intensity threshold range is obtained. The second brightness magnification is calculated using the following formula: BrightenRatio = (D-N2) / (A), where BrightenRatio is the second brightness ratio, N2 is the second ambient light brightness, D is the actual ambient light brightness, and A is the first screen brightness.
8. The screen brightness adjustment method as described in claim 1, characterized in that, The method for determining the first brightness magnification includes: Acquire multiple target images for the application; Calculate the grayscale histogram of each target image, and calculate the average grayscale histogram of the application based on the grayscale histogram of each target image; The first brightness multiplier is calculated based on the average grayscale histogram.
9. The screen brightness adjustment method as described in claim 8, characterized in that, The step of calculating the first brightness ratio based on the average grayscale histogram includes: Calculate the average gray level of the application based on the average gray level histogram; Determine the grayscale range in which the average grayscale is located, and calculate the correspondence between the grayscale and the preference ratio in the grayscale range based on the preset preference ratio corresponding to the two endpoint values of the grayscale range. The first brightness multiplier is calculated based on the average gray level and the corresponding relationship.
10. The screen brightness adjustment method as described in claim 1, characterized in that, The electronic device has a preset application installed, the preset application including a brightness adjustment interface, and the method further includes: The screen brightness of the electronic device is adjusted based on multiple controls in the brightness adjustment interface when displaying the application interface.
11. The screen brightness adjustment method as described in claim 10, characterized in that, The preset application is connected to the electronic device via an F interface.
12. The screen brightness adjustment method as described in claim 1, characterized in that, The step of calculating the target brightness value based on the initial brightness value, the first brightness magnification, and the second brightness magnification includes: The target brightness value is calculated using the following formula: Target brightness value = initial brightness value × (first brightness multiplier × k + second brightness multiplier × (1-k)), where k is the weight.
13. An electronic device, characterized in that, The electronic device includes a display screen, a memory, and a processor; The display screen and the memory are both coupled to the processor; The memory is used to store program instructions; The processor is configured to read the program instructions stored in the memory to implement the screen brightness adjustment method as described in any one of claims 1 to 12.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the screen brightness adjustment method as described in any one of claims 1 to 12.
15. A computer program product comprising computer-readable instructions, characterized in that, When the computer-readable instructions are executed by the processor, the screen brightness adjustment method as described in any one of claims 1 to 12 is implemented.
Citation Information
Patent Citations
Method for adjusting the screen luminance of terminal, and terminal equipment
CN105280160A
Screen brightness adjusting method, mobile terminal and computer readable storage medium
CN110417999A