WO2019041129A1 - 控制终端上的灯的方法、终端及计算机可读介质 - Google Patents

控制终端上的灯的方法、终端及计算机可读介质 Download PDF

Info

Publication number
WO2019041129A1
WO2019041129A1 PCT/CN2017/099482 CN2017099482W WO2019041129A1 WO 2019041129 A1 WO2019041129 A1 WO 2019041129A1 CN 2017099482 W CN2017099482 W CN 2017099482W WO 2019041129 A1 WO2019041129 A1 WO 2019041129A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
terminal
light
target light
interface
Prior art date
Application number
PCT/CN2017/099482
Other languages
English (en)
French (fr)
Inventor
徐叶辉
黄成钟
郑雪瑞
Original Assignee
深圳传音通讯有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳传音通讯有限公司 filed Critical 深圳传音通讯有限公司
Priority to PCT/CN2017/099482 priority Critical patent/WO2019041129A1/zh
Publication of WO2019041129A1 publication Critical patent/WO2019041129A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/725Cordless telephones

Definitions

  • the present invention relates to the field of electronic technologies, and in particular, to a method, a terminal, and a computer readable medium for controlling a lamp on a terminal.
  • Terminals such as mobile phones have become an important part of people's lives, and people use mobile phones to perform various functions.
  • the flashlight function of mobile phones has become one of the essential functions of mobile phones. People can use the flashlight to realize the flashlight function in the traditional sense.
  • the function of the flashlight of the mobile phone is to use a function key in the mobile phone to open the light-emitting diode at the front or the back of the mobile phone to make it shine for a long time.
  • the current flashlight function of the terminal is very troublesome, and the user often needs to open the flashlight of the mobile phone across several user interfaces. For example, the user must first unlock the screen of the terminal; after the screen is unlocked, the user also needs to find the icon of the flashlight application; and choose to turn on the flashlight, then the light of the mobile phone will be on. It can be seen that turning on the flashlight is very complicated.
  • a disadvantage of the above technical solution is that the operation is complicated and takes a long time.
  • Embodiments of the present invention provide a method for controlling a light on a terminal, which can quickly control the opening and closing of the illumination light on the terminal, and the operation is simple.
  • an embodiment of the present invention provides a method for controlling a flashlight, the method comprising:
  • an embodiment of the present invention provides a terminal, where the terminal includes a unit for performing the method of the foregoing first aspect.
  • an embodiment of the present invention provides another terminal, including a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, wherein the memory is used for storage.
  • a computer program supporting a terminal for performing the above method the computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of the first aspect above.
  • an embodiment of the present invention provides a computer readable storage medium, where the computer storage medium stores a computer program, where the computer program includes program instructions, and the program instructions, when executed by a processor, cause the processing The method of the first aspect described above is performed.
  • the terminal acquires the illuminance value of the current environment; after determining that the target light on the terminal is not occluded and the illuminance value is in the target interval, the target light is turned on; the illuminance value in the environment may be lower than a certain threshold. In this case, the target light is automatically turned on, and the operation is simple.
  • FIG. 1 is a schematic flowchart of a method for controlling a light on a terminal according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a duration setting interface according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of an illumination setting interface according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a light setting interface according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of a method for controlling a light on a terminal according to another embodiment of the present invention.
  • FIG. 6 is a schematic flowchart of a method for controlling a light on a terminal according to another embodiment of the present invention.
  • FIG. 7 is a schematic block diagram of a terminal according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic block diagram of a terminal according to another embodiment of the present invention.
  • FIG. 9 is a schematic block diagram of a terminal according to another embodiment of the present invention.
  • the term “if” can be interpreted as “when” or “on” or “in response to determining” or “in response to detecting” depending on the context. .
  • the phrase “if determined” or “if detected [condition or event described]” may be interpreted in context to mean “once determined” or “in response to determining” or “once detected [condition or event described] ] or “in response to detecting [conditions or events described]”.
  • the terminals described in this embodiment of the invention include, but are not limited to, other portable devices such as mobile phones, laptop computers or tablet computers having touch sensitive surfaces (eg, touch screen displays and/or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but a desktop computer having a touch sensitive surface (eg, a touch screen display and/or a touch pad).
  • a terminal including a display and a touch sensitive surface is described.
  • the terminal may include one or more of its physical keyboard, mouse, and/or joystick. It is a physical user interface device.
  • the terminal supports a variety of applications, such as one or more of the following: drawing applications, presentation applications, word processing applications, website creation applications, disk burning applications, spreadsheet applications, gaming applications, phone applications Programs, video conferencing applications, email applications, instant messaging applications, workout support applications, photo management applications, digital camera applications, digital camera applications, web browsing applications, digital music player applications, and / or digital video player app.
  • applications such as one or more of the following: drawing applications, presentation applications, word processing applications, website creation applications, disk burning applications, spreadsheet applications, gaming applications, phone applications Programs, video conferencing applications, email applications, instant messaging applications, workout support applications, photo management applications, digital camera applications, digital camera applications, web browsing applications, digital music player applications, and / or digital video player app.
  • Various applications that can be executed on the terminal can use at least one common physical user interface device such as a touch sensitive surface.
  • One or more functions of the touch sensitive surface and corresponding information displayed on the terminal can be adjusted and/or changed within the application and/or within the respective application.
  • the common physical architecture of the terminal eg, a touch-sensitive surface
  • the method may include:
  • Illuminance refers to the luminous flux of visible light received per unit area.
  • the unit of illuminance is lux (lux or lx), which is used to indicate the intensity of the illumination and the amount by which the surface area of the object is illuminated.
  • the obtaining the illuminance value of the current environment may be that the terminal uses the light brightness detecting circuit to detect the illuminance value of the current environment; or the terminal obtains the illuminance value of the current environment by using the brightness detector; or the terminal obtains the illuminance value of the current environment by using the illuminometer. It is also possible for the terminal to obtain the illuminance value of the current environment through other sensors or devices that can measure the environment.
  • the manner in which the illuminance value of the current environment is obtained is not limited in the embodiment of the present invention.
  • the above terminal may be a mobile phone, a tablet computer, a wearable device, or the like.
  • Step 102 Determine that the target light on the terminal is not blocked, and the illuminance value is in the target interval, where the target light is a light for illumination on the terminal;
  • the above terminal may include two types or two or more types of lamps. For example, there are breathing lights or lights on the phone, as well as LED lights for lighting.
  • the above target light is a lamp for illumination on the above terminal. In practical applications, the user can control the opening and closing of the target light through the flashlight application on the terminal.
  • the above target interval may be a preset interval, or may be entered by the user according to his or her own needs. Line settings.
  • the target interval can be 0lx-200lx. The user can adjust the target interval from 0lx-200lx to 0lx-400lx.
  • the determining that the target light on the terminal is unoccluded includes:
  • the above target distance is a preset distance, and may be, for example, 2 cm, 5 cm, 8 cm, or the like.
  • a part of the mobile phone is usually blocked, and whether there is an object in the target distance directly in front of the target light can accurately determine the target. Whether the light is blocked.
  • the situation that the target light is not blocked can be accurately determined, and the implementation is simple.
  • the above-mentioned target light may be turned on by the control circuit corresponding to the target light.
  • the terminal acquires the illuminance value of the current environment; after determining that the target light on the terminal is not occluded and the illuminance value is in the target interval, the target light is turned on; the illuminance value in the environment may be lower than a certain threshold. In this case, the target light is automatically turned on, and the operation is simple.
  • the method further includes:
  • the target light After determining that the target light on the terminal is occluded for a target length of time, the target light is turned off.
  • the above target duration is a preset duration, and can also be set by the user.
  • the target duration may be 1 second, 2 seconds, 3 seconds, 5 seconds, or the like.
  • the determining that the target light on the terminal is occluded reaches the target duration may be that after the distance sensor determines that the target light is blocked, the timer starts counting; and determining that the timer duration of the timer reaches the target duration.
  • the user wants to turn off the target light on the terminal, and can directly put the terminal into the pocket or the bag. After the target light is blocked for a certain period of time, the terminal turns off the target light.
  • the user can turn off the target light by blocking the target light, and does not need to be closed by the corresponding function key on the terminal, and the operation is simple.
  • the target duration is set to prevent the target light from being occluded and closed, thereby improving the user experience.
  • the user may inadvertently block the target light, and the target light is blocked for a target length of time, and the target light is not turned off.
  • the target light after the target length of the target light on the terminal is determined to reach the target duration, the target light is turned off; the target light can be quickly turned off, and the operation is simple.
  • the method before the determining that the target light on the terminal is occluded reaches the target duration, the method further includes:
  • the target duration is set according to the second setting instruction described above.
  • the user can set the above target duration through the duration setting interface.
  • the receiving the second setting instruction may be that the terminal receives the setting operation for the target duration through the duration setting interface.
  • the time length setting interface is displayed in the figure, and the rectangular area in the figure is an input window of the target duration, and the target duration can be set through the input window.
  • Different users may have different target durations. Some users need to set a shorter duration, and some users need to set a longer duration.
  • the user can set the target duration according to his own needs, meet the needs of different users, and improve the user experience.
  • the terminal sets the target duration according to the received second setting instruction, and the operation is simple, and can meet the requirements of different users.
  • the method further includes: determining that the target light on the terminal is not occluded and the illuminance value is before the target interval, the method further includes:
  • the target interval is set according to the first setting instruction described above.
  • the user can set the above target interval through the illumination setting interface.
  • the receiving the first setting instruction may be that the terminal receives the setting operation for the target interval through the illuminance setting interface.
  • the illuminance setting interface is shown in the figure.
  • the rectangular area showing the "lower limit” is the input window of the lower limit of the target interval
  • the rectangular area showing the "upper limit” is the input window of the upper limit of the target interval.
  • Some users need to set a higher upper limit of illumination, and some users need to set a lower upper limit of illumination. For example, some users require a target range of 0lx-200lx, and some users require a target range of 0lx-400lx.
  • the user can set a target interval according to his own needs, meet the needs of different users, and improve the user experience.
  • the terminal sets the target interval according to the received first setting instruction, and the operation is simple, and can meet the requirements of different users.
  • the method before the foregoing turning on the target light, the method further includes:
  • the illuminating power of the target lamp is determined according to the illuminance value, and the illuminance value is negatively correlated with the illuminating power of the target lamp.
  • the terminal may pre-store the correspondence between the illuminance value and the illuminating power.
  • Table 1 is a table showing the correspondence between the illuminance value and the illuminating power. The first luminous power to the Nth luminous power are sequentially decreased. It can be seen from Table 1 that the illuminance values in different illuminance value intervals correspond to different illuminating powers.
  • Illuminance value (in lx) Illumination power of the target lamp 0 to 10 First luminous power 11 ⁇ 50 Second luminous power 51 ⁇ 200 Third luminous power > Nth luminous power
  • the determining the illuminating power of the target lamp according to the illuminance value may be determining the illuminating power corresponding to the illuminance value according to the correspondence between the illuminance value and the illuminating power of the target lamp.
  • the illuminance value of the current environment acquired by the terminal is 8 lx
  • the terminal determines the illuminating power of the target lamp as the first illuminating power according to the table 1. It can be understood that the terminal can adaptively select the illuminating power of the target lamp according to the illuminance value of the current environment. In a darker environment, the target lamp has a higher luminous power, and in a darker environment, the target lamp has a lower luminous power.
  • the target light can operate at at least two illumination powers.
  • the luminous power of the target lamp may be the first luminous power or the second luminous power.
  • the terminal controls the target illuminating power to operate at the determined illuminating power.
  • the terminal determines the illuminating power of the target light according to the illuminance value of the current environment, which can provide a better lighting environment for the user, is simple to implement, and provides a user experience.
  • the method further includes:
  • the light setting interface includes a first interface and a second interface, where the first interface is a first illumination power selection interface, and the second interface is a second illumination power selection interface;
  • the illumination power of the target lamp is adjusted from the current illumination power to the first illumination power.
  • the receiving operation for receiving the first interface may be that a click operation for the first interface is received.
  • the target light can operate at at least two illumination powers.
  • the luminous power of the target lamp can operate at the first luminous power and can also operate at the second luminous power.
  • the user can set the luminous power of the target lamp through the above light setting interface.
  • the light setting interface is shown in the figure.
  • the white circular area in the figure is the switch button of the target light. By clicking this area, the target light can be turned on and off.
  • the black area in the figure indicates the luminous power of the target light.
  • "1" is the first interface
  • "2" is the second interface.
  • the target light works with the second luminous power
  • the terminal receives the click operation on the first interface, that is, "1".
  • the target light operates at a first luminous power and the target light in the right half operates at a first luminous power.
  • the light setting interface is displayed, so that the user sets the lighting power of the target light to meet the needs of different users, and the operation is simple.
  • FIG. 5 is a schematic flowchart of a method for controlling a light on a terminal according to an embodiment of the present invention.
  • the method may include:
  • the terminal determines that it is in a handheld posture
  • Hand-held gestures refer to the state in the hands of the end user.
  • the terminal can determine whether it is in a hand-held posture by a gyroscope.
  • the foregoing terminal acquires an illuminance value of the current environment.
  • the terminal determines that the illuminance value is in a target interval.
  • the terminal is turned on by the terminal.
  • the terminal acquires the illuminance value of the current environment; after determining that the illuminance value is in the target interval, the target light is turned on; if the illuminance value in the environment is lower than a certain threshold, the target light is automatically turned on, and the operation is simple. .
  • FIG. 6 is a schematic flowchart of a method for controlling a light on a terminal according to an embodiment of the present invention, where the method may include:
  • the above target light is a lamp for illumination on the above terminal.
  • the illuminance value described above is inversely related to the illuminating power of the target lamp.
  • the light setting interface includes a first interface and a second interface, wherein the first interface is a selection interface of the first lighting power, and the second interface is a selection interface of the second lighting power.
  • the target light After determining that the target light on the terminal is occluded for a target duration, the target light is turned off.
  • the terminal acquires the illuminance value of the current environment; after determining that the target light on the terminal is not occluded and the illuminance value is in the target interval, the target light is turned on; the illuminance value in the environment may be lower than a certain threshold. In this case, the target light is automatically turned on, and the operation is simple.
  • An embodiment of the present invention further provides a terminal, where the terminal is used to perform the foregoing method.
  • FIG. 7 is a schematic block diagram of a terminal according to an embodiment of the present invention, including:
  • the obtaining unit 701 is configured to obtain an illuminance value of the current environment.
  • a determining unit 702 configured to determine that the target light on the terminal is unoccluded and the illuminance value is in a target interval, where the target light is a light for illumination on the terminal;
  • the opening unit 703 is configured to turn on the target light.
  • the determining unit 702 is specifically configured to determine, by using the detection result of the distance sensor, that there is no obstruction within the target distance directly in front of the target light.
  • the above target distance is a preset distance, and may be, for example, 2 cm, 5 cm, 8 cm, or the like.
  • a part of the mobile phone is usually blocked, and whether there is an object in the target distance directly in front of the target light can accurately determine the target. Whether the light is blocked.
  • the situation that the target light is not blocked can be accurately determined, and the implementation is simple.
  • the determining unit 702 is further configured to determine that the duration of the target light on the terminal is occluded to reach a target duration; the terminal further includes:
  • the closing unit 704 is configured to turn off the target light.
  • the above target duration is a preset duration, and can also be set by the user.
  • the target duration may be 1 second, 2 seconds, 3 seconds, 5 seconds, or the like.
  • the determining that the target light on the terminal is occluded reaches the target duration may be that after the distance sensor determines that the target light is blocked, the timer starts counting; and determining that the timer duration of the timer reaches the target duration.
  • the user wants to turn off the target light on the terminal, and can directly put the terminal into the pocket or the bag. After the target light is blocked for a certain period of time, the terminal turns off the target light.
  • the user can turn off the target light by blocking the target light, and does not need to be closed by the corresponding function key on the terminal, and the operation is simple.
  • the target duration is set to prevent the target light from being occluded and closed, thereby improving the user experience.
  • the user may inadvertently block the target light, and the target light is blocked for a target length of time, and the target light does not turn off.
  • the target light after the target length of the target light on the terminal is determined to reach the target duration, the target light is turned off; the target light can be quickly turned off, and the operation is simple.
  • the foregoing terminal further includes:
  • the receiving unit 705 is configured to receive a first setting instruction
  • the setting unit 706 is configured to set the target interval according to the first setting instruction.
  • the user can set the above target interval through the illumination setting interface.
  • the receiving the first setting instruction may be that the terminal receives the setting operation for the target interval through the illuminance setting interface.
  • the illuminance setting interface is shown in the figure, and the rectangular area in the figure is an input window of the target section, and the target section can be set through the input window.
  • the target range required by different users may be different. Some users need to set a higher upper limit of illumination, and some users need to set a lower upper limit of illumination. For example, some users require a target range of 0lx-200lx, and some users require a target range of 0lx-400lx.
  • the user can set a target interval according to his own needs, meet the needs of different users, and improve the user experience.
  • the terminal sets the target interval according to the received first setting instruction, and the operation is simple. Can meet the needs of different users.
  • the receiving unit 705 is further configured to receive a second setting instruction
  • the setting unit 706 is further configured to set the target duration according to the second setting instruction.
  • the user can set the above target duration through the duration setting interface.
  • the receiving the second setting instruction may be that the terminal receives the setting operation for the target duration through the duration setting interface.
  • the time length setting interface is displayed in the figure, and the rectangular area in the figure is an input window of the target duration, and the target duration can be set through the input window.
  • Different users may have different target durations. Some users need to set a shorter duration, and some users need to set a longer duration.
  • the user can set the target duration according to his own needs, meet the needs of different users, and improve the user experience.
  • the terminal sets the target duration according to the received second setting instruction, and the operation is simple, and can meet the requirements of different users.
  • the determining unit 702 is further configured to determine, according to the illuminance value, the illuminating power of the target lamp, where the illuminance value is negatively correlated with the illuminating power of the target lamp.
  • the determining the illuminating power of the target lamp according to the illuminance value may be determining the illuminating power corresponding to the illuminance value according to the correspondence between the illuminance value and the illuminating power of the target lamp.
  • the illuminance value of the current environment acquired by the terminal is 8 lx
  • the terminal determines the illuminating power of the target lamp as the first illuminating power according to the table 1. It can be understood that the terminal can adaptively select the illuminating power of the target lamp according to the illuminance value of the current environment. In a darker environment, the target lamp has a higher luminous power, and in a darker environment, the target lamp has a lower luminous power.
  • the target light can operate at at least two illumination powers.
  • the luminous power of the target lamp may be the first luminous power or the second luminous power.
  • the terminal controls the target illuminating power to operate at the determined illuminating power.
  • the terminal determines the illuminating power of the target light according to the illuminance value of the current environment, which can provide a better lighting environment for the user, is simple to implement, and provides a user experience.
  • the foregoing terminal further includes:
  • the display unit 707 is configured to display a light setting interface, where the light setting interface includes a first interface and a second interface, the first interface is a selection interface of the first lighting power, and the second interface is a selection interface of the second lighting power;
  • the receiving unit 705 is further configured to receive a selection operation for the first interface.
  • the terminal further includes: an adjusting unit 708, configured to adjust a lighting power of the target light from a current lighting power to the first lighting power.
  • the receiving operation for receiving the first interface may be that a click operation for the first interface is received.
  • the target light can operate at at least two illumination powers.
  • the luminous power of the target lamp can operate at the first luminous power and can also operate at the second luminous power.
  • the user can set the luminous power of the target lamp through the above light setting interface. As shown in FIG. 4, "1" in the figure is the first interface, and "2" is the second interface. In the left half of the figure, the target light works with the second luminous power, and the terminal receives the first interface, that is, "1". After the click operation, the target light operates at the first luminous power, and the target light in the right half operates at the first luminous power.
  • the light setting interface is displayed, so that the user sets the lighting power of the target light to meet the needs of different users, and the operation is simple.
  • FIG. 8 is a schematic block diagram of a terminal according to another embodiment of the present invention.
  • the terminal in this embodiment as shown may include one or more processors 801; one or more input devices 802, one or more output devices 803, and memory 804.
  • the above processor 801, input device 802, output device 803, and memory 804 are connected by a bus 805.
  • the memory 802 is used to store a computer program, the computer program includes program instructions, and the processor 801 is configured to execute program instructions stored in the memory 802.
  • the processor 801 is configured to invoke the foregoing program instruction to: obtain an illuminance value of the current environment; determine that the target light on the terminal is not occluded, and the illuminance value is in a target interval, where the target light is used for illumination on the terminal. Light; turn on the above target light.
  • the processor 801 may be a central processing unit (CPU), and the processor may also be another general-purpose processor, a digital signal processor (DSP). , Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the input device 802 may include a touch panel, a fingerprint sensor (for collecting fingerprint information of the user and direction information of the fingerprint), a microphone, and the like, and the output device 803 may include a display (LCD, etc.), Speakers, etc.
  • the memory 804 can include read only memory and random access memory and provides instructions and data to the processor 801. A portion of the memory 804 may also include a non-volatile random access memory. For example, the memory 804 can also store information of the device type.
  • the processor 801, the input device 802, and the output device 803, which are described in the embodiments of the present invention, may be implemented in the foregoing embodiment of the method for controlling a light on a terminal provided by an embodiment of the present invention.
  • the implementation manner of the terminal described in the embodiment of the present invention may be implemented, and details are not described herein again.
  • a computer readable storage medium stores a computer program, where the computer program includes program instructions, and the program instructions are executed by a processor to: acquire a current environment. Illuminance value; determining that the target light on the terminal is not occluded and the illuminance value is in the target interval, the target light is a light for illumination on the terminal; and the target light is turned on.
  • the computer readable storage medium may be an internal storage unit of the terminal described above in any of the foregoing embodiments, such as a hard disk or a memory of the terminal.
  • the computer readable storage medium may also be an external storage device of the terminal, such as a plug-in hard disk provided on the terminal, a smart memory card (SMC), a Secure Digital (SD) card, and a flash memory card. (Flash Card), etc.
  • the above computer readable storage medium may also include both an internal storage unit of the above terminal and an external storage device.
  • the above computer readable storage medium is for storing the above computer program and other programs and data required by the above terminal.
  • the computer readable storage medium described above can also be used to temporarily store data that has been output or is about to be output.
  • FIG. 9 is a block diagram showing a partial structure of a mobile phone related to a terminal provided by an embodiment of the present invention.
  • the mobile phone includes: a radio frequency (RF) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a wireless fidelity (WiFi) module 970, and a processor 980. And power supply 990 and other components.
  • RF radio frequency
  • the RF circuit 910 can be used for receiving and transmitting signals during the transmission or reception of information or during a call. Specifically, after receiving the downlink information of the base station, it is processed by the processor 980. In addition, the uplink data is designed to be sent to the base station. Generally, RF circuit 910 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuitry 910 can also communicate with the network and other devices via wireless communication. The above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), and the like.
  • GSM Global System of Mobile communication
  • GPRS General Packet Radio Service
  • the memory 920 can be used to store software programs and modules, and the processor 980 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 920.
  • the memory 920 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to Data created by the use of the mobile phone (such as audio data, phone book, etc.).
  • memory 920 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input unit 930 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset.
  • the input unit 930 may include a touch panel 931 and other input devices 932.
  • the touch panel 931 also referred to as a touch screen, can collect touch operations on or near the user (such as a user using a finger, a stylus, or the like on the touch panel 930 or near the touch panel 930. Operation), and drive the corresponding connecting device according to a preset program.
  • the touch panel 930 can include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the touch panel 930 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 930 may also include other input devices 932.
  • other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
  • the display unit 940 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone.
  • the display unit 940 can include a display panel 941.
  • the display panel 941 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch panel 930 can cover the display panel 941. When the touch panel 930 detects a touch operation thereon or nearby, the touch panel 930 transmits to the processor 980 to determine the type of the touch event, and then the processor 980 according to the touch event. The type provides a corresponding visual output on display panel 941.
  • touch panel 930 and the display panel 941 are used as two independent components to implement the input and input functions of the mobile phone in FIG. 9, in some embodiments, the touch panel 930 can be integrated with the display panel 941. Realize the input and output functions of the phone.
  • the handset may also include at least one type of sensor 950, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 941 according to the brightness of the ambient light, and the proximity sensor may close the display panel 941 and/or when the mobile phone moves to the ear. Or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • the mobile phone can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
  • the gesture of the mobile phone such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration
  • vibration recognition related functions such as pedometer, tapping
  • the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
  • An audio circuit 960, a speaker 961, and a microphone 962 can provide an audio interface between the user and the handset.
  • the audio circuit 960 can transmit the converted electrical data of the received audio data to the speaker 961, and convert it into a sound signal output by the speaker 961.
  • the microphone 962 converts the collected sound signal into an electrical signal, and the audio circuit 960 After receiving, it is converted into audio data, and then processed by the audio data output processor 980, sent to the other mobile phone via the RF circuit 910, or outputted to the memory 920 for further processing.
  • WiFi is a short-range wireless transmission technology
  • the mobile phone can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 970, which provides users with wireless broadband Internet access.
  • FIG. 9 shows the WiFi module 970, it can be understood that it does not belong to the essential configuration of the mobile phone, and can be omitted as needed within the scope of not changing the essence of the invention.
  • the processor 980 is the control center of the handset, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 920, and invoking data stored in the memory 920, executing The phone's various functions and processing data, so that the overall monitoring of the phone.
  • the processor 980 may include one or more processing units; preferably, the processor 980 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 980.
  • the handset also includes a power source 990 (such as a battery) that supplies power to the various components.
  • a power source 990 such as a battery
  • the power source can be logically coupled to the processor 980 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • the mobile phone may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • the disclosed terminal and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the above units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or may be Integrated into another system, or some special The sign can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
  • the steps in the method of the embodiment of the present invention may be sequentially adjusted, merged, and deleted according to actual needs.
  • the units in the terminal in the embodiment of the present invention may be combined, divided, and deleted according to actual needs.
  • the units described above as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the above-described integrated unit if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention contributes in essence or to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the above-described methods of various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

