CN107708271B - Lighting function control method and device, mobile terminal and storage medium - Google Patents

Lighting function control method and device, mobile terminal and storage medium Download PDF

Info

Publication number
CN107708271B
CN107708271B CN201710898224.2A CN201710898224A CN107708271B CN 107708271 B CN107708271 B CN 107708271B CN 201710898224 A CN201710898224 A CN 201710898224A CN 107708271 B CN107708271 B CN 107708271B
Authority
CN
China
Prior art keywords
screen
state
lighting unit
broadcast information
mobile terminal
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201710898224.2A
Other languages
Chinese (zh)
Other versions
CN107708271A (en
Inventor
王珏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qiku Internet Technology Shenzhen Co Ltd
Original Assignee
Qiku Internet Technology Shenzhen Co Ltd
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 Qiku Internet Technology Shenzhen Co Ltd filed Critical Qiku Internet Technology Shenzhen Co Ltd
Priority to CN201710898224.2A priority Critical patent/CN107708271B/en
Publication of CN107708271A publication Critical patent/CN107708271A/en
Application granted granted Critical
Publication of CN107708271B publication Critical patent/CN107708271B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • H05B47/105Controlling the light source in response to determined parameters
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Abstract

The invention provides a lighting function control method, a lighting function control device, a mobile terminal and a storage medium, which are applied to the mobile terminal, wherein the method comprises the following steps: monitoring the current state of a screen of the mobile terminal when detecting that a lighting unit of the mobile terminal is in an illumination state; when the current state is a screen locking state, detecting an environment sensing distance of the mobile terminal, and judging whether the environment sensing distance is smaller than a preset distance threshold value; and when the environmental sensing distance is judged to be smaller than the preset distance threshold value, the lighting unit is closed, and the lighting unit is automatically closed when the current state is the screen locking state and the environmental sensing distance is smaller than the preset distance threshold value through the monitoring of the current state and the detection and judgment of the environmental sensing distance, so that the damage and the waste of electric quantity caused by long-time work of the lighting unit are prevented.

Description

Lighting function control method and device, mobile terminal and storage medium
Technical Field
The present invention relates to the field of lighting technologies, and in particular, to a method and an apparatus for controlling a lighting function, a mobile terminal, and a storage medium.
Background
With the development of the times, the living standard of people is continuously improved, the mobile terminal is used more and more frequently, the mobile terminal is favored by the majority of users due to the advantages of small size, convenience in carrying and the like, the requirement of the users on the lighting function is met by arranging the lighting unit on the mobile terminal, and the control method of the lighting function of the lighting unit is paid more and more attention by the people in the using process of the lighting unit.
The existing lighting function control method controls the working state of the lighting unit by receiving a lighting control instruction sent by a user.
In the existing lighting function control method, when the lighting unit is turned on or forgotten to be turned off by mistake, the lighting unit can be in a working state for a long time, so that the electric quantity of the mobile terminal is easily and quickly lost, and the service life of the lighting unit is reduced.
Disclosure of Invention
Based on this, an object of the embodiments of the present invention is to provide a method and an apparatus for controlling an illumination function, a mobile terminal, and a storage medium, which automatically turn off when an illumination unit is turned on by mistake or forgotten to turn off.
In a first aspect, the present invention provides a method for controlling an illumination function, which is applied to a mobile terminal, and the method includes:
monitoring the current state of a screen of the mobile terminal when detecting that a lighting unit of the mobile terminal is in an illumination state;
when the current state is a screen locking state, detecting an environment sensing distance of the mobile terminal, and judging whether the environment sensing distance is smaller than a preset distance threshold value; and
and when the environment sensing distance is judged to be smaller than the preset distance threshold value, the lighting unit is turned off.
The lighting function control method judges whether to check the environment sensing distance by monitoring the current state and judging whether the current state is the design of the screen locking state, judging whether to automatically close the lighting unit or not through the judgment of the environmental sensing distance and the preset distance threshold value, wherein in the prior art, when the lighting unit is turned on by mistake or is forgotten to be closed, the lighting unit can be in an irradiation state for a long time, further, the monitoring of the current state and the detection and judgment of the environmental sensing distance are carried out by the lighting function control method, so that when the current state is the screen locking state and the environment sensing distance is smaller than the preset distance threshold, the lighting unit is automatically turned off, and further prevents damage and waste of electric power due to long-time operation of the lighting unit.
Further, the step of determining whether the environmental sensing distance is smaller than a preset distance threshold includes:
and judging whether the environmental sensing distance is smaller than the preset distance threshold value or not, and whether the duration of the environmental sensing distance smaller than the preset distance threshold value is longer than a first preset time or not.
Further, the step of monitoring the current state of the screen comprises:
monitoring whether the current state of the screen is switched from a screen unlocking state to the screen locking state.
Further, the step of monitoring whether the current state of the screen is switched from the screen unlock state to the screen lock state includes:
detecting whether screen state switching broadcast information is received;
if yes, continuously judging whether the screen switching broadcast information is screen locking broadcast information;
and when the screen switching broadcast information is judged to be the screen locking broadcast information, judging that the current state is switched from the screen unlocking state to the screen locking state.
Further, the step of determining whether the screen switching broadcast information is screen locking broadcast information includes:
acquiring a state marking value in the screen state switching broadcast information, and judging whether the state marking value is a preset marking value or not;
if yes, the screen switching broadcast information is judged to be the screen locking broadcast information.
Further, the step of turning off the lighting unit includes:
sending out a prompt message to inquire whether to turn off the lighting unit;
turning off the lighting unit when confirmation information in response to the prompt information is received; and
not turning off the lighting unit when rejection information is received in response to the prompt information.
Further, after the sending a prompt message, the step of turning off the lighting unit further comprises:
and if no response message aiming at the prompt message is received within a second preset time, automatically turning off the lighting unit.
In a second aspect, the present invention provides an illumination function control apparatus, applied to a mobile terminal, where at least one illumination unit is disposed on the mobile terminal, including:
the monitoring module is used for monitoring the current state of the screen of the mobile terminal when any one of the lighting units is detected to be in the illumination state;
the judging module is used for detecting the environment sensing distance of the mobile terminal when the monitoring module monitors that the current state is the screen locking state, and judging whether the environment sensing distance is smaller than a preset distance threshold value or not; and
and the closing module is used for closing the lighting unit when the judgment module judges that the environmental sensing distance is smaller than the preset distance threshold.
Above-mentioned lighting function controlling means, through monitoring module's design is in order to judge whether to carry out the inspection of environment response distance, through judging module's design is in order to judge whether to carry out lighting unit's self-closing, works as among the prior art lighting unit is because the mistake is opened or forgets when closing, lighting unit can be in the illumination state for a long time, and then through above-mentioned lighting function controlling means, carries out current state's monitoring with environment response distance's detection and judgement, so that work as current state does screen lock state just environment response distance is less than during the predetermined distance threshold value, will automatically lighting unit closes, and then has prevented because the damage that lighting unit long-time work leads to and the waste of electric quantity.
In a third aspect, the present invention provides a mobile terminal, comprising a memory for storing a computer program and a processor for executing the computer program to make the mobile terminal execute the above-mentioned lighting function control method.
In a fourth aspect, the present invention provides a storage medium having stored thereon a computer program for execution by a processor in the mobile terminal described above.
Drawings
Fig. 1 is a flowchart of a lighting function control method according to a first embodiment of the present invention;
fig. 2 is a flowchart of a lighting function control method according to a second embodiment of the present invention;
FIG. 3 is a flowchart illustrating the detailed step of step S11 in FIG. 2;
fig. 4 is a schematic structural diagram of a lighting function control device according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a lighting function control device according to a fourth embodiment of the present invention;
description of the symbols of the main elements
Lighting function control device 100,100a Monitoring module 10
Judging module 20 Distance judging module 21
Detection module 22 Broadcast judging module 221
Screen locking judgment module 222 Acquisition module 223
Closing module 30 Transmission module 31
First sub-closing module 32 Second sub-shutdown module 33
Stop module 40
Detailed Description
In order to facilitate a better understanding of the invention, the invention will be further explained below with reference to the accompanying drawings of embodiments. Embodiments of the present invention are shown in the drawings, but the present invention is not limited to the preferred embodiments described above. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Referring to fig. 1, a flowchart of a lighting function control method according to a first embodiment of the present invention includes steps S10 to S30.
Step S10, when detecting that a lighting unit of the mobile terminal is in an illumination state, monitoring the current state of the screen of the mobile terminal;
when the lighting unit is in an illumination state, the lighting unit is used for providing a lighting function for a user operating the mobile terminal by emitting light with higher light intensity, whether the lighting unit is in the illumination state is detected by detecting voltage, current or light intensity, the current state of the screen comprises a screen locking state and a screen unlocking state, the screen locking state is a state in which the screen is automatically locked by a system when the user does not operate the mobile terminal for a long time, or the user actively emits a screen locking signal to control the screen to be locked, so that the screen enters the screen locking state, specifically, the mode in which the user emits the screen locking signal can be a mode in which the screen locking key is pressed to control the screen to be locked, or a mode in which the screen locking signal is emitted by the user through a sound signal or a touch signal and the like, and the unlocking state is the state that the screen is in a main control interface or a software application interface, and at the moment, the unlocking state indicates that the user is performing control operation on the screen.
Step S20, when the current state is a screen locking state, detecting an environment sensing distance of the mobile terminal, and judging whether the environment sensing distance is smaller than a preset distance threshold value;
the design of judging whether the environmental sensing distance is smaller than the preset distance threshold value is adopted to prevent the lighting unit from being turned off mistakenly when the lighting unit is used normally, for example, when a user starts the irradiation of the lighting unit and locks the screen, and the distance between the irradiation unit and an irradiated object is larger than the preset distance threshold value, the inspection of the environmental sensing distance is stopped. When the current state is detected to be the screen locking state, the sensor on the mobile terminal is started to detect the environment sensing distance, the sensor adopts a distance sensor, the environment sensing distance is the distance between the irradiation object sensed by the sensor and the illumination unit, and preferably, the preset distance threshold value is 2cm in the embodiment.
When the step S20 determines that the environmental sensing distance is smaller than the preset distance threshold, step S30 is performed.
Step S30, turning off the lighting unit.
When the lighting unit is in an illumination state, the current state of the screen is the screen locking state, and the environmental sensing distance is smaller than the preset distance threshold, the lighting unit is turned off, for example, when a user uses up the lighting function of the lighting unit and forgets to turn off the lighting unit, the mobile terminal is directly placed in a pocket or a backpack, the screen is detected to be in a screen locking state, the distance between the lighting unit and an illuminated object is smaller than the preset distance threshold, and the lighting unit is directly turned off at the moment, so that the damage caused by long-time turning on of the lighting unit and the electric quantity damage of the mobile terminal are prevented.
The present embodiment determines whether to perform the inspection of the environmental sensing distance by monitoring the current state and determining whether the current state is the design of the screen locking state, judging whether to automatically close the lighting unit or not through the judgment of the environmental sensing distance and the preset distance threshold value, wherein in the prior art, when the lighting unit is turned on by mistake or is forgotten to be closed, the lighting unit can be in an irradiation state for a long time, further, the monitoring of the current state and the detection and judgment of the environmental sensing distance are carried out by the lighting function control method, so that when the current state is the screen locking state and the environment sensing distance is smaller than the preset distance threshold, the lighting unit is automatically turned off, and further prevents damage and waste of electric power due to long-time operation of the lighting unit.
Referring to fig. 2, a flowchart of a lighting function control method according to a second embodiment of the present invention is shown, and the method includes steps S11 to S61.
Step S11, when detecting that a lighting unit of the mobile terminal is in an illumination state, monitoring whether the current state of the screen of the mobile terminal is switched from a screen unlocking state to a screen locking state;
the method comprises the steps of monitoring whether the current state is switched from the screen unlocking state to the screen locking state or not, so as to judge whether the screen is locked or not, for example, when a user places the mobile terminal in a pocket, the screen can be automatically locked after a long time, and at the moment, the current state is switched to the screen locking state.
Referring to fig. 3, in the step S11, the step of monitoring whether the current state of the screen is switched from the screen unlock state to the screen lock state includes steps S110 to S112.
Step S110, detecting whether screen state switching broadcast information is received;
when the state of the screen changes, the screen sends the screen state switching broadcast information, and then whether the screen state switching broadcast information is received or not is detected, so that whether the state of the screen changes or not is judged, for example, when the screen is locked, the screen locking broadcast information is sent, and when the screen is unlocked, the screen unlocking broadcast information is sent.
When the S110 detects that the screen status switching broadcast information is received, step S111 is performed.
Step S111, judging whether the screen switching broadcast information is screen locking broadcast information;
the screen switching broadcast information is judged to be the design of the screen locking broadcast information, so that the screen switching broadcast information is prevented from being closed by mistake when being the unlocking broadcast information, and preferably, the mode of judging whether the screen switching broadcast information is the screen locking broadcast information is as follows:
acquiring a state marking value in the screen state switching broadcast information, and judging whether the state marking value is a preset marking value or not;
the state flag values are set in the screen state switching broadcast information and the state flag values in different broadcast information are different, so that whether the screen state switching broadcast information is the screen locking broadcast information or not can be judged directly through judgment of the state flag values.
If yes, the screen switching broadcast information is judged to be the screen locking broadcast information.
When it is determined in the step S111 that the screen switching broadcast information is the lock screen broadcast information, a step S112 is performed.
Step S112, determining that the current state is switched from the screen unlock state to the screen lock state;
it can be understood that, since the detected state flag value is equal to the preset flag value, the screen is in the unlocked state at this time.
When the step S11 detects that the current state of the screen is switched from the screen unlock state to the screen lock state, step S21 is performed.
Step S21, detecting the environment sensing distance of the mobile terminal;
the sensor on the mobile terminal is started to detect the environment sensing distance, the environment sensing distance is detected to prevent the lighting unit from being turned off mistakenly when the lighting unit is normally used, the sensor adopts a distance sensor, and the environment sensing distance is the distance between an irradiation object sensed by the sensor and the lighting unit.
Step S31, determining whether the environmental sensing distance is smaller than the preset distance threshold, and whether a duration of the environmental sensing distance being smaller than the preset distance threshold is greater than a first preset time;
the lighting unit is controlled to be turned off in a short and large time by the design of whether the duration is longer than the first preset time, so that the lighting unit is prevented from being turned off in a wrong way due to the fact that the environment sensing distance is changed in a short and large way, for example, when a user irradiates the lighting unit in a corridor and collides with a pedestrian or an irradiated object, the environment sensing distance is smaller than the preset distance threshold, but the user still needs the irradiation function of the lighting unit in an irradiation state on the mobile terminal, therefore, the lighting unit is prevented from being turned off in a wrong way due to the similar situations through the judgment of the first preset time, and the accuracy of the lighting function control method is improved. Preferably, the preset distance threshold is 2cm, the first preset time is 5s, and when the environmental sensing distance is continuously smaller than 2cm within 5s, it is determined that the environmental sensing distance is smaller than the preset distance threshold.
When the judgment result of the step S31 is yes, step S41 is performed.
Step S41, detecting whether the current state of the screen is switched from the screen locked state to the screen unlocked state;
the method for switching the screen from the screen locking state to the screen unlocking state includes the following steps of determining whether the screen is switched from the screen locking state to the screen unlocking state by detecting whether the current state of the screen is switched from the screen locking state to the screen unlocking state, determining that a user needs to perform illumination of the illumination unit at the time when the current state of the screen is switched from the screen locking state to the screen unlocking state, and preventing the illumination unit from being turned off mistakenly by switching the screen from the screen locking state to the screen unlocking state when the user needs to perform short-distance illumination, for example, when the user needs to perform short-distance illumination, the environmental sensing distance is smaller than the preset distance threshold, and specifically, the method for switching the screen from the screen locking state to the screen unlocking state may be:
switching of an unlocking state is performed in a mode of sliding the screen according to a preset track;
switching of the unlocking state is carried out by pressing a preset control key;
switching of an unlocking state is carried out in a mode of sending a preset voice control signal;
the unlocking state is switched by emitting infrared signals or wireless signals and the like.
When the judgment result of the step S41 is yes, step S51 is performed.
Step S51, stopping the detection of the environment sensing distance;
the power consumption of the mobile terminal is reduced by stopping the detection of the environment sensing distance, and the lighting unit is not turned off at the moment, so that the lighting unit is prevented from being turned off mistakenly.
When the determination result of the step S41 is no, step S61 is performed.
And if the current state of the screen is judged not to be switched from the screen locking state to the screen unlocking state, the user is determined not to operate the screen.
Step S61, sending out a prompt message to inquire whether to turn off the lighting unit;
wherein, through sending prompt information's design to prevent that the user is exactly need the screen is in lock screen state and closely goes on lighting unit's use of shining, prompt information is used for prompting the user current lighting unit is in the state of shining, and then has prevented because maloperation or forget to close and lead to lighting unit's long-time work, prompt information is speech information, vibration information or light scintillation information etc..
In addition, in this embodiment, after the prompt message is sent, the lighting unit is turned off when the confirmation message responding to the prompt message is received, for example, after the voice prompt is sent, the confirmation key response of the user is obtained, and then the lighting unit is turned off.
When rejection information responding to the prompt information is received, the lighting unit is not turned off, for example, when a rejection key response of a user is obtained after a voice prompt is sent out, the lighting unit is still controlled to irradiate.
Further, after the sending a prompt message, the step of turning off the lighting unit further comprises:
and if no response message aiming at the prompt message is received within a second preset time, automatically turning off the lighting unit.
Wherein, through the design of the second preset time, the irradiation unit is prevented from being turned on for a long time due to the fact that the user forgets to feed back the prompt message or does not receive the prompt message, for example, when the mobile terminal is prevented from being in a backpack, the user cannot find the prompt message in time, therefore, by judging whether any response message aiming at the prompt message is received in the second preset time and is not received, the illumination unit is automatically turned off, so as to prevent the illumination unit from being irradiated for a long time, preferably, as long as no response message is received in the second preset time, the irradiation unit is turned off, the second preset time is 1 minute, when the illumination unit is in an irradiation state, the screen is in a screen locking state and the environmental sensing distance is continuously smaller than the preset distance threshold value in the first preset time, and after the prompt message is sent and when any response is not received within the second preset time, the lighting unit is automatically turned off.
Through the inquiry of lock screen broadcast information in this embodiment, in order to judge whether the screen is in the lock screen state, through judging whether environmental induction distance is less than preset distance threshold value and lasts the design of first preset time, in order to judge environmental induction distance is less than preset distance threshold value, through sending the design of reminder information, in order to respond automatic control according to the difference that obtains the state of lighting unit, and then improved the variety of lighting function control method, work as lighting unit is because maloperation or forget to close and lead to being in when shining the state for a long time, this embodiment can be automatic will lighting unit closes, and then has prevented because the damage that lighting unit long-time work leads to reaches the waste of mobile terminal electric quantity.
Referring to fig. 4, which is a schematic structural diagram of an illumination function control device 100 according to a third embodiment of the present invention, the illumination function control device 100 is applied to a mobile terminal, at least one illumination unit is disposed on the mobile terminal, and each illumination function control module 100 is electrically connected to the mobile terminal and each illumination unit, and includes:
a monitoring module 10, configured to monitor a current state of a screen of the mobile terminal when detecting that any one of the lighting units on the mobile terminal is in an illumination state, detect whether the lighting unit is in the illumination state and adopt a mode of performing voltage, current detection or light intensity detection, provide an illumination function for the mobile terminal when the lighting unit is in the illumination state, where the current state of the screen includes a screen locking state and a screen unlocking state, where the screen locking state is a state in which a system automatically locks the screen when a user does not operate the mobile terminal for a long time, or a user actively sends a screen locking signal to control the screen to be locked, so that the screen enters the screen locking state, and specifically, the mode in which the user sends the screen locking signal may be a mode in which the screen locking key is pressed to control the screen to be locked, or the user sends the screen locking signal in a mode of sound signal or touch signal, and the unlocking state is the state that the screen is in the main control interface or the software application interface, and at the moment, the user indicates that the user is performing control operation on the screen.
Judging module 20, be used for when monitoring module 10 monitors when the current state is screen locking state, detect mobile terminal's environmental sensing distance, and judge whether environmental sensing distance is less than predetermined distance threshold, when detecting the current state is when the screen locking state, open inductor on the mobile terminal, in order to carry out the detection of environmental sensing distance, the inductor adopts apart from the inductor, environmental sensing distance is the object that shines that the inductor sensed extremely distance between the lighting unit, in this embodiment predetermined distance threshold is 2 cm.
A closing module 30, configured to close the lighting unit when the determining module 20 determines that the environmental sensing distance is smaller than the preset distance threshold.
The judging module 20 includes:
distance judgment module 21 for detect and judge whether the environmental sensing distance is less than predetermined distance threshold, just the environmental sensing distance is less than whether the length of time of predetermined distance threshold is greater than first preset time, through opening inductor on the mobile terminal, in order to carry out the detection of environmental sensing distance, the inductor adopts apart from the inductor, the environmental sensing distance does the irradiation object that the inductor sensed extremely distance between the lighting unit, predetermined distance threshold is 2cm, first preset time is 5s, works as when the environmental sensing distance lasts and is less than 2cm in 5s, then judges the environmental sensing distance is less than predetermined distance threshold.
The detecting module 22 is configured to monitor whether the current state of the screen is switched from a screen unlock state to the screen lock state.
The detection module 22 includes:
a broadcast determining module 221, configured to detect and determine whether screen state switching broadcast information is received;
a screen locking judging module 222, configured to judge whether the screen switching broadcast information is screen locking broadcast information when the broadcast judging module judges that the screen state switching broadcast information exists.
When the screen locking judgment module 222 judges that the screen switching broadcast information is the screen locking broadcast information, it is judged that the current state is switched from the screen unlocking state to the screen locking state.
The screen locking determination module 222 includes:
an obtaining module 223, configured to obtain a state flag value in the screen state switching broadcast information, determine whether the state flag value is a preset flag value, and determine that the screen state switching broadcast information is the screen locking broadcast information when the state flag value is the preset flag value.
The closing module 30 includes:
the sending module 31 is used for sending prompt information to inquire whether to close the lighting unit, the prompt information is used for prompting a user that the lighting unit is in an irradiation state, and further long-time work of the lighting unit caused by misoperation or forgetting closing is prevented, and the prompt information is voice information, vibration information or light flicker information and the like.
A first sub-shutdown module 32 configured to shut down the lighting unit when receiving confirmation information in response to the prompt information; when rejection information responding to the prompt information is received, the lighting unit is not turned off, for example, when confirmation information responding to the prompt information is received after the prompt information is sent, the lighting unit is turned off, for example, when confirmation key response of a user is obtained after voice prompt is sent, the lighting unit is turned off.
When rejection information responding to the prompt information is received, the lighting unit is not turned off, for example, when a rejection key response of a user is obtained after a voice prompt is sent out, the lighting unit is still controlled to irradiate.
And a second sub-closing module 33, configured to automatically close the lighting unit when no response message to the prompt message is received within a second preset time, where the second preset time is 1 minute, and when the lighting unit is in an irradiation state, the screen is in a screen locking state, and the duration of the environmental sensing distance smaller than the preset distance threshold is smaller than the first preset time, and after the prompt message is sent, and when no response is received within the second preset time, the lighting unit is automatically closed.
The lighting function control device 100 determines whether to check the environmental sensing distance by the design of the monitoring module 10, by the design of the judging module 20, to judge whether to perform the automatic turn-off of the lighting unit, by the design of the turn-off module 30, the lighting unit can be automatically controlled to be turned off, and in the prior art, when the lighting unit is turned on by mistake or is forgotten to be turned off, the lighting unit can be in an illuminating state for a long time, further, the illumination function control device 100 monitors the current state and detects and determines the environmental sensing distance, so that when the current state is the screen locking state and the environment sensing distance is smaller than the preset distance threshold, the lighting unit is automatically turned off, and further prevents damage and waste of electric power due to long-time operation of the lighting unit.
Referring to fig. 5, a schematic structural diagram of an illumination function control apparatus 100a according to a fourth embodiment of the present invention is shown, the fourth embodiment is substantially the same as the third embodiment, except that the illumination function control apparatus 100a in this embodiment further includes:
and the stopping module 40 is configured to stop detecting the environmental sensing distance when detecting that the current state of the screen is switched from the screen locking state to the screen unlocking state.
Before the lighting unit is not turned off, as long as the stopping module 40 detects that the current state is switched from the screen locking state to the screen unlocking state, it is determined that the user needs the irradiation function of the lighting unit at this time, and the detection of the environmental sensing distance is stopped, so that the electric quantity loss of the mobile terminal is prevented, and the lighting unit is still controlled to irradiate at this time, so that the lighting unit is prevented from being turned off mistakenly, and the user experience is improved.
The embodiment also provides a mobile terminal, which comprises a memory and a processor, wherein the memory is used for storing a computer program, and the processor runs the computer program to enable the mobile terminal to execute the lighting function control method.
The embodiment also provides a storage medium, on which a computer program run by a processor in the mobile terminal is stored, and when executed, the program includes the following steps:
monitoring the current state of a screen of the mobile terminal when detecting that a lighting unit of the mobile terminal is in an illumination state;
when the current state is a screen locking state, detecting an environment sensing distance of the mobile terminal, and judging whether the environment sensing distance is smaller than a preset distance threshold value; and
and when the environment sensing distance is judged to be smaller than the preset distance threshold value, the lighting unit is turned off. The storage medium, such as: ROM/RAM, magnetic disk, optical disk, etc.
The above-described embodiments describe the technical principles of the present invention, and these descriptions are only for the purpose of explaining the principles of the present invention and are not to be construed as limiting the scope of the present invention in any way. Based on the explanations herein, those skilled in the art will be able to conceive of other embodiments of the present invention without inventive effort, which would fall within the scope of the present invention.

Claims (10)

1. A lighting function control method is applied to a mobile terminal, and is characterized by comprising the following steps:
when detecting that an illumination unit of the mobile terminal is in an illumination state, detecting whether screen state switching broadcast information is received or not;
when the screen state switching broadcast information is detected to be received, continuously judging whether the screen state switching broadcast information is screen locking broadcast information or not;
when the screen state switching broadcast information is judged to be the screen locking broadcast information, detecting an environment sensing distance of the mobile terminal, and judging whether the environment sensing distance is smaller than a preset distance threshold value or not; and
when the environment sensing distance is judged to be smaller than the preset distance threshold value, sending a prompt message to inquire whether the lighting unit is turned off, wherein the prompt message is voice message, vibration message or light flicker message;
turning off the lighting unit when confirmation information in response to the prompt information is received;
and if no response message aiming at the prompt message is received within a second preset time, automatically turning off the lighting unit.
2. The lighting function control method of claim 1, wherein the step of determining whether the ambient sensing distance is less than a preset distance threshold comprises:
and judging whether the environmental sensing distance is smaller than the preset distance threshold value or not, and whether the duration of the environmental sensing distance smaller than the preset distance threshold value is longer than a first preset time or not.
3. The lighting function control method of claim 1, wherein the step of determining whether the screen state switching broadcast information is lock screen broadcast information comprises:
acquiring a state marking value in the screen state switching broadcast information, and judging whether the state marking value is a preset marking value or not;
if yes, the screen state switching broadcast information is judged to be the screen locking broadcast information.
4. A lighting function control method according to claim 1, wherein after the step of issuing a prompt message asking whether to turn off the lighting unit, the method further:
not turning off the lighting unit when rejection information is received in response to the prompt information.
5. An illumination function control device, which is applied to a mobile terminal provided with at least one illumination unit by using the method of any one of claims 1 to 4, the illumination function control device comprising:
the monitoring module is used for monitoring the current state of the screen of the mobile terminal when any one of the lighting units is detected to be in the illumination state;
the judging module is used for detecting the environment sensing distance of the mobile terminal when the monitoring module monitors that the current state is the screen locking state, and judging whether the environment sensing distance is smaller than a preset distance threshold value or not; and
the closing module is used for closing the lighting unit when the judgment module judges that the environmental sensing distance is smaller than the preset distance threshold;
the judging module comprises:
the detection module is used for monitoring whether the current state of the screen is switched from a screen unlocking state to a screen locking state;
the detection module comprises:
the broadcast judging module is used for detecting and judging whether screen state switching broadcast information is received or not;
the screen locking judging module is used for judging whether the screen state switching broadcast information is screen locking broadcast information or not when the broadcast judging module judges that the screen state switching broadcast information exists; when the screen locking judgment module judges that the screen state switching broadcast information is the screen locking broadcast information, judging that the current state is switched from the screen unlocking state to the screen locking state;
the shutdown module includes:
the sending module is used for sending out prompt information to inquire whether the lighting unit is turned off or not;
a first sub-shutdown module for shutting down the lighting unit when receiving confirmation information in response to the prompt information;
and the second sub-closing module is used for automatically closing the lighting unit if any response information aiming at the prompt information is not received within a second preset time.
6. The lighting function control device according to claim 5, wherein the judging module includes:
and the distance judgment module is used for detecting and judging whether the environmental sensing distance is smaller than the preset distance threshold value or not, and whether the duration of the environmental sensing distance smaller than the preset distance threshold value is longer than a first preset time or not.
7. The illumination function control device according to claim 5, wherein the screen locking judgment module comprises:
and the acquisition module is used for acquiring a state marking value in the screen state switching broadcast information, judging whether the state marking value is a preset marking value or not, and judging that the screen state switching broadcast information is the screen locking broadcast information when the state marking value is the preset marking value.
8. The lighting function control device of claim 5, wherein the first sub-turning-off module is further configured to not turn off the lighting unit when a rejection message is received in response to the prompt message.
9. A mobile terminal characterized by comprising a memory for storing a computer program and a processor for executing the computer program to cause the mobile terminal to execute the lighting function control method according to any one of claims 1 to 4.
10. A storage medium, characterized in that it stores a computer program run by a processor in a mobile terminal according to claim 9.
CN201710898224.2A 2017-09-28 2017-09-28 Lighting function control method and device, mobile terminal and storage medium Active CN107708271B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710898224.2A CN107708271B (en) 2017-09-28 2017-09-28 Lighting function control method and device, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710898224.2A CN107708271B (en) 2017-09-28 2017-09-28 Lighting function control method and device, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN107708271A CN107708271A (en) 2018-02-16
CN107708271B true CN107708271B (en) 2020-10-23

Family

ID=61175105

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710898224.2A Active CN107708271B (en) 2017-09-28 2017-09-28 Lighting function control method and device, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN107708271B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111327767A (en) * 2020-02-06 2020-06-23 Tcl移动通信科技(宁波)有限公司 Lighting device control method, system, storage medium and mobile terminal
CN111526432A (en) * 2020-04-26 2020-08-11 Oppo广东移动通信有限公司 Electronic device, control method thereof, computer device, and readable storage medium
CN112492085B (en) * 2020-11-18 2023-08-15 惠州Tcl移动通信有限公司 Mobile terminal and illumination control method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2143039Y (en) * 1992-10-08 1993-09-29 王海琼 Acousto-optic automatic-controlling delay energy-saving lamp cap
CN105472828A (en) * 2014-08-25 2016-04-06 小米科技有限责任公司 Sound control lamp control method, device and sound control lamp

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105245714A (en) * 2015-10-23 2016-01-13 上海斐讯数据通信技术有限公司 Proximity-sensor-based smartphone flash fast switching method and system
CN105245718B (en) * 2015-10-27 2018-03-23 广东欧珀移动通信有限公司 Control method, device and the mobile terminal of breath light
CN105282342A (en) * 2015-11-02 2016-01-27 广东欧珀移动通信有限公司 Mobile terminal control method and device
CN105843392A (en) * 2016-03-28 2016-08-10 乐视控股(北京)有限公司 Screen control method and device of mobile terminal
CN106791065B (en) * 2016-12-14 2020-03-31 深圳铂睿智恒科技有限公司 Mobile device and method for controlling flashlight switch through fingerprint touch

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2143039Y (en) * 1992-10-08 1993-09-29 王海琼 Acousto-optic automatic-controlling delay energy-saving lamp cap
CN105472828A (en) * 2014-08-25 2016-04-06 小米科技有限责任公司 Sound control lamp control method, device and sound control lamp

Also Published As

Publication number Publication date
CN107708271A (en) 2018-02-16

Similar Documents

Publication Publication Date Title
CN107708271B (en) Lighting function control method and device, mobile terminal and storage medium
US10282958B2 (en) Sound or radiation triggered locating device with activity sensor
CN107808669B (en) Voice control method, intelligent home system, storage medium and computer equipment
CN105389024A (en) screen control method of electronic device
US11474586B2 (en) User-configurable person detection system, method and apparatus
CN103306592A (en) Safety reminding system and safety reminding method
US10045422B2 (en) System and method for light-based activation of an occupancy sensor wireless transceiver
CN105005269A (en) Intelligent household control system and method
CN109474503B (en) Electric appliance control method and device, storage medium and electric appliance
JP6709848B2 (en) Lighting circuit control method and controller
CN114655159A (en) Vehicle control method and device, electronic equipment and vehicle
KR101934357B1 (en) Tailgate automatic opening and lamp self-checking method interlocking smart key
CN110747599A (en) Washing machine and safety detection method thereof
CN108989445A (en) Biological safety protection method and car networking system based on car networking
CN114582052A (en) Control method and device of intelligent door lock, intelligent door lock and storage medium
KR20170114840A (en) Power management system using by human body detecting sensor and the control method thereof
US20090201122A1 (en) Method for generating an information signal in the event of an access request and device for carrying out the method
CN108917849A (en) Biological safety protection method and car networking system based on car networking
CN111142512A (en) Equipment control method, following equipment and storage medium
CN106714396A (en) Illumination device and method of electric appliance
KR100792160B1 (en) Intelligent power management system
CN110747603A (en) Washing machine and safety detection method thereof
JP2007115130A (en) Automatic alarm device
CN108870657A (en) Control system for central air-conditioning
CN112839405B (en) Pulse LED based on surface emitting laser diode and control method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant