Flashlight control method and device, electronic equipment and storage medium

文档序号:681920 发布日期:2021-04-30 浏览:26次 中文

阅读说明:本技术 手电筒控制方法、装置、电子设备及存储介质 (Flashlight control method and device, electronic equipment and storage medium ) 是由 李薇 于 2021-01-13 设计创作,主要内容包括:一种手电筒控制方法、装置、电子设备及存储介质。所述方法包括:当检测到对手电筒图标的第一触摸操作时,显示手电筒操作界面;当所述手电筒操作界面上,存在用于打开手电筒的第二触摸操作时,若所述电子设备未设置有闪光灯器件,则控制屏幕背景灯点亮,直至检测到用于关闭所述手电筒的第三触摸操作。应用上述方案,可以令不设置闪光灯器件的电子设备,满足用户对手电筒的应用需求。(A flashlight control method, a flashlight control device, electronic equipment and a storage medium are provided. The method comprises the following steps: when first touch operation on the flashlight icon is detected, displaying a flashlight operation interface; when a second touch operation for turning on the flashlight exists on the flashlight operation interface, if the electronic equipment is not provided with a flashlight device, a screen background lamp is controlled to be turned on until a third touch operation for turning off the flashlight is detected. By applying the scheme, the electronic equipment without the flash lamp device can meet the application requirements of users on the flashlight.)

1. A control method of a flashlight is applied to electronic equipment, and is characterized in that a flashlight icon is arranged on a desktop of the electronic equipment, and the method comprises the following steps:

when first touch operation on the flashlight icon is detected, displaying a flashlight operation interface;

when a second touch operation for turning on the flashlight exists on the flashlight operation interface, if the electronic equipment is not provided with a flashlight device, a screen background lamp is controlled to be turned on until a third touch operation for turning off the flashlight is detected.

2. The method for controlling the flashlight of claim 1, wherein the flashlight interface is provided with a switch button for turning on or off the flashlight.

3. The method of controlling a flashlight of claim 2, wherein the on-screen backlight comprises: a plurality of screen lighting units, each of the screen lighting units including: red, green, blue and white pixels;

the control screen backlight is illuminated, comprising: and controlling the white pixel points of each screen lighting unit to be lighted to the maximum brightness value.

4. The method of controlling a flashlight of claim 1, wherein when there is a second touch operation on the flashlight operational interface to turn on the flashlight, the method further comprises:

and if the electronic equipment is provided with a flash lamp device, turning on the flash lamp device.

5. The method of controlling a flashlight of claim 4, wherein the method further comprises: and controlling the screen background light to be lightened to a first brightness value while turning on the flash light device, wherein the first brightness value of the screen background light is less than or equal to the maximum brightness value of the screen background light.

6. The method of controlling a flashlight of claim 1, further comprising:

detecting the residual capacity of the electronic equipment;

calculating the remaining standby time of the flashlight under the condition of being turned on based on the remaining power of the electronic equipment;

and displaying the standby time length on the flashlight operation interface in real time.

7. The method as claimed in claim 6, wherein the flashlight interface is further provided with a display button for turning on or off the standby time.

8. The utility model provides a controlling means of flashlight is applied to electronic equipment, its characterized in that is provided with the flashlight icon on electronic equipment's the desktop, the device includes:

the display unit is suitable for displaying a flashlight operation interface when first touch operation on the flashlight icon is detected;

and the control unit is suitable for controlling a screen backlight to be turned on until a third touch operation for turning off the flashlight is detected if the electronic equipment is not provided with a flash lamp device when a second touch operation for turning on the flashlight exists on the flashlight operation interface.

9. The control device for a flashlight of claim 8, wherein said on-screen backlight comprises: a plurality of screen lighting units, each of the screen lighting units including: red, green, blue and white pixels;

the control unit is adapted to control only the white pixel lighting of each of the screen lighting units.

10. The control device of the flashlight of claim 8, wherein the control unit turns on the flash device if the electronic device is provided with the flash device when there is a second touch operation for turning on the flashlight operation interface.

11. The control device for a flashlight of claim 10, further comprising:

the electric quantity detection unit is suitable for detecting the residual electric quantity of the electronic equipment;