一种控制终端上的灯的方法、终端及计算机可读介质,其中方法包括:获取当前环境的照度值(101);确定终端上的目标灯未被遮挡且所述照度值处于目标区间,所述目标灯为所述终端上用于照明的灯(102);开启所述目标灯(103)。终端获取当前环境的照度值;在确定该终端上的目标灯未被遮挡且该照度值处于目标区间后,开启目标灯;可以在环境中的照度值低于一定阈值的情况下,自动开启目标灯,操作简单。

Description

控制终端上的灯的方法、终端及计算机可读介质 技术领域
本发明涉及电子技术领域,尤其涉及一种控制终端上的灯的方法、终端及计算机可读介质。
背景技术
终端如手机已经成为人们生活中的重要组成部分,人们利用手机完成各种功能。手机的手电筒功能已经成为手机的必备功能之一,人们利用手电筒可以实现传统意义上的手电筒功能。手机的手电筒功能就是用手机里的一个功能键打开手机前端或者后面的发光二极管,使其长期处于发光状态。
然而,目前终端的手电筒功能开启非常麻烦,用户常常需要跨越几个用户界面才能够打开手机的手电筒。例如用户要先对终端进行屏幕解锁;然后屏幕解锁完成后,用户还要找到手电筒应用的图标;并选择打开手电筒,然后手机的灯才会亮。可见,打开手电筒是非常复杂的。
上述技术方案的缺点在于,操作复杂,花费的时间长。
发明内容
本发明实施例提供一种控制终端上的灯的方法,可快速地控制终端上照明灯的开启和关闭,操作简单。
第一方面,本发明实施例提供了一种控制手电筒方法,该方法包括:
获取当前环境的照度值;
确定终端上的目标灯未被遮挡且所述照度值处于目标区间,所述目标灯为手电筒应用对应的灯;
开启所述目标灯。
第二方面,本发明实施例提供了一种终端,该终端包括用于执行上述第一方面的方法的单元。
第三方面,本发明实施例提供了另一种终端,包括处理器、输入设备、输出设备和存储器,所述处理器、输入设备、输出设备和存储器相互连接,其中,所述存储器用于存储支持终端执行上述方法的计算机程序,所述计算机程序包括程序指令,所述处理器被配置用于调用所述程序指令,执行上述第一方面的方法。
第四方面,本发明实施例提供了一种计算机可读存储介质,所述计算机存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行上述第一方面的方法。
本发明实施例中,终端获取当前环境的照度值;在确定该终端上的目标灯未被遮挡且该照度值处于目标区间后,开启目标灯;可以在环境中的照度值低于一定阈值的情况下,自动开启目标灯,操作简单。
附图说明
为了更清楚地说明本发明实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例提供的一种控制终端上的灯的方法的示意流程图;
图2是本发明实施例提供的一种时长设置界面的示意图;
图3是本发明实施例提供的一种照度设置界面的示意图;
图4是本发明实施例提供的一种灯光设置界面的示意图;
图5是本发明另一实施例提供的一种控制终端上的灯的方法的示意流程图;
图6是本发明另一实施例提供的一种控制终端上的灯的方法的示意流程图;
图7是本发明实施例提供的一种终端的示意性框图;
图8是本发明另一实施例提供的一种终端示意性框图;
图9是本发明另一实施例提供的一种终端示意性框图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在此本发明说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本发明。如在本发明说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。
还应当进一步理解,在本发明说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
如在本说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。
具体实现中,本发明实施例中描述的终端包括但不限于诸如具有触摸敏感表面(例如,触摸屏显示器和/或触摸板)的移动电话、膝上型计算机或平板计算机之类的其它便携式设备。还应当理解的是,在某些实施例中,所述设备并非便携式通信设备,而是具有触摸敏感表面(例如,触摸屏显示器和/或触摸板)的台式计算机。
在接下来的讨论中,描述了包括显示器和触摸敏感表面的终端。然而,应当理解的是,终端可以包括诸如物理键盘、鼠标和/或控制杆的一个或多个其 它物理用户接口设备。
终端支持各种应用程序,例如以下中的一个或多个:绘图应用程序、演示应用程序、文字处理应用程序、网站创建应用程序、盘刻录应用程序、电子表格应用程序、游戏应用程序、电话应用程序、视频会议应用程序、电子邮件应用程序、即时消息收发应用程序、锻炼支持应用程序、照片管理应用程序、数码相机应用程序、数字摄影机应用程序、web浏览应用程序、数字音乐播放器应用程序和/或数字视频播放器应用程序。
可以在终端上执行的各种应用程序可以使用诸如触摸敏感表面的至少一个公共物理用户接口设备。可以在应用程序之间和/或相应应用程序内调整和/或改变触摸敏感表面的一个或多个功能以及终端上显示的相应信息。这样,终端的公共物理架构(例如,触摸敏感表面)可以支持具有对用户而言直观且透明的用户界面的各种应用程序。
参见图1,是本发明实施例提供一种控制终端上灯方法的示意流程图,该方法可包括:
101、获取当前环境的照度值;
照度,即光照强度,指单位面积上所接受可见光的光通量。照度的单位是勒克斯(lux或lx),用于指示光照的强弱和物体表面积被照明程度的量。上述获取当前环境的照度值可以是终端利用光亮度检测电路检测当前环境的照度值;也可以是终端通过亮度检测器获取当前环境的照度值;还可以是终端通过照度仪获取当前环境的照度值;还可以是终端通过其他可以测量环境中的传感器或者装置获取当前环境的照度值。本发明实施例对获取当前环境的照度值的方式不作限定。上述终端可以是手机、平板电脑、可穿戴设备等。
102、确定终端上的目标灯未被遮挡且上述照度值处于目标区间,上述目标灯为上述终端上用于照明的灯;
上述终端上可以包含两种类型或者两种以上类型的灯。例如,手机上有呼吸灯或指示灯,还有用于照明的LED灯。上述目标灯为上述终端上用于照明的灯。在实际应用中,用户可以通过终端上的手电筒应用控制目标灯的开启和关闭。上述目标区间可以是预先设置的区间,也可以由用户根据自己的需要进 行设置。例如目标区间可以是0lx-200lx。用户可以将目标区间从0lx-200lx,调整为0lx-400lx。
在一种可选的实现方式中,上述确定终端上的目标灯未被遮挡包括:
通过距离传感器检测到上述目标灯正前方的目标距离内未存在遮挡物。
上述目标距离为预先设置的距离,例如可以是2厘米、5厘米、8厘米等。在实际应用中,用户使用手机上的目标灯进行照明时,在手持终端的情况下,通常会遮挡手机的部分区域,检测目标灯正前方的目标距离内是否存在遮挡物,可以准确地确定目标灯是否被遮挡。
本发明实施例中,可以准确地确定目标灯未被遮挡的情况,实现简单。
103、开启上述目标灯。
上述开启上述目标灯可以是通过上述目标灯对应的控制电路开启上述目标灯。
本发明实施例中,终端获取当前环境的照度值;在确定该终端上的目标灯未被遮挡且该照度值处于目标区间后,开启目标灯;可以在环境中的照度值低于一定阈值的情况下,自动开启目标灯,操作简单。
在一种可选的实现方式中,上述开启上述目标灯之后,上述方法还包括:
在确定上述终端上的目标灯被遮挡的时长达到目标时长后,关闭上述目标灯。
上述目标时长为预先设置的时长,也可以由用户进行设置。上述目标时长可以是1秒、2秒、3秒、5秒等。上述确定上述终端上的目标灯被遮挡的时长达到目标时长可以是在通过距离传感器确定上述目标灯被遮挡后,计时器开始计时;确定上述计时器的计时时长达到上述目标时长。在实际应用中,用户想要关闭终端上的目标灯,可以将终端直接放进口袋或者包中,目标灯被遮挡的时长到达目标时长后,该终端关闭目标灯。也就是说,用户可以通过遮挡目标灯关闭该目标灯,而不需要通过终端上对应的功能键进行关闭,操作简单。本发明实施例中,设置目标时长是为了避免目标灯意外被遮挡而被关闭的情况,提高用户体验。举例来说,用户在使用目标灯进行照明的过程中,可能无意间遮挡了一下该目标灯,遮挡该目标灯的时长未达到目标时长,该目标灯不关闭。
本发明实施例通过在确定终端上的目标灯被遮挡的时长达到目标时长后,关闭该目标灯;可以快速地关闭该目标灯,操作简单。
在一种可选的实现方式中,上述确定上述终端上的目标灯被遮挡的时长达到目标时长之前,上述方法还包括:
接收第二设置指令;
依据上述第二设置指令设置上述目标时长。
用户可以通过时长设置界面设置上述目标时长。上述接收第二设置指令可以是上述终端通过时长设置界面接收针对目标时长的设置操作。如图2所示,图中显示的为时长设置界面,图中的矩形区域为目标时长的输入窗口,通过该输入窗口可以设置目标时长。不同的用户所需的目标时长可能不同,有些用户需要设置比较短的时长,有些用户需要设置比较长的时长。本发明实施例中,用户可以根据自己的需要设置目标时长,满足不同用户的需求,提高用户体验。
本发明实施例中,终端依据接收的第二设置指令设置目标时长,操作简单,可以满足不同用户的需求。
在一种可选的实现方式中,上述确定终端上的目标灯未被遮挡且上述照度值处于目标区间之前,上述方法还包括:
接收第一设置指令;
依据上述第一设置指令设置上述目标区间。
用户可以通过照度设置界面设置上述目标区间。上述接收第一设置指令可以是上述终端通过照度设置界面接收针对目标区间的设置操作。如图3所示,图中显示的为照度设置界面,图中显示“下限”的矩形区域为目标区间下限的输入窗口,图中显示“上限”的矩形区域为目标区间上限的输入窗口,通过这两个输入窗口设置目标区间的下限和上限,从图3的右半图可以看出目标区间为0lx-400lx,即下限为0lx,上限为400lx。不同的用户所需的目标区间可能不同,有些用户需要设置的照度的上限较大,有些用户需要设置照度的上限较小。例如,有些用户所需的目标区间为0lx-200lx,有些用户所需的目标区间为0lx-400lx。本发明实施例中,用户可以根据自己的需要设置目标区间,满足不同用户的需求,提高用户体验。
本发明实施例中,终端依据接收的第一设置指令设置目标区间,操作简单,可以满足不同用户的需求。
在一种可选的实现方式中,上述开启上述目标灯之前,上述方法还包括:
依据上述照度值确定上述目标灯的发光功率,上述照度值与上述目标灯的发光功率负相关。
终端可以预先存储有照度值与发光功率的对应关系。表1为照度值与发光功率的对应关系表。第一发光功率到第N发光功率依次降低。从表1可以看出,处于不同照度值区间的照度值对应不同的发光功率。
表1
照度值(单位为lx) 目标灯的发光功率
0~10 第一发光功率
11~50 第二发光功率
51~200 第三发光功率
…… 第N发光功率
上述依据上述照度值确定上述目标灯的发光功率可以是依据照度值与目标灯的发光功率的对应关系,确定上述照度值对应的发光功率。举例来说,终端获取到的当前环境的照度值为8lx,依据表1终端确定目标灯的发光功率为第一发光功率。可以理解,终端可以根据当前环境的照度值,自适应地选择目标灯的发光功率。在较暗的环境中,目标灯的发光功率较高,在较暗的环境中,目标灯的发光功率较低。上述目标灯能够以至少两种发光功率工作。例如,目标灯的发光功率可以是第一发光功率,也可以是第二发光功率。本发明实施例中,终端依据上述照度值确定上述目标灯的发光功率后,控制上述目标灯以确定的发光功率工作。
本发明实施例中,终端依据当前环境的照度值确定目标灯的发光功率,可以为用户提供一个更好的照明环境,实现简单,提供用户体验。
在一种可选的实现方式中,上述开启上述目标灯之后,上述方法还包括:
显示灯光设置界面,上述灯光设置界面包含第一接口和第二接口,上述第一接口为第一发光功率的选择接口,上述第二接口为第二发光功率的选择接口;
在接收到针对上述第一接口的选择操作后,将上述目标灯的发光功率从当前的发光功率调整为上述第一发光功率。
上述接收到针对上述第一接口的选择操作可以是接收到针对上述第一接口的点击操作。上述目标灯能够以至少两种发光功率工作。例如,目标灯的发光功率能够以第一发光功率工作,也能够以第二发光功率工作。用户通过上述灯光设置界面可以设置目标灯的发光功率。如图4所示,图中为灯光设置界面,图中的白色圆形区域为目标灯的开关按键,通过点击该区域可以控制目标灯的开启和关闭,图中黑色区域指示目标灯的发光功率,图中的“1”为第一接口,“2”为第二接口,左半图中目标灯以第二发光功率工作,终端接收到对第一接口,即“1”的点击操作后,该目标灯以第一发光功率工作,右半图中的目标灯以第一发光功率工作。
本发明实施例中,在开启目标灯后,显示灯光设置界面,以便于用户设置该目标灯的发光功率,满足不同用户的需求,操作简单。
参见图5,是本发明实施例提供一种控制终端上灯方法的示意流程图,该方法可包括:
501、终端确定其处于手持姿态;
手持姿态是指处于终端用户手中的状态。终端可以通过陀螺仪确定其是否处于手持姿态。
502、上述终端获取当前环境的照度值;
503、上述终端确定上述照度值处于目标区间;
503、上述终端开启目标灯。
本发明实施例中,终端获取当前环境的照度值;在确定该照度值处于目标区间后,开启目标灯;可以在环境中的照度值低于一定阈值的情况下,自动开启目标灯,操作简单。
参见图6,是本发明实施例提供一种控制终端上灯方法的示意流程图,该方法可包括:
601、获取当前环境的照度值;
602、确定终端上的目标灯未被遮挡且上述照度值处于目标区间;
上述目标灯为上述终端上用于照明的灯。
603、依据上述照度值确定上述目标灯的发光功率;
上述照度值与上述目标灯的发光功率负相关。
604、控制上述目标灯以上述发光功率进行工作;
605、显示灯光设置界面;
上述灯光设置界面包含第一接口和第二接口,上述第一接口为第一发光功率的选择接口,上述第二接口为第二发光功率的选择接口。
606、在接收到针对上述灯光设置界面中的第一接口的选择操作后,将上述目标灯的发光功率从当前的发光功率调整为第一发光功率;
607、在确定上述终端上的目标灯被遮挡的时长达到目标时长后,关闭上述目标灯。
本发明实施例中,终端获取当前环境的照度值;在确定该终端上的目标灯未被遮挡且该照度值处于目标区间后,开启目标灯;可以在环境中的照度值低于一定阈值的情况下,自动开启目标灯,操作简单。
本发明实施例还提供一种终端,该终端用于执行前述任一项上述的方法的单元。具体地,参见图7,是本发明实施例提供的一种终端的示意框图,包括:
获取单元701,用于获取当前环境的照度值;
确定单元702,用于确定终端上的目标灯未被遮挡且上述照度值处于目标区间,上述目标灯为上述终端上用于照明的灯;
开启单元703,用于开启上述目标灯。
具体实现方法与图1中的方法相同,这里不作详述。
在一种可选的实现方式中,上述确定单元702,具体用于通过距离传感器的检测结果,确定上述目标灯正前方的目标距离内未存在遮挡物。
上述目标距离为预先设置的距离,例如可以是2厘米、5厘米、8厘米等。在实际应用中,用户使用手机上的目标灯进行照明时,在手持终端的情况下,通常会遮挡手机的部分区域,检测目标灯正前方的目标距离内是否存在遮挡物,可以准确地确定目标灯是否被遮挡。
本发明实施例中,可以准确地确定目标灯未被遮挡的情况,实现简单。
在一种可选的实现方式中,上述确定单元702,还用于确定上述终端上的目标灯被遮挡的时长达到目标时长;上述终端还包括:
关闭单元704,用于关闭上述目标灯。
上述目标时长为预先设置的时长,也可以由用户进行设置。上述目标时长可以是1秒、2秒、3秒、5秒等。上述确定上述终端上的目标灯被遮挡的时长达到目标时长可以是在通过距离传感器确定上述目标灯被遮挡后,计时器开始计时;确定上述计时器的计时时长达到上述目标时长。在实际应用中,用户想要关闭终端上的目标灯,可以将终端直接放进口袋或者包中,目标灯被遮挡的时长到达目标时长后,该终端关闭目标灯。也就是说,用户可以通过遮挡目标灯关闭该目标灯,而不需要通过终端上对应的功能键进行关闭,操作简单。本发明实施例中,设置目标时长是为了避免目标灯意外被遮挡而被关闭的情况,提高用户体验。举例来说,用户在使用目标灯进行照明的过程中,可能无意间遮挡了一下该目标灯,遮挡该目标灯的时长未达到目标时长,该目标灯不会关闭。
本发明实施例通过在确定终端上的目标灯被遮挡的时长达到目标时长后,关闭该目标灯;可以快速地关闭该目标灯,操作简单。
在一种可选的实现方式中,上述终端还包括:
接收单元705,用于接收第一设置指令;
设置单元706,用于依据上述第一设置指令设置上述目标区间。
用户可以通过照度设置界面设置上述目标区间。上述接收第一设置指令可以是上述终端通过照度设置界面接收针对目标区间的设置操作。如图3所示,图中显示的为照度设置界面,图中的矩形区域为目标区间的输入窗口,通过该输入窗口可以设置目标区间。不同的用户所需的目标区间可能不同,有些用户需要设置的照度的上限较大,有些用户需要设置照度的上限较小。例如,有些用户所需的目标区间为0lx-200lx,有些用户所需的目标区间为0lx-400lx。本发明实施例中,用户可以根据自己的需要设置目标区间,满足不同用户的需求,提高用户体验。
本发明实施例中,终端依据接收的第一设置指令设置目标区间,操作简单, 可以满足不同用户的需求。
在一种可选的实现方式中,上述接收单元705,还用于接收第二设置指令;
上述设置单元706,还用于依据上述第二设置指令设置上述目标时长。
用户可以通过时长设置界面设置上述目标时长。上述接收第二设置指令可以是上述终端通过时长设置界面接收针对目标时长的设置操作。如图2所示,图中显示的为时长设置界面,图中的矩形区域为目标时长的输入窗口,通过该输入窗口可以设置目标时长。不同的用户所需的目标时长可能不同,有些用户需要设置比较短的时长,有些用户需要设置比较长的时长。本发明实施例中,用户可以根据自己的需要设置目标时长,满足不同用户的需求,提高用户体验。
本发明实施例中,终端依据接收的第二设置指令设置目标时长,操作简单,可以满足不同用户的需求。
在一种可选的实现方式中,上述确定单元702,还用于依据上述照度值确定上述目标灯的发光功率,上述照度值与上述目标灯的发光功率负相关。
上述依据上述照度值确定上述目标灯的发光功率可以是依据照度值与目标灯的发光功率的对应关系,确定上述照度值对应的发光功率。举例来说,终端获取到的当前环境的照度值为8lx,依据表1终端确定目标灯的发光功率为第一发光功率。可以理解,终端可以根据当前环境的照度值,自适应地选择目标灯的发光功率。在较暗的环境中,目标灯的发光功率较高,在较暗的环境中,目标灯的发光功率较低。上述目标灯能够以至少两种发光功率工作。例如,目标灯的发光功率可以是第一发光功率,也可以是第二发光功率。本发明实施例中,终端依据上述照度值确定上述目标灯的发光功率后,控制上述目标灯以确定的发光功率工作。
本发明实施例中,终端依据当前环境的照度值确定目标灯的发光功率,可以为用户提供一个更好的照明环境,实现简单,提供用户体验。
在一种可选的实现方式中,上述终端还包括:
显示单元707,用于显示灯光设置界面,上述灯光设置界面包含第一接口和第二接口,上述第一接口为第一发光功率的选择接口,上述第二接口为第二发光功率的选择接口;
上述接收单元705,还用于接收针对上述第一接口的选择操作;上述终端还包括:调整单元708,用于将上述目标灯的发光功率从当前的发光功率调整为上述第一发光功率。
上述接收到针对上述第一接口的选择操作可以是接收到针对上述第一接口的点击操作。上述目标灯能够以至少两种发光功率工作。例如,目标灯的发光功率能够以第一发光功率工作,也能够以第二发光功率工作。用户通过上述灯光设置界面可以设置目标灯的发光功率。如图4所示,图中的“1”为第一接口,“2”为第二接口,左半图中目标灯以第二发光功率工作,终端接收到对第一接口,即“1”的点击操作后,该目标灯以第一发光功率工作,右半图中的目标灯以第一发光功率工作。
本发明实施例中,在开启目标灯后,显示灯光设置界面,以便于用户设置该目标灯的发光功率,满足不同用户的需求,操作简单。
参见图8,是本发明另一实施例提供的一种终端示意框图。如图所示的本实施例中的终端可以包括:一个或多个处理器801;一个或多个输入设备802,一个或多个输出设备803和存储器804。上述处理器801、输入设备802、输出设备803和存储器804通过总线805连接。存储器802用于存储计算机程序,上述计算机程序包括程序指令,处理器801用于执行存储器802存储的程序指令。其中,处理器801被配置用于调用上述程序指令执行:获取当前环境的照度值;确定终端上的目标灯未被遮挡且上述照度值处于目标区间,上述目标灯为上述终端上用于照明的灯;开启上述目标灯。
应当理解,在本发明实施例中,所称处理器801可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
输入设备802可以包括触控板、指纹采传感器(用于采集用户的指纹信息和指纹的方向信息)、麦克风等,输出设备803可以包括显示器(LCD等)、 扬声器等。
该存储器804可以包括只读存储器和随机存取存储器,并向处理器801提供指令和数据。存储器804的一部分还可以包括非易失性随机存取存储器。例如,存储器804还可以存储设备类型的信息。
具体实现中,本发明实施例中所描述的处理器801、输入设备802、输出设备803可执行本发明实施例提供的控制终端上的灯的方法的前述实施例中所描述的实现方式,也可执行本发明实施例所描述的终端的实现方式,在此不再赘述。
在本发明的另一实施例中提供一种计算机可读存储介质,上述计算机可读存储介质存储有计算机程序,上述计算机程序包括程序指令,上述程序指令被处理器执行时实现:获取当前环境的照度值;确定终端上的目标灯未被遮挡且上述照度值处于目标区间,上述目标灯为上述终端上用于照明的灯;开启上述目标灯。
上述计算机可读存储介质可以是前述任一实施例上述的终端的内部存储单元,例如终端的硬盘或内存。上述计算机可读存储介质也可以是上述终端的外部存储设备,例如上述终端上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,上述计算机可读存储介质还可以既包括上述终端的内部存储单元也包括外部存储设备。上述计算机可读存储介质用于存储上述计算机程序以及上述终端所需的其他程序和数据。上述计算机可读存储介质还可以用于暂时地存储已经输出或者将要输出的数据。
图9示出的是与本发明实施例提供的终端相关的手机的部分结构的框图。参考图9,手机包括:射频(Radio Frequency,RF)电路910、存储器920、输入单元930、显示单元940、传感器950、音频电路960、无线保真(wireless fidelity,WiFi)模块970、处理器980、以及电源990等部件。本领域技术人员可以理解,图9中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
下面结合图9对手机的各个构成部件进行具体的介绍:
RF电路910可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器980处理;另外,将设计上行的数据发送给基站。通常,RF电路910包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路910还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。
存储器920可用于存储软件程序以及模块,处理器980通过运行存储在存储器920的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器920可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器920可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
输入单元930可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元930可包括触控面板931以及其他输入设备932。触控面板931,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板930上或在触控面板930附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板930可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器980,并能接收处理器980发来的命令并加 以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板930。除了触控面板930,输入单元930还可以包括其他输入设备932。具体地,其他输入设备932可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
显示单元940可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元940可包括显示面板941,可选的,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板941。进一步的,触控面板930可覆盖显示面板941,当触控面板930检测到在其上或附近的触摸操作后,传送给处理器980以确定触摸事件的类型,随后处理器980根据触摸事件的类型在显示面板941上提供相应的视觉输出。虽然在图9中,触控面板930与显示面板941是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板930与显示面板941集成而实现手机的输入和输出功能。
手机还可包括至少一种传感器950,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板941的亮度,接近传感器可在手机移动到耳边时,关闭显示面板941和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
音频电路960、扬声器961,传声器962可提供用户与手机之间的音频接口。音频电路960可将接收到的音频数据转换后的电信号,传输到扬声器961,由扬声器961转换为声音信号输出;另一方面,传声器962将收集的声音信号转换为电信号,由音频电路960接收后转换为音频数据,再将音频数据输出处理器980处理后,经RF电路910以发送给比如另一手机,或者将音频数据输出至存储器920以便进一步处理。
WiFi属于短距离无线传输技术,手机通过WiFi模块970可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图9示出了WiFi模块970,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。
处理器980是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器920内的软件程序和/或模块,以及调用存储在存储器920内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器980可包括一个或多个处理单元;优选的,处理器980可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器980中。
手机还包括给各个部件供电的电源990(比如电池),优选的,电源可以通过电源管理系统与处理器980逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
尽管未示出,手机还可以包括摄像头、蓝牙模块等,在此不再赘述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的终端和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的终端和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特 征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。
本发明实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。本发明实施例终端中的单元可以根据实际需要进行合并、划分和删减。
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例上述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。

