CN114285936B - Screen brightness adjustment method and device, storage medium and terminal - Google Patents

Screen brightness adjustment method and device, storage medium and terminal Download PDF

Info

Publication number
CN114285936B
CN114285936B CN202010983836.3A CN202010983836A CN114285936B CN 114285936 B CN114285936 B CN 114285936B CN 202010983836 A CN202010983836 A CN 202010983836A CN 114285936 B CN114285936 B CN 114285936B
Authority
CN
China
Prior art keywords
value
brightness value
brightness
light intensity
background picture
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.)
Active
Application number
CN202010983836.3A
Other languages
Chinese (zh)
Other versions
CN114285936A (en
Inventor
刘植
邵俊骏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Coolpad Software Technology Co Ltd
Original Assignee
Nanjing Coolpad Software Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nanjing Coolpad Software Technology Co Ltd filed Critical Nanjing Coolpad Software Technology Co Ltd
Priority to CN202010983836.3A priority Critical patent/CN114285936B/en
Publication of CN114285936A publication Critical patent/CN114285936A/en
Application granted granted Critical
Publication of CN114285936B publication Critical patent/CN114285936B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)

Abstract

The embodiment of the application discloses a screen brightness adjusting method, a device, a storage medium and a terminal. The method comprises the following steps: and measuring the light intensity value through an ambient light sensor, acquiring the 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 application protects the eyesight of the user under certain specific scenes and improves the experience of the user.

Description

Screen brightness adjustment method and device, storage medium and terminal
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a method and apparatus for screen brightness, a storage medium, and a terminal.
Background
With the development of communication technology, intelligent terminals are becoming more and more popular in daily life, and various sensors are arranged on the terminals, so that functions are realized by using the sensors, and user experience such as a distance sensor, a light sensor, a gravity sensor, an acceleration sensor and the like is improved. More commonly, the light sensor is used for measuring the light intensity value of the environment where the terminal is located, the terminal can adjust the screen brightness according to the light intensity value, 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 device, a storage medium and a terminal, and aims to solve the technical problem that when the terminal is started to automatically adjust the 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 influenced and the user is required 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 a 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 the 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 illuminance threshold range and the brightness value of the background picture is smaller than a brightness threshold value, determining the target brightness value according to the mapping table; or (b)
When the light intensity value is in a second illuminance threshold range and the brightness value of the background picture is smaller than a brightness threshold value, determining the target brightness value according to the mapping table; or (b)
And when the light intensity value is in a third illuminance threshold range and the brightness value of the background picture is smaller than the brightness threshold value, determining the target brightness value according to the mapping table.
Optionally, the determining the 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 in the fourth illuminance threshold value, determining the target brightness value according to the mapping table.
Optionally, the obtaining 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 comprises the steps of obtaining the type of an application program running currently 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 includes:
and acquiring 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 adjustment device, including:
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 obtaining the brightness value of the background picture displayed on the display screen;
and the brightness adjustment 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-described 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 technical scheme provided by the embodiment of the application has the beneficial effects that at least:
when the scheme of the embodiment of the application is executed, the ambient light sensor is used for measuring the light intensity value, obtaining the brightness value of the background picture displayed on the display screen, determining the 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. According to the application, the target brightness value of the display screen is determined by measuring the light intensity value of the environment of the terminal and the brightness value of the background picture displayed by the display screen of the terminal, and further, the screen brightness value of the display screen is adjusted to the target brightness value, so that the eyesight of a user is protected under certain specific scenes, and the experience of the user is improved.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application and that other drawings may be obtained from them without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of a terminal according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an operating system and user space provided by an embodiment of the present application;
FIG. 3 is an architecture 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 flowchart of a method for adjusting screen brightness according to an embodiment of the present application;
fig. 6 is a flowchart of a method for adjusting screen brightness according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a screen brightness adjusting device 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 of 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 apparent that the described embodiments are only some embodiments of the present application, not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application as detailed in the accompanying claims.
In the description of the present application, it should 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 will be understood in specific cases by those of ordinary skill in the art.
Referring to fig. 1, a block diagram illustrating a structure of a terminal according to an exemplary embodiment of the present application is shown. The terminal of the present application may include one or more of the following components: processor 110, memory 120, input device 130, output device 140, and bus 150. The processor 110, the memory 120, the input device 130, and the output device 140 may be connected by a bus 150.
Processor 110 may include one or more processing cores. The processor 110 connects various parts within the overall terminal using various interfaces and lines, performs various functions of the terminal and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and invoking data stored in the memory 120. Alternatively, the processor 110 may be implemented in at least one hardware form of digital signal processing (digital signal processing, DSP), field-programmable gate array (field-programmable gate array, FPGA), programmable logic array (programmable logic Array, PLA). The processor 110 may integrate one or a combination of several of a central processing unit (central processing unit, CPU), an image processor (graphics processing unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for being responsible for rendering and drawing of display content; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 110 and may be implemented solely by a single communication chip.
The memory 120 may include a random access memory (random Access Memory, RAM) or a read-only memory (ROM). Optionally, the memory 120 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). Memory 120 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, which may be an Android (Android) system (including a system developed based on the Android system), an IOS system developed by apple corporation (including a system developed based on the IOS system), or other systems, 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. The storage data area may also store data created by the terminal in use (such as phonebook, audio-video data, chat-record data), etc.
Referring to FIG. 2, the memory 120 may be divided into an operating system space in which the 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 better operation effects, 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, under the local resource loading scenario, the third party application program has higher requirement on the disk reading speed; in the animation rendering scene, the third party application program has higher requirements on the GPU performance. The operating system and the third party application program are mutually independent, and the operating system often cannot timely sense the current application scene of the third party application program, 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 specific application scenes of the third-party application program, data communication between the third-party application program and the operating system needs to be communicated, so that the operating system can acquire current scene information of the third-party application program at any time, and targeted system resource adaptation is performed based on the current scene.
Taking an operating system as an Android system as an example, as shown in fig. 3, a program and data stored in the memory 120 may be stored in the memory 120 with a Linux kernel layer 320, a system runtime library layer 340, an application framework layer 360 and an application layer 380, 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 the various hardware of the terminal with the underlying drivers such as display drivers, audio drivers, camera drivers, bluetooth drivers, wi-Fi drivers, power management, etc. The system runtime layer 340 provides the main feature support for the Android system through some C/c++ libraries. For example, the SQLite library provides support for databases, the OpenGL/ES library provides support for 3D graphics, the Webkit library provides support for browser kernels, and the like. Also provided in the system runtime library layer 340 is a An Zhuoyun runtime library (Android run) which provides mainly 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 applications, which developers can also build their own applications by using, for example, campaign management, window management, view management, notification management, content provider, package management, call management, resource management, location management. At least one application program is running in the application layer 380, and these application programs may be native application programs of the operating system, such as a contact program, a short message program, a clock program, a camera application, etc.; and may also be a third party application developed by a third party developer, such as a game-like application, instant messaging program, photo beautification program, shopping program, etc.
Taking an operating system as an IOS system as an example, the programs and data stored in the memory 120 are shown in fig. 4, the IOS system includes: core operating system layer 420 (Core OS layer), core service layer 440 (Core Services layer), media layer 460 (Media layer), and touchable layer 480 (Cocoa Touch Layer). The core operating system layer 420 includes an operating system kernel, drivers, and underlying program frameworks that provide more hardware-like functionality for use by the program frameworks at the core services layer 440. The core services layer 440 provides system services and/or program frameworks required by the application, such as a Foundation (Foundation) framework, an account framework, an advertisement framework, a data storage framework, a network connection framework, a geographic location framework, a sports framework, and the like. The media layer 460 provides an interface for applications related to audiovisual aspects, such as a graphics-image related interface, an audio technology related interface, a video technology related interface, an audio video transmission technology wireless play (AirPlay) interface, and so forth. The touchable layer 480 provides various commonly used interface-related frameworks for application development, with the touchable layer 480 being responsible for user touch interactions on the terminal. Such as a local notification service, a remote push service, an advertisement framework, a game tool framework, a message User Interface (UI) framework, a User Interface UIKit framework, a map framework, and so forth.
Among the frameworks illustrated in fig. 4, frameworks related to most applications include, but are not limited to: the infrastructure in core services layer 440 and the UIKit framework in touchable layer 480. The infrastructure provides many basic object classes and data types, providing the most basic system services for all applications, independent of the UI. While the class provided by the UIKit framework is a basic UI class library for creating touch-based user interfaces, iOS applications can provide UIs based on the UIKit framework, so it provides the infrastructure for applications to build user interfaces, draw, process and user interaction events, respond to gestures, and so on.
The manner and principle of implementing data communication between the third party application program and the operating system in the IOS system can refer to the Android system, and the application is not described herein.
The input device 130 is configured to receive 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 to output 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 a touch display screen for receiving a touch operation thereon or thereabout by a user using a finger, a touch pen, or any other suitable object, and displaying a user interface of each application program. The touch display screen is typically provided at the front panel of the terminal. The touch display screen may be designed as a full screen, a curved screen, or a contoured screen. The touch display screen may also be designed as a combination of a full screen and a curved screen, and the combination of a special-shaped screen and a curved screen, which is not limited in the embodiment of the present application.
In addition, those skilled in the art will appreciate that the configuration of the terminal illustrated in the above-described figures does not constitute a limitation of the terminal, and the terminal may include more or less components than illustrated, or may combine certain components, or may have a different arrangement of components. For example, the terminal further includes components such as a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (wireless fidelity, wiFi) module, a power supply, and a bluetooth module, which are not described herein.
In the embodiment of the present application, the execution subject 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 other operating systems, which is not limited by the embodiments of the present application.
The terminal of the embodiment of the application can be further provided with a display device, and the display device can be various devices capable of realizing display functions, such as: cathode ray tube displays (cathode ray tubedisplay, CR), light-emitting diode displays (light-emitting diode display, LED), electronic ink screens, liquid crystal displays (liquid crystal display, LCD), plasma display panels (plasma display panel, PDP), and the like. A user may view displayed text, images, video, etc. information using a 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, electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, an electronic article of clothing, etc.
In the terminal shown in fig. 1, the processor 110 may be used to call an application program stored in the memory 120 and specifically execute the screen brightness adjustment method according to the embodiment of the present application.
When the scheme of the embodiment of the application is executed, the ambient light sensor is used for measuring the light intensity value, obtaining the brightness value of the background picture displayed on the display screen, determining the 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. According to the application, the target brightness value of the display screen is determined by measuring the light intensity value of the environment of the terminal and the brightness value of the background picture displayed by the display screen of the terminal, and further, the screen brightness value of the display screen is adjusted to the target brightness value, so that the eyesight of a user is protected under certain specific scenes, and the experience of the user is improved.
In the following method embodiments, for convenience of explanation, only the execution subject of each step is described as a terminal.
Fig. 5 is a flowchart of a method for adjusting brightness of a screen according to an embodiment of the application. As shown in fig. 5, the method according to the embodiment of the present application may include the following steps:
s501, the light intensity value is measured by the ambient light sensor.
An ambient light sensor is generally a device that is capable of sensing the light energy of light surrounding the device and converting the light energy into an electrical signal. When the light intensity value is measured by the ambient light sensor, the light intensity value can be measured according to the preset times, the average value of the light intensity values measured for a plurality of times is calculated, the average value is taken as the final light intensity value, the preset times can be set according to the actual situation, and the embodiment of the application is not limited in any way.
Specifically, the application body of the embodiment of the application is a terminal, and the adjustment of the screen brightness of the terminal is required to be in a lighting state and the function of automatically adjusting the screen brightness of the terminal is required to be in an on state. The function of automatically adjusting the brightness of the screen is detected to be in an on state at the terminal, and the screen is in a lighting state, and the terminal instructs the ambient light sensor to measure the light intensity value.
S502, obtaining the brightness value of the background picture displayed on the display screen.
Generally, a background picture displayed on a terminal display screen can be obtained, and further, the background picture is converted into a picture in an HLS color mode, so that a brightness value of the background picture can be obtained. Wherein the HSL color mode is an extension of the HSB color mode in which H represents chromaticity (Hue), B represents luminance (brightness), and S represents Saturation (Saturation); the H in HLS color mode represents chromaticity (Hue), L represents luminosity (light), and S represents Saturation (Saturation), where chromaticity determines the appearance characteristics of color, luminosity determines the intensity of color light, and Saturation indicates the color purity.
In the HLS color mode, the color range value of the chromaticity can be set between 0 and 360; the value of the intensity range which can be set by luminosity is 0-100; the saturation can be set to a range of values from 0 to 100. If the luminosity value is 100, the color represented will be white; if the luminosity 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.
Wherein the target intensity value is used to represent a screen brightness value of the terminal after the adjustment of the screen brightness.
In general, 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, and a mapping relation between the three values is set, so that 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 look-up is performed to determine a value of the target intensity value, determine a size between the luminance value of the current display screen and the target luminance value, and when the luminance value of the display screen is smaller than the target luminance value, increase the luminance value of the display screen by the target luminance value; when the luminance value of the display screen is greater than the target luminance value, the luminance value of the display screen may be reduced to the target luminance value.
For example: the application scenario of the embodiment of the application may be that the user plays a game in a room which is not lighted at night, no light exists at this time, and the background picture in the game is also deeper, 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 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 ambient light sensor is used for measuring the light intensity value, obtaining the brightness value of the background picture displayed on the display screen, determining the 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. According to the application, the target brightness value of the display screen is determined by measuring the light intensity value of the environment of the terminal and the brightness value of the background picture displayed by the display screen of the terminal, and further, the screen brightness value of the display screen is adjusted to the target brightness value, so that the eyesight of a user is protected under certain specific scenes, and the experience of the user is improved.
Fig. 6 is a flowchart of a method for adjusting brightness of a screen according to an embodiment of the application. As shown in fig. 6, the method according to the embodiment of the present application may include the following steps:
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 surrounding environment of 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.
In general, a target luminance value corresponding to each light intensity value and each luminance value of the background picture may be determined, and these values are written into the mapping table.
For example: referring to tables 1 and 2 below, 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 the relationship between the light intensity value and the brightness value of the display screen. Comparing table 1 with table 2, wherein table 1 adds the brightness value of the background picture, 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 determination of brightness values for a display screen based on 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 an ambient light sensor.
The application scene of the embodiment of the application is that the function of automatically adjusting the screen brightness of the terminal is in an on 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, the light intensity value can be measured according to the preset times when the light intensity value is measured, the average value of the measured light intensity values is calculated, the average value is taken as the final light intensity value, the preset times can be set according to actual conditions, for example, one second measurement can be set for 5 times, and the like.
S603, acquiring the type of the currently running application program, and determining that the application program is a game application program.
In general, the application can be applied to game applications, after measuring the light intensity value, the terminal can acquire the type of the currently running application program, and the brightness value of the background picture in part of game application scenes is lower, so when the user plays a game with lower brightness value of the background picture, the environment in which the user is positioned can be at night with lower light intensity value or in daytime with higher light intensity value or in a room with lights.
S604, acquiring a face image through a front camera, and determining that a user is watching a 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, face images are collected through the front camera, face recognition is performed on the face images by using a face recognition technology, the eye state of the user is identified, 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 a 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 where a user plays a game, but the application scenario of the present application is not limited to this, and the present application is also applicable to applications where a terminal runs other background pictures with lower brightness values.
For S605 and S606, after determining that the terminal is running the game program and the user is viewing the display screen at this time, the luminance value of the background picture of the current display screen may be obtained, the luminance value of the background picture is obtained, the background picture is first obtained, further, the background picture is converted into a picture in HLS color mode, and the luminance value of the background picture is determined based on the luminosity L (Lightness) in HLS color mode. Wherein, H in HLS color mode represents chromaticity (Hue), L represents luminosity (light), and S represents Saturation (Saturation), chromaticity determines the color appearance, luminosity determines the intensity of color light, and Saturation represents the color purity. In the HLS color mode, the color range value of the chromaticity can be set between 0 and 360; the value of the intensity range which can be set by luminosity is 0-100; the saturation can be set to a range of values from 0 to 100. If the luminosity value is 100, the color represented will be white; if the luminosity 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 light brightness value and the brightness value of the background picture are obtained, the corresponding target brightness value may be determined by looking up a table in the mapping table in S601. 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 brightness value of the background picture is in the first brightness threshold range, the target brightness 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 after table lookup; when the light intensity value is in the second light intensity threshold range and the brightness value of the background picture is in the second brightness threshold range, determining a target brightness value according to the mapping table, for example: the light intensity value is in the range of 5-10, the brightness value of the background picture is in the range of 10-20, and the target brightness value is 35 after table lookup; when the light intensity value is in the third light intensity threshold range and the brightness value of the background picture is in the third brightness threshold range, determining a target brightness value according to the mapping table, for example: the light intensity value is in the range of 10-20, the brightness value of the background picture is in the range of 20-40, and the target brightness value is 40 after table lookup; when the light intensity value is in the fourth light intensity threshold range, determining a target brightness value according to the mapping table, for example: the light intensity value is in the range of 20-30, and the target brightness value is determined according to the automatically adjusted screen brightness table in table 2, regardless of the brightness value of the background picture. And adjusting the brightness value of the display screen to the target brightness value when the brightness value of the display screen is not equal to the target brightness value according to the target brightness value obtained by the table lookup.
When the scheme of the embodiment of the application is executed, the ambient light sensor is used for measuring the light intensity value, obtaining the brightness value of the background picture displayed on the display screen, determining the 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. According to the application, the target brightness value of the display screen is determined by measuring the light intensity value of the environment of the terminal and the brightness value of the background picture displayed by the display screen of the terminal, and further, the screen brightness value of the display screen is adjusted to the target brightness value, so that the eyesight of a user is protected under certain specific scenes, and the experience of the user is improved.
Fig. 7 is a schematic structural diagram of a screen brightness adjusting device according to an embodiment of the application. The screen brightness adjustment device 700 may be implemented as all or a part of a server by software, hardware, or a combination of both. The screen brightness adjustment device 700 includes:
an illuminance measurement module 710 for measuring a light intensity value by an ambient light sensor;
the brightness value measurement module 720 is configured to obtain a brightness value of a background picture displayed on the display screen;
and the brightness adjustment 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 adjustment device 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 adjustment 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 illuminance threshold range and the brightness value of the background picture is smaller than the brightness threshold; or (b)
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 illuminance threshold range and the brightness value of the background picture is smaller than the brightness threshold; or (b)
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 illuminance threshold range and the brightness value of the background picture is smaller than the brightness threshold value.
Optionally, the brightness adjustment module 730 further includes:
and the fourth adjusting unit is used for determining the target brightness value according to the mapping table when the light intensity value is in a fourth illuminance threshold value.
Optionally, the brightness value measurement module 720 includes:
the first measuring unit is used for acquiring a background picture displayed on the display screen;
the second measuring unit is used for converting the background picture into a picture in an HLS color mode;
and the third measuring unit is used for obtaining the brightness value of the background picture based on the brightness parameter value of the picture in the HLS color mode.
Optionally, the luminance value measurement module 720 further includes:
and the first determining unit is used for acquiring the type of the currently running application program and determining that the application program is a game application program.
Optionally, the luminance value measurement module 720 further includes:
and the second determining unit is used for acquiring a face image through the front camera and determining that the user is watching the display screen based on the face image.
When the scheme of the embodiment of the application is executed, the ambient light sensor is used for measuring the light intensity value, obtaining the brightness value of the background picture displayed on the display screen, determining the 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. According to the application, the target brightness value of the display screen is determined by measuring the light intensity value of the environment of the terminal and the brightness value of the background picture displayed by the display screen of the terminal, and further, the screen brightness value of the display screen is adjusted to the target brightness value, so that the eyesight of a user is protected under certain specific scenes, and the experience of the user is improved.
The 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 executed as described above, and the specific implementation process may refer to the specific description of the embodiment shown in fig. 5 and fig. 6, which is not repeated herein.
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.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, or the like.
The foregoing disclosure is illustrative of the present application and is not to be construed as limiting the scope of the application, which is defined by the appended claims.

