Screen brightness determination method, device, equipment and storage medium
By detecting the touch operation of the tablet screen and the ambient brightness, and determining the target brightness based on weighted calculations, it solves the problem of screen brightness fluctuations caused by the stylus blocking the ambient light sensor, and improves the user experience.
Patent Information
- Application Number
- CN202111521827.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-13
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2041-12-13
AI Technical Summary
When the user uses a stylus to interact with the tablet, the stylus blocks the ambient light sensor, causing the screen brightness to change frequently, affecting the user experience.
By detecting screen touch operations, it is determined whether the touch area exceeds the set threshold, and weighted based on the ambient brightness in the previous time period to determine the target brightness of the screen and avoid brightness fluctuations caused by blocking the ambient light sensor when using the stylus.
It effectively avoids the problem of flickering screen brightness, improves user experience, and intelligently adjusts screen brightness through weighted calculations based on historical brightness data.
Smart Images

Figure CN114281205B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of electrical technology, and in particular to a method, device, equipment and storage medium for determining screen brightness. Background Art
[0002] Nowadays, with the development of smart terminal technology, portable electronic devices such as tablet computers have entered the lives of more and more users. Tablet computers, also known as portable computers, are small, easy-to-carry personal computers that are smaller and lighter than laptops. They can use stylus and touch screen as input devices, can realize powerful stylus input recognition and other functions, and are more mobile and flexible.
[0003] In the related art, the brightness adjustment algorithm of tablet computers is similar to that of smartphones, such as reporting the ambient light intensity to the Automatic Brightness Controller in the Android Framework through the ambient light sensor, and obtaining the current screen brightness after mapping the ambient light intensity. However, when the user uses a stylus to interact with the tablet screen, the user's hand holding the stylus may block the ambient light sensor, causing the tablet screen to flicker, affecting the user experience. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the embodiments of the present disclosure provide a method, device, equipment and storage medium for determining screen brightness to solve the defects in the related art.
[0005] According to a first aspect of an embodiment of the present disclosure, a method for determining screen brightness is provided, which is applied to an electronic device supporting stylus input, and the method includes:
[0006] In response to detecting that the touch operation on the screen of the electronic device is a stylus touch operation, determining whether a first touch area on the screen in a current time period exceeds a set threshold;
[0007] In response to determining that the first touch area exceeds the set threshold, a target brightness of the screen is determined based on a first ambient brightness within a first preset time period before the current time period.
[0008] In one embodiment, the method further comprises:
[0009] In response to determining that the first touch area exceeds the set threshold, data of the current environment brightness within the current time period is discarded.
[0010] In one embodiment, determining the target brightness of the screen based on the first ambient brightness within a first preset time period before the current time period includes:
[0011] Based on a pre-set first non-linear relationship curve between the acquisition time of the ambient brightness and the weighted coefficient of the ambient brightness, determining a first weighted coefficient corresponding to the acquisition time of the first ambient brightness, wherein in the first non-linear relationship curve, the closer the acquisition time is to the midpoint of the first preset time period, the larger the weighted coefficient corresponding to the acquisition time;
[0012] weighting the first ambient brightness based on the first weighting coefficient;
[0013] Based on a pre-constructed correspondence between ambient brightness and screen brightness, the weighted screen brightness corresponding to the first ambient brightness is determined as the target brightness of the screen.
[0014] In one embodiment, the method further comprises:
[0015] In response to determining that the first touch area does not exceed the set threshold, determining whether a second touch area on the screen in a second preset time period before the current time period exceeds the set threshold;
[0016] In response to determining that the second touch area exceeds the set threshold, a target brightness of the screen is determined based on a third ambient brightness within a third preset time period after the current time period.
[0017] In one embodiment, the method further comprises:
[0018] In response to determining that the first touch area does not exceed the set threshold, updating and recording a current timestamp;
[0019] The determining whether a second touch area of the screen in a second preset time period before the current time period exceeds the set threshold comprises:
[0020] Determine a difference between the current timestamp and the timestamp corresponding to the second preset time period;
[0021] In response to detecting that the difference is less than or equal to a latest timestamp, determining that the second touch area exceeds the set threshold, the latest timestamp being a timestamp of a record updated when the touch area on the screen is last detected to exceed the set threshold;
[0022] In response to detecting that the difference is greater than the most recent timestamp, it is determined that the second touch area does not exceed the set threshold.
[0023] In one embodiment, determining the target brightness of the screen based on a third ambient brightness within a third preset time period after the current time period includes:
[0024] Determine a second weighting coefficient corresponding to the acquisition time of the third ambient brightness based on a pre-set second non-linear relationship curve between the acquisition time of the ambient brightness and the weighting coefficient of the ambient brightness, wherein in the second non-linear relationship curve, the weighting coefficient corresponding to the acquisition time closer to the current time is larger;
[0025] weighting the third ambient brightness based on the second weighting coefficient;
[0026] Based on the pre-constructed correspondence between the ambient brightness and the screen brightness, the screen brightness corresponding to the weighted third ambient brightness is determined as the target brightness of the screen.
[0027] In one embodiment, the method further comprises:
[0028] In response to determining that the second touch area does not exceed the set threshold, obtaining a current ambient brightness of an environment in which the electronic device is currently located;
[0029] A target brightness of the screen is determined based on the current ambient brightness.
[0030] In one embodiment, determining the target brightness of the screen based on the current ambient brightness includes:
[0031] Determine a third weighting coefficient corresponding to the acquisition time of the current ambient brightness based on a pre-set third non-linear relationship curve between the acquisition time of the ambient brightness and the weighting coefficient of the ambient brightness, wherein in the third non-linear relationship curve, the weighting coefficient corresponding to the acquisition time closer to the current time is greater;
[0032] weighting the current environment brightness based on the third weighting coefficient;
[0033] Based on the pre-constructed correspondence between the ambient brightness and the screen brightness, the weighted screen brightness corresponding to the current ambient brightness is determined as the target brightness of the screen.
[0034] In one embodiment, the method further comprises:
[0035] In response to detecting that the touch control operation is a touch operation, obtaining a current ambient brightness of an environment in which the electronic device is currently located;
[0036] A target brightness of the screen is determined based on the current ambient brightness.
[0037] According to a second aspect of an embodiment of the present disclosure, a device for determining screen brightness is provided, which is applied to an electronic device supporting stylus input, and the device includes:
[0038] A first touch area determination module, configured to determine whether a first touch area on the screen in a current time period exceeds a set threshold in response to detecting that the touch operation on the screen of the electronic device is a stylus touch operation;
[0039] The first target brightness determination module is configured to determine the target brightness of the screen based on a first ambient brightness within a first preset time period before the current time period in response to determining that the first touch area exceeds the set threshold.
[0040] In one embodiment, the device further comprises:
[0041] The brightness data discarding module is used to discard the data of the current environment brightness in the current time period in response to determining that the first touch area exceeds the set threshold.
[0042] In one embodiment, the first target brightness determination module includes:
[0043] a first weighting coefficient determining unit, configured to determine a first weighting coefficient corresponding to the acquisition time of the first ambient brightness based on a first nonlinear relationship curve between the acquisition time of the ambient brightness and the weighting coefficient of the ambient brightness, wherein in the first nonlinear relationship curve, the closer the acquisition time is to the midpoint of the first preset time period, the greater the weighting coefficient corresponding to the acquisition time;
[0044] a first environment brightness weighting unit, configured to weight the first environment brightness based on the first weighting coefficient;
[0045] The first target brightness determination unit is used to determine the screen brightness corresponding to the first environment brightness after weighting as the target brightness of the screen based on a pre-constructed correspondence relationship between the environment brightness and the screen brightness.
[0046] In one embodiment, the device further comprises:
[0047] a second touch area determination module, configured to determine, in response to determining that the first touch area does not exceed the set threshold, whether a second touch area on the screen in a second preset time period before the current time period exceeds the set threshold;
[0048] The second target brightness determination module is used to determine the target brightness of the screen based on a third ambient brightness within a third preset time period after the current time period in response to determining that the second touch area exceeds the set threshold.
[0049] In one embodiment, the device further comprises:
[0050] a timestamp updating module, configured to update and record a current timestamp in response to determining that the first touch area does not exceed the set threshold;
[0051] The second touch area determination module includes:
[0052] a difference determination unit, configured to determine a difference between the current timestamp and the timestamp corresponding to the second preset time period;
[0053] a first judgment unit, configured to determine, in response to detecting that the difference is less than or equal to a latest timestamp, that the second touch area exceeds the set threshold, wherein the latest timestamp is a timestamp of a record updated when the touch area on the screen is last detected to exceed the set threshold;
[0054] The second judgment unit is configured to determine that the second touch area does not exceed the set threshold in response to detecting that the difference is greater than the most recent timestamp.
[0055] In one embodiment, the second target brightness determination module includes:
[0056] a second weighting coefficient determining unit, configured to determine a second weighting coefficient corresponding to the acquisition time of the third ambient brightness based on a pre-determined second non-linear relationship curve between the acquisition time of the ambient brightness and the weighting coefficient of the ambient brightness, wherein in the second non-linear relationship curve, the weighting coefficient corresponding to the acquisition time closer to the current time is larger;
[0057] a third environment brightness weighting unit, configured to weight the third environment brightness based on the second weighting coefficient;
[0058] The second target brightness determination unit is used to determine the screen brightness corresponding to the weighted third ambient brightness as the target brightness of the screen based on a pre-constructed correspondence relationship between ambient brightness and screen brightness.
[0059] In one embodiment, the device further comprises:
[0060] A first current brightness acquisition module, configured to acquire the current ambient brightness of the environment in which the electronic device is currently located in response to determining that the second touch area does not exceed the set threshold;
[0061] The third target brightness determination module is used to determine the target brightness of the screen based on the current ambient brightness.
[0062] In one embodiment, the third target brightness determination module includes:
[0063] a third weighting coefficient determining unit, configured to determine a third weighting coefficient corresponding to the acquisition time of the current ambient brightness based on a third nonlinear relationship curve between the acquisition time of the ambient brightness and the weighting coefficient of the ambient brightness, wherein in the third nonlinear relationship curve, the weighting coefficient corresponding to the acquisition time closer to the current time is greater;
[0064] a first current brightness weighting unit, configured to weight the current environment brightness based on the third weighting coefficient;
[0065] The third target brightness determination unit is used to determine the screen brightness corresponding to the weighted current ambient brightness as the target brightness of the screen based on a pre-constructed correspondence relationship between ambient brightness and screen brightness.
[0066] In one embodiment, the device further comprises:
[0067] A second current brightness acquisition module, configured to acquire the current ambient brightness of the environment in which the electronic device is currently located in response to detecting that the touch operation is a touch operation;
[0068] The fourth target brightness determination module is used to determine the target brightness of the screen based on the current ambient brightness.
[0069] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device supporting stylus input, the device comprising:
[0070] a processor and a memory for storing a computer program;
[0071] Wherein, the processor is configured to implement, when executing the computer program:
[0072] In response to detecting that the touch operation on the screen of the electronic device is a stylus touch operation, determining whether a first touch area on the screen in a current time period exceeds a set threshold;
[0073] In response to determining that the first touch area exceeds the set threshold, a target brightness of the screen is determined based on a first ambient brightness within a first preset time period before the current time period.
[0074] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the following is implemented:
[0075] In response to detecting that the touch operation on the screen of the electronic device is a stylus touch operation, determining whether a first touch area on the screen in a current time period exceeds a set threshold;
[0076] In response to determining that the first touch area exceeds the set threshold, a target brightness of the screen is determined based on a first ambient brightness within a first preset time period before the current time period.
[0077] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0078] The present disclosure determines whether a first touch area for the screen in a current time period exceeds a set threshold in response to detecting that the touch operation for the screen of the electronic device is a stylus touch operation, and then determines the target brightness of the screen based on a first ambient brightness in a first preset time period before the current time period in response to determining that the first touch area exceeds the set threshold. This can achieve, when it is determined that the touch area for the screen of the electronic device in the current time period is large, the target brightness of the screen is determined based on the ambient brightness in a time period before the current time period. This can avoid the problem of the screen flickering due to the user's hand holding the stylus blocking the ambient light sensor when the user uses the stylus to touch the screen of the electronic device. This can improve the intelligence level of determining the target brightness of the screen, thereby improving the user experience.
[0079] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0081] Figure 1 is a flow chart of a method for determining screen brightness according to an exemplary embodiment of the present disclosure;
[0082] Figure 2A is a flowchart showing how to determine the target brightness of the screen based on the first ambient brightness within a first preset time period before the current time period according to an exemplary embodiment of the present disclosure;
[0083] Figure 2B is a schematic diagram of a first nonlinear relationship curve according to an exemplary embodiment of the present disclosure;
[0084] Figure 3 is a flow chart of another method for determining screen brightness according to an exemplary embodiment of the present disclosure;
[0085] Figure 4 is a flowchart showing how to determine whether a second touch area on the screen in a second preset time period before the current time period exceeds the set threshold according to an exemplary embodiment of the present disclosure;
[0086] Figure 5A is a flowchart showing how to determine the target brightness of the screen based on the third ambient brightness within a third preset time period after the current time period according to an exemplary embodiment of the present disclosure;
[0087] Figure 5B is a schematic diagram of a second nonlinear relationship curve according to an exemplary embodiment of the present disclosure;
[0088] Fig. 6A is a flowchart showing how to determine the target brightness of the screen based on the current ambient brightness according to an exemplary embodiment of the present disclosure;
[0089] Figure 6B is a schematic diagram of a third nonlinear relationship curve according to an exemplary embodiment of the present disclosure;
[0090] Figure 7 is a flow chart showing another method for determining screen brightness according to an exemplary embodiment of the present disclosure;
[0091] Figure 8 is a block diagram of a device for determining screen brightness according to an exemplary embodiment of the present disclosure;
[0092] Fig. 9 is a block diagram showing another device for determining screen brightness according to an exemplary embodiment of the present disclosure;
[0093] Fig.10 It is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0094] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0095] Figure 1 It is a flow chart of a method for determining screen brightness according to an exemplary embodiment; the method of this embodiment can be applied to electronic devices that support stylus input (such as tablet computers, electronic writing boards, etc.).
[0096] like Figure 1 As shown, the method includes the following steps S101-S102:
[0097] In step S101, in response to detecting that the touch operation on the screen of the electronic device is a stylus touch operation, it is determined whether a first touch area on the screen in a current time period exceeds a set threshold.
[0098] In this embodiment, in response to detecting that the touch operation on the screen of the electronic device is a stylus touch operation, the electronic device may determine whether a first touch area on the screen in a current time period exceeds a set threshold.
[0099] For example, after the electronic device establishes a connection with a supported stylus, a touch operation on the screen of the electronic device can be detected. The connection established between the electronic device and the stylus may include but is not limited to a Bluetooth connection, etc. Furthermore, when the electronic device detects that the touch operation on the screen of the electronic device is a stylus touch operation, it can be determined whether the first touch area for the screen in the current time period exceeds a set threshold. The first touch area includes the area of the screen touched by the user's hand holding the stylus. Exemplarily, the electronic device can determine the first touch area by detecting the capacitance value returned on the screen in response to the user's touch, and then compare the first touch area with the set threshold.
[0100] In step S102, in response to determining that the first touch area exceeds the set threshold, a target brightness of the screen is determined based on a first ambient brightness within a first preset time period before the current time period.
[0101] In this embodiment, the electronic device may determine the target brightness of the screen based on the first ambient brightness in the first preset time period before the current time period in response to determining that the first touch area exceeds the set threshold. The target brightness may be used to adjust the brightness of the screen of the electronic device. For example, after determining the target brightness, the current brightness of the screen of the electronic device may be adjusted to the target brightness.
[0102] The first preset time period may include a time period of a first preset length before the current time period. The first preset length may be set based on actual business needs, such as being set to 10 seconds, etc. This embodiment does not limit this.
[0103] It is understandable that when it is determined that the first touch area exceeds the set threshold, it indicates that the user's hand holding the stylus has blocked a large area of the ambient light sensor of the electronic device. In this case, if the electronic device still determines the target brightness of the screen based on the ambient brightness of the current time period detected by the ambient light sensor, the automatic brightness controller of the electronic device (such as the automatic brightness controller Automatic BrightnessController in the Android Framework) will frequently adjust the current brightness of the screen according to the ambient brightness of the user's hand blocking the screen, causing the screen to flicker, affecting the user's experience. Therefore, in this embodiment, the target brightness of the screen is determined based on the first ambient brightness in the first preset time period before the current time period. That is to say, in this embodiment, when a large touch area is detected in the current time period, the target brightness of the screen is determined according to the ambient brightness in the time period before the current time period when a large area touch is not detected, thereby avoiding the problem of the screen flickering due to the user's hand holding the stylus blocking the ambient light sensor.
[0104] On this basis, the electronic device can discard the data of the current ambient brightness in the current time period in response to determining that the first touch area exceeds the set threshold. In other words, when a large area of touch is detected on the screen, the data of the ambient brightness detected during the large area touch is discarded to prevent the automatic brightness controller of the electronic device from frequently changing the brightness of the screen based on the data, causing the screen to flicker. Exemplarily, the electronic device can discard the ambient brightness data reported by the underlying ambient light sensor by calling back to notify the Automatic Brightness Controller.
[0105] As can be seen from the above description, the method of this embodiment determines whether the first touch area of the screen in the current time period exceeds the set threshold in response to detecting that the touch operation on the screen of the electronic device is a stylus touch operation, and then determines the target brightness of the screen based on the first ambient brightness in a first preset time period before the current time period in response to determining that the first touch area exceeds the set threshold. This can achieve that when it is determined that the touch area of the screen of the electronic device in the current time period is large, the target brightness of the screen is determined based on the ambient brightness in the time period before the current time period. This can avoid the problem of the screen flickering due to the user's hand holding the stylus blocking the ambient light sensor when the user uses the stylus to touch the screen of the electronic device. The intelligence level of determining the target brightness of the screen can be improved, thereby improving the user experience.
[0106] Figure 2AThis is a flowchart showing how to determine the target brightness of the screen based on the first ambient brightness within the first preset time period before the current time period according to an exemplary embodiment of the present disclosure; based on the above embodiment, this embodiment takes how to determine the target brightness of the screen based on the first ambient brightness within the first preset time period before the current time period as an example. Figure 2A As shown, the determination of the target brightness of the screen based on the first ambient brightness in the first preset time period before the current time period described in the above step S102 may include the following steps S201-S203:
[0107] In step S201, a first weighting coefficient corresponding to the acquisition time of the first ambient brightness is determined based on a pre-defined first non-linear relationship curve between the acquisition time of the ambient brightness and the weighting coefficient of the ambient brightness.
[0108] In this embodiment, when it is detected that the touch operation on the screen of the electronic device is a stylus touch operation, and it is determined that the first touch area on the screen in the current time period exceeds a set threshold, the first weighting coefficient corresponding to the acquisition time of the first ambient brightness can be determined based on a first nonlinear relationship curve between a predetermined ambient brightness acquisition time and a weighting coefficient of the ambient brightness.
[0109] It can be understood that, since the first ambient brightness is the ambient brightness acquired within a time period (i.e., the first preset time period), the first ambient brightness actually includes ambient brightness data collected at different times within the first preset time period. On this basis, the first weighting coefficient corresponding to the acquisition time of the first ambient brightness can be determined based on the first nonlinear relationship curve. Among them, in the first nonlinear relationship curve, the closer the acquisition time is to the midpoint of the first preset time period, the larger the weighting coefficient corresponding to the acquisition time is.
[0110] It is worth noting that the present embodiment takes into account that when a large area of the screen of the electronic device is touched, the ambient light sensor will be blocked, resulting in a decrease in the detected light sensitivity value, thereby reducing the weight of the ambient brightness in the time closer to the current time within the above-mentioned first preset time period. At the same time, considering that the ambient brightness far from the current time within the first preset time period belongs to the historical ambient light brightness, the weight of the ambient brightness is also reduced. Therefore, in the present embodiment, it is hoped to reflect the ambient brightness of the scene in which the electronic device is located based on the ambient brightness in the middle distribution within the first preset time period, thereby increasing the weight of this part of the ambient brightness. Therefore, in the present embodiment, the weighting coefficient corresponding to the acquisition time closer to the midpoint of the first preset time period is larger in the first nonlinear relationship curve. Based on the above description, the above-mentioned first nonlinear relationship curve can be referred to. Figure 2B As shown. Figure 2BAs shown, the time axis span of the first nonlinear relationship curve can be the length of the first preset time period, such as 10 seconds; and the weighting coefficient corresponding to the vertex of the curve (i.e., the point whose horizontal coordinate is the midpoint of the first preset time period) is the largest, such as 1.0; and the weighting coefficient corresponding to the acquisition time closest to and farthest from the end of the time period is the smallest, such as 0.1.
[0111] In step S202, the first ambient brightness is weighted based on the first weighting coefficient.
[0112] In this embodiment, after the first weighting coefficient corresponding to the acquisition time of the first ambient brightness is determined, the first ambient brightness may be weighted based on the first weighting coefficient.
[0113] For example, after the first ambient brightness is weighted based on the first weighting coefficient, the weighted first ambient brightness may be expressed as follows:
[0114]
[0115] Among them, w i is the weighting coefficient corresponding to the i-th ambient light data in the first ambient brightness, lux i is the value of the i-th ambient light data in the first ambient brightness.
[0116] In step S203, based on the pre-constructed correspondence between the ambient brightness and the screen brightness, the weighted screen brightness corresponding to the first ambient brightness is determined as the target brightness of the screen.
[0117] In this embodiment, after the first ambient brightness is weighted based on the first weighting coefficient, the screen brightness corresponding to the weighted first ambient brightness can be determined as the target brightness of the screen based on a pre-constructed correspondence between ambient brightness and screen brightness.
[0118] For example, the weighted first ambient brightness may be mapped by an automatic brightness controller in a pre-constructed correspondence between ambient brightness and screen brightness (eg, a pre-constructed ambient brightness-screen backlight curve, etc.) to obtain a target brightness of the screen.
[0119] From the above description, it can be seen that this embodiment determines the first weighting coefficient corresponding to the acquisition time of the first ambient brightness based on a first nonlinear relationship curve between the acquisition time of the ambient brightness and the weighting coefficient of the ambient brightness, and then weights the first ambient brightness based on the first weighting coefficient. Furthermore, based on the pre-constructed correspondence between the ambient brightness and the screen brightness, the screen brightness corresponding to the weighted first ambient brightness is determined as the target brightness of the screen. This can achieve accurate determination of the target brightness of the screen based on the first ambient brightness within the first preset time period before the current time period. Since the corresponding weighting coefficient is determined by taking into account the acquisition time of the first ambient brightness, the rationality of determining the weighting coefficient can be further improved, thereby improving the rationality of subsequently determining the target brightness of the screen based on the weighted first ambient brightness.
[0120] Figure 3 It is a flowchart of another method for determining screen brightness according to an exemplary embodiment of the present disclosure; the method of this embodiment can be applied to electronic devices that support stylus input (such as tablet computers, electronic writing boards, etc.).
[0121] like Figure 3 As shown, the method includes the following steps S301-S307:
[0122] In step S301, in response to detecting that the touch operation on the screen of the electronic device is a stylus touch operation.
[0123] In step S302, it is determined whether the first touch area of the screen in the current time period exceeds a set threshold: if so, step S303 is executed; if not, step S304 is executed.
[0124] In step S303, the target brightness of the screen is determined based on the first ambient brightness within a first preset time period before the current time period.
[0125] The relevant explanations and descriptions of steps S301-S303 can be found in the above Figure 1 Steps S101 - S102 in the illustrated embodiment are not described in detail here.
[0126] In step S304, it is determined whether a second touch area on the screen in a second preset time period before the current time period exceeds the set threshold: if not, step S305 is executed; if yes, step S307 is executed.
[0127] In step S305, the current ambient brightness of the environment in which the electronic device is currently located is obtained.
[0128] In this embodiment, when it is determined that the second touch area on the screen in the second preset time period before the current time period does not exceed the set threshold, the current ambient brightness of the environment in which the electronic device is currently located can be obtained.
[0129] The current ambient brightness may include the ambient brightness collected by the ambient light sensor during the current time period and reported to the automatic brightness controller.
[0130] In step S306, the target brightness of the screen is determined based on the current ambient brightness.
[0131] In this embodiment, after the current ambient brightness of the environment in which the electronic device is currently located is acquired, the target brightness of the screen may be determined based on the current ambient brightness.
[0132] For example, the target brightness of the screen can be determined based on the current ambient brightness from a pre-constructed ambient brightness-screen backlight relationship curve.
[0133] In another embodiment, the above method of determining the target brightness of the screen based on the current ambient brightness can refer to the following Fig. 6A The illustrated embodiment will not be described in detail here.
[0134] In step S307, the target brightness of the screen is determined based on a third ambient brightness within a third preset time period after the current time period.
[0135] In this embodiment, when it is determined that the second touch area of the screen in the second preset time period before the current time period exceeds the set threshold, the target brightness of the screen can be determined based on the third ambient brightness in the third preset time period after the current time period.
[0136] The third ambient brightness may include the ambient brightness collected by the ambient light sensor within a third preset time period after the current time period and reported to the automatic brightness controller.
[0137] For example, the target brightness of the screen may be determined based on the third ambient brightness from a pre-constructed ambient brightness-screen backlight relationship curve.
[0138] In another embodiment, the above method of determining the target brightness of the screen based on the third ambient brightness within the third preset time period after the current time period can refer to the following Figure 5A The illustrated embodiment will not be described in detail here.
[0139] Figure 4This is a flowchart showing how to determine whether the second touch area for the screen in the second preset time period before the current time period exceeds the set threshold according to an exemplary embodiment of the present disclosure. In this embodiment, when it is determined that the first touch area does not exceed the set threshold, the current timestamp can be updated and recorded. On this basis, the determination of whether the second touch area for the screen in the second preset time period before the current time period exceeds the set threshold in the above step S304 can include the following steps S401-S404:
[0140] In step S401, the difference between the current timestamp and the timestamp corresponding to the second preset time period is determined.
[0141] In this embodiment, when it is determined that the first touch area of the screen in the current time period does not exceed the set threshold, the difference between the current timestamp and the timestamp corresponding to the second preset time period may be determined.
[0142] It is understandable that the current timestamp refers to the total number of seconds from 00:00:00 Greenwich Mean Time, January 1, 1970 to the current time. Therefore, the timestamp corresponding to the second preset time period can also be converted based on the duration of the second preset time period.
[0143] For example, if the current timestamp is 1639037558 and the second preset time period is 10 seconds, the corresponding timestamp may be "28790000". The difference between the current timestamp and the timestamp corresponding to the second preset time period may be calculated to be 1639037558-28790000=1610247558.
[0144] In step S402, in response to detecting that the difference is less than or equal to the most recent timestamp, it is determined that the second touch area exceeds the set threshold.
[0145] In step S403, in response to detecting that the difference is greater than the latest timestamp, it is determined that the second touch area does not exceed the set threshold.
[0146] In this embodiment, after determining the difference between the current timestamp and the timestamp corresponding to the second preset time period, the difference can be compared with the most recent timestamp, and then when it is detected that the difference is less than or equal to the most recent timestamp, it can be determined that the second touch area exceeds the set threshold; conversely, when it is detected that the difference is greater than the most recent timestamp, it can be determined that the second touch area does not exceed the set threshold.
[0147] The most recent timestamp is the timestamp recorded when the touch area on the screen is detected to exceed the set threshold the most recently. That is to say, in this embodiment, each time the touch area on the screen is detected to exceed the set threshold, the most recent timestamp is updated and recorded once to ensure that the most recent timestamp recorded is the timestamp recorded when the touch area on the screen is detected to exceed the set threshold the most recently.
[0148] As can be seen from the above description, this embodiment takes into account that it is impossible to directly detect whether the second touch area for the screen in the second preset time period before the current time period exceeds the set threshold based on the capacitance detection method. Therefore, by updating and recording the most recent timestamp each time it is detected that the touch area for the screen exceeds the set threshold, it is possible to detect whether the second touch area for the screen in the second preset time period before the current time period exceeds the set threshold based on the comparison result of the difference between the current timestamp and the timestamp corresponding to the second preset time period and the most recent timestamp. This can accurately determine whether the second touch area exceeds the set threshold, thereby laying a foundation for subsequently determining the target brightness of the screen based on different judgment results using the ambient brightness of different time periods.
[0149] Figure 5A This is a flowchart showing how to determine the target brightness of the screen based on the third ambient brightness within the third preset time period after the current time period according to an exemplary embodiment of the present disclosure; based on the above embodiment, this embodiment takes how to determine the target brightness of the screen based on the third ambient brightness within the third preset time period after the current time period as an example. Figure 5A As shown, the determination of the target brightness of the screen based on the third ambient brightness within a third preset time period after the current time period described in the above step S307 may include the following steps S501-S503:
[0150] In step S501, based on a pre-defined second non-linear relationship curve between the acquisition time of the ambient brightness and the weighted coefficient of the ambient brightness, a second weighted coefficient corresponding to the acquisition time of the third ambient brightness is determined.
[0151] In this embodiment, when it is detected that the touch operation on the screen of the electronic device is a stylus touch operation, and it is determined that the first touch area on the screen in the current time period does not exceed the set threshold, and it is determined that the second touch area on the screen in the second preset time period before the current time period exceeds the set threshold, the second weighting coefficient corresponding to the acquisition time of the third ambient brightness can be determined based on a second nonlinear relationship curve between the predetermined ambient brightness acquisition time and the ambient brightness weighting coefficient.
[0152] It can be understood that, since the third ambient brightness is the ambient brightness acquired within a time period (i.e., the third preset time period after the above-mentioned current time period), the third ambient brightness actually includes ambient brightness data collected at different times within the third preset time period. On this basis, the second weighting coefficient corresponding to the acquisition time of the third ambient brightness can be determined based on the above-mentioned second nonlinear relationship curve. Among them, in the second nonlinear relationship curve, the weighting coefficient corresponding to the acquisition time closer to the current time is larger.
[0153] It is worth noting that this embodiment takes into account that when a large area of the screen of the electronic device is touched, the ambient light sensor will be blocked, resulting in a decrease in the detected light sensitivity value, thereby reducing the weight of the ambient brightness in the time far from the current time in the above-mentioned third preset time period. Therefore, in this embodiment, it is hoped that the ambient brightness of the scene in which the electronic device is located will be reflected based on the ambient brightness in the time close to the current time in the third preset time period, thereby increasing the weight of this part of the ambient brightness. Therefore, in this embodiment, the weighting coefficient corresponding to the acquisition time closer to the current time in the second nonlinear relationship curve is larger.
[0154] Based on the above description, the second nonlinear relationship curve can be seen in Figure 5B As shown. Figure 5B As shown, the time axis span of the second nonlinear relationship curve can be the length of the third preset time period, such as 10 seconds; and the weighting coefficient corresponding to the vertex of the curve (that is, the point whose horizontal axis is closer to the current time, because the third preset time period is after the current time period) is the largest, such as 1.0, and the weighting coefficient corresponding to the acquisition time whose horizontal axis is the farthest from the current time is the smallest, such as 0.1.
[0155] In step S502, the third environment brightness is weighted based on the second weighting coefficient.
[0156] In this embodiment, after the second weighting coefficient corresponding to the acquisition time of the third ambient brightness is determined, the third ambient brightness may be weighted based on the second weighting coefficient.
[0157] For example, after the third ambient brightness is weighted based on the second weighting coefficient, the weighted third ambient brightness may be expressed as follows:
[0158]
[0159] Among them, w i is the weighting coefficient corresponding to the i-th ambient light data in the third ambient brightness, lux i is the value of the i-th ambient light data in the third ambient brightness.
[0160] In step S503, based on the pre-constructed correspondence between the ambient brightness and the screen brightness, the screen brightness corresponding to the weighted third ambient brightness is determined as the target brightness of the screen.
[0161] In this embodiment, after the third ambient brightness is weighted based on the second weighting coefficient, the screen brightness corresponding to the weighted third ambient brightness can be determined as the target brightness of the screen based on a pre-constructed correspondence between ambient brightness and screen brightness.
[0162] For example, the weighted third ambient brightness may be mapped by an automatic brightness controller in a pre-constructed correspondence between ambient brightness and screen brightness (eg, a pre-constructed ambient light-backlight curve, etc.) to obtain a target brightness of the screen.
[0163] From the above description, it can be seen that this embodiment determines the second weighting coefficient corresponding to the acquisition time of the third ambient brightness based on a second nonlinear relationship curve between the acquisition time of the ambient brightness and the weighting coefficient of the ambient brightness, and then weights the third ambient brightness based on the second weighting coefficient. Furthermore, based on the pre-constructed correspondence between the ambient brightness and the screen brightness, the screen brightness corresponding to the weighted third ambient brightness is determined as the target brightness of the screen. This can accurately determine the target brightness of the screen based on the third ambient brightness within the third preset time period after the current time period. Since the corresponding weighting coefficient is determined by taking into account the acquisition time of the third ambient brightness, the rationality of determining the weighting coefficient can be further improved, thereby improving the rationality of subsequently determining the target brightness of the screen based on the weighted third ambient brightness.
[0164] Fig. 6A FIG. 1 is a flowchart showing how to determine the target brightness of the screen based on the current ambient brightness according to an exemplary embodiment of the present disclosure; based on the above embodiment, this embodiment takes how to determine the target brightness of the screen based on the current ambient brightness as an example for exemplary description. Fig. 6A As shown, the determination of the target brightness of the screen based on the current ambient brightness in the above step S306 may include the following steps S601-S603:
[0165] In step S601, based on a pre-defined third non-linear relationship curve between the acquisition time of the ambient brightness and the weighted coefficient of the ambient brightness, a third weighted coefficient corresponding to the acquisition time of the current ambient brightness is determined.
[0166] In this embodiment, when it is detected that the touch operation on the screen of the electronic device is a stylus touch operation, and it is determined that the first touch area on the screen in the current time period does not exceed the set threshold, and it is determined that the second touch area on the screen in the second preset time period before the current time period also does not exceed the set threshold, the third weighting coefficient corresponding to the acquisition time of the current ambient brightness can be determined based on a third nonlinear relationship curve between the predetermined ambient brightness acquisition time and the ambient brightness weighting coefficient.
[0167] It can be understood that, since the current ambient brightness is the ambient brightness acquired within a time period (i.e., the current time period), the current ambient brightness actually includes ambient brightness data collected at different times within the current time period. On this basis, the third weighting coefficient corresponding to the acquisition time of the current ambient brightness can be determined based on the third nonlinear relationship curve. Among them, in the third nonlinear relationship curve, the weighting coefficient corresponding to the acquisition time closer to the current time is larger.
[0168] It is worth noting that this embodiment takes into account that when a large area of the screen of the electronic device is touched, the ambient light sensor will be blocked, resulting in a decrease in the detected light sensitivity value, thereby reducing the weight of the ambient brightness in the time far from the current time in the above-mentioned current preset time period. Therefore, in this embodiment, it is hoped that the ambient brightness of the scene in which the electronic device is located will be reflected based on the ambient brightness in the time close to the current time in the current time period, thereby increasing the weight of this part of the ambient brightness. Therefore, in this embodiment, the weighting coefficient corresponding to the acquisition time closer to the current time in the third nonlinear relationship curve is larger.
[0169] Based on the above description, the third nonlinear relationship curve can be seen in Figure 6B As shown. Figure 6B As shown, the time axis span of the third nonlinear relationship curve can be the length of the current time period, such as 10 seconds, etc.; and the weighting coefficient corresponding to the vertex of the curve (that is, the point whose horizontal axis is closer to the current time, because the start time of the current time period is before the current time, and the end time is the current time) is the largest, such as 1.0, and the weighting coefficient corresponding to the acquisition time whose horizontal axis is the farthest from the current time is the smallest, such as 0.1.
[0170] In step S602, the current environment brightness is weighted based on the third weighting coefficient.
[0171] In this embodiment, after the third weighting coefficient corresponding to the acquisition time of the current ambient brightness is determined, the current ambient brightness may be weighted based on the third weighting coefficient.
[0172] For example, after the current ambient brightness is weighted based on the third weighting coefficient, the weighted current ambient brightness may be expressed as follows:
[0173]
[0174] Among them, w i is the weighting coefficient corresponding to the i-th ambient light data in the current ambient brightness, lux i It is the value of the i-th ambient light data in the current ambient brightness.
[0175] In step S603, based on the pre-constructed correspondence between the ambient brightness and the screen brightness, the weighted screen brightness corresponding to the current ambient brightness is determined as the target brightness of the screen.
[0176] In this embodiment, after the current ambient brightness is weighted based on the third weighting coefficient, the screen brightness corresponding to the weighted current ambient brightness can be determined as the target brightness of the screen based on a pre-constructed correspondence between ambient brightness and screen brightness.
[0177] For example, the weighted current ambient brightness may be mapped by an automatic brightness controller in a pre-constructed correspondence between ambient brightness and screen brightness (eg, a pre-constructed ambient light-backlight curve, etc.) to obtain a target brightness of the screen.
[0178] From the above description, it can be seen that this embodiment determines the third weighting coefficient corresponding to the acquisition time of the current ambient brightness based on a third nonlinear relationship curve between the acquisition time of the ambient brightness and the weighting coefficient of the ambient brightness, and then weights the current ambient brightness based on the third weighting coefficient. Then, based on the pre-constructed correspondence between the ambient brightness and the screen brightness, the screen brightness corresponding to the weighted current ambient brightness is determined as the target brightness of the screen. This can achieve accurate determination of the target brightness of the screen based on the current ambient brightness in the current time period. Since the corresponding weighting coefficient is determined by taking into account the acquisition time of the current ambient brightness, the rationality of determining the weighting coefficient can be further improved, thereby improving the rationality of subsequently determining the target brightness of the screen based on the weighted current ambient brightness.
[0179] Figure 7 It is a flowchart of another method for determining screen brightness according to an exemplary embodiment of the present disclosure; the method of this embodiment can be applied to electronic devices that support stylus input (such as tablet computers, electronic writing boards, etc.).
[0180] like Figure 7 As shown, the method includes the following steps S701-S705:
[0181] In step S701, it is determined whether the touch operation on the screen of the electronic device is a stylus touch operation: if so, step S702 is executed; if not, step S704 is executed.
[0182] In step S702, it is determined whether the first touch area of the screen in the current time period exceeds a set threshold.
[0183] In step S703, in response to determining that the first touch area exceeds the set threshold, a target brightness of the screen is determined based on a first ambient brightness within a first preset time period before the current time period.
[0184] The explanation and description of steps S701-S703 can be found in the above Figure 1 Steps S101 - S102 in the illustrated embodiment are not described in detail here.
[0185] In step S704, in response to detecting that the touch control operation is a touch operation, the current ambient brightness of the environment in which the electronic device is currently located is obtained.
[0186] In step S705, the target brightness of the screen is determined based on the current ambient brightness.
[0187] For example, when it is determined that the touch operation on the screen of the electronic device is not a stylus touch operation but a touch operation triggered by the user's hand, the current ambient brightness of the environment in which the electronic device is currently located can be obtained, and the target brightness of the screen can be determined based on the current ambient brightness.
[0188] In one embodiment, the method for determining the target brightness of the screen based on the current ambient brightness can refer to the above Fig. 6A The illustrated embodiments are not described in detail here.
[0189] From the above description, it can be seen that in this embodiment, when it is detected that the current touch operation on the screen is a touch operation of the user, the normal processing method in the related technology can be adopted based on the automatic brightness controller (Automatic Brightness Controller), and the current ambient brightness detected by the ambient light sensor is weighted and mapped to the target brightness of the screen through the ambient brightness-screen backlight curve. When it is detected that the touch operation on the screen of the electronic device is a stylus touch operation, and it is determined that the touch area of the screen of the electronic device in the current time period is large, the target brightness of the screen is determined based on the ambient brightness in the time period before the current time period, which can improve the intelligence level of determining the target brightness of the screen, thereby improving the user experience.
[0190] Figure 8 is a block diagram of a device for determining screen brightness according to an exemplary embodiment; the device of this embodiment can be applied to electronic devices that support stylus input (such as tablet computers, electronic writing boards, etc.). Figure 8 As shown, the device may include: a first touch area determination module 110 and a first target brightness determination module 120, wherein:
[0191] A first touch area determination module 110 is configured to determine whether a first touch area on the screen of the electronic device exceeds a set threshold in response to detecting that the touch operation on the screen of the electronic device is a stylus touch operation;
[0192] The first target brightness determination module 120 is configured to determine the target brightness of the screen based on the first ambient brightness within a first preset time period before the current time period in response to determining that the first touch area exceeds the set threshold.
[0193] As can be seen from the above description, the device of this embodiment determines whether the first touch area of the screen in the current time period exceeds the set threshold in response to detecting that the touch operation on the screen of the electronic device is a stylus touch operation, and then determines the target brightness of the screen based on the first ambient brightness in a first preset time period before the current time period in response to determining that the first touch area exceeds the set threshold. This can achieve that when it is determined that the touch area of the screen of the electronic device in the current time period is large, the target brightness of the screen is determined based on the ambient brightness in the time period before the current time period. This can avoid the problem of the screen flickering due to the user's hand holding the stylus blocking the ambient light sensor when the user uses the stylus to touch the screen of the electronic device. The intelligence level of determining the target brightness of the screen can be improved, thereby improving the user experience.
[0194] Fig. 92 is a block diagram of a screen brightness determination device according to another exemplary embodiment; the device of this embodiment can be applied to electronic devices (such as tablet computers, electronic writing boards, etc.) that support stylus input. The first touch area determination module 210 and the first target brightness determination module 220 are similar to the aforementioned Figure 8 The functions of the first touch area determination module 110 and the first target brightness determination module 120 in the illustrated embodiment are the same and will not be described in detail herein. Figure 8 As shown, the device may also include:
[0195] The brightness data discarding module 230 is configured to discard the data of the current environment brightness in the current time period in response to determining that the first touch area exceeds the set threshold.
[0196] In one embodiment, the first target brightness determination module 220 may include:
[0197] A first weighting coefficient determining unit 221 is used to determine a first weighting coefficient corresponding to the acquisition time of the first ambient brightness based on a pre-set first non-linear relationship curve between the acquisition time of the ambient brightness and the weighting coefficient of the ambient brightness, wherein in the first non-linear relationship curve, the closer the acquisition time is to the midpoint of the first preset time period, the larger the weighting coefficient corresponding to the acquisition time is;
[0198] A first environment brightness weighting unit 222, configured to weight the first environment brightness based on the first weighting coefficient;
[0199] The first target brightness determination unit 223 is used to determine the screen brightness corresponding to the first environment brightness after weighting as the target brightness of the screen based on the pre-constructed correspondence relationship between the environment brightness and the screen brightness.
[0200] In one embodiment, the above device may further include:
[0201] A second touch area determination module 240 is configured to determine, in response to determining that the first touch area does not exceed the set threshold, whether a second touch area on the screen in a second preset time period before the current time period exceeds the set threshold;
[0202] The second target brightness determination module 250 is configured to determine the target brightness of the screen based on a third ambient brightness within a third preset time period after the current time period in response to determining that the second touch area exceeds the set threshold.
[0203] In one embodiment, the above device may further include:
[0204] A timestamp updating module 260, configured to update and record a current timestamp in response to determining that the first touch area does not exceed the set threshold;
[0205] The second touch area determination module 240 may include:
[0206] A difference determination unit 241, configured to determine a difference between the current timestamp and the timestamp corresponding to the second preset time period;
[0207] A first judgment unit 242 is configured to determine, in response to detecting that the difference is less than or equal to a latest timestamp, that the second touch area exceeds the set threshold, wherein the latest timestamp is a timestamp of a record updated when the touch area on the screen is last detected to exceed the set threshold;
[0208] The second judgment unit 243 is configured to determine that the second touch area does not exceed the set threshold in response to detecting that the difference is greater than the most recent timestamp.
[0209] In one embodiment, the second target brightness determination module 250 may include:
[0210] The second weighting coefficient determining unit 251 is used to determine the second weighting coefficient corresponding to the acquisition time of the third ambient brightness based on a pre-set second non-linear relationship curve between the acquisition time of the ambient brightness and the weighting coefficient of the ambient brightness, wherein in the second non-linear relationship curve, the weighting coefficient corresponding to the acquisition time closer to the current time is larger;
[0211] A third environment brightness weighting unit 252, configured to weight the third environment brightness based on the second weighting coefficient;
[0212] The second target brightness determination unit 253 is used to determine the screen brightness corresponding to the weighted third ambient brightness as the target brightness of the screen based on a pre-constructed correspondence relationship between ambient brightness and screen brightness.
[0213] In one embodiment, the above device may further include:
[0214] A first current brightness acquisition module 270, configured to acquire the current ambient brightness of the environment in which the electronic device is currently located in response to determining that the second touch area does not exceed the set threshold;
[0215] The third target brightness determination module 280 is configured to determine the target brightness of the screen based on the current ambient brightness.
[0216] In one embodiment, the third target brightness determination module 280 may include:
[0217] A third weighting coefficient determining unit 281 is used to determine a third weighting coefficient corresponding to the acquisition time of the current ambient brightness based on a pre-set third non-linear relationship curve between the acquisition time of the ambient brightness and the weighting coefficient of the ambient brightness, wherein in the third non-linear relationship curve, the closer the acquisition time is to the current time, the greater the weighting coefficient corresponding to the acquisition time;
[0218] A first current brightness weighting unit 282, configured to weight the current environment brightness based on the third weighting coefficient;
[0219] The third target brightness determination unit 283 is used to determine the screen brightness corresponding to the weighted current ambient brightness as the target brightness of the screen based on the pre-constructed correspondence relationship between ambient brightness and screen brightness.
[0220] In one embodiment, the above device may further include:
[0221] A second current brightness acquisition module 290 is used to acquire the current ambient brightness of the environment in which the electronic device is currently located in response to detecting that the touch operation is a touch operation;
[0222] The fourth target brightness determination module 300 is used to determine the target brightness of the screen based on the current ambient brightness.
[0223] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0224] Fig.10 900 is a block diagram of an electronic device according to an exemplary embodiment. For example, the device 900 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0225] Reference Fig.10 , device 900 may include one or more of the following components: a processing component 902 , a memory 904 , a power component 906 , a multimedia component 908 , an audio component 910 , an input / output (I / O) interface 912 , a sensor component 914 , and a communication component 916 .
[0226] The processing component 902 generally controls the overall operation of the device 900, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 902 may include one or more modules to facilitate the interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.
[0227] The memory 904 is configured to store various types of data to support operations on the device 900. Examples of such data include instructions for any application or method operating on the device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 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 memory, flash memory, magnetic disk or optical disk.
[0228] The power supply component 906 provides power to the various components of the device 900. The power supply component 906 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 900.
[0229] The multimedia component 908 includes a screen that provides an output interface between the device 900 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 touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the device 900 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0230] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC), and when the device 900 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 904 or sent via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.
[0231] I / O interface 912 provides an interface between processing component 902 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0232] The sensor assembly 914 includes one or more sensors for providing various aspects of status assessment for the device 900. For example, the sensor assembly 914 can detect the open / closed state of the device 900, the relative positioning of components, such as the display and keypad of the device 900, and the sensor assembly 914 can also detect the position change of the device 900 or a component of the device 900, the presence or absence of user contact with the device 900, the orientation or acceleration / deceleration of the device 900, and the temperature change of the device 900. The sensor assembly 914 can also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0233] The communication component 916 is configured to facilitate wired or wireless communication between the device 900 and other devices. The device 900 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G or 5G or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0234] In an exemplary embodiment, the device 900 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 above methods.
[0235] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 904 including instructions, and the instructions can be executed by the processor 920 of the device 900 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0236] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0237] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for determining screen brightness, characterized in that: Applied to an electronic device supporting stylus input, the method comprises: In response to detecting that the touch operation on the screen of the electronic device is a stylus touch operation, determining whether a first touch area on the screen in a current time period exceeds a set threshold; In response to determining that the first touch area exceeds the set threshold, determining a target brightness of the screen based on a first ambient brightness within a first preset time period before the current time period; The method further comprises: In response to determining that the first touch area does not exceed the set threshold, determining whether a second touch area on the screen in a second preset time period before the current time period exceeds the set threshold; In response to determining that the second touch area exceeds the set threshold, determining a target brightness of the screen based on a third ambient brightness within a third preset time period after the current time period; The method further comprises: In response to determining that the first touch area does not exceed the set threshold, updating and recording a current timestamp; The determining whether a second touch area of the screen in a second preset time period before the current time period exceeds the set threshold comprises: Determine a difference between the current timestamp and the timestamp corresponding to the second preset time period; In response to detecting that the difference is less than or equal to a latest timestamp, determining that the second touch area exceeds the set threshold, the latest timestamp being a timestamp of a record updated when the touch area on the screen is last detected to exceed the set threshold; In response to detecting that the difference is greater than the most recent timestamp, it is determined that the second touch area does not exceed the set threshold.
2. The method according to claim 1, characterized in that The method further comprises: In response to determining that the first touch area exceeds the set threshold, data of the current environment brightness within the current time period is discarded.
3. The method according to claim 1, characterized in that The determining the target brightness of the screen based on the first ambient brightness within a first preset time period before the current time period includes: Based on a pre-set first non-linear relationship curve between the acquisition time of the ambient brightness and the weighted coefficient of the ambient brightness, determining a first weighted coefficient corresponding to the acquisition time of the first ambient brightness, wherein in the first non-linear relationship curve, the closer the acquisition time is to the midpoint of the first preset time period, the larger the weighted coefficient corresponding to the acquisition time; weighting the first ambient brightness based on the first weighting coefficient; Based on a pre-constructed correspondence between ambient brightness and screen brightness, the weighted screen brightness corresponding to the first ambient brightness is determined as the target brightness of the screen.
4. The method according to claim 1, characterized in that: The determining the target brightness of the screen based on a third ambient brightness within a third preset time period after the current time period includes: Determine a second weighting coefficient corresponding to the acquisition time of the third ambient brightness based on a pre-set second non-linear relationship curve between the acquisition time of the ambient brightness and the weighting coefficient of the ambient brightness, wherein in the second non-linear relationship curve, the weighting coefficient corresponding to the acquisition time closer to the current time is larger; weighting the third ambient brightness based on the second weighting coefficient; Based on the pre-constructed correspondence between the ambient brightness and the screen brightness, the screen brightness corresponding to the weighted third ambient brightness is determined as the target brightness of the screen.
5. The method according to claim 1, characterized in that The method further comprises: In response to determining that the second touch area does not exceed the set threshold, obtaining a current ambient brightness of an environment in which the electronic device is currently located; A target brightness of the screen is determined based on the current ambient brightness.
6. The method according to claim 5, characterized in that The determining the target brightness of the screen based on the current ambient brightness includes: Determine a third weighting coefficient corresponding to the acquisition time of the current ambient brightness based on a pre-set third non-linear relationship curve between the acquisition time of the ambient brightness and the weighting coefficient of the ambient brightness, wherein in the third non-linear relationship curve, the weighting coefficient corresponding to the acquisition time closer to the current time is greater; weighting the current environment brightness based on the third weighting coefficient; Based on the pre-constructed correspondence between the ambient brightness and the screen brightness, the weighted screen brightness corresponding to the current ambient brightness is determined as the target brightness of the screen.
7. The method according to claim 1, characterized in that The method further comprises: In response to detecting that the touch control operation is a touch operation, obtaining a current ambient brightness of an environment in which the electronic device is currently located; A target brightness of the screen is determined based on the current ambient brightness.
8. A device for determining screen brightness, characterized in that: Applicable to an electronic device supporting stylus input, the device comprises: A first touch area determination module, configured to determine whether a first touch area on the screen in a current time period exceeds a set threshold in response to detecting that the touch operation on the screen of the electronic device is a stylus touch operation; a first target brightness determination module, configured to determine a target brightness of the screen based on a first ambient brightness within a first preset time period before the current time period in response to determining that the first touch area exceeds the set threshold; The device also includes: a second touch area determination module, configured to determine, in response to determining that the first touch area does not exceed the set threshold, whether a second touch area on the screen in a second preset time period before the current time period exceeds the set threshold; a second target brightness determination module, configured to determine the target brightness of the screen based on a third ambient brightness within a third preset time period after the current time period in response to determining that the second touch area exceeds the set threshold; The device also includes: a timestamp updating module, configured to update and record a current timestamp in response to determining that the first touch area does not exceed the set threshold; The second touch area determination module includes: a difference determination unit, configured to determine a difference between the current timestamp and the timestamp corresponding to the second preset time period; a first judgment unit, configured to determine, in response to detecting that the difference is less than or equal to a latest timestamp, that the second touch area exceeds the set threshold, wherein the latest timestamp is a timestamp of a record updated when the touch area on the screen is last detected to exceed the set threshold; The second judgment unit is configured to determine that the second touch area does not exceed the set threshold in response to detecting that the difference is greater than the most recent timestamp.
9. The device according to claim 8, characterized in that The device also includes: The brightness data discarding module is used to discard the data of the current environment brightness in the current time period in response to determining that the first touch area exceeds the set threshold.
10. The device according to claim 8, characterized in that The first target brightness determination module includes: a first weighting coefficient determining unit, configured to determine a first weighting coefficient corresponding to the acquisition time of the first ambient brightness based on a first nonlinear relationship curve between the acquisition time of the ambient brightness and the weighting coefficient of the ambient brightness, wherein in the first nonlinear relationship curve, the closer the acquisition time is to the midpoint of the first preset time period, the greater the weighting coefficient corresponding to the acquisition time; a first environment brightness weighting unit, configured to weight the first environment brightness based on the first weighting coefficient; The first target brightness determination unit is used to determine the screen brightness corresponding to the first environment brightness after weighting as the target brightness of the screen based on a pre-constructed correspondence relationship between the environment brightness and the screen brightness.
11. The device according to claim 8, characterized in that The second target brightness determination module includes: a second weighting coefficient determining unit, configured to determine a second weighting coefficient corresponding to the acquisition time of the third ambient brightness based on a pre-determined second non-linear relationship curve between the acquisition time of the ambient brightness and the weighting coefficient of the ambient brightness, wherein in the second non-linear relationship curve, the weighting coefficient corresponding to the acquisition time closer to the current time is larger; a third environment brightness weighting unit, configured to weight the third environment brightness based on the second weighting coefficient; The second target brightness determination unit is used to determine the screen brightness corresponding to the weighted third ambient brightness as the target brightness of the screen based on a pre-constructed correspondence relationship between ambient brightness and screen brightness.
12. The device according to claim 8, characterized in that The device also includes: A first current brightness acquisition module, configured to acquire the current ambient brightness of the environment in which the electronic device is currently located in response to determining that the second touch area does not exceed the set threshold; The third target brightness determination module is used to determine the target brightness of the screen based on the current ambient brightness.
13. The device according to claim 12, characterized in that The third target brightness determination module comprises: a third weighting coefficient determining unit, configured to determine a third weighting coefficient corresponding to the acquisition time of the current ambient brightness based on a third nonlinear relationship curve between the acquisition time of the ambient brightness and the weighting coefficient of the ambient brightness, wherein in the third nonlinear relationship curve, the weighting coefficient corresponding to the acquisition time closer to the current time is greater; a first current brightness weighting unit, configured to weight the current environment brightness based on the third weighting coefficient; The third target brightness determination unit is used to determine the screen brightness corresponding to the weighted current ambient brightness as the target brightness of the screen based on a pre-constructed correspondence relationship between ambient brightness and screen brightness.
14. The device according to claim 8, characterized in that The device also includes: A second current brightness acquisition module, configured to acquire the current ambient brightness of the environment in which the electronic device is currently located in response to detecting that the touch operation is a touch operation; The fourth target brightness determination module is used to determine the target brightness of the screen based on the current ambient brightness.
15. An electronic device, characterized in that: Supporting stylus input, the device includes: a processor and a memory for storing a computer program; The processor is configured to implement the method according to any one of claims 1 to 7 when executing the computer program.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