Claims (10)

  1. 一种控制终端上的灯的方法,其特征在于,包括:
    获取当前环境的照度值;
    确定终端上的目标灯未被遮挡且所述照度值处于目标区间,所述目标灯为所述终端上用于照明的灯;
    开启所述目标灯。
  2. 根据权利要求1所述的方法,其特征在于,所述确定终端上的目标灯未被遮挡包括:
    通过距离传感器检测到所述目标灯正前方的目标距离内未存在遮挡物。
  3. 根据权利要求2所述的方法,其特征在于,所述开启所述目标灯之后,所述方法还包括:
    在确定所述终端上的目标灯被遮挡的时长达到目标时长后,关闭所述目标灯。
  4. 根据权利要求3所述的方法,其特征在于,所述确定终端上的目标灯未被遮挡且所述照度值处于目标区间之前,所述方法还包括:
    接收第一设置指令;
    依据所述第一设置指令设置所述目标区间。
  5. 根据权利要求4所述的方法,其特征在于,所述确定所述终端上的目标灯被遮挡的时长达到目标时长之前,所述方法还包括:
    接收第二设置指令;
    依据所述第二设置指令设置所述目标时长。
  6. 根据权利要求3所述的方法,其特征在于,所述开启所述目标灯之前,所述方法还包括:
    依据所述照度值确定所述目标灯的发光功率,所述照度值与所述目标灯的发光功率负相关。
  7. 根据权利要求1至6任意一项所述的方法,其特征在于,所述开启所述目标灯之后,所述方法还包括:
    显示灯光设置界面,所述灯光设置界面包含第一接口和第二接口,所述第 一接口为第一发光功率的选择接口,所述第二接口为第二发光功率的选择接口;
    在接收到针对所述第一接口的选择操作后,将所述目标灯的发光功率从当前的发光功率调整为所述第一发光功率。
  8. 一种终端,其特征在于,包括用于执行如权利要求1-7任一权利要求所述的方法的单元。
  9. 一种终端,其特征在于,包括处理器、输入设备、输出设备和存储器,所述处理器、输入设备、输出设备和存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器被配置用于调用所述程序指令,执行如权利要求1-7任一项所述的方法。
  10. 一种计算机可读存储介质,其特征在于,所述计算机存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行如权利要求1-7任一项所述的方法。
PCT/CN2017/099482 2017-08-29 2017-08-29 控制终端上的灯的方法、终端及计算机可读介质 WO2019041129A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/099482 WO2019041129A1 (zh) 2017-08-29 2017-08-29 控制终端上的灯的方法、终端及计算机可读介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/099482 WO2019041129A1 (zh) 2017-08-29 2017-08-29 控制终端上的灯的方法、终端及计算机可读介质

Publications (1)

Publication Number Publication Date
WO2019041129A1 true WO2019041129A1 (zh) 2019-03-07

Family

ID=65524726

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/099482 WO2019041129A1 (zh) 2017-08-29 2017-08-29 控制终端上的灯的方法、终端及计算机可读介质

Country Status (1)

Country Link
WO (1) WO2019041129A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113873726A (zh) * 2021-09-14 2021-12-31 深圳市航天泰瑞捷电子有限公司 照明灯具的控制方法、装置、终端设备及可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917511A (zh) * 2010-07-19 2010-12-15 中兴通讯股份有限公司 一种控制终端背光的方法及终端
CN103067604A (zh) * 2013-01-17 2013-04-24 广东欧珀移动通信有限公司 一种手机进入手电筒模式的方法
CN103791473A (zh) * 2012-10-31 2014-05-14 深圳富泰宏精密工业有限公司 手电筒应用开启系统及方法
CN105744699A (zh) * 2014-12-10 2016-07-06 小米科技有限责任公司 一种照明灯的控制方法、装置及设备
CN105872160A (zh) * 2015-11-20 2016-08-17 乐视移动智能信息技术(北京)有限公司 一种快速打开手电筒的方法和设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917511A (zh) * 2010-07-19 2010-12-15 中兴通讯股份有限公司 一种控制终端背光的方法及终端
CN103791473A (zh) * 2012-10-31 2014-05-14 深圳富泰宏精密工业有限公司 手电筒应用开启系统及方法
CN103067604A (zh) * 2013-01-17 2013-04-24 广东欧珀移动通信有限公司 一种手机进入手电筒模式的方法
CN105744699A (zh) * 2014-12-10 2016-07-06 小米科技有限责任公司 一种照明灯的控制方法、装置及设备
CN105872160A (zh) * 2015-11-20 2016-08-17 乐视移动智能信息技术(北京)有限公司 一种快速打开手电筒的方法和设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113873726A (zh) * 2021-09-14 2021-12-31 深圳市航天泰瑞捷电子有限公司 照明灯具的控制方法、装置、终端设备及可读存储介质
CN113873726B (zh) * 2021-09-14 2023-08-11 深圳市航天泰瑞捷电子有限公司 照明灯具的控制方法、装置、终端设备及可读存储介质

