Electronic equipment control method and device, electronic equipment, medium and program product
By turning on the flashlight in the dark environment of the electronic device and adjusting the lighting brightness according to the screen brightness, the irritation problem of OLED screen flickering on the eyes is solved, and the safety of electronic devices is improved.
Patent Information
- Application Number
- CN202510059522.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-04-25
AI Technical Summary
The damage to the user's eyes of electronic devices is an issue that cannot be ignored, especially when OLED screens are popular, the flickering phenomenon of screens makes the eyes more obvious.
Get the light intensity of the surrounding environment when the electronic device is in the screen illuminated. If the light intensity is less than the threshold, control the flashlight to turn on and adjust the lighting brightness of the flashlight according to the current screen brightness. The screen brightness is positively correlated with the lighting brightness.
By turning on the flashlight in a dark environment and adjusting the lighting brightness according to the screen brightness, the irritation of the screen lit by the electronic device to the user's eyes is reduced, and the safety of the use of electronic devices is improved.
Smart Images

Figure CN119892977A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic equipment, and in particular to a control method, device, electronic equipment, medium and program product of an electronic equipment. Background Art
[0002] At present, electronic devices such as mobile phones and tablet computers have penetrated into people's lives. People spend most of their leisure time on these electronic devices. These electronic devices can interact with users through the screen, for example, allowing users to play games, watch TV series, read e-books, etc.
[0003] While electronic devices bring convenience to people's lives, they also bring some adverse effects to people's health. For example, the damage of electronic device screens to people's eyes is an issue that cannot be ignored. Therefore, how to improve the safety of electronic devices is of great significance. Summary of the invention
[0004] Based on this, it is necessary to provide a control method, device, electronic device, medium and program product for an electronic device in order to address the above technical problems, so as to improve the safety of use of the electronic device.
[0005] In a first aspect, the present application provides a method for controlling an electronic device. The method comprises:
[0006] When the screen of the electronic device is on, obtaining the light intensity of the surrounding environment of the electronic device;
[0007] When the light intensity is less than the light intensity threshold, the flashlight of the electronic device is controlled to turn on, and the illumination brightness of the flashlight is controlled according to the current screen brightness of the electronic device;
[0008] Among them, the screen brightness is positively correlated with the lighting brightness.
[0009] In a second aspect, the present application also provides a control device for an electronic device. The device comprises:
[0010] An acquisition module, used to acquire the light intensity of the surrounding environment of the electronic device when the screen of the electronic device is in a state of being lit;
[0011] A control module, used to control the flashlight of the electronic device to turn on when the light intensity is less than the light intensity threshold, and to control the illumination brightness of the flashlight according to the current screen brightness of the electronic device;
[0012] Among them, the screen brightness is positively correlated with the lighting brightness.
[0013] In a third aspect, the present application further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the first aspect are implemented.
[0014] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when the computer program is executed by a processor.
[0015] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the steps of the method described in the first aspect when the computer program is executed by a processor.
[0016] The control method, device, electronic device, medium and program product of the above-mentioned electronic device obtains the light intensity of the environment around the electronic device when the electronic device is in a screen-lit state. When the light intensity is less than a light intensity threshold, it indicates that the environment around the electronic device is dark. The embodiment of the present application controls the flashlight of the electronic device to turn on to fill in the surrounding environment, and controls the illumination brightness of the flashlight according to the current screen brightness of the electronic device. The size of the screen brightness is positively correlated with the size of the illumination brightness, that is, when the screen brightness is small (the screen is darker), the illumination brightness of the flashlight is also reduced accordingly, and when the screen brightness is large (the screen is brighter), the illumination brightness of the flashlight is also increased accordingly, thereby reducing the stimulation of the lit screen of the electronic device to the user's eyes and improving the safety of use of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 is a schematic diagram of an electronic device in one embodiment;
[0019] Figure 2 is a flow chart of a control method of an electronic device in one embodiment;
[0020] Figure 3 It is a schematic diagram of a process of controlling the illumination brightness of a flashlight according to the current screen brightness of an electronic device in another embodiment;
[0021] Figure 4 is a schematic diagram of a process of controlling the illumination brightness of a flashlight according to the current screen brightness of an electronic device in another embodiment;
[0022] Figure 5 It is a schematic diagram of a process of controlling the illumination brightness of a flashlight according to the current screen brightness of an electronic device in another embodiment;
[0023] Figure 6 It is a schematic diagram of a process of controlling the illumination brightness of a flashlight according to the current screen brightness of an electronic device in another embodiment;
[0024] Figure 7 is a flow chart of step 202 in another embodiment;
[0025] Figure 8 is a structural block diagram of a control device of an electronic device in one embodiment;
[0026] Fig. 9 FIG. 4 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0028] At present, electronic devices such as mobile phones and tablet computers have penetrated into people's lives. People spend most of their leisure time on these electronic devices. These electronic devices can interact with users through the screen, for example, allowing users to play games, watch TV series, read e-books, etc.
[0029] While electronic devices bring convenience to people's lives, they also have some adverse effects on people's health. For example, the damage caused by the screens of electronic devices to people's eyes is an issue that cannot be ignored.
[0030] The inventor of this application found through a lot of research and experiments during the research and development process that as OLED (Organic Light-Emitting Diode) screens become more and more popular, the demand for eye protection of electronic devices becomes stronger. Taking mobile phones as an example, compared with LCD (Liquid Crystal Display) mobile phones that use DC (Direct Current) backlight adjustment, since LCD screens have a stable power supply, there is no problem of backlight flickering, while OLED mobile phones do not have backlight components, and when the DC current is low, there will be uneven color rendering problems, so they can only be driven by PWM (Pulse Width Modulation) current to emit light, and since PWM dimming is in the form of high and low levels, it will cause the OLED screen to flicker, which will irritate the user's eyes, especially in darker environments, the flickering of the OLED screen will irritate the user's eyes more obviously.
[0031] Therefore, how to improve the safety of electronic equipment is of great significance.
[0032] In view of this, the embodiments of the present application provide a control method, device, electronic device, medium and program product of an electronic device, which can improve the safety of use of the electronic device.
[0033] The control method of the electronic device provided in the embodiment of the present application can be applied to the electronic device. The electronic device can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc.
[0034] In the embodiment of the present application, the electronic device is provided with a screen, which may be an OLED screen. Figure 1 , Figure 1 This is a schematic diagram of an exemplary implementation environment of the control method of an electronic device provided in an embodiment of the present application. The smart phone 10 includes a screen 101.
[0035] Of course, the way the screen is set in a smartphone is not limited to this, and the embodiments of the present application do not impose specific restrictions on this. For example, the smartphone can also be a foldable smartphone. As the shape of the smartphone changes, the way the screen is set will also be different, and so on.
[0036] In an exemplary embodiment, Figure 2 As shown, a control method for an electronic device is provided, and the method is applied to an electronic device as an example for explanation. The electronic device may be, for example, Figure 1 The electronic device shown in the figure, the control method of the electronic device includes the following steps 201 to 202:
[0037] Step 201: When the screen of the electronic device is on, obtain the light intensity of the surrounding environment of the electronic device.
[0038] When the user needs to use the screen of the electronic device, the electronic device lights up the screen and puts it in the screen-lit state. For example, when the user needs to use a game application in the electronic device to play a game, the electronic device responds to the user's trigger operation to light up the screen, lights up the screen, and opens the game application to enter the game interface through interaction with the user.
[0039] When the screen of the electronic device is on, the light intensity of the surrounding environment of the electronic device can be obtained. For example, a light sensor is provided in the electronic device, and the electronic device can sense the light in the surrounding environment through the light sensor, and the electronic device obtains the light intensity of the surrounding environment collected by the light sensor.
[0040] After the electronic device obtains the light intensity of the surrounding environment, it compares the light intensity with a preset light intensity threshold. The light intensity threshold can be a smaller light intensity and can be set by itself during implementation. If the light intensity is less than the light intensity threshold, it indicates that the surrounding environment is darker (the surrounding environment is a dark environment); if the light intensity is equal to or greater than the light intensity threshold, it indicates that the surrounding environment is brighter (the surrounding environment is a bright environment).
[0041] If the electronic device detects that the currently acquired light intensity is greater than or equal to the light intensity threshold, the electronic device may optionally continue to reacquire the light intensity of the environment surrounding the electronic device, and compare the reacquired light intensity with the light intensity threshold to detect whether the reacquired light intensity is less than the light intensity threshold. Optionally, the electronic device may also stop reacquiring the light intensity of the environment surrounding the electronic device and exit the current process, and so on.
[0042] If the electronic device detects that the currently acquired light intensity is less than the light intensity threshold, as an implementation, the electronic device may execute the following step 202 .
[0043] Step 202, when the light intensity is less than the light intensity threshold, control the flashlight of the electronic device to turn on, and control the illumination brightness of the flashlight according to the current screen brightness of the electronic device.
[0044] If the electronic device detects that the light intensity of the surrounding environment is less than the light intensity threshold, it indicates that the surrounding environment of the electronic device is dark. In order to reduce the strong stimulation to the user's eyes caused by the screen flicker of the electronic device in a dark environment, the electronic device controls the flashlight of the electronic device to turn on, and controls the lighting brightness of the flashlight according to the current screen brightness of the electronic device.
[0045] In a possible implementation, after detecting that the currently acquired light intensity is less than a light intensity threshold, the electronic device may re-acquire the light intensity of the electronic device's surrounding environment at an interval of a preset time (the preset time can be flexibly set during implementation), and again compare the relationship between the re-acquired light intensity and the light intensity threshold. If the re-acquired light intensity is still less than the light intensity threshold, the electronic device controls the flashlight of the electronic device to turn on, and controls the brightness of the flashlight according to the current screen brightness of the electronic device. This can improve the accuracy of dark environment detection, thereby improving the control accuracy of the electronic device.
[0046] In the embodiment of the present application, at least one flashlight may be provided in the electronic device, and the lighting direction of the flashlight turned on by the electronic device is different from the direction of the screen of the electronic device, for example, the lighting direction of the flashlight turned on by the electronic device is opposite to the direction of the screen of the electronic device. Figure 1 As an example, the user uses the smartphone shown in Figure 1 When the smartphone is shown, the screen of the smartphone is facing the user, and the smartphone can turn on the flashlight set on the back of the smartphone to prevent the flashlight from directly shining into the user's eyes.
[0047] After the electronic device controls the flashlight of the electronic device to be turned on, the illumination brightness of the flashlight is controlled according to the current screen brightness of the electronic device, wherein the screen brightness is positively correlated with the illumination brightness. For example, when the screen brightness is low (the screen is darker), the illumination brightness of the flashlight is also reduced accordingly, and when the screen brightness is high (the screen is brighter), the illumination brightness of the flashlight is also increased accordingly.
[0048] As an implementation mode, the electronic device can determine a corresponding lighting brightness value based on the current screen brightness of the electronic device, and the electronic device detects whether the lighting brightness value is the same as the default brightness value of the flashlight. If the lighting brightness value is the same as the default brightness value of the flashlight, the electronic device controls the flashlight to illuminate according to the default brightness value; if the lighting brightness value is different from the default brightness value of the flashlight, the electronic device controls the flashlight to illuminate according to the lighting brightness value.
[0049] In the above embodiment, when the screen of the electronic device is lit in a dark environment, the electronic device can control the flashlight of the electronic device to turn on to fill in the surrounding environment, and control the illumination brightness of the flashlight according to the current screen brightness of the electronic device. The screen brightness is positively correlated with the illumination brightness, that is, when the screen brightness is small (the screen is darker), the illumination brightness of the flashlight is also reduced accordingly, and when the screen brightness is large (the screen is brighter), the illumination brightness of the flashlight is also increased accordingly, thereby reducing the stimulation of the lighted screen of the electronic device to the user's eyes and improving the safety of the use of the electronic device. In addition, this method does not increase the cost of the electronic device, and does not require the user to perform additional operations, which is conducive to improving the user experience of the electronic device.
[0050] In the following, four possible implementations are used to exemplarily introduce an implementation in which an electronic device controls the illumination brightness of a flashlight according to the current screen brightness of the electronic device.
[0051] 1) The first implementation method:
[0052] exist Figure 2 Based on the embodiments shown, the electronic device can perform Figure 3 Steps 301 and 302 shown in the figure implement the process of the electronic device controlling the illumination brightness of the flashlight according to the current screen brightness of the electronic device:
[0053] Step 301, determining a target lighting brightness value corresponding to the screen brightness according to the screen brightness.
[0054] Step 302, controlling the illumination brightness of the flashlight according to the target illumination brightness value.
[0055] In an embodiment of the present application, a first mapping relationship can be preset in the electronic device, and the first mapping relationship includes a one-to-one correspondence between each screen brightness of the screen and each lighting brightness value of the flashlight. The greater the screen brightness, the greater the corresponding lighting brightness value. Conversely, the smaller the screen brightness, the smaller the corresponding lighting brightness value.
[0056] In this way, the electronic device can search for a lighting brightness value uniquely corresponding to the current screen brightness of the electronic device in the first mapping relationship, that is, a target lighting brightness value.
[0057] After the electronic device determines the target lighting brightness value from the first mapping relationship, it controls the flashlight to illuminate according to the target lighting brightness value.
[0058] 2) The second implementation method:
[0059] exist Figure 2 Based on the embodiments shown, the electronic device can perform Figure 4Steps 401 and 402 shown in the figure implement the process of the electronic device controlling the illumination brightness of the flashlight according to the current screen brightness of the electronic device:
[0060] Step 401, determining a lighting brightness interval corresponding to the screen brightness according to the screen brightness, wherein the lighting brightness interval includes a plurality of lighting brightness values.
[0061] Step 402, controlling the illumination brightness of the flashlight according to the illumination brightness range.
[0062] In an embodiment of the present application, the lighting brightness range supported by the flashlight can be pre-divided into multiple lighting brightness intervals. Optionally, the lighting brightness range supported by the flashlight can be evenly divided into multiple lighting brightness intervals (the brightness length of each lighting brightness interval is equal). Optionally, the lighting brightness range supported by the flashlight can also be unevenly divided into multiple lighting brightness intervals (the brightness length of each lighting brightness interval may not be equal).
[0063] For example, the lighting brightness range supported by the flashlight is 0nit (nit) ~ 50nit, and the lighting brightness range is divided into three lighting brightness intervals: 0~5nit, 5~20nit, and 20~50nit.
[0064] The electronic device may preset a second mapping relationship, which includes a correspondence between each screen brightness of the screen and each lighting brightness interval of the flashlight. The correspondence may be a one-to-one correspondence, that is, one screen brightness corresponds to one lighting brightness interval uniquely, or a many-to-one correspondence, that is, multiple screen brightnesses correspond to the same lighting brightness interval. For different lighting brightness intervals, the greater the screen brightness, the greater the lighting brightness value included in the corresponding lighting brightness interval, and conversely, the smaller the screen brightness, the smaller the lighting brightness value included in the corresponding lighting brightness interval.
[0065] In this way, the electronic device can search for the lighting brightness interval corresponding to the current screen brightness in the second mapping relationship according to the current screen brightness of the electronic device.
[0066] After the electronic device determines the lighting brightness interval from the second mapping relationship, it controls the lighting brightness of the flashlight according to the lighting brightness interval.
[0067] As described above, the lighting brightness interval includes multiple lighting brightness values, and the electronic device can control the flashlight to illuminate according to any lighting brightness value in the lighting brightness interval, thereby realizing the process of controlling the lighting brightness of the flashlight according to the lighting brightness interval.
[0068] 3) The third implementation method:
[0069] exist Figure 2 Based on the embodiments shown, the electronic device can perform Figure 5 Steps 501 to 503 shown in the figure implement the process of the electronic device controlling the illumination brightness of the flashlight according to the current screen brightness of the electronic device:
[0070] Step 501, determine the screen brightness interval in which the screen brightness lies.
[0071] Step 502: Determine a target lighting brightness value corresponding to the screen brightness interval according to the screen brightness interval.
[0072] Step 503, controlling the illumination brightness of the flashlight according to the target illumination brightness value.
[0073] The difference between the third implementation and the first implementation is that in the third implementation, the electronic device implements the process of step 301 in the first implementation through steps 501 and 502.
[0074] In an embodiment of the present application, the screen brightness range supported by the screen of the electronic device can be pre-divided into multiple screen brightness intervals. Optionally, the screen brightness range supported by the screen of the electronic device can be evenly divided into multiple screen brightness intervals (the brightness length of each screen brightness interval is equal). Optionally, the screen brightness range supported by the screen of the electronic device can also be unevenly divided into multiple screen brightness intervals (the brightness length of each lighting brightness interval may not be equal).
[0075] A third mapping relationship can be preset in the electronic device, and the third mapping relationship includes a one-to-one correspondence between each screen brightness interval of the screen and each lighting brightness value of the flashlight. For different screen brightness intervals, the greater the screen brightness included in the screen brightness interval, the greater the corresponding lighting brightness value. Conversely, the smaller the screen brightness included in the screen brightness interval, the smaller the corresponding lighting brightness value.
[0076] In this way, the electronic device can first determine the screen brightness range according to the current screen brightness of the electronic device, and then use the screen brightness range to find the lighting brightness value uniquely corresponding to the current screen brightness range in the third mapping relationship, that is, the target lighting brightness value.
[0077] After the electronic device determines the target lighting brightness value from the third mapping relationship, it controls the flashlight to illuminate according to the target lighting brightness value.
[0078] 3) The fourth implementation method:
[0079] exist Figure 2 Based on the embodiments shown, the electronic device can perform Figure 6Steps 601 to 603 shown in the figure implement the process of the electronic device controlling the illumination brightness of the flashlight according to the current screen brightness of the electronic device:
[0080] Step 601, determine the screen brightness interval in which the screen brightness lies.
[0081] Step 602: Determine, according to the screen brightness interval, a lighting brightness interval corresponding to the screen brightness interval, wherein the lighting brightness interval includes a plurality of lighting brightness values.
[0082] Step 603, controlling the illumination brightness of the flashlight according to the illumination brightness range.
[0083] The difference between the fourth implementation mode and the second implementation mode is that in the fourth implementation mode, the electronic device implements the process of step 401 in the second implementation mode through steps 601 and 602.
[0084] As described above, the screen brightness range supported by the screen of the electronic device can be divided into multiple screen brightness intervals in advance, and the lighting brightness range supported by the flashlight can be divided into multiple lighting brightness intervals.
[0085] A fourth mapping relationship can be preset in the electronic device, and the fourth mapping relationship includes a one-to-one correspondence between each screen brightness interval of the screen and each lighting brightness interval of the flashlight. The greater the each screen brightness included in the screen brightness interval, the greater the each lighting brightness value included in the corresponding lighting brightness interval. Conversely, the smaller the each screen brightness included in the screen brightness interval, the smaller the each lighting brightness value included in the corresponding lighting brightness interval.
[0086] In this way, the electronic device can first determine the screen brightness range according to the current screen brightness of the electronic device, and then use the screen brightness range to find the lighting brightness range that uniquely corresponds to the current screen brightness range in the fourth mapping relationship, and then control the lighting brightness of the flashlight according to the lighting brightness range.
[0087] As described above, the lighting brightness interval includes multiple lighting brightness values, and the electronic device can control the flashlight to illuminate according to any lighting brightness value in the lighting brightness interval, thereby realizing the process of controlling the lighting brightness of the flashlight according to the lighting brightness interval.
[0088] In the above embodiments, the electronic device can realize the process of controlling the lighting brightness of the flashlight according to the current screen brightness of the electronic device through several different implementation methods. The implementation methods are flexible and diverse and can be flexibly selected during the implementation process, thereby improving the control flexibility of the control method of the electronic device in the embodiment of the present application.
[0089] The above embodiments introduce several possible implementations of the electronic device controlling the illumination brightness of the flashlight according to the current screen brightness of the electronic device. The following is an exemplary introduction to the situation where the electronic device turns off the flashlight after turning it on.
[0090] In a possible implementation, after the electronic device controls the flashlight of the electronic device to turn on, if a flashlight off instruction is detected, the electronic device can turn off the flashlight. The off instruction can be, for example, input by a user's voice or input by a user clicking on the screen of the electronic device, etc. The manner in which the user inputs the flashlight off instruction is not limited.
[0091] In another possible implementation, the electronic device turns off the flashlight when detecting that the electronic device has switched to a screen-off state. That is, when the screen of the electronic device is off, the electronic device directly turns off the flashlight without any user operation. This can avoid additional operations by the user and improve the convenience of using the electronic device.
[0092] Based on any of the above embodiments, Figure 2 Taking the illustrated embodiment as an example, when the light intensity of the electronic device is less than the light intensity threshold, the electronic device may first detect whether the electronic device is in the eye protection mode, and then determine whether to directly control the flashlight to turn on based on the detection result.
[0093] like Figure 7 As shown, step 202 includes Figure 7 Steps 701 to 705 shown:
[0094] Step 701: When the light intensity is less than a light intensity threshold, detect whether the electronic device is in an eye protection mode.
[0095] Whether to turn on the eye protection mode can be flexibly selected by the user. For example, the user can click the eye protection mode trigger control in the electronic device, enter the eye protection mode turning on instruction, and the electronic device will turn on the eye protection mode.
[0096] It is understandable that if the user has turned on the eye protection mode in the electronic device before step 701, then the electronic device can detect that the electronic device is in the eye protection mode; otherwise, the electronic device detects that the electronic device is not in the eye protection mode.
[0097] Step 702, when the electronic device is in the eye protection mode, control the flashlight to turn on, and control the illumination brightness of the flashlight according to the current screen brightness of the electronic device.
[0098] In a dark environment, if the electronic device detects that the electronic device is in the eye protection mode, it indicates that the user allows the electronic device to perform the eye protection operation, and the electronic device then controls the flashlight to turn on, which can improve the intelligence of the electronic device's eye protection. Among them, the implementation method of the electronic device controlling the illumination brightness of the flashlight according to the current screen brightness of the electronic device can refer to the relevant description of the above embodiment, which will not be repeated here.
[0099] Step 703: When the electronic device is not in the eye protection mode, detect whether the screen lighting time of the electronic device is greater than a preset time threshold.
[0100] The screen lighting duration may refer to: the screen lighting duration of the electronic device after the electronic device detects that the light intensity of the surrounding environment is less than the light intensity threshold, that is, the screen lighting duration of the electronic device in a dark environment.
[0101] The electronic device detects whether the screen lighting time is greater than a preset time threshold, and the preset time threshold can be set by itself during implementation, for example, set to 30s.
[0102] Step 704: If the screen lighting time is greater than a preset time threshold, an eye protection mode trigger control is displayed on the screen of the electronic device. The eye protection mode trigger control is used for the user to input an eye protection mode on instruction.
[0103] If the screen is lit for longer than a preset time threshold, the electronic device displays an eye protection mode trigger control on the screen. The eye protection mode trigger control can be in the form of a pop-up window, or in other forms, such as a banner message, etc.
[0104] The eye protection mode triggering control includes prompt information, such as "whether to turn on the eye protection mode", etc.
[0105] Step 705: If an eye protection mode on instruction is detected, the flashlight is controlled to turn on, and the illumination brightness of the flashlight is controlled according to the current screen brightness of the electronic device.
[0106] If the electronic device detects an eye protection mode turn-on instruction input by the user based on the eye protection mode trigger control, the electronic device then controls the flashlight to turn on, and controls the lighting brightness of the flashlight according to the current screen brightness of the electronic device. This can improve the intelligence of the eye protection of the electronic device. For the implementation method of the electronic device controlling the lighting brightness of the flashlight according to the current screen brightness of the electronic device, please refer to the relevant description of the above embodiment, which will not be repeated here.
[0107] In some possible implementations, the electronic device may also detect the remaining power of the battery of the electronic device before controlling the flashlight to turn on. If the remaining power is greater than a preset power threshold, the flashlight is controlled to turn on, thereby avoiding turning on the flashlight when the remaining power is too low and causing extra power consumption, etc.
[0108] The above-mentioned embodiment detects the light intensity of the environment around the electronic device, the current screen brightness of the electronic device and the user's behavior. When the screen is lit in a dark environment, the electronic device can control the flashlight of the electronic device to flexibly fill in the surrounding environment, thereby improving the safety of use of the electronic device. This method does not increase the cost of the electronic device, nor does it require additional operations by the user, which is conducive to improving the user experience of the electronic device.
[0109] In one embodiment, a control method of an electronic device is provided, which is used in the electronic device and includes the following steps:
[0110] Step A1, when the screen of the electronic device is on, obtaining the light intensity of the surrounding environment of the electronic device.
[0111] Step A2: When the light intensity is less than the light intensity threshold, detect whether the electronic device is in the eye protection mode.
[0112] Step A3: When the electronic device is not in the eye protection mode, detect whether the screen lighting time of the electronic device is greater than a preset time threshold.
[0113] Step A4: if the screen lighting time is greater than a preset time threshold, an eye protection mode trigger control is displayed on the screen of the electronic device.
[0114] Step A5, if the eye protection mode trigger control detects an eye protection mode turn-on instruction, the flashlight of the electronic device is controlled to turn on, and the illumination brightness of the flashlight is controlled according to the current screen brightness of the electronic device;
[0115] Among them, the screen brightness is positively correlated with the lighting brightness.
[0116] Step A6, when the electronic device is switched to the screen-off state, turn off the flashlight.
[0117] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0118] Based on the same inventive concept, the embodiment of the present application also provides a control device for an electronic device for implementing the control method of the electronic device involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the control device embodiments of one or more electronic devices provided below can refer to the limitations of the control method of the electronic device above, and will not be repeated here.
[0119] In an exemplary embodiment, Figure 8 As shown, a control device for an electronic device is provided, comprising:
[0120] An acquisition module 801 is used to acquire the light intensity of the surrounding environment of the electronic device when the screen of the electronic device is in a state of being lit;
[0121] The control module 802 is used to control the flashlight of the electronic device to turn on when the light intensity is less than the light intensity threshold, and control the illumination brightness of the flashlight according to the current screen brightness of the electronic device;
[0122] The screen brightness is positively correlated with the lighting brightness.
[0123] In one embodiment, the control module 802 is specifically used to determine the lighting brightness interval or target lighting brightness value corresponding to the screen brightness according to the screen brightness, and the lighting brightness interval includes multiple lighting brightness values; according to the lighting brightness interval or the target lighting brightness value, control the lighting brightness of the flashlight.
[0124] In one of the embodiments, the control module 802 is specifically used to determine a screen brightness interval in which the screen brightness is located; and according to the screen brightness interval, determine the lighting brightness interval or the target lighting brightness value corresponding to the screen brightness interval.
[0125] In one embodiment, the control module 802 is specifically used to control the flashlight to illuminate according to any of the illumination brightness values in the illumination brightness range.
[0126] In one embodiment, the device further comprises:
[0127] A detection module, the detection module is used to detect whether the electronic device is in an eye protection mode before the control module 802 controls the flashlight of the electronic device to turn on;
[0128] The control module 802 is specifically configured to control the flashlight to turn on when the electronic device is in the eye protection mode.
[0129] In one of the embodiments, the detection module is further used to detect whether the screen lighting time of the electronic device is greater than a preset time threshold when the electronic device is not in the eye protection mode;
[0130] If the screen lighting time is longer than the preset time threshold, an eye protection mode trigger control is displayed on the screen of the electronic device, and the eye protection mode trigger control is used for the user to input an eye protection mode opening instruction;
[0131] The control module 802 is specifically configured to execute the step of controlling the flashlight to turn on if the eye protection mode turn-on instruction is detected.
[0132] In one embodiment, the control module 802 is further configured to turn off the flashlight when the electronic device is switched to a screen-off state.
[0133] Each module in the control device of the above electronic device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0134] In an exemplary embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig. 9As shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. 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. The input / output interface of the electronic device is used to exchange information between the processor and an external device. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a control method of an electronic device is implemented. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen 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 covering the display screen, or a button, trackball or touchpad set on the electronic device casing, or an external keyboard, touchpad or mouse.
[0135] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0136] The embodiment of the present application also provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, the processors execute the steps of the control method of the electronic device.
[0137] An embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute a method for controlling an electronic device.
[0138] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0139] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a controller of a digital electronic device, a programmable logic unit, a data processing logic unit based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0140] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0141] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A control method for an electronic device, characterized in that: The method comprises: When the screen of the electronic device is on, obtaining the light intensity of the surrounding environment of the electronic device; When the light intensity is less than the light intensity threshold, controlling the flashlight of the electronic device to turn on, and controlling the illumination brightness of the flashlight according to the current screen brightness of the electronic device; The screen brightness is positively correlated with the lighting brightness.
2. The method according to claim 1, characterized in that The step of controlling the illumination brightness of the flashlight according to the current screen brightness of the electronic device comprises: Determine, according to the screen brightness, a lighting brightness interval or a target lighting brightness value corresponding to the screen brightness, wherein the lighting brightness interval includes a plurality of lighting brightness values; The illumination brightness of the flashlight is controlled according to the illumination brightness interval or the target illumination brightness value.
3. The method according to claim 2, characterized in that The determining, according to the screen brightness, a lighting brightness interval or a target lighting brightness value corresponding to the screen brightness includes: Determine the screen brightness interval in which the screen brightness lies; According to the screen brightness interval, the lighting brightness interval or the target lighting brightness value corresponding to the screen brightness interval is determined.
4. The method according to claim 2, characterized in that: The process of controlling the illumination brightness of the flashlight according to the illumination brightness interval includes: The flashlight is controlled to illuminate according to any of the illumination brightness values in the illumination brightness interval.
5. The method according to claim 1, characterized in that Before controlling the flashlight of the electronic device to turn on, the method further includes: Detecting whether the electronic device is in an eye protection mode; The step of controlling the flashlight of the electronic device to turn on comprises: When the electronic device is in the eye protection mode, the flashlight is controlled to turn on.
6. The method according to claim 5, characterized in that The method further comprises: When the electronic device is not in the eye protection mode, detecting whether the screen lighting time of the electronic device is greater than a preset time threshold; If the screen lighting time is longer than the preset time threshold, an eye protection mode trigger control is displayed on the screen of the electronic device, and the eye protection mode trigger control is used for the user to input an eye protection mode opening instruction; If the eye protection mode on instruction is detected, the step of controlling the flashlight to turn on is executed.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: When the electronic device is switched to a screen-off state, the flashlight is turned off.
8. A control device for an electronic device, characterized in that: The device comprises: An acquisition module, used to acquire the light intensity of the surrounding environment of the electronic device when the screen of the electronic device is in a state of being lit; A control module, configured to control the flashlight of the electronic device to turn on when the light intensity is less than a light intensity threshold, and to control the illumination brightness of the flashlight according to the current screen brightness of the electronic device; The screen brightness is positively correlated with the lighting brightness.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.