the computing unit is suitable for computing the remaining standby time of the flashlight under the condition of being turned on based on the remaining electric quantity of the electronic equipment;

the display unit is further suitable for displaying the standby time length on the flashlight operation interface in real time.

12. A computer-readable storage medium, on which a computer program is stored, which computer program is executable by a processor for carrying out the steps of the method according to any one of claims 1 to 7.

13. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program operable on the processor, wherein the processor, when executing the computer program, performs the steps of the method of any of claims 1 to 7.

Technical Field

The invention relates to the technical field of flashlights, in particular to a flashlight control method, a flashlight control device, electronic equipment and a storage medium.

Background

With the development of science and technology, portable devices such as telephone watches have become an important tool in people's daily life.

In the existing portable equipment such as telephone watches and the like, a flashlight device is not arranged generally, and the application requirement of a user on the flashlight cannot be met.

Disclosure of Invention

The invention aims to solve the problems that: for electronic equipment without a flash lamp device, how to meet the application requirements of users on the flashlight.

In order to solve the above problem, an embodiment of the present invention provides a method for controlling a flashlight, which is applied to an electronic device, where a flashlight icon is arranged on a desktop of the electronic device, and the method includes:

when first touch operation on the flashlight icon is detected, displaying a flashlight operation interface;

when a second touch operation for turning on the flashlight exists on the flashlight operation interface, if the electronic equipment is not provided with a flashlight device, a screen background lamp is controlled to be turned on until a third touch operation for turning off the flashlight is detected.

Optionally, a switch button for turning on or off the flashlight is arranged on the flashlight operation interface.

Optionally, the screen backlight comprises: a plurality of screen lighting units, each of the screen lighting units including: red, green, blue and white pixels;

the control screen backlight is illuminated, comprising: and controlling the white pixel points of each screen lighting unit to be lighted to the maximum brightness value.

Optionally, when there is a second touch operation for turning on the flashlight operation interface, the method further includes:

and if the electronic equipment is provided with a flash lamp device, turning on the flash lamp device.

Optionally, the method further comprises: and controlling the screen background light to be lightened to a first brightness value while turning on the flash light device, wherein the first brightness value of the screen background light is less than or equal to the maximum brightness value of the screen background light.

Optionally, the method further comprises:

detecting the residual capacity of the electronic equipment;

calculating the remaining standby time of the flashlight under the condition of being turned on based on the remaining power of the electronic equipment;

and displaying the standby time length on the flashlight operation interface in real time.

Optionally, a display button for turning on or off the standby time is further arranged on the flashlight operation interface.

The embodiment of the invention also provides a control device of the flashlight, which is applied to electronic equipment, wherein a flashlight icon is arranged on a desktop of the electronic equipment, and the control device comprises:

the display unit is suitable for displaying a flashlight operation interface when first touch operation on the flashlight icon is detected;

and the control unit is suitable for controlling a screen backlight to be turned on until a third touch operation for turning off the flashlight is detected if the electronic equipment is not provided with a flash lamp device when a second touch operation for turning on the flashlight exists on the flashlight operation interface.

Optionally, the screen backlight comprises: a plurality of screen lighting units, each of the screen lighting units including: red, green, blue and white pixels;

the control unit is adapted to control only the white pixel lighting of each of the screen lighting units.

Optionally, when a second touch operation for turning on the flashlight exists on the flashlight operation interface, the control unit turns on the flashlight device if the electronic device is provided with the flashlight device.

Optionally, the apparatus further comprises:

the electric quantity detection unit is suitable for detecting the residual electric quantity of the electronic equipment;

the computing unit is suitable for computing the remaining standby time of the flashlight under the condition of being turned on based on the remaining electric quantity of the electronic equipment;

the display unit is further suitable for displaying the standby time length on the flashlight operation interface in real time.

Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of any one of the methods described above.

An embodiment of the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program capable of running on the processor, and the processor executes any of the steps of the method when running the computer program.

Compared with the prior art, the technical scheme of the embodiment of the invention has the following advantages:

