CN114285936A - Screen brightness adjusting method and device, storage medium and terminal - Google Patents
Screen brightness adjusting method and device, storage medium and terminal Download PDFInfo
- Publication number
- CN114285936A CN114285936A CN202010983836.3A CN202010983836A CN114285936A CN 114285936 A CN114285936 A CN 114285936A CN 202010983836 A CN202010983836 A CN 202010983836A CN 114285936 A CN114285936 A CN 114285936A
- Authority
- CN
- China
- Prior art keywords
- brightness value
- value
- light intensity
- background picture
- brightness
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Controls And Circuits For Display Device (AREA)
Abstract
The embodiment of the application discloses a screen brightness adjusting method and device, a storage medium and a terminal. The method comprises the following steps: the method comprises the steps of measuring a light intensity value through an ambient light sensor, obtaining a brightness value of a background picture displayed on a display screen, determining a target brightness value according to the light intensity value and the brightness value of the background picture, and adjusting the brightness value of the display screen to the target brightness value. The method and the device are applied to certain specific scenes, so that the eyesight of the user is protected, and the experience of the user is improved.
Description
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a screen brightness method, an apparatus, a storage medium, and a terminal.
Background
With the development of communication technology, intelligent terminals are increasingly popularized in daily life, various sensors are arranged on the terminals, and the sensors are utilized to realize functions and improve user experience, such as distance sensors, light sensors, gravity sensors, acceleration sensors and the like. More generally, the light sensor is used for measuring a light intensity value of an environment where the terminal is located, the terminal can adjust screen brightness according to the light intensity value, and the lower the light intensity value is, the lower the screen brightness is, and the higher the light intensity value is, the higher the screen brightness is.
Disclosure of Invention
The embodiment of the application provides a screen brightness adjusting method, a screen brightness adjusting device, a storage medium and a terminal, and aims to solve the technical problems that when a terminal starts a function of automatically adjusting screen brightness in the related art, under the condition that light is low and the brightness value of a background picture of the terminal is low, the eyesight of a user is affected, and the user needs to manually adjust the screen brightness. The technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a method for adjusting screen brightness, where the method includes:
measuring a light intensity value by an ambient light sensor;
acquiring the brightness value of a background picture displayed on a display screen;
and determining a target brightness value according to the light intensity value and the brightness value of the background picture, and adjusting the brightness value of the display screen to the target brightness value.
Optionally, before the measuring the light intensity value by the ambient light sensor, the method further includes:
setting a mapping table; the mapping table represents the mapping relation between the light intensity value and the brightness value of the background picture and the brightness value of the display screen.
Optionally, the determining a target brightness value according to the light intensity value and the brightness value of the background picture includes:
when the light intensity value is in a first light intensity threshold range and the brightness value of the background picture is smaller than a brightness threshold, determining the target brightness value according to the mapping table; or
When the light intensity value is in a second light intensity threshold range and the brightness value of the background picture is smaller than a brightness threshold, determining the target brightness value according to the mapping table; or
And when the light intensity value is in a third light intensity threshold range and the brightness value of the background picture is smaller than a brightness threshold, determining the target brightness value according to the mapping table.
Optionally, the determining a target brightness value according to the light intensity value and the brightness value of the background picture further includes:
and when the light intensity value is at a fourth light intensity threshold value, determining the target brightness value according to the mapping table.
Optionally, the acquiring the brightness value of the background picture displayed on the display screen includes:
acquiring a background picture displayed on a display screen;
converting the background picture into a picture in an HLS color mode;
and obtaining the brightness value of the background picture based on the brightness parameter value of the picture in the HLS color mode.
Optionally, before the obtaining the brightness value of the background picture displayed on the display screen, the method further includes:
the method includes the steps of obtaining the type of an application program currently running, and determining that the application program is a game application program.
Optionally, the obtaining the type of the currently running application program and determining that the application program is a game application program further include:
the method comprises the steps of collecting a face image through a front camera, and determining that a user is watching the display screen based on the face image.
In a second aspect, an embodiment of the present application provides a screen brightness adjusting apparatus, where the apparatus includes:
the illuminance measuring module is used for measuring the light intensity value through the ambient light sensor;
the brightness value measuring module is used for acquiring the brightness value of a background picture displayed on a display screen;
and the brightness adjusting module is used for determining a target brightness value according to the light intensity value and the brightness value of the background picture and adjusting the brightness value of the display screen to the target brightness value.
In a third aspect, embodiments of the present application provide a storage medium having a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect, an embodiment of the present application provides a terminal, which may include: a memory and a processor; wherein the memory stores a computer program adapted to be loaded by the memory and to perform the above-mentioned method steps.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
when the scheme of the embodiment of the application is executed, the light intensity value is measured through the ambient light sensor, the brightness value of the background picture displayed on the display screen is obtained, the target brightness value is determined according to the light intensity value and the brightness value of the background picture, and the brightness value of the display screen is adjusted to the target brightness value. The method and the device have the advantages that the terminal is measured, the light intensity value of the environment and the brightness value of the background picture displayed by the display screen of the terminal are determined to be the target brightness value of the display screen, further, the screen brightness value of the display screen is adjusted to be the target brightness value, the eyesight of a user is protected under certain specific scenes, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a terminal provided in an embodiment of the present application;
FIG. 2 is a schematic structural diagram of an operating system and a user space provided in an embodiment of the present application;
FIG. 3 is an architectural diagram of the android operating system of FIG. 1;
FIG. 4 is an architecture diagram of the IOS operating system of FIG. 1;
fig. 5 is a schematic flowchart of a method for adjusting screen brightness according to an embodiment of the present disclosure;
fig. 6 is a schematic flowchart of a method for adjusting screen brightness according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a screen brightness adjusting apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.
Referring to fig. 1, a block diagram of a terminal according to an exemplary embodiment of the present application is shown. A terminal in the present application may include one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, memory 120, input device 130, and output device 140 may be connected by a bus 150.
The Memory 120 may include a Random Access Memory (RAM) or a read-only Memory (ROM). Optionally, the memory 120 includes a non-transitory computer-readable medium. The memory 120 may be used to store instructions, programs, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like, and the operating system may be an Android (Android) system (including a system based on Android system depth development), an IOS system developed by apple inc (including a system based on IOS system depth development), or other systems. The storage data area may also store data created by the terminal in use, such as a phonebook, audio-video data, chat log data, and the like.
Referring to fig. 2, the memory 120 may be divided into an operating system space, in which an operating system runs, and a user space, in which native and third-party applications run. In order to ensure that different third-party application programs can achieve a better operation effect, the operating system allocates corresponding system resources for the different third-party application programs. However, the requirements of different application scenarios in the same third-party application program on system resources are different, for example, in a local resource loading scenario, the third-party application program has a higher requirement on the disk reading speed; in the animation rendering scene, the third-party application program has a high requirement on the performance of the GPU. The operating system and the third-party application program are independent from each other, and the operating system cannot sense the current application scene of the third-party application program in time, so that the operating system cannot perform targeted system resource adaptation according to the specific application scene of the third-party application program.
In order to enable the operating system to distinguish a specific application scenario of the third-party application program, data communication between the third-party application program and the operating system needs to be opened, so that the operating system can acquire current scenario information of the third-party application program at any time, and further perform targeted system resource adaptation based on the current scenario.
Taking an operating system as an Android system as an example, programs and data stored in the memory 120 are as shown in fig. 3, and a Linux kernel layer 320, a system runtime library layer 340, an application framework layer 360, and an application layer 380 may be stored in the memory 120, where the Linux kernel layer 320, the system runtime library layer 340, and the application framework layer 360 belong to an operating system space, and the application layer 380 belongs to a user space. The Linux kernel layer 320 provides underlying drivers for various hardware of the terminal, such as a display driver, an audio driver, a camera driver, a bluetooth driver, a Wi-Fi driver, a power management, and the like. The system runtime library layer 340 provides a main feature support for the Android system through some C/C + + libraries. For example, the SQLite library provides support for a database, the OpenGL/ES library provides support for 3D drawing, the Webkit library provides support for a browser kernel, and the like. Also provided in the system runtime library layer 340 is an Android runtime library (Android runtime), which mainly provides some core libraries that can allow developers to write Android applications using the Java language. The application framework layer 360 provides various APIs that may be used in building an application, and developers may build their own applications by using these APIs, such as activity management, window management, view management, notification management, content provider, package management, session management, resource management, and location management. At least one application program runs in the application layer 380, and the application programs may be native application programs carried by the operating system, such as a contact program, a short message program, a clock program, a camera application, and the like; or a third-party application developed by a third-party developer, such as a game-like application, an instant messaging program, a photo beautification program, a shopping program, and the like.
Taking an operating system as an IOS system as an example, programs and data stored in the memory 120 are shown in fig. 4, and the IOS system includes: a Core operating system Layer 420(Core OS Layer), a Core Services Layer 440(Core Services Layer), a Media Layer 460(Media Layer), and a touchable Layer 480(Cocoa Touch Layer). The kernel operating system layer 420 includes an operating system kernel, drivers, and underlying program frameworks that provide functionality closer to hardware for use by program frameworks located in the core services layer 440. The core services layer 440 provides system services and/or program frameworks, such as a Foundation framework, an account framework, an advertisement framework, a data storage framework, a network connection framework, a geographic location framework, a motion framework, and so forth, as required by the application. The media layer 460 provides audiovisual related interfaces for applications, such as graphics image related interfaces, audio technology related interfaces, video technology related interfaces, audio video transmission technology wireless playback (AirPlay) interfaces, and the like. Touchable layer 480 provides various common interface-related frameworks for application development, and touchable layer 480 is responsible for user touch interaction operations on the terminal. Such as a local notification service, a remote push service, an advertising framework, a game tool framework, a messaging User Interface (UI) framework, a User Interface UIKit framework, a map framework, and so forth.
In the framework shown in FIG. 4, the framework associated with most applications includes, but is not limited to: a base framework in the core services layer 440 and a UIKit framework in the touchable layer 480. The base framework provides many basic object classes and data types, provides the most basic system services for all applications, and is UI independent. While the class provided by the UIKit framework is a basic library of UI classes for creating touch-based user interfaces, iOS applications can provide UIs based on the UIKit framework, so it provides an infrastructure for applications for building user interfaces, drawing, processing and user interaction events, responding to gestures, and the like.
The Android system can be referred to as a mode and a principle for realizing data communication between the third-party application program and the operating system in the IOS system, and details are not repeated herein.
The input device 130 is used for receiving input instructions or data, and the input device 130 includes, but is not limited to, a keyboard, a mouse, a camera, a microphone, or a touch device. The output device 140 is used for outputting instructions or data, and the output device 140 includes, but is not limited to, a display device, a speaker, and the like. In one example, the input device 130 and the output device 140 may be combined, and the input device 130 and the output device 140 are touch display screens for receiving touch operations of a user on or near the touch display screens by using any suitable object such as a finger, a touch pen, and the like, and displaying user interfaces of various applications. The touch display screen is generally provided at a front panel of the terminal. The touch display screen may be designed as a full-face screen, a curved screen, or a profiled screen. The touch display screen can also be designed to be a combination of a full-face screen and a curved-face screen, and a combination of a special-shaped screen and a curved-face screen, which is not limited in the embodiment of the present application.
In addition, those skilled in the art will appreciate that the configurations of the terminals illustrated in the above-described figures do not constitute limitations on the terminals, as the terminals may include more or less components than those illustrated, or some components may be combined, or a different arrangement of components may be used. For example, the terminal further includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WiFi) module, a power supply, a bluetooth module, and other components, which are not described herein again.
In the embodiment of the present application, the main body of execution of each step may be the terminal described above. Optionally, the execution subject of each step is an operating system of the terminal. The operating system may be an android system, an IOS system, or another operating system, which is not limited in this embodiment of the present application.
The terminal of the embodiment of the application can also be provided with a display device, and the display device can be various devices capable of realizing a display function, for example: a cathode ray tube display (CR), a light-emitting diode display (LED), an electronic ink panel, a Liquid Crystal Display (LCD), a Plasma Display Panel (PDP), and the like. The user can view information such as displayed text, images, video, etc. using the display device on the terminal 101. The terminal may be a smart phone, a tablet computer, a gaming device, an AR (Augmented Reality) device, an automobile, a data storage device, an audio playing device, a video playing device, a notebook, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, an electronic garment, or the like.
In the terminal shown in fig. 1, the processor 110 may be configured to call an application program stored in the memory 120 and specifically execute the screen brightness adjusting method according to the embodiment of the present application.
When the scheme of the embodiment of the application is executed, the light intensity value is measured through the ambient light sensor, the brightness value of the background picture displayed on the display screen is obtained, the target brightness value is determined according to the light intensity value and the brightness value of the background picture, and the brightness value of the display screen is adjusted to the target brightness value. The method and the device have the advantages that the terminal is measured, the light intensity value of the environment and the brightness value of the background picture displayed by the display screen of the terminal are determined to be the target brightness value of the display screen, further, the screen brightness value of the display screen is adjusted to be the target brightness value, the eyesight of a user is protected under certain specific scenes, and the user experience is improved.
In the following method embodiments, for convenience of description, only the main execution body of each step is described as a terminal.
Fig. 5 is a schematic flow chart of a method for adjusting screen brightness according to an embodiment of the present disclosure. As shown in fig. 5, the method of the embodiment of the present application may include the steps of:
s501, measuring the light intensity value through an ambient light sensor.
The ambient light sensor generally refers to a device that can sensitively sense light energy of light around the device and convert the light energy into an electrical signal. When measuring the light intensity value through the ambient light sensor, can measure the light intensity value according to the number of times that predetermines, calculate the average value of a plurality of light intensity values of many times measuring, regard this average value as final light intensity value, the number of times that predetermines can be set for according to actual conditions, this application embodiment does not do any restriction to this.
Specifically, the application main body of the embodiment of the application is the terminal, and the adjustment of the screen brightness of the terminal requires that the screen of the terminal is in a lighting state, and the function of automatically adjusting the screen brightness of the terminal is in an on state. When the terminal detects that the function of automatically adjusting the screen brightness is in an on state, the screen is in a lighting state, and the terminal indicates the ambient light sensor to measure the light intensity value.
S502, acquiring the brightness value of the background picture displayed on the display screen.
Generally, a background picture displayed on a display screen of a terminal may be obtained, and further, the background picture is converted into a picture in an HLS color mode, so as to obtain a brightness value of the background picture. Wherein, the HSL color mode is an extension of the HSB color mode, H in the HSB color mode represents chroma (Hue), B represents brightness (brightness), and S represents Saturation (Saturation); h in HLS color mode represents Hue (Hue), L represents luminosity (luminance), and S represents Saturation (Saturation), where Hue determines the feature of the color, luminosity determines the intensity of the color light, and Saturation indicates the color purity.
In the HLS color mode, the chroma can be set to have a color range value of 0-360; the intensity range value of the light intensity can be set to be 0-100; the saturation can be set to a range of values from 0 to 100. If the photometric value is 100, the color represented will be white; if the photometric value is 0, the color represented will be black.
S503, determining a target brightness value according to the light intensity value and the brightness value of the background picture, and adjusting the brightness value of the display screen to the target brightness value.
And the target intensity value is used for representing the screen brightness value of the terminal after the screen brightness is adjusted.
Generally, a mapping table may be set, where the mapping table includes a light intensity value, a luminance value of a background picture and a target luminance value, a mapping relationship between the three values is set, a position of the light intensity value in the mapping table and a position of the luminance value of the background picture in the mapping table may be determined, further, a table is looked up to determine a value of the target intensity value, a magnitude between a luminance value of a current display screen and the target luminance value is determined, and when the luminance value of the display screen is smaller than the target luminance value, the luminance value of the display screen may be increased to the target luminance value; when the brightness value of the display screen is greater than the target brightness value, the brightness value of the display screen may be reduced to the target brightness value.
For example: the application scenario of the embodiment of the present application may be that a user plays a game in a room that is not lighted at night, there is no light at this time, and the background picture in the game is also deep, if the light intensity value is 0 lux, the brightness value of the background picture is 20, and the target brightness value in the mapping table is set to be 30. Because the terminal starts the automatic brightness adjusting function, when the light intensity value is 0, the brightness value of the display screen is 15, and at the moment, the brightness value of the display screen is smaller than the target brightness value, and the terminal can increase the brightness value of the display screen to the target brightness value.
When the scheme of the embodiment of the application is executed, the light intensity value is measured through the ambient light sensor, the brightness value of the background picture displayed on the display screen is obtained, the target brightness value is determined according to the light intensity value and the brightness value of the background picture, and the brightness value of the display screen is adjusted to the target brightness value. The method and the device have the advantages that the terminal is measured, the light intensity value of the environment and the brightness value of the background picture displayed by the display screen of the terminal are determined to be the target brightness value of the display screen, further, the screen brightness value of the display screen is adjusted to be the target brightness value, the eyesight of a user is protected under certain specific scenes, and the user experience is improved.
Fig. 6 is a schematic flow chart of a method for adjusting screen brightness according to an embodiment of the present disclosure. As shown in fig. 6, the method of the embodiment of the present application may include the steps of:
s601, setting a mapping table.
The mapping table represents the mapping relation between the light intensity value and the brightness value of the background picture and the brightness value of the display screen. The light intensity value is used for representing the light intensity value of the environment around the terminal, the brightness value of the background picture is used for representing the brightness value of the background picture displayed on the display screen of the terminal, and the brightness value of the display screen is used for representing the brightness value of the current screen of the terminal.
Generally, the target brightness value corresponding to each light intensity value and the brightness value of each background picture can be determined, and the values are written into the mapping table.
For example: as can be specifically described with reference to the following tables 1 and 2, table 1 is a mapping table of the present application, and table 2 is a table of automatically adjusting screen brightness corresponding to the function of automatically adjusting screen brightness in the related art, and represents a relationship between a light intensity value and a brightness value of a display screen. Comparing the table 1 with the table 2, adding the brightness value of the background picture into the table 1, and determining the brightness value of the display screen based on the brightness value and the light intensity value of the background picture; table 2 is a table for determining the brightness value of the display screen based on the light intensity values.
TABLE 1
Brightness value of display screen | Light intensity value | Brightness value of background picture |
<item>20</item> | <!--0-5--> | 0-10 |
<item>35</item> | <!--5-10--> | 10-20 |
<item>40</item> | <!--10-20--> | 20-40 |
<item>50</item> | <!--20-30--> | 0-100 |
<item>80</item> | <!--30-50--> | 0-100 |
<item>100</item> | <!--50-75-> | 0-100 |
<item>120</item> | <!--75-100--> | 0-100 |
<item>140</item> | <!--100-150--> | 0-100 |
<item>160</item> | <!--150-200--> | 0-100 |
<item>180</item> | <!--200-300--> | 0-100 |
<item>200</item> | <!--300-500--> | 0-100 |
<item>220</item> | <!--500-1000--> | 0-100 |
<item>250</item> | <!--1000+--> | 0-100 |
TABLE 2
S602, measuring the light intensity value by the ambient light sensor.
The application scenario of the embodiment of the application is that the function of automatically adjusting the screen brightness of the terminal is in an open state, and the screen of the terminal is in a bright screen state. When the terminal is identified to meet the two conditions, the terminal indicates the ambient light sensor to measure the light intensity value, when the light intensity value is measured, the light intensity value can be measured according to preset times, the average value of the measured light intensity values is calculated, the average value is used as the final light intensity value, the preset times can be set according to the actual situation, for example, 5 times of measurement in one second can be set.
S603, acquiring the type of the currently running application program, and determining the application program to be a game application program.
Generally, the method can be applied to game applications, after the light intensity value is measured, the terminal can obtain the type of the currently running application program, the luminance value of the background picture in a part of the game application scene is relatively low, and when the user plays a game with the background picture with the relatively low luminance value, the environment where the user is located may be night with the relatively low light intensity value, or day with the relatively high light intensity value or in a lighted room.
S604, acquiring a face image through the front camera, and determining that the user watches the display screen based on the face image.
Generally, after determining that the application currently running on the terminal is the game application based on S603, it may be detected whether the user is currently watching the display screen, a front-facing camera acquires a face image, face recognition is performed on the face image by using a face recognition technology, an eye state of the user is recognized, and the user is determined to be watching the display screen of the terminal according to the eye state.
S605, obtaining a background picture displayed on the display screen, and converting the background picture into a picture in an HLS color mode.
S606, obtaining the brightness value of the background picture based on the brightness parameter value of the picture in the HLS color mode.
It should be noted that the application scenario in the embodiment of the present application is a scenario in which a user plays a game, but the application scenario in the present application is not limited to this, and the present application is also applicable to an application program in which a terminal runs other background pictures and the brightness value is low.
For S605 and S606, after determining that the terminal is running the game program and the user is watching the display screen at this time, the brightness value of the background picture of the current display screen may be obtained, the brightness value of the background picture is obtained, the background picture is obtained first, further, the background picture is converted into a picture in the HLS color mode, and the brightness value of the background picture is determined based on the luminosity l (luminance) in the HLS color mode. H in the HLS color mode represents Hue (Hue), L represents luminosity (luminance), and S represents Saturation (Saturation), where Hue determines the feature of a color, luminosity determines the intensity of a color light, and Saturation indicates the color purity. In the HLS color mode, the chroma can be set to have a color range value of 0-360; the intensity range value of the light intensity can be set to be 0-100; the saturation can be set to a range of values from 0 to 100. If the photometric value is 100, the color represented will be white; if the photometric value is 0, the color represented will be black.
S607, determining a target brightness value according to the light intensity value and the brightness value of the background picture, and adjusting the brightness value of the display screen to the target brightness value.
Generally, after the brightness value of the light and the brightness value of the background picture are obtained, a table may be looked up in the mapping table in S601 to determine the corresponding target brightness value. In the mapping table shown in table 1, it can be seen that when the light intensity value is in the first light intensity threshold range and the luminance value of the background picture is in the first luminance threshold range, the target luminance value is determined according to the mapping table, for example: the light intensity value is in the range of 0-5, the brightness value of the background picture is in the range of 0-10, and the target brightness value is 20 by looking up a table; when the light intensity value is within the second light intensity threshold range and the brightness value of the background picture is within the second brightness threshold range, determining a target brightness value according to the mapping table, for example: the light intensity value is within the range of 5-10, the brightness value of the background picture is within the range of 10-20, and the target brightness value is 35 by table lookup; when the light intensity value is within the third light intensity threshold range and the brightness value of the background picture is within the third brightness threshold range, determining a target brightness value according to the mapping table, for example: the light intensity value is within the range of 10-20, the brightness value of the background picture is within the range of 20-40, and the target brightness value is 40 by looking up a table; when the light intensity value is in the fourth light intensity threshold range, determining a target brightness value according to the mapping table, such as: the light intensity value is in the range of 20-30, no matter what the brightness value of the background picture is, the target brightness value is determined according to the automatic adjustment screen brightness table in table 2. And according to the target brightness value obtained by the table lookup, when the brightness value of the display screen is not equal to the target brightness value, adjusting the brightness value of the display screen to the target brightness value.
When the scheme of the embodiment of the application is executed, the light intensity value is measured through the ambient light sensor, the brightness value of the background picture displayed on the display screen is obtained, the target brightness value is determined according to the light intensity value and the brightness value of the background picture, and the brightness value of the display screen is adjusted to the target brightness value. The method and the device have the advantages that the terminal is measured, the light intensity value of the environment and the brightness value of the background picture displayed by the display screen of the terminal are determined to be the target brightness value of the display screen, further, the screen brightness value of the display screen is adjusted to be the target brightness value, the eyesight of a user is protected under certain specific scenes, and the user experience is improved.
Fig. 7 is a schematic structural diagram of a screen brightness adjusting device according to an embodiment of the present disclosure. The screen brightness adjusting apparatus 700 may be implemented by software, hardware or a combination of both as a whole or a part of a server. The screen brightness adjusting apparatus 700 includes:
the illuminance measuring module 710 is configured to measure a light intensity value by using an ambient light sensor;
the brightness value measuring module 720 is configured to obtain a brightness value of a background picture displayed on the display screen;
the brightness adjusting module 730 is configured to determine a target brightness value according to the light intensity value and the brightness value of the background picture, and adjust the brightness value of the display screen to the target brightness value.
Optionally, the screen brightness adjusting apparatus 700 further includes:
the mapping table setting module is used for setting a mapping table; the mapping table represents the mapping relation between the light intensity value and the brightness value of the background picture and the brightness value of the display screen.
Optionally, the brightness adjusting module 730 includes:
the first adjusting unit is used for determining the target brightness value according to the mapping table when the light intensity value is in a first illumination threshold range and the brightness value of the background picture is smaller than a brightness threshold; or
The second adjusting unit is used for determining the target brightness value according to the mapping table when the light intensity value is in a second light intensity threshold range and the brightness value of the background picture is smaller than a brightness threshold; or
And the third adjusting unit is used for determining the target brightness value according to the mapping table when the light intensity value is in a third light intensity threshold range and the brightness value of the background picture is smaller than a brightness threshold.
Optionally, the brightness adjusting module 730 further comprises:
and the fourth adjusting unit is used for determining the target brightness value according to the mapping table when the light intensity value is at a fourth light intensity threshold value.
Optionally, the brightness value measuring module 720 includes:
the first measuring unit is used for acquiring a background picture displayed on a display screen;
a second measuring unit, for converting the background picture into a picture in HLS color mode;
and the third measurement unit is used for obtaining the brightness value of the background picture based on the brightness parameter value of the picture of the HLS color mode.
Optionally, the brightness value measuring module 720 further includes:
the game device comprises a first determining unit, a second determining unit and a third determining unit, wherein the first determining unit is used for acquiring the type of the currently running application program and determining the application program to be a game application program.
Optionally, the brightness value measuring module 720 further includes:
and the second determination unit is used for acquiring a face image through a front camera and determining that the user watches the display screen based on the face image.
When the scheme of the embodiment of the application is executed, the light intensity value is measured through the ambient light sensor, the brightness value of the background picture displayed on the display screen is obtained, the target brightness value is determined according to the light intensity value and the brightness value of the background picture, and the brightness value of the display screen is adjusted to the target brightness value. The method and the device have the advantages that the terminal is measured, the light intensity value of the environment and the brightness value of the background picture displayed by the display screen of the terminal are determined to be the target brightness value of the display screen, further, the screen brightness value of the display screen is adjusted to be the target brightness value, the eyesight of a user is protected under certain specific scenes, and the user experience is improved.
An embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are suitable for being loaded by a processor and executing the above method steps, and a specific execution process may refer to specific descriptions of the embodiments shown in fig. 5 and fig. 6, which are not described herein again.
The application also provides a terminal, which comprises a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory or a random access memory.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.
Claims (10)
1. A method for adjusting screen brightness, the method comprising:
measuring a light intensity value by an ambient light sensor;
acquiring the brightness value of a background picture displayed on a display screen;
and determining a target brightness value according to the light intensity value and the brightness value of the background picture, and adjusting the brightness value of the display screen to the target brightness value.
2. The method of claim 1, wherein prior to measuring the light intensity value with the ambient light sensor, further comprising:
setting a mapping table; the mapping table represents the mapping relation between the light intensity value and the brightness value of the background picture and the brightness value of the display screen.
3. The method of claim 2, wherein determining a target brightness value according to the light intensity value and a brightness value of the background picture comprises:
when the light intensity value is in a first light intensity threshold range and the brightness value of the background picture is smaller than a brightness threshold, determining the target brightness value according to the mapping table; or
When the light intensity value is in a second light intensity threshold range and the brightness value of the background picture is smaller than a brightness threshold, determining the target brightness value according to the mapping table; or
And when the light intensity value is in a third light intensity threshold range and the brightness value of the background picture is smaller than a brightness threshold, determining the target brightness value according to the mapping table.
4. The method of claim 2, wherein determining a target brightness value according to the light intensity value and a brightness value of the background picture further comprises:
and when the light intensity value is at a fourth light intensity threshold value, determining the target brightness value according to the mapping table.
5. The method of claim 1, wherein the obtaining the brightness value of the background picture displayed on the display screen comprises:
acquiring a background picture displayed on a display screen;
converting the background picture into a picture in an HLS color mode;
and obtaining the brightness value of the background picture based on the brightness parameter value of the picture in the HLS color mode.
6. The method according to claim 1, wherein before obtaining the brightness value of the background picture displayed on the display screen, the method further comprises:
the method includes the steps of obtaining the type of an application program currently running, and determining that the application program is a game application program.
7. The method of claim 4, wherein obtaining the type of currently running application and determining that the application is a game application further comprises:
the method comprises the steps of collecting a face image through a front camera, and determining that a user is watching the display screen based on the face image.
8. A screen brightness adjustment apparatus, comprising:
the illuminance measuring module is used for measuring the light intensity value through the ambient light sensor;
the brightness value measuring module is used for acquiring the brightness value of a background picture displayed on a display screen;
and the brightness adjusting module is used for determining a target brightness value according to the light intensity value and the brightness value of the background picture and adjusting the brightness value of the display screen to the target brightness value.
9. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to carry out the method steps according to any one of claims 1 to 7.
10. A terminal, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010983836.3A CN114285936B (en) | 2020-09-17 | 2020-09-17 | Screen brightness adjustment method and device, storage medium and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010983836.3A CN114285936B (en) | 2020-09-17 | 2020-09-17 | Screen brightness adjustment method and device, storage medium and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114285936A true CN114285936A (en) | 2022-04-05 |
CN114285936B CN114285936B (en) | 2023-09-15 |
Family
ID=80867387
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010983836.3A Active CN114285936B (en) | 2020-09-17 | 2020-09-17 | Screen brightness adjustment method and device, storage medium and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114285936B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115002554A (en) * | 2022-05-13 | 2022-09-02 | 广州方硅信息技术有限公司 | Live broadcast picture adjusting method, system and device and computer equipment |
CN116110351A (en) * | 2023-04-13 | 2023-05-12 | 荣耀终端有限公司 | Backlight control method, device, chip, electronic equipment and medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107799093A (en) * | 2017-12-08 | 2018-03-13 | 深圳市金立通信设备有限公司 | Adjust method, terminal and the computer-readable recording medium of screen luminance of terminal |
CN107818753A (en) * | 2017-11-22 | 2018-03-20 | 广东欧珀移动通信有限公司 | Screen brightness regulation method, device, storage medium and electronic equipment |
CN108574778A (en) * | 2018-04-19 | 2018-09-25 | Oppo广东移动通信有限公司 | Throw screen brightness adjusting method and Related product |
CN108764056A (en) * | 2018-05-03 | 2018-11-06 | Oppo广东移动通信有限公司 | Brightness adjusting method and related product |
CN109032741A (en) * | 2018-07-25 | 2018-12-18 | 努比亚技术有限公司 | Screen luminance of terminal adjusting method, mobile terminal and storage medium |
CN109951594A (en) * | 2017-12-20 | 2019-06-28 | 广东欧珀移动通信有限公司 | Intelligent adjusting method, device, storage medium and the mobile terminal of screen intensity |
CN110689862A (en) * | 2019-11-13 | 2020-01-14 | 深圳市道通科技股份有限公司 | Screen brightness adjusting method and mobile terminal |
CN111667800A (en) * | 2020-06-16 | 2020-09-15 | 广州视源电子科技股份有限公司 | Image display parameter adjusting method and device, storage medium and terminal |
CN112714216A (en) * | 2020-12-17 | 2021-04-27 | 宇龙计算机通信科技(深圳)有限公司 | Brightness adjusting method and device, storage medium and terminal |
-
2020
- 2020-09-17 CN CN202010983836.3A patent/CN114285936B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107818753A (en) * | 2017-11-22 | 2018-03-20 | 广东欧珀移动通信有限公司 | Screen brightness regulation method, device, storage medium and electronic equipment |
CN107799093A (en) * | 2017-12-08 | 2018-03-13 | 深圳市金立通信设备有限公司 | Adjust method, terminal and the computer-readable recording medium of screen luminance of terminal |
CN109951594A (en) * | 2017-12-20 | 2019-06-28 | 广东欧珀移动通信有限公司 | Intelligent adjusting method, device, storage medium and the mobile terminal of screen intensity |
CN108574778A (en) * | 2018-04-19 | 2018-09-25 | Oppo广东移动通信有限公司 | Throw screen brightness adjusting method and Related product |
CN108764056A (en) * | 2018-05-03 | 2018-11-06 | Oppo广东移动通信有限公司 | Brightness adjusting method and related product |
CN109032741A (en) * | 2018-07-25 | 2018-12-18 | 努比亚技术有限公司 | Screen luminance of terminal adjusting method, mobile terminal and storage medium |
CN110689862A (en) * | 2019-11-13 | 2020-01-14 | 深圳市道通科技股份有限公司 | Screen brightness adjusting method and mobile terminal |
CN111667800A (en) * | 2020-06-16 | 2020-09-15 | 广州视源电子科技股份有限公司 | Image display parameter adjusting method and device, storage medium and terminal |
CN112714216A (en) * | 2020-12-17 | 2021-04-27 | 宇龙计算机通信科技(深圳)有限公司 | Brightness adjusting method and device, storage medium and terminal |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115002554A (en) * | 2022-05-13 | 2022-09-02 | 广州方硅信息技术有限公司 | Live broadcast picture adjusting method, system and device and computer equipment |
CN115002554B (en) * | 2022-05-13 | 2024-07-26 | 广州方硅信息技术有限公司 | Live broadcast picture adjustment method, system, device, computer equipment and medium |
CN116110351A (en) * | 2023-04-13 | 2023-05-12 | 荣耀终端有限公司 | Backlight control method, device, chip, electronic equipment and medium |
CN116110351B (en) * | 2023-04-13 | 2023-09-19 | 荣耀终端有限公司 | Backlight control method, device, chip, electronic equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN114285936B (en) | 2023-09-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111667800B (en) | Image display parameter adjusting method and device, storage medium and terminal | |
US20230035047A1 (en) | Remote assistance method, device, storage medium, and terminal | |
CN111767554B (en) | Screen sharing method and device, storage medium and electronic equipment | |
CN112714216B (en) | Brightness adjusting method and device, storage medium and terminal | |
CN111225138A (en) | Camera control method and device, storage medium and terminal | |
CN112839223B (en) | Image compression method, image compression device, storage medium and electronic equipment | |
CN114285936B (en) | Screen brightness adjustment method and device, storage medium and terminal | |
CN111127469A (en) | Thumbnail display method, device, storage medium and terminal | |
CN111913614B (en) | Multi-picture display control method and device, storage medium and display | |
CN113163055B (en) | Vibration adjusting method and device, storage medium and electronic equipment | |
CN111866372A (en) | Self-photographing method, device, storage medium and terminal | |
CN113595662B (en) | Signal prompting method, device, terminal equipment and storage medium | |
CN111986454A (en) | Wireless earphone searching method, device, storage medium and terminal | |
WO2022218191A1 (en) | Method and apparatus for displaying amount of charge, storage medium, and terminal device | |
CN113450762B (en) | Text reading method, text reading device, terminal and storage medium | |
CN112612633B (en) | Inter-process communication method, inter-process communication device, storage medium and terminal | |
CN112988097A (en) | Display screen control method and device, storage medium and mobile terminal | |
CN113419650A (en) | Data moving method and device, storage medium and electronic equipment | |
CN113691676B (en) | Equipment state prompting method and device, storage medium and electronic equipment | |
CN115314588B (en) | Background synchronization method, device, terminal, equipment, system and storage medium | |
CN110609599A (en) | Display method and device of double-screen terminal, storage medium and terminal | |
WO2023273936A1 (en) | Wallpaper setting method and apparatus, and storage medium and electronic device | |
CN112859050B (en) | Correction method and device for optical distance sensor, storage medium and terminal | |
CN111556194B (en) | Brightness adjusting method and device, storage medium and terminal | |
CN112612487B (en) | Application installation method, device, storage medium and terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |