Screen brightness adjusting method and device, storage medium and electronic equipment
By obtaining the brightness value correspondence of terminal devices and interpolation algorithms, the target backlight value is determined for screen brightness adjustment, which solves the visual experience problem caused by the difference in brightness values of different screen panels, and achieves consistency of brightness values and improvement of user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING XIAOMI MOBILE SOFTWARE CO LTD
- Filing Date
- 2024-10-22
- Publication Date
- 2026-04-24
AI Technical Summary
Differences in brightness values exist between different screen panels, resulting in significant differences in screen brightness values across different terminal devices under the same backlight setting, which affects the user's visual experience.
By obtaining the corresponding relationship of brightness values of terminal devices under different backlight value settings, the target backlight value is determined according to the desired brightness value, and the screen brightness is adjusted by interpolation algorithm or by directly using the maximum backlight value to ensure that the screen brightness value meets the expected value set by the user or software.
It achieves consistency in screen brightness values after adjustment across different terminal devices, improving the user's visual experience and avoiding inconsistencies caused by brightness differences.
Smart Images

Figure CN121922075A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of screen display technology, and in particular to a screen brightness adjustment method and device, storage medium and electronic device. Background Technology
[0002] Due to the influence of the manufacturing process, there may be differences between different screen panels of the same model, resulting in a large difference in brightness value between different screen panels under the same backlight setting.
[0003] In other words, for two terminal devices using the same model of screen panel, if the brightness values set by the software or the user are the same, and the same backlight value is used, the actual brightness values of the screens of the two terminal devices may differ significantly. Summary of the Invention
[0004] In view of the above, embodiments of this disclosure provide a screen brightness adjustment method and apparatus, a storage medium and an electronic device.
[0005] According to a first aspect of this disclosure, a screen brightness adjustment method is proposed, the method comprising:
[0006] Upon receiving a screen brightness adjustment command, the desired brightness value is determined based on the screen brightness adjustment command.
[0007] Obtain the corresponding relationship obtained by measuring the brightness values of the screen of the current terminal device under different backlight settings;
[0008] The target backlight value corresponding to the desired brightness value is determined based on the correspondence.
[0009] The brightness of the current terminal device's screen is adjusted according to the target backlight value so that the adjusted screen brightness value is the desired brightness value.
[0010] In conjunction with any embodiment provided in this disclosure, determining the target backlight value corresponding to the desired brightness value based on the correspondence includes:
[0011] When it is determined that the correspondence contains the desired brightness value, the backlight value corresponding to the desired brightness value is determined as the target backlight value;
[0012] When it is determined that the expected brightness value is not included in the correspondence, the target backlight value corresponding to the expected brightness value is determined by an interpolation algorithm.
[0013] In conjunction with any embodiment provided in this disclosure, determining the target backlight value corresponding to the desired brightness value using an interpolation algorithm includes:
[0014] Determine a first brightness value and a second brightness value, wherein the first brightness value is the largest brightness value among the brightness values less than the desired brightness value in the correspondence relationship, and the second brightness value is the smallest brightness value among the brightness values greater than the desired brightness value in the correspondence relationship;
[0015] Calculate the interpolation coefficient, which is the quotient of a first difference and a second difference, where the first difference is the difference between the desired brightness value and the first brightness value, and the second difference is the difference between the second brightness value and the first brightness value;
[0016] Calculate the product of the interpolation coefficient and the third difference, where the third difference is the difference between the backlight value corresponding to the second brightness value and the backlight value corresponding to the first brightness value in the correspondence relationship;
[0017] The sum of the product and the backlight value corresponding to the first brightness value is calculated to obtain the target backlight value corresponding to the desired brightness value.
[0018] In conjunction with any of the embodiments provided in this disclosure, the correspondence includes the maximum brightness value supported by the screen of the current terminal device and the corresponding maximum backlight value;
[0019] Determining the target backlight value corresponding to the desired brightness value based on the correspondence includes:
[0020] When it is determined that the desired brightness value is greater than the maximum brightness value, the maximum backlight value is determined as the target backlight value.
[0021] In any embodiment provided by this disclosure, the brightness value in the correspondence is an integer.
[0022] Determining the target backlight value corresponding to the desired brightness value based on the correspondence includes:
[0023] After receiving the floating-point expected brightness value sent by the architecture layer, the hardware abstraction layer converts the floating-point expected brightness value into an integer expected brightness value by shifting the decimal point, and then sends the integer expected brightness value to the kernel layer.
[0024] After receiving the integer desired brightness value, the kernel layer determines the target backlight value corresponding to the integer desired brightness value according to the correspondence.
[0025] According to a second aspect of this disclosure, a screen brightness adjustment device is provided, the device comprising:
[0026] The desired brightness value determination module is used to determine the desired brightness value according to the screen brightness adjustment command when a screen brightness adjustment command is received;
[0027] The correspondence acquisition module is used to acquire the correspondence obtained by measuring the brightness values of the screen of the current terminal device under different backlight value settings;
[0028] A backlight value determination module is used to determine the target backlight value corresponding to the desired brightness value based on the correspondence relationship.
[0029] The screen brightness adjustment module is used to adjust the brightness of the current terminal device's screen according to the target backlight value, so that the adjusted screen brightness value is the desired brightness value.
[0030] In conjunction with any embodiment provided in this disclosure, the backlight value determination module, when determining the target backlight value corresponding to the desired brightness value based on the correspondence, includes:
[0031] When it is determined that the correspondence contains the desired brightness value, the backlight value corresponding to the desired brightness value is determined as the target backlight value;
[0032] When it is determined that the expected brightness value is not included in the correspondence, the target backlight value corresponding to the expected brightness value is determined by an interpolation algorithm.
[0033] In conjunction with any embodiment provided in this disclosure, the backlight value determination module, when determining the target backlight value corresponding to the desired brightness value through an interpolation algorithm, includes:
[0034] Determine a first brightness value and a second brightness value, wherein the first brightness value is the largest brightness value among the brightness values less than the desired brightness value in the correspondence relationship, and the second brightness value is the smallest brightness value among the brightness values greater than the desired brightness value in the correspondence relationship;
[0035] Calculate the interpolation coefficient, which is the quotient of a first difference and a second difference, where the first difference is the difference between the desired brightness value and the first brightness value, and the second difference is the difference between the second brightness value and the first brightness value;
[0036] Calculate the product of the interpolation coefficient and the third difference, where the third difference is the difference between the backlight value corresponding to the second brightness value and the backlight value corresponding to the first brightness value in the correspondence relationship;
[0037] The sum of the product and the backlight value corresponding to the first brightness value is calculated to obtain the target backlight value corresponding to the desired brightness value.
[0038] In conjunction with any of the embodiments provided in this disclosure, the correspondence includes the maximum brightness value supported by the screen of the current terminal device and the corresponding maximum backlight value.
[0039] The backlight value determination module, when determining the target backlight value corresponding to the desired brightness value based on the correspondence, includes:
[0040] When it is determined that the desired brightness value is greater than the maximum brightness value, the maximum backlight value is determined as the target backlight value.
[0041] In any embodiment provided by this disclosure, the brightness value in the correspondence is an integer.
[0042] The backlight value determination module, when determining the target backlight value corresponding to the desired brightness value based on the correspondence, includes:
[0043] After receiving the floating-point expected brightness value sent by the architecture layer, the hardware abstraction layer converts the floating-point expected brightness value into an integer expected brightness value by shifting the decimal point, and then sends the integer expected brightness value to the kernel layer.
[0044] After receiving the integer desired brightness value, the kernel layer determines the target backlight value corresponding to the integer desired brightness value according to the correspondence.
[0045] According to a third aspect of this disclosure, a computer-readable storage medium is provided, the machine-readable storage medium storing machine-readable instructions, which, when invoked and executed by a processor, cause the processor to implement a screen brightness adjustment method according to any embodiment of this disclosure.
[0046] According to a fourth aspect of this disclosure, an electronic device is provided, comprising:
[0047] processor;
[0048] Memory used to store processor-executable instructions;
[0049] The processor is configured to perform a screen brightness adjustment method according to any embodiment of the present disclosure.
[0050] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0051] In the screen brightness adjustment method, apparatus, storage medium, and electronic device provided in this disclosure, each terminal device can determine the target backlight value corresponding to the desired brightness value indicated by the current screen brightness adjustment command based on a correspondence, and adjust the brightness of the terminal device's screen based on the target backlight value. Since the aforementioned correspondence is obtained by measuring the screen brightness value of each terminal device under different backlight value settings, this method ensures that the adjusted screen brightness value of each terminal device is the desired brightness value set by the user or software. This avoids situations where the actual brightness values of different terminal devices differ significantly even when the desired brightness values set by the software or user are the same, thus improving the user's visual experience.
[0052] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0053] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0054] Figure 1 This disclosure is a flowchart illustrating a method for determining a backlight value based on a brightness value set by software or by the user, according to an exemplary embodiment.
[0055] Figure 2 This is a flowchart illustrating a screen brightness adjustment method according to an exemplary embodiment of the present disclosure;
[0056] Figure 3 This is a flowchart illustrating another screen brightness adjustment method according to an exemplary embodiment of the present disclosure;
[0057] Figure 4 This is a flowchart illustrating another screen brightness adjustment method according to an exemplary embodiment of the present disclosure;
[0058] Figure 5 This is a flowchart illustrating another screen brightness adjustment method according to an exemplary embodiment of the present disclosure;
[0059] Figure 6 This is a schematic diagram of the structure of a screen brightness adjustment device according to an exemplary embodiment of the present disclosure;
[0060] Figure 7 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation
[0061] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. In the following description, when referring to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements.
[0062] Backlight value can be understood as a numerical value that controls the brightness of a terminal device's screen. Specifically, the backlight value determines the intensity of the light source behind the screen, thus affecting the screen's brightness. Generally speaking, the higher the backlight value, the brighter the screen (i.e., the higher the screen brightness); conversely, the lower the backlight value, the darker the screen (i.e., the lower the screen brightness).
[0063] In practical applications, the backlight value can usually be adjusted. For example, when using devices such as smartphones and tablets, users can increase or decrease the backlight value by sliding the brightness bar, thereby making the screen brighter or darker to better adapt to different ambient lighting conditions and personal preferences.
[0064] Due to the influence of the manufacturing process, there may be differences between different screen panels of the same model, resulting in a large difference in brightness value between different screen panels under the same backlight setting.
[0065] For example, for screen panels 1 and 2 of the same model, since the two screen panels are of the same model, theoretically the maximum supported brightness and maximum backlight value are also the same. For instance, the theoretically supported maximum brightness value could be 1600 nits, and the maximum backlight value could be 4096 nits.
[0066] However, due to the influence of the manufacturing process, the actual maximum brightness values supported by the two screen panels may be different. For example, screen panel 2 may have a lower overall brightness, and its actual maximum supported brightness value is 1500 nits, which is lower than the theoretical maximum supported brightness value mentioned above.
[0067] At this point, when the desired brightness value set by the software or the user is the same, the backlight value determined based on the relevant technical solution will also be the same. However, because the maximum brightness values actually supported by the two screen panels are different, when the set backlight values are the same, the actual brightness values of the two screen panels will differ, affecting the user's visual experience.
[0068] The following is combined with Figure 1 This section describes the process of determining the backlight value based on a desired brightness value set by software or the user in the relevant technical solutions. Specifically, this method can be executed by terminal device 1 using the aforementioned screen panel 1 and terminal device 2 using the aforementioned screen panel 2, respectively. For example... Figure 1 As shown, the exemplary embodiment method may include the following steps:
[0069] In step 101, after determining the adjusted desired brightness value, a first ratio of the desired brightness value to the maximum brightness value theoretically supported by the terminal device is calculated.
[0070] In practical applications, this ratio can be floating-point data.
[0071] Let's take the aforementioned expected brightness value of 800.8596 NIT as an example for description:
[0072] For terminal device 1, the first ratio obtained is 800.8596÷1600≈0.5005.
[0073] For terminal device 2, the first ratio obtained is 800.8596÷1600≈0.5005.
[0074] In step 102, the product of the first ratio and the maximum backlight value is calculated to obtain the target backlight value.
[0075] For terminal device 1, the target backlight value is: 0.5005 × 4096 = 2050.048.
[0076] For terminal device 2, the target backlight value is also: 0.5005×4096=2050.048.
[0077] That is, when the desired brightness value set by the software or the user is the same, the target backlight value determined based on this scheme is also the same.
[0078] In step 103, the brightness of the terminal device's screen is adjusted according to the target backlight value.
[0079] For terminal device 1, after the backlight value is set to the aforementioned 2050.048, since the maximum brightness value of the screen is 1600 NIT and the maximum backlight value is 4096, the current actual brightness value is 1600 × (2050.048 ÷ 4096) = 800.8 NIT.
[0080] For terminal device 2, after the backlight value is set to the aforementioned 2050.048, since the maximum brightness value supported by the screen is 1500 NIT and the maximum backlight value is 4096, the current actual brightness value is 1500 × (2050.048 ÷ 4096) = 750.75 NIT.
[0081] Therefore, when adjusting the brightness of the screens of two terminal devices based on this solution, even if the brightness values set by the software or the user are the same, the actual brightness values of the screens of the two terminal devices will be different, affecting the user's visual experience.
[0082] In view of the above, this disclosure provides a screen brightness adjustment method. The screen brightness adjustment method of this disclosure will now be described in detail with reference to the accompanying drawings.
[0083] Figure 2 This is a flowchart illustrating a screen brightness adjustment method according to an exemplary embodiment of the present disclosure. This method can be executed by a terminal device, including but not limited to smartphones, tablets, and other devices. Figure 2 As shown, the exemplary embodiment method may include the following steps:
[0084] In step 201, upon receiving a screen brightness adjustment command, the desired brightness value is determined based on the screen brightness adjustment command.
[0085] Optionally, after confirming that the automatic brightness adjustment function of the terminal device is enabled, a screen brightness adjustment command can be considered received when a change in the ambient light intensity value obtained from the ambient light sensor is detected. In this case, the automatic brightness adjustment function can automatically adjust the screen brightness based on changes in the ambient light intensity value. At this point, the changed ambient light intensity value and a pre-defined correspondence between different ambient light intensity values and different brightness values can be obtained based on the screen brightness adjustment command to determine the desired brightness value corresponding to the changed ambient light intensity value. Generally, the higher the ambient light intensity value, the higher the desired brightness value corresponding to that ambient light intensity value. The target brightness value determined based on this process corresponds to the aforementioned software-set desired brightness value.
[0086] Optionally, after determining that the automatic brightness adjustment function of the terminal device is not enabled, a screen brightness adjustment command can be considered received when a user's operation to adjust the brightness bar is detected. At this point, the adjusted backlight value can be further determined based on this command, and the desired brightness value can be linearly calculated based on this backlight value, the maximum backlight value, and the theoretically maximum brightness value supported by the terminal device's screen. The target brightness value determined through this process corresponds to the aforementioned user-set desired brightness value.
[0087] In step 202, the corresponding relationship is obtained by measuring the brightness values of the screen of the current terminal device under different backlight value settings.
[0088] In practical applications, before the terminal device leaves the factory, the host computer can control the terminal device to switch between different backlight value settings. At the same time, it can control a brightness measuring instrument, such as a CA410 instrument, to measure the brightness value of the terminal device's screen under different backlight value settings, thereby obtaining the aforementioned correspondence.
[0089] Optionally, to reduce power consumption, the host computer can control the terminal device to switch the backlight value in steps greater than 1, such as in steps of 50. For example, the host computer can control the backlight value of the terminal device to be 1, 51, 101, 151... in sequence, while controlling the CA410 instrument to measure the brightness value of the terminal device's screen when the backlight is set to 1, 51, 101, 151..., thereby obtaining the aforementioned correspondence.
[0090] It should be noted that the foregoing description of switching backlight values in steps of 50 is merely illustrative and intended to enable those skilled in the art to better understand the technical solutions of the embodiments of this disclosure. In practical applications, backlight values can also be switched in steps of 100, 200, etc., or the backlight values can be switched in steps without a fixed value. The specific settings can be made by relevant personnel based on actual conditions, and this disclosure does not limit this.
[0091] It should be noted that the aforementioned steps 201 and 202 can be executed sequentially or simultaneously, and this disclosure does not limit this.
[0092] In step 203, the target backlight value corresponding to the desired brightness value is determined according to the correspondence.
[0093] In this example, after determining the desired brightness value based on the screen brightness adjustment command, the target backlight value corresponding to the aforementioned desired brightness value can be further determined based on the obtained correspondence.
[0094] Optionally, when it is determined that the correspondence includes the aforementioned desired brightness value, the backlight value corresponding to the desired brightness value can be determined as the target backlight value. When it is determined that the aforementioned correspondence does not include the desired brightness value, the target backlight value corresponding to the desired brightness value can be determined by an interpolation algorithm.
[0095] The process of determining the target backlight value corresponding to the desired brightness value using an interpolation algorithm will be described in subsequent embodiments and will not be repeated here.
[0096] In step 204, the brightness of the screen of the current terminal device is adjusted according to the target backlight value so that the adjusted screen brightness value is the desired brightness value.
[0097] In practical applications, the backlight value of the current terminal device can be set to the aforementioned target backlight value so that the screen brightness value is the aforementioned desired brightness value.
[0098] In the screen brightness adjustment method provided in this embodiment, each terminal device can determine the target backlight value corresponding to the desired brightness value indicated by the screen brightness adjustment command based on its own pre-saved correspondence, and adjust the brightness of the terminal device's screen based on the target backlight value. Since the aforementioned correspondence is obtained by measuring the screen brightness value of each terminal device under different backlight value settings, this method can ensure that the adjusted screen brightness value of each terminal device is the desired brightness value set by the user or software. This avoids situations where the actual brightness values of different terminal devices' screens differ significantly even when the desired brightness values set by the software or user are the same, thereby improving the user's visual experience.
[0099] In one embodiment, for example, the pre-saved partial correspondences sorted by brightness values from smallest to largest can be shown in Table 1 below:
[0100] Table 1
[0101] Luminance value (unit: NIT) Backlight value 650.2594 1800 750.1265 2000 850.1265 2200 950.3654 2400
[0102] Taking the previously mentioned expected brightness value of 800.8596 NIT as an example, it can be determined that this expected brightness value is not included in the corresponding relationship. In this case, it can be done by... Figure 3 The steps shown determine the target backlight value corresponding to the desired brightness value.
[0103] In step 301, the first brightness value and the second brightness value are determined.
[0104] Wherein, the first brightness value is the largest brightness value among the brightness values less than the expected brightness value in the corresponding relationship, and the second brightness value is the smallest brightness value among the brightness values greater than the expected brightness value in the corresponding relationship.
[0105] Based on Table 1 above, the first brightness value can be determined to be 750.1265 and the second brightness value to be 850.1265.
[0106] In step 302, the interpolation coefficients are calculated.
[0107] The interpolation coefficient is the quotient of a first difference and a second difference, wherein the first difference is the difference between the desired brightness value and the first brightness value, and the second difference is the difference between the second brightness value and the first brightness value.
[0108]
[0109] In step 303, the product of the interpolation coefficient and the third difference is calculated.
[0110] The third difference is the difference between the backlight value corresponding to the second brightness value and the backlight value corresponding to the first brightness value in the correspondence relationship.
[0111]
[0112] In step 304, the sum of the product and the backlight value corresponding to the first brightness value is calculated to obtain the target backlight value corresponding to the desired brightness value.
[0113] The target backlight value corresponding to the desired brightness value = 101.4662 + 2000 = 2101.4662
[0114] The screen brightness adjustment method provided in this disclosure, when it is determined that the pre-saved correspondence does not contain the desired brightness value, can determine the target backlight value corresponding to the desired brightness value through an interpolation algorithm. Since the first and second backlight values corresponding to the first and second brightness values adjacent to the desired brightness value used in the interpolation process are based on actual measurements, the calculated target backlight value also has good accuracy. Adjusting the screen brightness based on this target backlight value can make the adjusted screen brightness value close to the aforementioned desired brightness value, avoiding situations where the actual brightness values of screens on different terminal devices differ significantly even when the desired brightness values set by the software or the user are consistent.
[0115] In one embodiment, the aforementioned correspondence may include the maximum brightness value supported by the screen of the current terminal device and the corresponding maximum backlight value. For example, the maximum brightness value supported by the screen of the current terminal device may be 1500 nits, and the corresponding maximum backlight value may be 4096 nits.
[0116] At this point, step 201 may specifically include: when it is determined that the desired brightness value is greater than the aforementioned maximum brightness value, the maximum backlight value corresponding to the maximum brightness value can be determined as the target backlight value.
[0117] For example, when the desired brightness value is determined to be 1600.1452 NIT, which is greater than the maximum brightness value of 1500 NIT, the maximum backlight value of 4096 corresponding to 1500 NIT can be determined as the target backlight value.
[0118] In the screen brightness adjustment method provided in this embodiment, when it is determined that the desired brightness value is greater than the maximum brightness value supported by the current terminal device screen, the maximum backlight value corresponding to the maximum brightness value supported by the current terminal device screen can be determined as the target backlight value, and the brightness of the terminal device screen can be adjusted based on the target backlight value, thereby maximizing the screen visibility and adapting as much as possible to the current ambient light conditions or meeting the user's needs.
[0119] In one embodiment, the brightness values in the correspondence can all be integers. This correspondence can be obtained in the following manner:
[0120] 1. Measure the brightness values of the screen of the current terminal device under different backlight settings to obtain the correspondence between different backlight values and different brightness values (the brightness value can be a floating-point data with 4 decimal places; if it is less than 4 digits, it is padded with 0). For example, some correspondences can be shown in Table 1 above.
[0121] 2. Convert the floating-point brightness values in the correspondence to integer brightness values to obtain the aforementioned correspondence where all brightness values are integers, as shown in Table 2 below:
[0122] Table 2
[0123] Luminance value (unit: NIT) Backlight value 6502594 1800 7501265 2000 8501265 2200 9503654 2400
[0124] like Figure 4 As shown, the aforementioned step 201 may specifically include:
[0125] In step 401, after receiving the floating-point expected brightness value sent by the architecture layer, the hardware abstraction layer converts the floating-point expected brightness value into an integer expected brightness value by shifting the decimal point, and then sends the integer expected brightness value to the kernel layer.
[0126] In practical applications, the terminal device's architecture layer can obtain a floating-point desired brightness value based on software settings or user settings. For example, a desired brightness value of 800.8596 with 4 decimal places can be obtained. The number of decimal places is determined by the number of decimal places in the brightness value when the brightness value of the current terminal device is measured under different backlight settings.
[0127] Then, the architecture layer can send the desired brightness value, which is a floating-point number with 4 decimal places, to the hardware abstraction layer (HAL).
[0128] After receiving the desired brightness value of 800.8596, a floating-point number with four decimal places, from the architecture layer, the hardware abstraction layer can convert this floating-point value into an integer value by shifting the decimal point. For example, for the desired brightness value of 800.8596, the decimal point can be shifted four places to the right, effectively multiplying the desired brightness value by 10,000, resulting in the corresponding integer value of 8008596. The hardware abstraction layer can then send this integer value of 8008596 to the kernel layer.
[0129] In step 402, after receiving the integer desired brightness value, the kernel layer determines the target backlight value corresponding to the integer desired brightness value according to the correspondence.
[0130] After receiving the integer expected brightness value 8008596 sent by the hardware abstraction layer, the kernel layer can determine the target backlight value corresponding to the expected brightness value 8008596 based on the correspondence shown in Table 2.
[0131] As mentioned above, it can be determined that the expected brightness value is not included in the correspondence. In this case, the target backlight value corresponding to the expected brightness value 8008596 can be determined by interpolation algorithm. For details, please refer to the description of the aforementioned embodiment, which will not be repeated here.
[0132] In the screen brightness adjustment method provided in this embodiment, after obtaining the desired floating-point brightness value at the architecture layer, the desired floating-point brightness value can be directly sent to the hardware abstraction layer. Since the kernel layer does not support floating-point data, the hardware abstraction layer can convert the desired floating-point brightness value into an integer value by shifting the decimal point before sending it to the kernel layer. The kernel layer then determines the corresponding target backlight value based on the integer desired brightness value, resulting in high usability.
[0133] Figure 5 This is a flowchart illustrating another screen brightness adjustment method according to an exemplary embodiment of the present disclosure, which can also be executed by a terminal device. In this embodiment, the same steps as in the foregoing embodiments will be briefly described and will not be detailed further; please refer to any of the foregoing embodiments for specific details. Figure 5 As shown, the exemplary embodiment method may include the following steps:
[0134] In step 501, it is determined whether the automatic brightness adjustment function is enabled.
[0135] The automatic brightness adjustment function is a feature that can automatically adjust the screen brightness based on changes in ambient light intensity.
[0136] If enabled, proceed to step 502.
[0137] If not enabled, proceed to step 503.
[0138] In step 502, after determining that the ambient light intensity value has changed and obtaining the changed ambient light intensity value based on the ambient light sensor, the desired floating-point brightness value corresponding to the ambient light intensity value is determined.
[0139] Optionally, the terminal device can pre-store the correspondence between different ambient light intensity values and different brightness values. After the terminal device obtains the changed ambient light intensity value based on the ambient light sensor, it can determine the desired brightness value corresponding to the changed ambient light intensity value based on the pre-stored correspondence between different ambient light intensity values and different brightness values.
[0140] In step 503, after receiving the user-set backlight value, the floating-point desired brightness value corresponding to the user-set backlight value is determined.
[0141] Optionally, after receiving the user-defined backlight value, the terminal device can linearly calculate the desired brightness value based on the backlight value, the maximum backlight value, and the theoretically maximum brightness value supported by the terminal device's screen. This desired brightness value can, for example, be a floating-point number with four decimal places.
[0142] In step 504, the floating-point desired brightness value is converted to an integer desired brightness value by moving the decimal point.
[0143] Specifically, the decimal point of the aforementioned floating-point desired brightness value with four decimal places can be moved four places to the right to obtain an integer desired brightness value.
[0144] In step 505, the corresponding relationship is obtained by measuring the brightness values of the screen of the current terminal device under different backlight value settings.
[0145] The brightness values in this correspondence are integers.
[0146] In step 506, the target backlight value corresponding to the desired brightness value of the integer is determined according to the correspondence.
[0147] In step 507, the brightness of the screen of the current terminal device is adjusted according to the target backlight value so that the adjusted screen brightness value is the desired brightness value.
[0148] In the screen brightness adjustment method provided in this embodiment, each terminal device can determine the target backlight value corresponding to the desired brightness value indicated by the current screen brightness adjustment command based on its own pre-saved correspondence, and adjust the brightness of the terminal device's screen based on the target backlight value. Since the aforementioned correspondence is obtained by measuring the screen brightness value of each terminal device under different backlight value settings, this method can ensure that the adjusted screen brightness value of each terminal device is the desired brightness value set by the user or software. This avoids situations where the actual brightness values of different terminal devices' screens differ significantly even when the desired brightness values set by the software or user are the same, thereby improving the user's visual experience.
[0149] For the foregoing method embodiments, in order to simplify the description, they are all described as a series of actions. However, those skilled in the art should know that this disclosure is not limited to the described order of actions, because according to this disclosure, some steps may be performed in other orders or simultaneously.
[0150] Corresponding to the aforementioned application function implementation method embodiments, this disclosure also provides embodiments of application function implementation apparatus and corresponding terminals.
[0151] Figure 6 This is a schematic diagram illustrating the structure of a screen brightness adjustment device according to an exemplary embodiment of the present disclosure, as shown below. Figure 6 As shown, the screen brightness adjustment device may include:
[0152] The desired brightness value determination module 61 is used to determine the desired brightness value according to the screen brightness adjustment command when a screen brightness adjustment command is received.
[0153] The correspondence acquisition module 62 is used to acquire the correspondence obtained by measuring the brightness values of the screen of the current terminal device under different backlight value settings.
[0154] The backlight value determination module 63 is used to determine the target backlight value corresponding to the desired brightness value according to the correspondence.
[0155] The screen brightness adjustment module 64 is used to adjust the brightness of the screen of the current terminal device according to the target backlight value, so that the adjusted screen brightness value is the desired brightness value.
[0156] Optionally, the backlight value determination module 63, when determining the target backlight value corresponding to the desired brightness value according to the correspondence, includes:
[0157] When it is determined that the correspondence includes the desired brightness value, the backlight value corresponding to the desired brightness value is determined as the target backlight value.
[0158] When it is determined that the expected brightness value is not included in the correspondence, the target backlight value corresponding to the expected brightness value is determined by an interpolation algorithm.
[0159] Optionally, the backlight value determination module 63, when determining the target backlight value corresponding to the desired brightness value according to the correspondence, includes:
[0160] A first brightness value and a second brightness value are determined, wherein the first brightness value is the largest brightness value among the brightness values less than the desired brightness value in the correspondence relationship, and the second brightness value is the smallest brightness value among the brightness values greater than the desired brightness value in the correspondence relationship.
[0161] Calculate the interpolation coefficient, which is the quotient of a first difference and a second difference, where the first difference is the difference between the desired brightness value and the first brightness value, and the second difference is the difference between the second brightness value and the first brightness value.
[0162] Calculate the product of the interpolation coefficient and the third difference, where the third difference is the difference between the backlight value corresponding to the second brightness value and the backlight value corresponding to the first brightness value in the correspondence.
[0163] The sum of the product and the backlight value corresponding to the first brightness value is calculated to obtain the target backlight value corresponding to the desired brightness value.
[0164] Optionally, the correspondence includes the maximum brightness value supported by the screen of the current terminal device and the corresponding maximum backlight value.
[0165] The backlight value determination module 63, when determining the target backlight value corresponding to the desired brightness value according to the correspondence, includes:
[0166] When it is determined that the desired brightness value is greater than the maximum brightness value, the maximum backlight value is determined as the target backlight value.
[0167] Optionally, the brightness value in the correspondence is an integer.
[0168] The backlight value determination module 63, when determining the target backlight value corresponding to the desired brightness value according to the correspondence, includes:
[0169] After receiving the floating-point expected brightness value sent by the architecture layer, the hardware abstraction layer converts the floating-point expected brightness value into an integer expected brightness value by shifting the decimal point, and then sends the integer expected brightness value to the kernel layer.
[0170] After receiving the integer desired brightness value, the kernel layer determines the target backlight value corresponding to the integer desired brightness value according to the correspondence.
[0171] For the apparatus embodiment, since it basically corresponds to the method embodiment, the relevant parts can be referred to in the description of the method embodiment.
[0172] Figure 7 This is a schematic diagram illustrating the structure of an electronic device 700 according to an exemplary embodiment of this disclosure. The electronic device can be a terminal device, including but not limited to smartphones, tablets, etc.
[0173] Reference Figure 7The electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power supply component 706, a multimedia component 708, an audio component 710, an input / output (I / O) interface 712, a sensor component 714, and a communication component 716.
[0174] Processing component 702 typically controls the overall operation of electronic device 700, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 702 may include one or more modules to facilitate interaction between processing component 702 and other components. For example, processing component 702 may include a multimedia module to facilitate interaction between multimedia component 708 and processing component 702.
[0175] Memory 704 is configured to store various types of data to support the operation of device 700. Examples of this data include instructions for any application or method operating on electronic device 700, contact data, phonebook data, messages, pictures, videos, etc. Memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0176] Power supply component 706 provides power to various components of electronic device 700. Power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 700.
[0177] Multimedia component 708 includes a screen that provides an output interface between the aforementioned electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 708 includes a front-facing camera and / or a rear-facing camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0178] Audio component 710 is configured to output and / or input audio signals. For example, audio component 710 includes a microphone (MIC) configured to receive external audio signals when electronic device 700 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 704 or transmitted via communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
[0179] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0180] Sensor assembly 714 includes one or more sensors for providing state assessments of various aspects of electronic device 700. For example, sensor assembly 714 can detect the on / off state of electronic device 700, the relative positioning of components such as the display and keypad of electronic device 700, changes in position of electronic device 700 or one of its components, the presence or absence of user contact with electronic device 700, orientation or acceleration / deceleration of electronic device 700, and temperature changes of electronic device 700. Sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 714 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0181] Communication component 716 is configured to facilitate wired or wireless communication between electronic device 700 and other devices. Electronic device 700 can access wireless networks based on communication standards, such as WiFi, 4G or 5G, 4G LTE, 5G NR, or combinations thereof. In one exemplary embodiment, communication component 716 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the aforementioned communication component 716 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0182] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0183] In an exemplary embodiment, a non-transitory computer-readable storage medium is also provided, such as a memory 704 including instructions, which, when executed by a processor 720 of an electronic device 700, enables the electronic device 700 to perform the screen brightness adjustment method of any embodiment of the present disclosure.
[0184] The non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0185] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for adjusting screen brightness, characterized in that, The method includes: Upon receiving a screen brightness adjustment command, the desired brightness value is determined based on the screen brightness adjustment command. Obtain the corresponding relationship obtained by measuring the brightness values of the screen of the current terminal device under different backlight settings; The target backlight value corresponding to the desired brightness value is determined based on the correspondence. The brightness of the current terminal device's screen is adjusted according to the target backlight value so that the adjusted screen brightness value is the desired brightness value.
2. The method according to claim 1, characterized in that, Determining the target backlight value corresponding to the desired brightness value based on the correspondence includes: When it is determined that the correspondence contains the desired brightness value, the backlight value corresponding to the desired brightness value is determined as the target backlight value; When it is determined that the expected brightness value is not included in the correspondence, the target backlight value corresponding to the expected brightness value is determined by an interpolation algorithm.
3. The method according to claim 2, characterized in that, The step of determining the target backlight value corresponding to the desired brightness value through an interpolation algorithm includes: Determine a first brightness value and a second brightness value, wherein the first brightness value is the largest brightness value among the brightness values less than the desired brightness value in the correspondence relationship, and the second brightness value is the smallest brightness value among the brightness values greater than the desired brightness value in the correspondence relationship; Calculate the interpolation coefficient, which is the quotient of a first difference and a second difference, where the first difference is the difference between the desired brightness value and the first brightness value, and the second difference is the difference between the second brightness value and the first brightness value; Calculate the product of the interpolation coefficient and the third difference, where the third difference is the difference between the backlight value corresponding to the second brightness value and the backlight value corresponding to the first brightness value in the correspondence relationship; The sum of the product and the backlight value corresponding to the first brightness value is calculated to obtain the target backlight value corresponding to the desired brightness value.
4. The method according to claim 1, characterized in that, The correspondence includes the maximum brightness value and the corresponding maximum backlight value supported by the screen of the current terminal device. Determining the target backlight value corresponding to the desired brightness value based on the correspondence includes: When it is determined that the desired brightness value is greater than the maximum brightness value, the maximum backlight value is determined as the target backlight value.
5. The method according to claim 1, characterized in that, The brightness value in the correspondence is an integer; determining the target backlight value corresponding to the desired brightness value based on the correspondence includes: After receiving the floating-point expected brightness value sent by the architecture layer, the hardware abstraction layer converts the floating-point expected brightness value into an integer expected brightness value by shifting the decimal point, and then sends the integer expected brightness value to the kernel layer. After receiving the integer desired brightness value, the kernel layer determines the target backlight value corresponding to the integer desired brightness value according to the correspondence.
6. A screen brightness adjustment device, characterized in that, The device includes: The desired brightness value determination module is used to determine the desired brightness value according to the screen brightness adjustment command when a screen brightness adjustment command is received; The correspondence acquisition module is used to acquire the correspondence obtained by measuring the brightness values of the screen of the current terminal device under different backlight value settings; A backlight value determination module is used to determine the target backlight value corresponding to the desired brightness value based on the correspondence relationship. The screen brightness adjustment module is used to adjust the brightness of the current terminal device's screen according to the target backlight value, so that the adjusted screen brightness value is the desired brightness value.
7. The apparatus according to claim 6, characterized in that, The backlight value determination module, when determining the target backlight value corresponding to the desired brightness value based on the correspondence, includes: When it is determined that the correspondence contains the desired brightness value, the backlight value corresponding to the desired brightness value is determined as the target backlight value; When it is determined that the expected brightness value is not included in the correspondence, the target backlight value corresponding to the expected brightness value is determined by an interpolation algorithm.
8. The apparatus according to claim 6, characterized in that, The backlight value determination module, when used to determine the target backlight value corresponding to the desired brightness value through an interpolation algorithm, includes: Determine a first brightness value and a second brightness value, wherein the first brightness value is the largest brightness value among the brightness values less than the desired brightness value in the correspondence relationship, and the second brightness value is the smallest brightness value among the brightness values greater than the desired brightness value in the correspondence relationship; Calculate the interpolation coefficient, which is the quotient of a first difference and a second difference, where the first difference is the difference between the desired brightness value and the first brightness value, and the second difference is the difference between the second brightness value and the first brightness value; Calculate the product of the interpolation coefficient and the third difference, where the third difference is the difference between the backlight value corresponding to the second brightness value and the backlight value corresponding to the first brightness value in the correspondence relationship; The sum of the product and the backlight value corresponding to the first brightness value is calculated to obtain the target backlight value corresponding to the desired brightness value.
9. A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method of any one of claims 1-5.
10. An electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to perform the steps of the method according to any one of claims 1-5.