Claims (7)

1. A method for adjusting brightness of a screen, the method 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;
measuring a light intensity value by an ambient light sensor;
acquiring a brightness value of a background picture displayed on a display screen;
determining a target brightness value in the mapping table 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 determining a target brightness value in the mapping table according to the light intensity value and the brightness value of the background picture includes:
when the light intensity value is in a first illuminance threshold range and the brightness value of the background picture is smaller than a brightness threshold value, determining the target brightness value according to the mapping table; or (b)
When the light intensity value is in a second illuminance threshold range and the brightness value of the background picture is smaller than a brightness threshold value, determining the target brightness value according to the mapping table; or (b)
When the light intensity value is in a third illuminance threshold range and the brightness value of the background picture is smaller than a brightness threshold value, determining the target brightness value according to the mapping table; or (b)
And when the light intensity value is in the fourth illuminance threshold value, determining the target brightness value according to the mapping table.
2. The method according to claim 1, wherein the obtaining the luminance 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.
3. The method according to claim 1, further comprising, prior to obtaining the luminance value of the background picture displayed on the display screen:
the method comprises the steps of obtaining the type of an application program running currently and determining that the application program is a game application program.
4. The method of claim 3, wherein the obtaining the type of the currently running application and determining that the application is a gaming application further comprises:
and acquiring a face image through a front camera, and determining that a user is watching the display screen based on the face image.
5. A screen brightness adjustment device, the device comprising:
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;
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 obtaining the brightness value of the background picture displayed on the display screen;
the brightness adjustment module is used for determining a target brightness value in the mapping table 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 brightness adjustment module 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 illuminance threshold range and the brightness value of the background picture is smaller than the brightness threshold; or (b)
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 illuminance threshold range and the brightness value of the background picture is smaller than the brightness threshold; or (b)
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 illuminance threshold range and the brightness value of the background picture is smaller than the brightness threshold; or (b)
And the fourth adjusting unit is used for determining the target brightness value according to the mapping table when the light intensity value is in a fourth illuminance threshold value.
6. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method steps of any one of claims 1 to 4.
7. 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-4.
CN202010983836.3A 2020-09-17 2020-09-17 Screen brightness adjustment method and device, storage medium and terminal Active CN114285936B (en)

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 CN114285936A (en) 2022-04-05
CN114285936B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
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
CN116110351B (en) * 2023-04-13 2023-09-19 荣耀终端有限公司 Backlight control method, device, chip, electronic equipment and medium