by applying the scheme of the invention, when the second touch operation for turning on the flashlight exists, if the electronic equipment is not provided with the flash lamp device, the screen background lamp is controlled to be turned on, so that the application requirement of a user on the flashlight can be met when the flash lamp device is not arranged. In addition, because the flashlight icon is arranged on the desktop of the electronic equipment, the flashlight can be turned on or turned off more conveniently, the operation required by a user for turning on or turning off the flashlight is reduced, and the user experience is improved.

Further, when the screen background light is controlled to be lightened, only the white pixel of each screen lightening unit is controlled to be lightened, and all the pixels of the screen lightening units are not required to be controlled to be lightened, so that the power consumption of the electronic equipment can be reduced.

Furthermore, the standby time length is displayed on the flashlight operation interface in real time, the remaining service time can be prompted to a user, the user can conveniently execute the storage operation in advance, and the user experience is improved.

Drawings

FIG. 1 is a flow chart of a method of controlling a flashlight of an embodiment of the present invention;

FIG. 2 is a schematic illustration of a flashlight icon in accordance with an embodiment of the present invention;

FIG. 3 is a schematic view of an exemplary flashlight interface;

fig. 4 is a schematic structural diagram of a control device of a flashlight according to an embodiment of the present invention.

Detailed Description

In the existing portable equipment such as telephone watches and the like, a flashlight device is not arranged generally, and the application requirement of a user on the flashlight cannot be met.

In order to solve the problem, the invention provides a control method of a flashlight, when a second touch operation for turning on the flashlight exists, if the electronic equipment is not provided with a flash lamp device, a screen background lamp is controlled to be turned on, and therefore, the application requirement of a user on the flashlight can be met when the flash lamp device is not arranged.

In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.

Referring to fig. 1, an embodiment of the present invention provides a method for controlling a flashlight. The method is applied to the electronic equipment. And a flashlight icon is arranged on the desktop of the electronic equipment.

In a specific implementation, a flashlight application is installed in the electronic device. Accordingly, referring to fig. 2, a flashlight icon 21 is displayed on the desktop of the electronic device. The desktop refers to a display main screen area that is viewed after the electronic device is opened and login is successful. The desktop will typically have a number of application icons placed on it that act as portals for opening the application.

In a specific implementation, the electronic device is a device capable of performing human-computer interaction through a touch display screen. The user can operate the touch display screen through the target object to enable the electronic device to execute a specific function, and the electronic device can also display a user interface through the touch display screen. For example, home intelligent terminals (including air conditioners, refrigerators, electric cookers, water heaters, and the like), business intelligent terminals (including video phones, conference desktop intelligent terminals, and the like), wearable devices (including smart watches, smart glasses, and the like), financial intelligent terminals, and smart phones, tablet computers, Personal Digital Assistants (PDAs), in-vehicle devices, computers, and the like.

The target object is an object which can be detected and positioned by a touch display screen when the target object is close to or in contact with the touch display screen of the terminal device, for example, a human body, a touch pen and other manual input tools commonly used by a user. The floating button is displayed on the uppermost layer of the program interface which is currently running in a floating mode and is provided with a virtual button with an instruction triggering function.

The method may comprise the steps of:

and step 11, displaying a flashlight operation interface when the first touch operation on the flashlight icon is detected.

In a specific implementation, the touch operation is implemented by a user approaching or contacting a touch display screen of the electronic device through a target object. The first touch operation is a preset touch operation for opening the flashlight operation interface, and specifically may be a click (including a single click, a double click, a triple continuous click) operation, a long-time press operation, and the like.

For example, when the user performs a click operation on a flashlight icon in the touch display screen through the target object, the electronic device may recognize the user's intention, and turn on the flashlight operation interface. The flashlight operation interface is used for inputting control operation of the flashlight.

And step 12, when a second touch operation for turning on the flashlight exists on the flashlight operation interface, if the electronic equipment is not provided with a flashlight device, controlling a screen backlight to be turned on until a third touch operation for turning off the flashlight is detected.

The flashlight operation interface can have various types, and a second touch operation for turning on the flashlight can be preset and set based on the flashlight operation interface.

For example, the flashlight operator interface may be as shown in FIG. 3. In the flashlight operational interface shown in fig. 3, a switch button 31 for turning on or off the flashlight is provided, and the switch button 31 may be suspended on the flashlight operational interface. The touch operation of the target object on the floating button is not the direct operation of the target object on the floating button, but the target object is touched to the area of the position displayed by the floating button through the touch display screen.

