Screen brightness adjusting method and device, electronic equipment, medium and vehicle
By comparing the light intensity data of the light sensor and the rain sensor and adjusting the screen brightness, the brightness problem caused by abnormal data of the light sensor is solved and the user experience is improved.
Patent Information
- Application Number
- CN202311434415.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-31
- Publication Date
- 2025-05-02
AI Technical Summary
Due to abnormal light intensity reported by the light sensor, the screen brightness adjustment fails, affecting the user experience.
By obtaining the light intensity data of the light sensor and the rain sensor, we can determine whether the two match and adjust the screen brightness according to the matching situation.
It effectively solves the problem of abnormal screen brightness changes caused by abnormal data of light sensors, and improves the user experience.
Smart Images

Figure CN119920185A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of intelligent automobile technology, and in particular to a screen brightness adjustment method, device, electronic device, medium and vehicle. Background Art
[0002] At present, vehicles are equipped with light sensors to detect the light intensity of the environment. When the vehicle system detects a change in the light intensity of the environment through the light sensor, it automatically adjusts the screen brightness so that the driver can clearly see the content displayed on the screen. However, in actual application scenarios, due to some external factors, such as foreign objects on the screen, sudden changes in the temperature of the vehicle's environment, etc., the light intensity reported by the light sensor may be abnormal, and then when the screen is adjusted according to the abnormal light intensity, the screen brightness may be too high or too low, affecting the user experience. Summary of the invention
[0003] In order to solve the above technical problems, the present disclosure provides a screen brightness adjustment method, device, electronic device, medium and vehicle. The method can solve the problem of abnormal changes in screen brightness caused by abnormal values reported by the light sensor.
[0004] In a first aspect, the present disclosure provides a screen brightness adjustment method, comprising:
[0005] Acquire a first light intensity and a second light intensity; the first light intensity is the light intensity of the current environment collected in real time by the light sensor, and the second light intensity is the light intensity of the current environment collected in real time by the rain sensor;
[0006] determining whether the first light intensity matches the second light intensity;
[0007] When the first light intensity matches the second light intensity, adjusting the current screen brightness to the screen brightness corresponding to the first light intensity;
[0008] When the first light intensity does not match the second light intensity, the current screen brightness is adjusted to the screen brightness corresponding to the second light intensity
[0009] As an optional implementation of the embodiment of the present disclosure, the determining whether the first light intensity matches the second light intensity includes:
[0010] According to the light intensity level table, obtaining the first light intensity level corresponding to the second light intensity; wherein the light intensity level table includes: the correspondence between the light intensity collected by the rain sensor and the light intensity level;
[0011] Determining, according to the light intensity mapping relationship table, whether the first light intensity matches the first light intensity level;
[0012] The light intensity mapping relationship table includes: a correspondence between a preset light intensity interval and a first light intensity level, wherein the preset light intensity interval is a light intensity interval corresponding to the light intensity collected by the light sensor.
[0013] As an optional implementation of the embodiment of the present disclosure, determining whether the first light intensity matches the first light intensity level includes:
[0014] Determine, according to the light intensity mapping relationship table, a first preset light intensity interval corresponding to the first light intensity and a second preset light intensity interval corresponding to the first light intensity level;
[0015] Determining whether the first preset light intensity interval is consistent with the second preset light intensity interval;
[0016] If the first preset light intensity interval is consistent with the second preset light intensity interval, determining that the first light intensity matches the first light intensity level;
[0017] If the first preset light intensity interval is inconsistent with the second preset light intensity interval, it is determined that the first light intensity does not match the first light intensity level.
[0018] As an optional implementation of the embodiment of the present disclosure, the light intensity mapping relationship table further includes: a correspondence between the preset light intensity interval and the preset screen brightness, and when the first light intensity matches the second light intensity, adjusting the current screen brightness to the screen brightness corresponding to the first light intensity includes:
[0019] If the first light intensity matches the first light intensity level, determining a first preset screen brightness corresponding to the first preset light intensity interval according to the light intensity mapping relationship table;
[0020] Adjust the current screen brightness to the first preset screen brightness; wherein the first preset screen brightness is the screen brightness corresponding to the first light intensity.
[0021] As an optional implementation of the embodiment of the present disclosure, when the first light intensity does not match the second light intensity, adjusting the current screen brightness to the screen brightness corresponding to the second light intensity includes:
[0022] If the first light intensity does not match the first light intensity level, determining a second preset screen brightness corresponding to the second preset light intensity interval according to the light intensity mapping relationship table;
[0023] Adjust the current screen brightness to the second preset screen brightness; wherein the second preset screen brightness is the screen brightness corresponding to the second light intensity.
[0024] As an optional implementation of the embodiment of the present disclosure, if the first light intensity does not match the first light intensity level, the method further includes:
[0025] Within a preset time period, periodically obtain a third light intensity of the current environment collected by the light sensor and a fourth light intensity of the current environment collected in real time by the rain sensor, and obtain a second light intensity level corresponding to the fourth light intensity according to the light intensity level table;
[0026] Determining the expected light intensity corresponding to the second light intensity level according to the light intensity mapping relationship table;
[0027] Calculating according to the third light intensity and the expected light intensity corresponding to the second light intensity level to obtain a light intensity difference;
[0028] Within a preset time period, obtaining the actual number of times the light intensity difference is greater than a preset intensity threshold;
[0029] When the actual number is greater than the preset number, it is determined that the light sensor is faulty.
[0030] In a second aspect, an embodiment of the present disclosure provides a screen brightness adjustment device, comprising:
[0031] An acquisition module, used to acquire a first light intensity and a second light intensity; the first light intensity is the light intensity of the current environment collected in real time by the light sensor, and the second light intensity is the light intensity of the current environment collected in real time by the rainfall sensor;
[0032] A judging module, used for judging whether the first light intensity matches the second light intensity;
[0033] A first adjustment module, configured to adjust the current screen brightness to the screen brightness corresponding to the first light intensity when the first light intensity matches the second light intensity;
[0034] The second adjustment module is used to adjust the current screen brightness to the screen brightness corresponding to the second light intensity when the first light intensity does not match the second light intensity.
[0035] As an optional implementation of the embodiment of the present disclosure, the judgment module includes:
[0036] an acquisition unit, configured to acquire, according to a light intensity level table, a first light intensity level corresponding to the second light intensity; wherein the light intensity level table includes: a correspondence between the light intensity collected by the rainfall sensor and the light intensity level;
[0037] a matching unit, configured to determine whether the first light intensity matches the first light intensity level according to a light intensity mapping relationship table;
[0038] The light intensity mapping relationship table includes: a correspondence between a preset light intensity interval and a first light intensity level, wherein the preset light intensity interval is a light intensity interval corresponding to the light intensity collected by the light sensor.
[0039] As an optional implementation of the embodiment of the present disclosure, the matching unit is specifically used for:
[0040] Determine, according to the light intensity mapping relationship table, a first preset light intensity interval corresponding to the first light intensity and a second preset light intensity interval corresponding to the first light intensity level;
[0041] Determining whether the first preset light intensity interval is consistent with the second preset light intensity interval;
[0042] If the first preset light intensity interval is consistent with the second preset light intensity interval, determining that the first light intensity matches the first light intensity level;
[0043] If the first preset light intensity interval is inconsistent with the second preset light intensity interval, it is determined that the first light intensity does not match the first light intensity level.
[0044] As an optional implementation of the embodiment of the present disclosure, the light intensity mapping relationship table further includes: a correspondence between the preset light intensity interval and the preset screen brightness, and the first adjustment module is specifically used to:
[0045] If the first light intensity matches the first light intensity level, determining a first preset screen brightness corresponding to the first preset light intensity interval according to the light intensity mapping relationship table;
[0046] Adjust the current screen brightness to the first preset screen brightness; wherein the first preset screen brightness is the screen brightness corresponding to the first light intensity.
[0047] As an optional implementation of the embodiment of the present disclosure, the second adjustment module is specifically used to:
[0048] If the first light intensity does not match the first light intensity level, determining a second preset screen brightness corresponding to the second preset light intensity interval according to the light intensity mapping relationship table;
[0049] Adjust the current screen brightness to the second preset screen brightness; wherein the second preset screen brightness is the screen brightness corresponding to the second light intensity.
[0050] As an optional implementation of the embodiment of the present disclosure, the device further includes: a fault determination module, configured to:
[0051] Within a preset time period, periodically obtain a third light intensity of the current environment collected by the light sensor and a fourth light intensity of the current environment collected in real time by the rain sensor, and obtain a second light intensity level corresponding to the fourth light intensity according to the light intensity level table;
[0052] Determining the expected light intensity corresponding to the second light intensity level according to the light intensity mapping relationship table;
[0053] Calculating according to the third light intensity and the expected light intensity corresponding to the second light intensity level to obtain a light intensity difference;
[0054] Within a preset time period, obtaining the actual number of times the light intensity difference is greater than a preset intensity threshold;
[0055] When the actual number is greater than the preset number, it is determined that the light sensor is faulty.
[0056] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors;
[0057] a storage device for storing one or more programs,
[0058] When the one or more programs are executed by the one or more processors, the one or more processors implement the screen brightness adjustment method as described in any embodiment of the first aspect.
[0059] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the screen brightness adjustment method as described in any one of the embodiments in the first aspect.
[0060] In a fifth aspect, the disclosed embodiment provides a vehicle, comprising: the electronic device as described in the third aspect.
[0061] The technical solution provided by the embodiments of the present disclosure has the following advantages over the prior art: obtaining a first light intensity and a second light intensity, wherein the first light intensity is the light intensity of the current environment collected in real time by the light sensor, and the second light intensity is the light intensity of the current environment collected in real time by the rain sensor, and judging whether the first light intensity matches the second light intensity; when the first light intensity matches the second light intensity, adjusting the current screen brightness to the screen brightness corresponding to the first light intensity; when the first light intensity does not match the second light intensity, adjusting the current screen brightness to the screen brightness corresponding to the second light intensity. The first light intensity obtained by the light sensor is calibrated and judged by the second light intensity obtained by the rain sensor. Since the accuracy of the rain sensor is lower than that of the light sensor, when the first light intensity matches the second light intensity, it is determined that the light sensor is not faulty, that is, the data obtained by the light sensor is trustworthy data. The current screen brightness is further adjusted based on the trustworthy data obtained by the light sensor. When the first light intensity does not match the second light intensity, it is determined that the light sensor is faulty, that is, the data obtained by the light sensor is abnormal data. Although the accuracy of the rain sensor is lower than that of the light sensor, the data of the rain sensor is trustworthy data. Therefore, the current screen brightness is adjusted based on the trustworthy data obtained by the rain sensor at this time, thereby solving the problem of abnormal changes in screen brightness due to abnormal values reported by the light sensor, and further improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] 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.
[0063] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0064] Figure 1 is a flow chart of a screen brightness adjustment method provided by an embodiment of the present disclosure;
[0065] Figure 2 is a structural schematic diagram of a screen brightness adjustment device provided by an embodiment of the present disclosure;
[0066] Figure 3 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0067] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0068] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0069] Relational terms such as “first” and “second” in the description and claims of the present disclosure are merely used to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0070] In the embodiments of the present disclosure, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present disclosure should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. In addition, in the description of the embodiments of the present disclosure, unless otherwise specified, the meaning of "multiple" refers to two or more.
[0071] In some embodiments, Figure 1 As shown, a screen brightness adjustment method is provided, comprising the following steps S11-S14:
[0072] S11, obtaining a first light intensity and a second light intensity.
[0073] Among them, the first light intensity is the light intensity of the current environment collected in real time by the light sensor, and the first light intensity is the light intensity of the current environment collected in real time by the rainfall sensor.
[0074] Specifically, the function of the light sensor is to adjust the screen brightness of the vehicle system according to the environment. The rain sensor is generally used to monitor the amount of rain, and the vehicle wiper controller can automatically adjust the speed and sensitivity of the wiper according to the amount of rain; it is also used to monitor light changes, and the vehicle headlight control system can automatically control the opening and closing of the headlights according to the light intensity. Compared with the light sensor, the rain sensor obtains less accurate light intensity. When the light sensor on the screen in the car is abnormal, the vehicle's rain sensor is used as a backup interface for adjusting the brightness. The light intensity of the current environment is collected in real time through the light sensor, that is, the first light intensity. The light intensity of the current environment is collected in real time through the rain sensor, that is, the second light intensity.
[0075] For example, the first light intensity collected in real time by the light sensor may be 50 Lux (lumen: a unit indicating the ambient brightness value), or 150 Lux, or other reasonable brightness values, which are only examples here and are not specifically limited. The second light intensity collected in real time by the rain sensor may be 50 Lux, or 150 Lux, or 200 Lux, or other reasonable brightness values, which are only examples here and are not specifically limited.
[0076] S12: Determine whether the first light intensity matches the second light intensity.
[0077] In some embodiments, the above step S12 (determining whether the first light intensity matches the second light intensity) can be implemented in the following manner:
[0078] a. According to a light intensity level table, obtain the first light intensity level corresponding to the second light intensity.
[0079] The light intensity level table includes: the correspondence between the light intensity collected by the rain sensor and the light intensity level. That is, the light intensity interval in Table 1 is the light intensity interval corresponding to the light intensity collected by the rain sensor, and the light intensity level is the light intensity level corresponding to the light intensity interval.
[0080] Specifically, since the light intensity obtained by the rain sensor has low accuracy, the second light intensity is divided into preset light intensity intervals to obtain the first light intensity level. According to the light intensity level table, the first light intensity level corresponding to the second light intensity is obtained.
[0081] Exemplarily, referring to Table 1, Table 1 is a light intensity level table, and the light intensity level table includes: the correspondence between the light intensity collected by the rain sensor and the light intensity level, that is, first obtain the second light intensity collected by the rain sensor, then determine the light intensity interval corresponding to the second light intensity in Table 1 according to the second light intensity, and then determine the first light intensity level according to the light intensity interval corresponding to the second light intensity. Assuming that the second light intensity is 60Lux, and the interval to which it belongs is (1, 100], the first light intensity level corresponding to the second light intensity is 1; assuming that the second light intensity is 150Lux, and the interval to which it belongs is (100, 200], the first light intensity level corresponding to the second light intensity is 2; assuming that the second light intensity is 220Lux, and the interval to which it belongs is (200, 300], the first light intensity level corresponding to the second light intensity is 3; assuming that the second light intensity is 360Lux, and the interval to which it belongs is (300, 400], the first light intensity level corresponding to the second light intensity is 4, and so on, which will not be repeated here.
[0082] Table 1
[0083] Light intensity level Light intensity range 1 (1,100] 2 (100,200] 3 (200,300] 4 (300,400]
[0084] b. Determine whether the first light intensity matches the first light intensity level according to the light intensity mapping relationship table.
[0085] The light intensity mapping relationship table includes: a correspondence between a preset light intensity interval and a first light intensity level, wherein the preset light intensity interval is a light intensity interval corresponding to the light intensity collected by the light sensor.
[0086] Specifically, according to the light intensity mapping relationship table, a first preset light intensity interval corresponding to the first light intensity and a second preset light intensity interval corresponding to the first light intensity level are determined.
[0087] Exemplarily, refer to Table 2, which is a light intensity mapping relationship table. One possible implementation is: assuming that the first light intensity is 30 Lux, the light intensity interval corresponding to the first light intensity is (1, 50]. Assuming that the second light intensity is 60 Lux, it can be seen from Table 1 that the first light intensity level corresponding to the second light intensity is 1, and the preset light intensity interval corresponding to the first light intensity level is (1, 50]. Another possible implementation is: assuming that the first light intensity is 30 Lux, it can be seen from Table 2 that the light intensity interval corresponding to the first light intensity is (1, 50]. Assuming that the second light intensity is 120 Lux, it can be seen from Table 1 that the first light intensity level corresponding to the second light intensity is 2, and the preset light intensity interval corresponding to the first light intensity level is (51, 150].
[0088] Table 2
[0089] Preset light intensity range Preset screen brightness First light intensity level (1,50] 10 1 (51,150] 50 2 (151,250] 150 3 (251,350] 200 4
[0090] In some embodiments, the above step (determining whether the first light intensity matches the first light intensity level according to the light intensity mapping relationship table) can be implemented as follows:
[0091] Determine, according to the light intensity mapping relationship table, a first preset light intensity interval corresponding to the first light intensity and a second preset light intensity interval corresponding to the first light intensity level;
[0092] Determining whether the first preset light intensity interval is consistent with the second preset light intensity interval;
[0093] If the first preset light intensity interval is consistent with the second preset light intensity interval, determining that the first light intensity matches the first light intensity level;
[0094] If the first preset light intensity interval is inconsistent with the second preset light intensity interval, it is determined that the first light intensity does not match the first light intensity level.
[0095] Specifically, since the light intensity mapping relationship table includes: the correspondence between the light intensity interval corresponding to the first light intensity, and the first light intensity level, the first preset light intensity interval corresponding to the first light intensity and the second preset light intensity interval corresponding to the first light intensity level can be determined according to the light intensity mapping relationship table, and then it is determined whether the first preset light intensity interval is consistent with the second preset light intensity interval. If the first preset light intensity interval is consistent with the second preset light intensity interval, it is determined that the first light intensity matches the first light intensity level; if the first preset light intensity interval is inconsistent with the second preset light intensity interval, it is determined that the first light intensity does not match the first light intensity level.
[0096] Exemplarily, a possible implementation is: assuming that the first light intensity obtained is 60 Lux and the first light intensity level is 2, according to Table 2, the first preset light intensity interval corresponding to the first light intensity 60 Lux is (51, 150], and the second preset light intensity interval corresponding to the first light intensity level 2 is (51, 150]. Since the first preset light intensity interval determined according to Table 2 is (51, 150], and the second preset light intensity interval corresponding to the first light intensity level is (51, 150], the first preset light intensity interval is consistent with the second preset light intensity interval, and therefore, it is determined that the first light intensity matches the first light intensity level.
[0097] Another possible implementation is: assuming that the first light intensity obtained is 200 Lux and the first light intensity level is 1, according to Table 2, the first preset light intensity interval corresponding to the first light intensity 200 Lux is (151, 250], and the second preset light intensity interval corresponding to the first light intensity level 1 is (1, 50]. Since the first preset light intensity interval determined according to Table 2 is (151, 250], and the second preset light intensity interval corresponding to the first light intensity level is (1, 50], the first preset light intensity interval is inconsistent with the second preset light intensity interval. Therefore, it is determined that the first light intensity does not match the first light intensity level.
[0098] S13. When the first light intensity matches the second light intensity, adjusting the current screen brightness to the screen brightness corresponding to the first light intensity.
[0099] In some embodiments, the light intensity mapping relationship table further includes: a correspondence between the preset light intensity interval and the preset screen brightness. The above step S13 (when the first light intensity matches the second light intensity, adjusting the current screen brightness to the screen brightness corresponding to the first light intensity) can be implemented as follows:
[0100] If the first light intensity matches the first light intensity level, determining a first preset screen brightness corresponding to the first preset light intensity interval according to the light intensity mapping relationship table;
[0101] Adjust the current screen brightness to the first preset screen brightness; wherein the first preset screen brightness is the screen brightness corresponding to the first light intensity.
[0102] Specifically, if the first light intensity matches the first light intensity level, it means that the data currently obtained by the light sensor is reliable data. Since the accuracy of the rain sensor is lower than that of the light sensor, it is preferred to adjust the screen brightness according to the light intensity obtained by the light sensor. According to the correspondence between the first light intensity and the preset screen brightness in the light intensity mapping relationship table, the current screen brightness is adjusted to the first preset screen brightness.
[0103] For example, assuming that the current screen brightness is 50, if the first light intensity obtained is 200 Lux, and the first light intensity level is 3, it can be seen from Table 2 that the first preset light intensity interval corresponding to the first light intensity is (151, 250], and the first preset screen brightness corresponding to the first preset light intensity interval (151, 250] is 150, so the current screen brightness 50 is adjusted to the first preset screen brightness 150; if the first light intensity obtained is 100 Lux, and the first light intensity level is 2, it can be seen from Table 2 that the first light intensity is The first preset light intensity interval is (51, 150], and the first preset screen brightness corresponding to the first preset light intensity interval (51, 150] is 50, so the current screen brightness remains unchanged at 50; if the first light intensity obtained is 40Lux, and the first light intensity level is 1, according to Table 2, the first preset light intensity interval corresponding to the first light intensity is (1, 50], and the first preset screen brightness corresponding to the first preset light intensity interval (1, 50] is 10, so the current screen brightness 50 is adjusted to the first preset screen brightness 10.
[0104] S14. When the first light intensity does not match the second light intensity, adjusting the current screen brightness to the screen brightness corresponding to the second light intensity.
[0105] In some embodiments, the above step S14 (when the first light intensity does not match the second light intensity, adjusting the current screen brightness to the screen brightness corresponding to the second light intensity) can be implemented as follows:
[0106] If the first light intensity does not match the first light intensity level, determining a second preset screen brightness corresponding to the second preset light intensity interval according to the light intensity mapping relationship table;
[0107] Adjust the current screen brightness to the second preset screen brightness; wherein the second preset screen brightness is the screen brightness corresponding to the second light intensity.
[0108] Specifically, if the first light intensity does not match the first light intensity level, it means that the data currently obtained by the light sensor is unreliable data, that is, the data obtained by the light sensor is abnormal data. Although the accuracy of the rain sensor is lower than that of the light sensor, the data it obtains is more reliable than the value obtained by the faulty light sensor. Therefore, it is necessary to rely on the data obtained by the rain sensor to adjust the screen brightness. According to the correspondence between the first light intensity level and the preset screen brightness in the light intensity mapping relationship table, the current screen brightness is adjusted to the second preset screen brightness.
[0109] For example, assuming that the current screen brightness is 50, if the first light intensity obtained is 200 Lux, and the first light intensity level is 1, it can be seen from Table 2 that the second preset screen brightness corresponding to the first light intensity level is 10, so the current screen brightness of 50 is adjusted to the second preset screen brightness of 10; if the first light intensity obtained is 200 Lux, and the first light intensity level is 2, it can be seen from Table 2 that the second preset screen brightness corresponding to the first light intensity level is 50, so the current screen brightness remains unchanged at 50; if the first light intensity obtained is 200 Lux, and the first light intensity level is 4, it can be seen from Table 2 that the second preset screen brightness corresponding to the first light intensity level is 200, so the current screen brightness of 50 is adjusted to the second preset screen brightness of 200.
[0110] The screen brightness adjustment method provided by the present disclosure obtains a first light intensity and a second light intensity, wherein the first light intensity is the light intensity of the current environment collected in real time by a light sensor, and the second light intensity is the light intensity of the current environment collected in real time by a rain sensor, and determines whether the first light intensity matches the second light intensity; when the first light intensity matches the second light intensity, the current screen brightness is adjusted to the screen brightness corresponding to the first light intensity; when the first light intensity does not match the second light intensity, the current screen brightness is adjusted to the screen brightness corresponding to the second light intensity. The first light intensity obtained by the light sensor is calibrated and judged by the second light intensity obtained by the rain sensor. Since the accuracy of the rain sensor is lower than that of the light sensor, when the first light intensity matches the second light intensity, it is determined that the light sensor is not faulty, that is, the data obtained by the light sensor is trustworthy data. The current screen brightness is further adjusted based on the trustworthy data obtained by the light sensor. When the first light intensity does not match the second light intensity, it is determined that the light sensor is faulty, that is, the data obtained by the light sensor is abnormal data. Although the accuracy of the rain sensor is lower than that of the light sensor, the data of the rain sensor is trustworthy data. Therefore, the current screen brightness is adjusted based on the trustworthy data obtained by the rain sensor at this time, thereby solving the problem of abnormal changes in screen brightness due to abnormal values reported by the light sensor, and further improving the user experience.
[0111] In some embodiments, the above step S14 (if the first light intensity does not match the first light intensity level) further includes the following implementation:
[0112] Within a preset time period, periodically obtain a third light intensity of the current environment collected by the light sensor and a fourth light intensity of the current environment collected in real time by the rain sensor, and obtain a second light intensity level corresponding to the fourth light intensity according to the light intensity level table;
[0113] Determining the expected light intensity corresponding to the second light intensity level according to the light intensity mapping relationship table;
[0114] Calculating according to the third light intensity and the expected light intensity corresponding to the second light intensity level to obtain a light intensity difference;
[0115] Within a preset time period, obtaining the actual number of times the light intensity difference is greater than a preset intensity threshold;
[0116] When the actual number is greater than the preset number, it is determined that the light sensor is faulty.
[0117] Among them, the preset duration can be set according to actual needs, for example, it can be set to 10 seconds, 20 seconds, 60 seconds, or it can be set to other reasonable values, which are not specifically limited here. The preset intensity threshold can be set according to real-time needs, for example, the preset intensity threshold can be set to 50Lux, 100Lux, 150Lux, etc., or it can be set to other reasonable values, which are not specifically limited here. The preset number of times can be set according to real-time needs, for example, the preset number of times can be set to 5 times, 10 times, 20 times, etc., or it can be set to other reasonable values, which are not specifically limited here.
[0118] Specifically, first, within a preset time period, the third light intensity of the current environment collected by the light sensor and the fourth light intensity of the current environment collected by the rain sensor in real time are periodically obtained, and according to the light intensity level table, with reference to Table 1, the second light intensity level corresponding to the fourth light intensity is obtained. Since in this embodiment, the third light intensity does not match the second light intensity level, it is necessary to rely on the data obtained by the rain sensor to adjust the screen brightness, and specifically obtain the expected light intensity corresponding to the third light intensity according to the second light intensity level, and obtain the light intensity difference according to the difference between the first light intensity and the expected light intensity. Further, within the preset time period, the actual number of times the light intensity difference is greater than the preset intensity threshold is obtained; when the actual number is greater than the preset number, it is determined that the light sensor is faulty.
[0119] Exemplarily, within 5 seconds, the third light intensity and the second light intensity level are periodically obtained. Assuming that the third light intensity and the second light intensity level are obtained twice per second, the third light intensity and the second light intensity level are obtained 10 times in 5 seconds. Assuming that the third light intensity is 200 Lux and the second light intensity level is 1, it can be seen from Table 2 that the expected light intensity corresponding to the first light intensity determined according to the second light intensity level 1 is 50 Lux, so according to the third light intensity and the expected light intensity, the light intensity difference is calculated to be 150 Lux. Further, assuming that the preset intensity threshold is 100 Lux and the preset number of times is 10 times, a total of 20 data are obtained within 10 seconds, of which the actual number of times the light intensity difference is greater than 100 Lux is 13 times. Since the actual number is greater than the preset number, it is determined that the light sensor has failed.
[0120] Further, a fault message is sent to the server; the fault message is used to prompt that the light sensor has a fault.
[0121] Specifically, when the light sensor fails, a fault message is sent to the server, and the server collects data for reference as subsequent maintenance data.
[0122] The screen brightness adjustment method provided by the present disclosure obtains a first light intensity and a second light intensity, wherein the first light intensity is the light intensity of the current environment collected in real time by a light sensor, and the second light intensity is the light intensity of the current environment collected in real time by a rain sensor, and determines whether the first light intensity matches the second light intensity; when the first light intensity matches the second light intensity, the current screen brightness is adjusted to the screen brightness corresponding to the first light intensity; when the first light intensity does not match the second light intensity, the current screen brightness is adjusted to the screen brightness corresponding to the second light intensity. The first light intensity obtained by the light sensor is calibrated and judged by the second light intensity obtained by the rain sensor. Since the accuracy of the rain sensor is lower than that of the light sensor, when the first light intensity matches the second light intensity, it is determined that the light sensor is not faulty, that is, the data obtained by the light sensor is trustworthy data. The current screen brightness is further adjusted based on the trustworthy data obtained by the light sensor. When the first light intensity does not match the second light intensity, it is determined that the light sensor is faulty, that is, the data obtained by the light sensor is abnormal data. Although the accuracy of the rain sensor is lower than that of the light sensor, the data of the rain sensor is trustworthy data. Therefore, the current screen brightness is adjusted based on the trustworthy data obtained by the rain sensor at this time, thereby solving the problem of abnormal changes in screen brightness due to abnormal values reported by the light sensor, and further improving the user experience.
[0123] In some embodiments, reference Figure 2As shown, a screen brightness adjustment device 200 is provided, comprising:
[0124] The acquisition module 210 is used to acquire a first light intensity and a second light intensity; the first light intensity is the light intensity of the current environment collected in real time by the light sensor, and the second light intensity is the light intensity of the current environment collected in real time by the rainfall sensor;
[0125] A judging module 220, configured to judge whether the first light intensity matches the second light intensity;
[0126] A first adjustment module 230, configured to adjust the current screen brightness to the screen brightness corresponding to the first light intensity when the first light intensity matches the second light intensity;
[0127] The second adjustment module 240 is used to adjust the current screen brightness to the screen brightness corresponding to the second light intensity when the first light intensity does not match the second light intensity.
[0128] As an optional implementation of the embodiment of the present disclosure, the determination module 220 includes:
[0129] an acquisition unit, configured to acquire, according to a light intensity level table, a first light intensity level corresponding to the second light intensity; wherein the light intensity level table includes: a correspondence between the light intensity collected by the rainfall sensor and the light intensity level;
[0130] a matching unit, configured to determine whether the first light intensity matches the first light intensity level according to a light intensity mapping relationship table;
[0131] The light intensity mapping relationship table includes: a correspondence between a preset light intensity interval and a first light intensity level, wherein the preset light intensity interval is a light intensity interval corresponding to the light intensity collected by the light sensor.
[0132] As an optional implementation of the embodiment of the present disclosure, the matching unit is specifically used for:
[0133] Determine, according to the light intensity mapping relationship table, a first preset light intensity interval corresponding to the first light intensity and a second preset light intensity interval corresponding to the first light intensity level;
[0134] Determining whether the first preset light intensity interval is consistent with the second preset light intensity interval;
[0135] If the first preset light intensity interval is consistent with the second preset light intensity interval, determining that the first light intensity matches the first light intensity level;
[0136] If the first preset light intensity interval is inconsistent with the second preset light intensity interval, it is determined that the first light intensity does not match the first light intensity level.
[0137] As an optional implementation of the embodiment of the present disclosure, the light intensity mapping relationship table further includes: a correspondence between the preset light intensity interval and the preset screen brightness, and the first adjustment module is specifically used to:
[0138] If the first light intensity matches the first light intensity level, determining a first preset screen brightness corresponding to the first preset light intensity interval according to the light intensity mapping relationship table;
[0139] Adjust the current screen brightness to the first preset screen brightness; wherein the first preset screen brightness is the screen brightness corresponding to the first light intensity.
[0140] As an optional implementation of the embodiment of the present disclosure, the second adjustment module is specifically used to:
[0141] If the first light intensity does not match the first light intensity level, determining a second preset screen brightness corresponding to the second preset light intensity interval according to the light intensity mapping relationship table;
[0142] Adjust the current screen brightness to the second preset screen brightness; wherein the second preset screen brightness is the screen brightness corresponding to the second light intensity.
[0143] As an optional implementation of the embodiment of the present disclosure, the device further includes: a fault determination module, configured to:
[0144] Within a preset time period, periodically obtain a third light intensity of the current environment collected by the light sensor and a fourth light intensity of the current environment collected in real time by the rain sensor, and obtain a second light intensity level corresponding to the fourth light intensity according to the light intensity level table;
[0145] Determining the expected light intensity corresponding to the second light intensity level according to the light intensity mapping relationship table;
[0146] Calculating according to the third light intensity and the expected light intensity corresponding to the second light intensity level to obtain a light intensity difference;
[0147] Within a preset time period, obtaining the actual number of times the light intensity difference is greater than a preset intensity threshold;
[0148] When the actual number is greater than the preset number, it is determined that the light sensor is faulty.
[0149] The screen brightness adjustment device provided by the present disclosure obtains a first light intensity and a second light intensity, wherein the first light intensity is the light intensity of the current environment collected in real time by a light sensor, and the second light intensity is the light intensity of the current environment collected in real time by a rain sensor, and determines whether the first light intensity matches the second light intensity; when the first light intensity matches the second light intensity, the current screen brightness is adjusted to the screen brightness corresponding to the first light intensity; when the first light intensity does not match the second light intensity, the current screen brightness is adjusted to the screen brightness corresponding to the second light intensity. The first light intensity obtained by the light sensor is calibrated and judged by the second light intensity obtained by the rain sensor. Since the accuracy of the rain sensor is lower than that of the light sensor, when the first light intensity matches the second light intensity, it is determined that the light sensor is not faulty, that is, the data obtained by the light sensor is trustworthy data. The current screen brightness is further adjusted based on the trustworthy data obtained by the light sensor. When the first light intensity does not match the second light intensity, it is determined that the light sensor is faulty, that is, the data obtained by the light sensor is abnormal data. Although the accuracy of the rain sensor is lower than that of the light sensor, the data of the rain sensor is trustworthy data. Therefore, the current screen brightness is adjusted based on the trustworthy data obtained by the rain sensor at this time, thereby solving the problem of abnormal changes in screen brightness due to abnormal values reported by the light sensor, and further improving the user experience.
[0150] For the specific definition of the screen brightness adjustment device, please refer to the definition of the screen brightness adjustment method above, which will not be repeated here. Each module in the above-mentioned screen brightness adjustment device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor of the electronic device in the form of hardware, or can be stored in the processor of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0151] The present disclosure also provides an electronic device, Figure 3 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 3As shown, the electronic device provided in this embodiment includes: a memory 31 and a processor 32, the memory 31 is used to store a computer program; the processor 32 is used to execute the steps executed in any embodiment of the fault identification method of the image acquisition device provided by the above method embodiment when calling the computer program. The electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. When the computer program is executed by the processor, a method for fault identification of an image acquisition device is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the housing of the computer device, or an external keyboard, touchpad or mouse.
[0152] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present disclosure, and does not constitute a limitation on the computer device to which the scheme of the present disclosure is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0153] In some embodiments, the screen brightness adjustment device provided by the present disclosure can be implemented in the form of a computer program. Figure 3 The memory of the electronic device may store various program modules constituting the screen brightness adjustment device of the electronic device, for example, Figure 2 The acquisition module 210, the judgment module 220, the first adjustment module 230, and the second adjustment module 240 shown in the figure. The computer program composed of each program module enables the processor to execute the steps of the fault identification method of the image acquisition device of the electronic device of each embodiment of the present disclosure described in this specification.
[0154] The embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the fault identification method for the image acquisition device provided by the above method embodiment is implemented.
[0155] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0156] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0157] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0158] Computer readable media include permanent and non-permanent, removable and non-removable storage media. Storage media can be implemented by any method or technology to store information, and the information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0159] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0160] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A screen brightness adjustment method, characterized in that: The method comprises: Acquire a first light intensity and a second light intensity; the first light intensity is the light intensity of the current environment collected in real time by the light sensor, and the second light intensity is the light intensity of the current environment collected in real time by the rain sensor; determining whether the first light intensity matches the second light intensity; When the first light intensity matches the second light intensity, adjusting the current screen brightness to the screen brightness corresponding to the first light intensity; When the first light intensity does not match the second light intensity, the current screen brightness is adjusted to the screen brightness corresponding to the second light intensity.
2. The method according to claim 1, characterized in that The determining whether the first light intensity matches the second light intensity includes: According to the light intensity level table, obtaining the first light intensity level corresponding to the second light intensity; wherein the light intensity level table includes: the correspondence between the light intensity collected by the rain sensor and the light intensity level; Determining, according to the light intensity mapping relationship table, whether the first light intensity matches the first light intensity level; The light intensity mapping relationship table includes: a correspondence between a preset light intensity interval and a first light intensity level, wherein the preset light intensity interval is a light intensity interval corresponding to the light intensity collected by the light sensor.
3. The method according to claim 2, characterized in that The determining whether the first light intensity matches the first light intensity level comprises: Determine, according to the light intensity mapping relationship table, a first preset light intensity interval corresponding to the first light intensity and a second preset light intensity interval corresponding to the first light intensity level; Determining whether the first preset light intensity interval is consistent with the second preset light intensity interval; If the first preset light intensity interval is consistent with the second preset light intensity interval, determining that the first light intensity matches the first light intensity level; If the first preset light intensity interval is inconsistent with the second preset light intensity interval, it is determined that the first light intensity does not match the first light intensity level.
4. The method according to claim 3, characterized in that The light intensity mapping relationship table further includes: a correspondence between the preset light intensity interval and the preset screen brightness, and when the first light intensity matches the second light intensity, adjusting the current screen brightness to the screen brightness corresponding to the first light intensity includes: If the first light intensity matches the first light intensity level, determine the first preset screen brightness corresponding to the first preset light intensity interval according to the light intensity mapping relationship table; adjust the current screen brightness to the first preset screen brightness; wherein the first preset screen brightness is the screen brightness corresponding to the first light intensity.
5. The method according to claim 4, characterized in that When the first light intensity does not match the second light intensity, adjusting the current screen brightness to the screen brightness corresponding to the second light intensity includes: If the first light intensity does not match the first light intensity level, determining a second preset screen brightness corresponding to the second preset light intensity interval according to the light intensity mapping relationship table; Adjust the current screen brightness to the second preset screen brightness; wherein the second preset screen brightness is the screen brightness corresponding to the second light intensity.
6. The method according to claim 3, characterized in that: If the first light intensity does not match the first light intensity level, the method further includes: Within a preset time period, periodically obtain a third light intensity of the current environment collected by the light sensor and a fourth light intensity of the current environment collected in real time by the rain sensor, and obtain a second light intensity level corresponding to the fourth light intensity according to the light intensity level table; Determining the expected light intensity corresponding to the second light intensity level according to the light intensity mapping relationship table; Calculating according to the third light intensity and the expected light intensity corresponding to the second light intensity level to obtain a light intensity difference; Within a preset time period, obtaining the actual number of times the light intensity difference is greater than a preset intensity threshold; When the actual number is greater than the preset number, it is determined that the light sensor is faulty.
7. A screen brightness adjustment device, characterized in that: include: An acquisition module, used for acquiring a first light intensity and a second light intensity; The first light intensity is the light intensity of the current environment collected in real time by the light sensor, and the second light intensity is the light intensity of the current environment collected in real time by the rain sensor; A judging module, used for judging whether the first light intensity matches the second light intensity; A first adjustment module, configured to adjust the current screen brightness to the screen brightness corresponding to the first light intensity when the first light intensity matches the second light intensity; The second adjustment module is used to adjust the current screen brightness to the screen brightness corresponding to the second light intensity when the first light intensity does not match the second light intensity.
8. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the screen brightness adjustment method as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the screen brightness adjustment method as described in any one of claims 1 to 6 is implemented.
10. A vehicle, characterized in that: include: The electronic device as claimed in claim 8.