Citations (9)

* Cited by examiner, † Cited by third party
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

Patent Citations (9)

* Cited by examiner, † Cited by third party
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

Also Published As

Publication number Publication date
CN114285936A (en) 2022-04-05

Similar Documents

Publication Publication Date Title
CN111667800B (en) Image display parameter adjusting method and device, storage medium and terminal
US9093007B2 (en) Method and device for generating a presentation
CN114285936B (en) Screen brightness adjustment method and 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
CN113313804B (en) Image rendering method and device, electronic equipment and storage medium
CN111127469A (en) Thumbnail display method, device, storage medium and terminal
CN113163055B (en) Vibration adjusting method and device, storage medium and electronic equipment
CN111913614B (en) Multi-picture display control method and device, storage medium and display
CN113595662B (en) Signal prompting method, device, terminal equipment and storage medium
CN114038370B (en) Display parameter adjustment method and device, storage medium and display equipment
CN112612633B (en) Inter-process communication method, inter-process communication device, storage medium and terminal
CN111949150B (en) Method and device for controlling peripheral switching, storage medium and electronic equipment
CN113691676B (en) Equipment state prompting method and device, storage medium and electronic equipment
EP2712193B1 (en) Method, computer program and device for generating a presentation
CN112859050B (en) Correction method and device for optical distance sensor, storage medium and terminal
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
CN112612487B (en) Application installation method, device, storage medium and terminal
WO2023273936A1 (en) Wallpaper setting method and apparatus, and storage medium and electronic device
CN111556194B (en) Brightness adjusting method and device, storage medium and terminal
WO2022218191A1 (en) Method and apparatus for displaying amount of charge, storage medium, and terminal device
CN113778386B (en) Component generation method and device, storage medium and electronic equipment
CN113692026B (en) Network connection method, device, terminal and storage medium
CN114125048B (en) Message push setting method and device, storage medium and electronic equipment

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