In a specific implementation, the second touch operation may be a click operation, but may also be other operations. When the user performs a click operation on the switch button 31, the electronic device may recognize the operation and turn on the flashlight.

After the flashlight operation interface is turned on, the flashlight is in the off state by default before the user does not perform the second touch operation on the switch button 31.

In some embodiments, to better alert the user of the current on/off state of the flashlight, the current screen backlight (i.e., the flashlight operator interface backlight) may be controlled to be off or the brightness of the current screen backlight may be controlled to be reduced while the flashlight is in the off state.

When there is a second touch operation for turning on the flashlight, the electronic device may have different control operations based on whether the electronic device itself is provided with a flash device.

In an embodiment, if the electronic device is not provided with a flash device, the electronic device may control an on-screen backlight to be turned on until a third touch operation for turning off the flashlight is detected.

The third touch operation may be a click operation, a double click operation, or other operations. When the flashlight is in an open state, once the third touch operation is detected, the operation of turning off the flashlight can be executed.

In one embodiment, the screen backlight may be provided by an Active-matrix organic light-emitting diode (AMOLED) panel. The AMOLED panel may include a plurality of screen lighting units, each of the screen lighting units including: red pixels, green pixels, blue pixels, and white pixels.

In some embodiments, the control screen backlight is illuminated, and may be controlled to illuminate red pixels, green pixels, blue pixels and white pixels,

in an embodiment of the invention, in order to realize the function of the flashlight and reduce power consumption, only the white pixel points of each screen lighting unit may be controlled to be lighted to the maximum brightness value. The white pixels of all the screen lighting units are lighted, and compared with the lighting of all the pixels of all the screen lighting units, the power consumption of the electronic equipment can be effectively reduced, and the realization of the flashlight function is ensured.

After the screen background lamp is lightened to the maximum brightness value, the flashlight function can be realized through the brightness of the screen background lamp, and the lighting service is provided for users.

In another embodiment of the invention, the electronic device may also be provided with a flash device. At this time, when a second touch operation for turning on the flashlight is detected, the flashlight device may be turned on, and the flashlight function may be implemented by the flashlight device.

In implementations, because the flash device is typically disposed away from the electronic device display screen, it is often the case that the flash is turned on but not detected by the user.

In one embodiment, to better alert a user of the current on/off state of the flashlight, the current screen backlight may be controlled to illuminate to a first brightness value when the flashlight is in the on state, the first brightness value of the screen backlight being less than or equal to the maximum brightness value of the screen backlight.

That is, even if a flash device is provided, the current screen backlight can be turned on at the same time, so that the user can be prompted as to the on-off state of the flashlight. At this time, the brightness of the screen background light may be the maximum brightness value, or may be less than the maximum brightness value.

In some embodiments, when the screen backlight is provided by the AMOLED panel, in order to make the prompt more obvious, one or more of the red pixel, the green pixel and the blue pixel in the screen lighting unit may be controlled to be lighted up to the maximum brightness value. At the moment, the flashlight operation interface can display colored light, so that a user can find the state of the flashlight more easily.

In specific implementation, when the battery power is low, a user cannot find the battery power in time, which often causes shutdown of the electronic device due to too low power, and thus user experience is poor.

In some embodiments, to avoid the above, the method may further include: and detecting the residual capacity of the electronic equipment. Then, the remaining standby time of the flashlight under the condition of being turned on is calculated based on the remaining power of the electronic equipment. Finally, referring to FIG. 3, the standby duration 32 is displayed in real time on the flashlight operator interface.

In specific implementation, the remaining standby time can be calculated and displayed in real time when the remaining power of the electronic device is lower than a preset power threshold. Of course, when the flashlight is turned on, the remaining power of the electronic device can be detected, and then the remaining standby time length can be calculated and displayed in real time. And are not limited herein.

Due to the fact that the standby time length is displayed on the flashlight operation interface, compared with a low-power reminding mode of the electronic equipment, the standby time length reminding mode is more obvious, and a user can find the situation that the current battery power is low in time. In addition, the remaining standby time is directly displayed, the prompting mode is more visual, a user can conveniently execute the storage operation in advance, and the user experience is improved.