Similar Documents

Publication Publication Date Title
US20200177726A1 (en) Method for switching applications in split screen mode, computer device and computer-readable storage medium
EP3525075B1 (en) Method for lighting up screen of double-screen terminal, and terminal
CN107193455B (zh) 一种信息处理方法及移动终端
JP5688330B2 (ja) 携帯端末、バックライト制御プログラムおよびバックライト制御方法
CN109683847A (zh) 一种音量调节方法和终端
CN109375890A (zh) 一种屏幕显示方法和多屏电子设备
WO2020238647A1 (zh) 手势交互方法和终端
CN107493389A (zh) 单手模式实现方法、终端及计算机可读介质
WO2016045027A1 (zh) 屏幕灵敏度调整方法和移动终端
CN110413364A (zh) 一种信息处理方法及终端
WO2017202076A1 (zh) 一种终端管理方法以及装置
CN104991699B (zh) 一种视频显示控制的方法和装置
CN108897473A (zh) 一种界面显示方法及终端
CN110531915A (zh) 屏幕操作方法及终端设备
CN110362369A (zh) 可穿戴设备操控方法、可穿戴设备及计算机可读存储介质
WO2019071424A1 (zh) 应用功能的控制方法及终端
CN109407949A (zh) 一种显示控制方法及终端
TW201541337A (zh) 移動終端中訊息的顯示方法、裝置和系統
CN108712563B (zh) 通话控制方法、装置以及移动终端
CN108228902A (zh) 一种文件显示方法及移动终端
CN109521937A (zh) 一种屏幕显示控制方法及移动终端
CN108984099A (zh) 一种人机交互方法及终端
CN104836717B (zh) 一种数据处理方法、装置及终端设备
CN109933196A (zh) 一种屏幕控制方法、装置及终端设备
CN108040492A (zh) 一种数据复制方法及用户终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17923904

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17923904

Country of ref document: EP

Kind code of ref document: A1