In particular implementations, the flashlight operator interface may also be provided with other option buttons. For example, the flashlight operator interface may be provided with a "back" button for controlling exiting of the current flashlight application and returning to the previous menu. For another example, the flashlight operation interface is further provided with a display button for turning on or off the standby duration, and the display of the standby duration can be turned off or on more flexibly based on user operation.

As can be seen from the above, in the control method of the flashlight in the embodiment of the present invention, when the flash light device is not installed in the electronic device, the flashlight function is implemented by controlling the increase of the brightness of the interface. When the electronic equipment is provided with the flash lamp device, the flash lamp device is controlled to realize the flashlight function, the switch state of the flashlight is prompted to a user through interface brightness, the standby time is displayed in real time based on the residual electric quantity, the use of the user can be facilitated, and the user experience is improved.

In order to make those skilled in the art better understand and implement the present invention, the user terminal and the computer readable storage medium corresponding to the above method are described in detail below.

Referring to fig. 4, an embodiment of the present invention provides a flashlight control device 40. The device 40 is applied to an electronic device, a flashlight icon is arranged on a desktop of the electronic device, and the device 40 comprises: a display unit 41 and a control unit 42. Wherein:

the display unit 41 is suitable for displaying a flashlight operation interface when a first touch operation on the flashlight icon is detected;

the control unit 42 is adapted to, when a second touch operation for turning on the flashlight exists on the flashlight operation interface, control the screen backlight to be turned on until a third touch operation for turning off the flashlight is detected if the electronic device is not provided with the flash lamp device.

In an embodiment of the present invention, the screen backlight includes: a plurality of screen lighting units, each of the screen lighting units including: red, green, blue and white pixels;

the control unit 42 is adapted to control only the white pixel lighting of each of the screen lighting units.

In an embodiment of the present invention, when there is a second touch operation for turning on the flashlight operation interface, the control unit 42 turns on the flash device if the electronic device is provided with the flash device.

In an embodiment of the present invention, the apparatus 40 further includes: electric quantity detection unit 43, calculation unit 44. Wherein:

the power detecting unit 43 is adapted to detect the remaining power of the electronic device;

the calculating unit 44 is adapted to calculate the remaining standby time of the flashlight when the flashlight is turned on based on the remaining power of the electronic device;

the display unit 41 is further adapted to display the standby time length on the flashlight operation interface in real time.

In a specific implementation, the apparatus 40 may be, for example: a chip, or a chip module.

The embodiment of the present invention further provides another computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of any one of the methods for controlling an electric torch in the foregoing embodiments, and details are not repeated.

In particular implementations, the computer-readable storage medium may include: ROM, RAM, magnetic or optical disks, and the like.

The embodiment of the present invention further provides an electronic device, where the terminal may include a memory and a processor, where the memory stores a computer program capable of running on the processor, and when the processor runs the computer program, the step of executing any one of the flashlight control methods in the above embodiments is performed, which is not described again.

Each module/unit included in each apparatus and product described in the above embodiments may be a software module/unit, or may also be a hardware module/unit, or may also be a part of a software module/unit and a part of a hardware module/unit. For example, for each device or product applied to or integrated into a chip, each module/unit included in the device or product may be implemented by hardware such as a circuit, or at least a part of the module/unit may be implemented by a software program running on a processor integrated within the chip, and the rest (if any) part of the module/unit may be implemented by hardware such as a circuit; for each device or product applied to or integrated with the chip module, each module/unit included in the device or product may be implemented by using hardware such as a circuit, and different modules/units may be located in the same component (e.g., a chip, a circuit module, etc.) or different components of the chip module, or at least some of the modules/units may be implemented by using a software program running on a processor integrated within the chip module, and the rest (if any) of the modules/units may be implemented by using hardware such as a circuit; for each device and product applied to or integrated in the terminal, each module/unit included in the device and product may be implemented by using hardware such as a circuit, and different modules/units may be located in the same component (e.g., a chip, a circuit module, etc.) or different components in the terminal, or at least part of the modules/units may be implemented by using a software program running on a processor integrated in the terminal, and the rest (if any) part of the modules/units may be implemented by using hardware such as a circuit.

Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种图片保存方法、电子设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类