CN109068456B - Flashlight control method, flashlight control device, terminal and storage medium - Google Patents
Flashlight control method, flashlight control device, terminal and storage medium Download PDFInfo
- Publication number
- CN109068456B CN109068456B CN201810698552.2A CN201810698552A CN109068456B CN 109068456 B CN109068456 B CN 109068456B CN 201810698552 A CN201810698552 A CN 201810698552A CN 109068456 B CN109068456 B CN 109068456B
- Authority
- CN
- China
- Prior art keywords
- reminding
- flashlight
- duration
- terminal
- reminding mode
- 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
Links
Classifications
-
- H—ELECTRICITY
- H05—ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
- H05B—ELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
- H05B47/00—Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
- H05B47/10—Controlling the light source
- H05B47/16—Controlling the light source by timing means
-
- H—ELECTRICITY
- H05—ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
- H05B—ELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
- H05B47/00—Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
- H05B47/10—Controlling the light source
- H05B47/105—Controlling the light source in response to determined parameters
- H05B47/11—Controlling the light source in response to determined parameters by determining the brightness or colour temperature of ambient light
-
- H—ELECTRICITY
- H05—ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
- H05B—ELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
- H05B47/00—Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
- H05B47/10—Controlling the light source
- H05B47/105—Controlling the light source in response to determined parameters
- H05B47/115—Controlling the light source in response to determined parameters by determining the presence or movement of objects or living beings
- H05B47/12—Controlling the light source in response to determined parameters by determining the presence or movement of objects or living beings by detecting audible sound
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02B—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
- Y02B20/00—Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
- Y02B20/40—Control techniques providing energy savings, e.g. smart controller or presence detection
Landscapes
- Telephone Function (AREA)
Abstract
The embodiment of the application discloses a flashlight control method, a flashlight control device, a terminal and a storage medium, which belong to the technical field of terminals, wherein the method is used for the terminal provided with a flash lamp, and comprises the following steps: when the flashlight function is started, the flashlight is started; acquiring the starting time of the flashlight function; if the starting time length does not reach the time length threshold value, using a reminding mode corresponding to the starting time length to remind the user of the use time length; and if the opening duration reaches the duration threshold, the flashlight function is turned off. In the embodiment of the application, the terminal automatically executes the reminding and the automatic closing operation when in use according to the opening time of the flashlight function, and avoids hardware damage caused by the fact that the flash lamp is normally on the premise of not influencing the normal use of the flashlight function.
Description
Technical Field
The embodiment of the application relates to the technical field of terminals, in particular to a flashlight control method, a flashlight control device, a terminal and a storage medium.
Background
In order to facilitate lighting of a user, most mobile terminals implement a flashlight function by means of a flashlight.
When receiving a flashlight starting signal, the mobile terminal starts a flash lamp on one side of the rear camera and keeps the flash lamp normally on; when the flashlight closing signal is received, the mobile terminal closes the flashlight.
Disclosure of Invention
The embodiment of the application provides a flashlight control method, a flashlight control device, a terminal and a storage medium, and can solve the problem that flashlight hardware is easily damaged because a flashlight is kept in an on state for a long time in the on state of the flashlight. The technical scheme is as follows:
in one aspect, a flashlight control method is provided, where the flashlight control method is used for a terminal provided with a flashlight, and the method includes:
when the flashlight function is started, the flash lamp is started;
acquiring the starting time of the flashlight function;
if the starting time length does not reach the time length threshold value, using a reminding mode corresponding to the starting time length to remind the using time length;
and if the opening duration reaches the duration threshold, closing the flashlight function.
In another aspect, there is provided a flashlight control device provided with a flashlight, the device including:
the starting module is used for starting the flash lamp when the flashlight function is started;
the acquisition module is used for acquiring the starting duration of the flashlight function;
the reminding module is used for reminding the using duration by adopting a reminding mode corresponding to the starting duration when the starting duration does not reach the duration threshold;
and the closing module is used for closing the flashlight function when the opening duration reaches the duration threshold value.
In another aspect, a terminal is provided, the terminal includes a processor and a memory, and the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the flashlight control method according to the above aspect.
In another aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to implement the flashlight control method according to the above aspect.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
after the terminal starts the flashlight function and turns on the flash lamp, by acquiring the turning-on duration of the flashlight function, when the turning-on duration does not reach a duration threshold value, a corresponding reminding mode is adopted to remind a user of turning off the flashlight function, so that the flash lamp is prevented from being normally on; and when the opening duration reaches the duration threshold, the flashlight function is automatically closed, so that the damage to the flash lamp hardware caused by opening the flashlight function for a long time is avoided. The terminal automatically executes the reminding of the using time and the automatic closing operation according to the opening time of the flashlight function, and avoids hardware damage caused by the fact that the flashlight is normally on the premise that the normal use of the flashlight function is not influenced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart illustrating a flashlight control method according to an exemplary embodiment of the present disclosure;
FIG. 2 illustrates a flow chart of a flashlight control method provided by another exemplary embodiment of the present application;
FIG. 3 illustrates a flow chart of a flashlight control method provided by another exemplary embodiment of the present application;
FIG. 4 is a schematic diagram of an implementation of using duration reminding performed by the terminal in different using stages;
FIG. 5 is a schematic diagram of an interface for a terminal to perform an interface notification reminder;
FIG. 6 illustrates a flow chart of a flashlight control method provided by another exemplary embodiment of the present application;
FIG. 7 is a block diagram illustrating a flashlight control device according to an exemplary embodiment of the present disclosure;
fig. 8 shows a block diagram of a terminal according to an exemplary embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
In the description of the present application, "plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
In the related art, the flashlight function of the terminal needs to be manually turned on and off by a user. In general, after a user turns on the flashlight function, the terminal turns on the flashlight and keeps on the flashlight normally, and only when receiving a flashlight function turn-off signal (or when the power of the terminal is exhausted), the terminal turns off the flashlight. However, when the flashlight function is turned on for a long time, a large amount of electricity is consumed, and flash lamp hardware is damaged.
In order to avoid that a user uses the flashlight for a long time or forgets to turn off the flashlight after using the flashlight (because the flashlight is usually arranged on the back of the terminal, the flashlight is turned on after the terminal is placed flatly and is not easy to be perceived), in the embodiment of the application, in the using process of the flashlight function, the terminal reminds the user of corresponding use duration in different use stages to turn off the flashlight as soon as possible, and automatically turns off the flashlight function when the flashlight is turned on too long, so that hardware damage and electric quantity consumption caused by the fact that the flashlight is normally on are avoided.
The flashlight control method provided by each embodiment of the application is used for a terminal provided with a flashlight, and the terminal can be a smart phone, a tablet computer and the like. The flash lamps can be arranged on the front side or the back side of the terminal, the number of the flash lamps is at least one, and the arrangement position and the number of the flash lamps are not limited in the embodiment of the application.
Referring to fig. 1, a flowchart of a flashlight control method according to an exemplary embodiment of the present application is shown. The present embodiment is exemplified by the method applied to a terminal. The method comprises the following steps:
step 101, when the flashlight function is started, a flashlight is turned on.
When a trigger signal of the flashlight function icon is received, or a trigger signal of a preset entity key (or an entity key combination) is received, or a preset flashlight opening gesture is detected, the terminal starts the flashlight function, starts the flashlight and keeps the flashlight normally on.
Optionally, when the flashlight function supports brightness adjustment, the terminal adjusts the brightness of the flashlight according to the brightness adjustment signal.
And 102, acquiring the starting time of the flashlight function.
In a possible implementation manner, when the terminal starts the flashlight function, the starting time of the manual function is recorded, so that the starting time of the flashlight function is calculated according to the current time and the starting time. For example, when the turning-on time is 18:00:00 and the current time is 18:00:30, the turning-on duration of the flashlight function is 30 s.
In another possible implementation manner, when the terminal starts the flashlight function, a preset Timer (Timer) is started, and the acquired Timer time is the starting duration of the flashlight function. For example, when the timer time of the timer is 30s, the on duration of the flashlight function is 30 s.
The embodiment of the application does not limit the manner of acquiring the opening duration.
In order to avoid the situation that the starting time of the flashlight is too long, a time length threshold value is arranged in the terminal, in the starting process of the flashlight function, the terminal detects whether the starting time length reaches the time length threshold value, and if the starting time length does not reach the time length threshold value, the step 103 is executed; if so, go to step 104. For example, the duration threshold is 90 s.
And 103, if the starting time does not reach the time threshold, using time reminding is carried out by adopting a reminding mode corresponding to the starting time.
Optionally, when the opening duration does not reach the duration threshold, the terminal adopts a step-type reminding mode along with the continuous increase of the opening duration, and different reminding modes are used for reminding the use duration in different use stages.
Optionally, the reminding method includes: at least one of a vibration reminder, an interface notification reminder, a ringtone reminder, and a flash light flashing reminder.
Wherein, different use stages correspond to different opening duration intervals, and the stage duration of each use stage is the same or different. Schematically, the corresponding relationship between the opening duration interval and the use phase is shown in table one.
Watch 1
Stage of use | First stage of use | Second stage of use | Third stage of use |
Duration of opening interval | 20s-60s | 60s-80s | 80s-90s |
Optionally, when n usage phases are included (n is greater than or equal to 2), the maximum value of the opening duration interval corresponding to the nth usage phase is the duration threshold.
And step 104, if the opening duration reaches a duration threshold, closing the flashlight function.
And when the starting time length reaches the time length threshold value, the terminal determines that the starting time length of the flash lamp is too long, so that the flashlight function is automatically turned off, and the flash lamp is turned off.
Optionally, when the terminal adopts a step-type reminding mode, the service life is reminded in different service stages, and the terminal includes n service stages, namely when the opening time reaches the maximum value of the opening time interval corresponding to the nth service stage, the flashlight function is automatically turned off.
For example, in combination with the data shown in table one, when the timer time of the terminal reaches the maximum value 90s of the opening duration interval corresponding to the third use stage, the terminal automatically turns off the flashlight function.
To sum up, in the embodiment of the application, after the terminal starts the flashlight function and turns on the flash lamp, by acquiring the turning-on duration of the flashlight function, when the turning-on duration does not reach the duration threshold, the use duration is reminded in a corresponding reminding mode so as to remind a user to turn off the flashlight function, and the flash lamp is prevented from being normally on; and when the opening duration reaches the duration threshold, the flashlight function is automatically closed, so that the damage to the flash lamp hardware caused by opening the flashlight function for a long time is avoided. The terminal automatically executes the reminding of the using time and the automatic closing operation according to the opening time of the flashlight function, and avoids hardware damage caused by the fact that the flashlight is normally on the premise that the normal use of the flashlight function is not influenced.
In order to remind the using time length on the premise of not influencing the normal use of the flashlight function, the terminal divides a plurality of using stages according to the starting time length interval in advance, when the terminal enters each using stage, the terminal adopts a corresponding reminding mode to remind, and along with the increase of the starting time length, the significance degree of the reminding mode is sequentially improved. The following description will be made by using exemplary embodiments.
Referring to fig. 2, a flowchart of a flashlight control method according to another exemplary embodiment of the present application is shown. The present embodiment is exemplified by the method applied to a terminal. The method comprises the following steps:
step 201, when the flashlight function is started, the flashlight is turned on.
Step 202, acquiring the starting duration of the flashlight function.
The implementation of the steps 201 to 202 can refer to the steps 101 to 102, and this embodiment is not described herein again.
In step 203, if the opening duration does not reach the duration threshold, determining the use stage to which the opening duration belongs.
The terminal divides a plurality of using stages in advance according to the starting time interval, and the corresponding relation between the starting time interval and the using stages is shown in a table I. And when the opening duration does not reach the duration threshold, the terminal determines the current use stage according to the current opening duration.
In a possible implementation manner, the terminal starts the flashlight function and simultaneously starts a timer, and when the time of the timer reaches the minimum value of a starting time interval corresponding to the ith use stage, the terminal determines to enter the ith use stage; and when the time of the timer is in the starting duration interval corresponding to the ith use stage, the terminal determines that the starting time belongs to the ith use stage.
In other possible embodiments, the terminal may also determine the use phase to which the current time belongs according to the starting time of the flashlight function and the current time, which is not described herein again in this embodiment of the application.
Optionally, since the flash lamp may consume a large amount of power when the flash lamp is normally turned on, which is particularly obvious when the power of the terminal is low, in order to further reduce the time for which the flash lamp is normally turned on in the low power mode, before the terminal determines the use phase to which the turn-on duration belongs, a duration threshold and a duration of the use phase corresponding to each use phase are determined according to the remaining power of the terminal, wherein the duration of the use phase and the remaining power of the terminal are in a positive correlation, and the duration threshold and the remaining power of the terminal are in a positive correlation.
For example, when the remaining power of the terminal is 80%, the terminal determines that the time threshold for triggering automatic flashlight shutdown is 90s, and the startup time intervals corresponding to each use stage are shown in table one, wherein the use stage durations corresponding to each use stage are 40s, 20s and 10s respectively; and when the residual electric quantity of the terminal is 30%, the terminal determines that the time threshold value for triggering the automatic flashlight closing is 60s, and the opening time intervals corresponding to all the using stages are shown in the table II, wherein the using stage time lengths corresponding to all the using stages are 22s, 10s and 8s respectively
Watch two
Stage of use | First stage of use | Second stage of use | Third stage of use |
Duration of opening interval | 20s-42s | 42s-52s | 52s-60s |
And 204, when the ith use stage is entered, determining a target reminding mode corresponding to the ith use stage, wherein i is more than or equal to 1, and i is an integer.
When the ith use stage is entered, the terminal determines the target reminding mode corresponding to the ith use stage, and then uses the target reminding mode to remind the use duration. And the corresponding relation between the ith use stage and the target reminding mode is preset and/or is determined in real time according to the environment where the terminal is located.
In a possible embodiment, when three usage phases are divided according to the starting time duration, as shown in fig. 3, this step may include the following steps.
Step 204A, when entering a first use stage, determining a first target reminding mode corresponding to the first use stage, wherein the first target reminding mode at least comprises vibration reminding.
Optionally, when the time of the timer reaches the minimum value of the enabled duration interval corresponding to the first usage phase, the terminal determines to enter the first usage phase. Illustratively, in conjunction with the data in Table one, the terminal determines to enter the first usage phase when the timer time reaches 20 s.
When entering a first use stage, the terminal determines to remind according to a preset first target reminding mode, wherein the first target reminding mode at least comprises vibration reminding.
Wherein, the vibration duration and the vibration frequency of the vibration prompt are default of the system or set by a user. For example, the vibration alert indication vibrates at a vibration frequency of 10Hz for 2 s. The embodiment of the application does not limit the concrete mode of vibration reminding.
And 204B, when the second use stage is entered, determining a second target reminding mode corresponding to the second use stage, wherein the second target reminding mode comprises at least one of the first target reminding mode and the ringing reminding mode.
Optionally, the second target reminding mode may be the same as the first target reminding mode, or a ring alert may be added on the basis of the first target reminding mode, or only a ring alert may be performed.
Optionally, when it is detected that the first usage phase enters the second usage phase, in order to achieve a more significant reminding effect, the terminal determines whether to add a ring reminder on the basis of the first target reminding mode according to the current environment volume. This step may include the following steps.
When the second use stage is entered, the volume of the environment is collected through the audio collection equipment.
When the terminal enters the second use stage, the terminal starts an audio acquisition device (such as a microphone) to acquire the environmental volume of the current environment.
And secondly, if the environment volume is larger than the volume threshold, determining that the second target reminding mode comprises the first target reminding mode and the ringing reminding mode.
When the environmental volume is larger than the volume threshold value, the current environment where the terminal is located is noisy, and in order to achieve a better reminding effect, the terminal determines the first target reminding mode and the ringing reminding mode as the second target reminding mode. When the use duration is subsequently reminded, the terminal can simultaneously carry out ringing reminding and vibration reminding. For example, the volume threshold may be 30 dB.
Optionally, the ring tone used in the ring alert is different from the incoming call notification ring tone, so that the user can distinguish the ring tone from the incoming call notification ring tone. And the ringing duration and the ringing volume of the ringing reminder are default for the system or set by the user.
And thirdly, if the environment volume is smaller than the volume threshold, determining that the second target reminding mode comprises the first target reminding mode.
When the environmental volume is smaller than the volume threshold, the current environment of the terminal is quiet, and in order to reduce the influence on the use process of the flashlight, the terminal determines the first target reminding mode as the second target reminding mode.
And 204C, when entering a third use stage, determining a third target reminding mode corresponding to the third use stage, wherein the third target reminding mode comprises at least one of a second target reminding mode and flash lamp flickering reminding.
Optionally, the third object reminding mode may be the same as the second object reminding mode, or flash light reminding may be added on the basis of the second object reminding mode, or flash light reminding may be performed only.
Optionally, when it is detected that the second usage phase enters the third usage phase, in order to achieve a more significant reminding effect, the terminal determines whether a flash lamp flashing reminding mode needs to be added on the basis of the second target reminding mode according to the current ambient light intensity. This step may include the following steps.
When the third use stage is started, the light intensity of the environment is collected through the light sensor.
When entering the third use stage, the terminal starts a light sensor (such as a front light sensor of the terminal) to collect the ambient light intensity of the current environment.
And secondly, if the intensity of the ambient light is greater than the intensity threshold value, determining that the third target reminding mode comprises a second target reminding mode and flash lamp flickering reminding.
When the intensity of the ambient light is greater than the intensity threshold value, the current environment of the terminal is bright, and accordingly the flashlight twinkles and cannot greatly affect the lighting of the mobile phone. Therefore, in order to achieve a better reminding effect, the terminal determines the second target reminding mode and the flash lamp flickering reminding mode as a third target reminding mode. When the use duration is subsequently reminded, the terminal can simultaneously carry out ringing reminding, vibration reminding and flash lamp flicker reminding. For example, the intensity threshold may be 50 cd.
Optionally, the flashing frequency and the flashing time length of the flashing light flashing reminder are default of the system or set by a user. For example, the flashing frequency of the flashing light flashing reminder is 2Hz, and the flashing duration is 3 s.
And thirdly, if the intensity of the ambient light is smaller than the intensity threshold, determining that the third target reminding mode comprises a second target reminding mode.
When the intensity of the ambient light is smaller than the intensity threshold value, the current environment of the terminal is dark, and accordingly flashlight flicker can greatly affect flashlight illumination. Therefore, in order to achieve a better reminding effect, the terminal determines the second target reminding mode as the third target reminding mode.
And step 205, carrying out service duration reminding by adopting a target reminding mode.
And according to the determined target reminding mode, the terminal further reminds the user of the use duration, and reminds the user of closing the flashlight function in time.
In combination with the step 204A, when the first usage stage is entered, the terminal performs vibration reminding.
With reference to step 204B, when the second use stage is entered, if the ambient volume is greater than the volume threshold, the terminal performs vibration reminding and ring reminding at the same time; and if the environmental volume is smaller than the volume threshold, the terminal only carries out vibration reminding.
With reference to step 204C, when entering the third use phase, if the ambient volume is greater than the volume threshold and the ambient light intensity is greater than the intensity threshold, the terminal performs flash alert while performing vibration alert and ring alert; if the ambient volume is greater than the volume threshold and the ambient light intensity is less than the intensity threshold, the terminal only carries out vibration reminding and ringing reminding; and if the ambient volume is smaller than the volume threshold and the ambient light intensity is smaller than the intensity threshold, the terminal only carries out vibration reminding.
In one possible application scenario, as shown in fig. 4, the user turns on the flashlight function in a well-lighted and noisy scenario. When the starting time reaches 20s, the terminal determines to enter a first use stage and carries out vibration reminding; when the starting time reaches 60s, the terminal determines to enter a second use stage, and simultaneously carries out vibration reminding and ringing reminding; and when the starting time length reaches 80s, the terminal determines to enter a third use stage, and simultaneously performs vibration reminding, ring reminding and flash lamp flickering reminding.
In other possible embodiments, when the flash supports brightness adjustment, the terminal gradually adjusts the brightness of the flash while performing use duration reminding when entering each use stage. The embodiments of the present application do not limit this.
And step 206, if the opening duration reaches the duration threshold, closing the flashlight function.
The implementation of this step is similar to the above step 104, and this embodiment is not described herein again.
As shown in fig. 4, when the on-duration of the flashlight function reaches 90s, the terminal automatically turns off the flashlight function.
In the embodiment, according to the current entering use stage, the terminal adopts different reminding modes to remind the user for the use duration, and along with the deepening of the use stage, the remarkable degree of the reminding mode is continuously improved, and a better reminding effect is achieved on the premise that the normal use of the flashlight function is not influenced.
In addition, in the embodiment, in the first use stage, a vibration reminding mode with the smallest influence degree is adopted for reminding; in the second use stage, according to the environmental volume, increasing a ringing reminding mode with smaller influence degree for reminding; in the third use stage, according to the ambient light intensity, the flash lamp flicker reminding mode with large influence degree is increased for reminding, the reminding significance degree is gradually increased, and a good reminding effect is achieved.
In addition, in this embodiment, the terminal adjusts the duration threshold and the duration of the use phase corresponding to each use phase according to the remaining power of the terminal, so that the duration of the terminal self-triggering automatic power-off function is shortened in the low power state, and the situation that the flash lamp is normally on and consumes too much power is avoided.
In the first use stage, if the use duration reminding is performed only by vibration, the user may not know the intention of the terminal vibration, so that in order to enable the user to accurately know the intention of the reminding, the first target reminding mode includes an interface notification reminding for displaying a notification message in an interface in addition to the vibration reminding. Correspondingly, when entering each use stage and reminding the use duration, the terminal can carry out interface notification reminding.
Schematically, as shown in fig. 5, when the terminal enters the first use stage, a notification frame 52 is displayed in the flashlight interface 51 while the terminal performs a vibration prompt to prompt the user to turn off the flashlight function as soon as possible.
Optionally, when the user needs to use the flashlight function for a long time, in order to avoid the automatic turning off of the flashlight function, on the basis of fig. 3, as shown in fig. 6, the following steps are further included after step 205.
Step 207, in any use stage, when a trigger signal for interface notification reminding is received, initializing the starting duration.
The trigger signal for the interface notification reminder may be a signal triggered when the close notification operation is performed. Illustratively, as shown in fig. 5, when receiving a click signal to the cancel button 53 in the notification box 52, the terminal determines that a trigger signal for the interface notification reminder is received.
After receiving the trigger signal, the terminal initializes the opening duration, that is, the opening duration is reset to 0. For example, the terminal initializes the start duration by resetting a timer.
After the starting time length is initialized, the terminal records the starting time length of the flashlight function again, so that the automatic closing time of the flashlight function is prolonged.
In this embodiment, when the terminal enters each use stage and performs the use duration reminding, the interface notification reminding is performed, so that the user can immediately know the reminding intention according to the interface notification reminding. Meanwhile, when a trigger signal for informing and reminding the interface is received, the terminal initializes the starting time, so that the time for automatically closing the flashlight by the terminal is prolonged, and the flashlight function is prevented from being automatically closed when the flashlight function is used for a long time.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 7, a block diagram of a flashlight control device according to an exemplary embodiment of the present application is shown. This flashlight controlling means is provided with the flash light, and the device includes: an opening module 710, an obtaining module 720, a reminding module 730, and a closing module 740.
The starting module 710 is used for starting the flash lamp when the flashlight function is started;
an obtaining module 720, configured to obtain a starting duration of the flashlight function;
the reminding module 730 is used for reminding the using time length by adopting a reminding mode corresponding to the starting time length when the starting time length does not reach the time length threshold value;
and a closing module 740, configured to close the flashlight function when the opening duration reaches the duration threshold.
Optionally, the reminding module 730 includes:
the first determining unit is used for determining the use stage to which the starting time length belongs if the starting time length does not reach the time length threshold;
the second determining unit is used for determining a target reminding mode corresponding to the ith using stage when the ith using stage is entered, wherein i is more than or equal to 1, and i is an integer;
and the reminding unit is used for reminding the using time length by adopting the target reminding mode.
Optionally, the reminding unit is configured to:
when a first use stage is entered, determining a first target reminding mode corresponding to the first use stage, wherein the first target reminding mode at least comprises a vibration reminding;
when entering a second use stage, determining a second target reminding mode corresponding to the second use stage, wherein the second target reminding mode comprises at least one of the first target reminding mode and a ringing reminding mode;
and when a third use stage is entered, determining a third target reminding mode corresponding to the third use stage, wherein the third target reminding mode comprises at least one of the second target reminding mode and flash lamp flickering reminding.
Optionally, the reminding unit is configured to:
when the second use stage is entered, acquiring the environmental volume through audio acquisition equipment;
if the environment volume is larger than a volume threshold, determining that the second target reminding mode comprises the first target reminding mode and the ring reminding mode;
and if the environment volume is smaller than the volume threshold, determining that the second target reminding mode comprises the first target reminding mode.
Optionally, the reminding unit is configured to:
when entering the third use stage, acquiring the ambient light intensity through a light sensor;
if the ambient light intensity is greater than the intensity threshold, determining that the third target reminding mode comprises the second target reminding mode and the flash lamp flickering reminding;
and if the intensity of the ambient light is smaller than the intensity threshold, determining that the third target reminding mode comprises the second target reminding mode.
Optionally, the first target reminding mode further includes an interface notification reminder, where the interface notification reminder is used to display a notification message in an interface;
the device further comprises:
and the initialization module is used for initializing the starting duration when a trigger signal for notifying the interface is received in any use stage.
Optionally, the apparatus further comprises:
the determining module is used for determining the duration threshold and the duration of the use stage corresponding to each use stage according to the remaining capacity of the terminal, wherein the duration of the use stage is in positive correlation with the remaining capacity of the terminal, and the duration threshold is in positive correlation with the remaining capacity of the terminal.
To sum up, in the embodiment of the application, after the terminal starts the flashlight function and turns on the flash lamp, by acquiring the turning-on duration of the flashlight function, when the turning-on duration does not reach the duration threshold, the use duration is reminded in a corresponding reminding mode so as to remind a user to turn off the flashlight function, and the flash lamp is prevented from being normally on; and when the opening duration reaches the duration threshold, the flashlight function is automatically closed, so that the damage to the flash lamp hardware caused by opening the flashlight function for a long time is avoided. The terminal automatically executes the reminding of the using time and the automatic closing operation according to the opening time of the flashlight function, and avoids hardware damage caused by the fact that the flashlight is normally on the premise that the normal use of the flashlight function is not influenced.
In the embodiment, according to the current entering use stage, the terminal adopts different reminding modes to remind the user for the use duration, and along with the deepening of the use stage, the remarkable degree of the reminding mode is continuously improved, and a better reminding effect is achieved on the premise that the normal use of the flashlight function is not influenced.
In addition, in the embodiment, in the first use stage, a vibration reminding mode with the smallest influence degree is adopted for reminding; in the second use stage, according to the environmental volume, increasing a ringing reminding mode with smaller influence degree for reminding; in the third use stage, according to the ambient light intensity, the flash lamp flicker reminding mode with large influence degree is increased for reminding, the reminding significance degree is gradually increased, and a good reminding effect is achieved.
In addition, in this embodiment, the terminal adjusts the duration threshold and the duration of the use phase corresponding to each use phase according to the remaining power of the terminal, so that the duration of the terminal self-triggering automatic power-off function is shortened in the low power state, and the situation that the flash lamp is normally on and consumes too much power is avoided.
In this embodiment, when the terminal enters each use stage and performs the use duration reminding, the interface notification reminding is performed, so that the user can immediately know the reminding intention according to the interface notification reminding. Meanwhile, when a trigger signal for informing and reminding the interface is received, the terminal initializes the starting time, so that the time for automatically closing the flashlight by the terminal is prolonged, and the flashlight function is prevented from being automatically closed when the flashlight function is used for a long time.
It should be noted that, when the device provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the terminal may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Referring to fig. 8, a block diagram of a terminal according to an exemplary embodiment of the present application is shown. The terminal includes a processor 1010, a memory 1020, and a display 1030.
Processor 1010 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP. The processor 1010 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
The memory 1020 is connected to the processor 1010 through a bus or other means, and at least one instruction, at least one program, a set of codes, or a set of instructions is stored in the memory 1020, and is loaded and executed by the processor 1010 to implement the user interface display method according to the above embodiments. The memory 1020 may be a volatile memory (volatile memory), a non-volatile memory (non-volatile memory), or a combination thereof. The volatile memory may be a random-access memory (RAM), such as a Static Random Access Memory (SRAM) or a Dynamic Random Access Memory (DRAM). The non-volatile memory may be a Read Only Memory (ROM), such as a Programmable Read Only Memory (PROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM). The non-volatile memory may also be a flash memory, a magnetic memory, such as a magnetic tape, a floppy disk, or a hard disk. The non-volatile memory may also be an optical disc.
The display screen 1030 is coupled to the processor 1010 via a bus or other means. The memory 1020 stores at least one instruction that is loaded and executed by the processor 1010 to implement the flashlight control method according to the above embodiments.
In the embodiment of the application, the terminal is further provided with a flash lamp, and the flash lamp is used for achieving the flashlight function.
The embodiment of the present application further provides a computer-readable medium, where at least one instruction is stored, and the at least one instruction is loaded and executed by the processor to implement the flashlight control method according to the above embodiments.
The embodiment of the present application further provides a computer program product, where at least one instruction is stored, and the at least one instruction is loaded and executed by the processor to implement the flashlight control method according to the above embodiments.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims (9)
1. A flashlight control method is characterized by being used for a terminal provided with a flashlight, and the method comprises the following steps:
when the flashlight function is started, the flash lamp is started;
acquiring the starting time of the flashlight function;
if the starting time length does not reach a time length threshold value, determining a use stage to which the starting time length belongs;
when a first use stage is entered, determining a first target reminding mode corresponding to the first use stage, and carrying out use duration reminding by adopting the first target reminding mode, wherein the first target reminding mode at least comprises vibration reminding;
when entering a second use stage, determining a second target reminding mode corresponding to the second use stage, and carrying out service duration reminding by adopting the second target reminding mode, wherein the second target reminding mode comprises at least one of the first target reminding mode and ring reminding;
and if the opening duration reaches the duration threshold, closing the flashlight function.
2. The method of claim 1, further comprising:
and when a third use stage is entered, determining a third target reminding mode corresponding to the third use stage, wherein the third target reminding mode comprises at least one of the second target reminding mode and flash lamp flickering reminding.
3. The method according to claim 1, wherein the determining a second target reminding manner corresponding to a second usage phase when entering the second usage phase comprises:
when the second use stage is entered, acquiring the environmental volume through audio acquisition equipment;
if the environment volume is larger than a volume threshold, determining that the second target reminding mode comprises the first target reminding mode and the ring reminding mode;
and if the environment volume is smaller than the volume threshold, determining that the second target reminding mode comprises the first target reminding mode.
4. The method according to claim 2, wherein the determining a third target reminding manner corresponding to a third usage phase when entering the third usage phase comprises:
when entering the third use stage, acquiring the ambient light intensity through a light sensor;
if the ambient light intensity is greater than the intensity threshold, determining that the third target reminding mode comprises the second target reminding mode and the flash lamp flickering reminding;
and if the intensity of the ambient light is smaller than the intensity threshold, determining that the third target reminding mode comprises the second target reminding mode.
5. The method of any one of claims 1 to 4, wherein the first target alert mode further comprises an interface notification alert, wherein the interface notification alert is used for displaying a notification message in an interface;
the method further comprises the following steps:
and in any use stage, initializing the starting time when a trigger signal for notifying the interface is received.
6. The method according to any one of claims 1 to 4, wherein before determining the usage phase to which the on-time period belongs, the method further comprises:
and determining the duration threshold value and the duration of the use stage corresponding to each use stage according to the remaining capacity of the terminal, wherein the duration of the use stage is in positive correlation with the remaining capacity of the terminal, and the duration threshold value is in positive correlation with the remaining capacity of the terminal.
7. A flashlight control device, characterized in that the device is provided with a flashlight, the device comprising:
the starting module is used for starting the flash lamp when the flashlight function is started;
the acquisition module is used for acquiring the starting duration of the flashlight function;
the reminding module is used for determining the use stage to which the starting duration belongs when the starting duration does not reach a duration threshold; when a first use stage is entered, determining a first target reminding mode corresponding to the first use stage, and carrying out use duration reminding by adopting the first target reminding mode, wherein the first target reminding mode at least comprises vibration reminding; when entering a second use stage, determining a second target reminding mode corresponding to the second use stage, and carrying out service duration reminding by adopting the second target reminding mode, wherein the second target reminding mode comprises at least one of the first target reminding mode and ring reminding;
and the closing module is used for closing the flashlight function when the opening duration reaches the duration threshold value.
8. A terminal, characterized in that the terminal comprises a processor and a memory, wherein the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the flashlight control method according to any one of claims 1 to 6.
9. A computer-readable storage medium having stored thereon at least one instruction, which is loaded and executed by a processor to implement a flashlight control method according to any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810698552.2A CN109068456B (en) | 2018-06-29 | 2018-06-29 | Flashlight control method, flashlight control device, terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810698552.2A CN109068456B (en) | 2018-06-29 | 2018-06-29 | Flashlight control method, flashlight control device, terminal and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109068456A CN109068456A (en) | 2018-12-21 |
CN109068456B true CN109068456B (en) | 2019-12-31 |
Family
ID=64818490
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810698552.2A Active CN109068456B (en) | 2018-06-29 | 2018-06-29 | Flashlight control method, flashlight control device, terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109068456B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109995923A (en) * | 2019-03-28 | 2019-07-09 | Oppo广东移动通信有限公司 | A kind of flashlight control method, flashlight control device and terminal device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103607822A (en) * | 2013-11-25 | 2014-02-26 | 广东欧珀移动通信有限公司 | Over-temperature protection method and device of flashlight of terminal |
CN104540289A (en) * | 2014-12-29 | 2015-04-22 | 联想(北京)有限公司 | Backlight display control method and electronic device |
US9247609B2 (en) * | 2011-05-20 | 2016-01-26 | Samsung Electronics Co., Ltd. | Apparatus and method for controlling flash in portable terminal |
CN106102265A (en) * | 2016-06-14 | 2016-11-09 | 捷开通讯(深圳)有限公司 | There is means of illumination and the device of timing function |
CN106302993A (en) * | 2016-07-29 | 2017-01-04 | 维沃移动通信有限公司 | The control method of pocket lamp and mobile terminal |
CN106535434A (en) * | 2016-11-29 | 2017-03-22 | 维沃移动通信有限公司 | Method for controlling flash lamp of mobile terminal and mobile terminal |
-
2018
- 2018-06-29 CN CN201810698552.2A patent/CN109068456B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9247609B2 (en) * | 2011-05-20 | 2016-01-26 | Samsung Electronics Co., Ltd. | Apparatus and method for controlling flash in portable terminal |
CN103607822A (en) * | 2013-11-25 | 2014-02-26 | 广东欧珀移动通信有限公司 | Over-temperature protection method and device of flashlight of terminal |
CN104540289A (en) * | 2014-12-29 | 2015-04-22 | 联想(北京)有限公司 | Backlight display control method and electronic device |
CN106102265A (en) * | 2016-06-14 | 2016-11-09 | 捷开通讯(深圳)有限公司 | There is means of illumination and the device of timing function |
CN106302993A (en) * | 2016-07-29 | 2017-01-04 | 维沃移动通信有限公司 | The control method of pocket lamp and mobile terminal |
CN106535434A (en) * | 2016-11-29 | 2017-03-22 | 维沃移动通信有限公司 | Method for controlling flash lamp of mobile terminal and mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN109068456A (en) | 2018-12-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107134823B (en) | Charging prompting method and device | |
US7970272B2 (en) | Method and apparatus for power management in an electronic device | |
CN105635467B (en) | Mobile terminal and reminding method thereof | |
WO2000046933A1 (en) | System and method for power conservation in a wireless communication handset | |
CA2596748C (en) | Method and apparatus for power management in an electronic device | |
EP3133466B1 (en) | Method and device for reminding in shutdown state | |
CN103199310A (en) | Battery power guaranteeing method and battery power guaranteeing apparatus for portable electronic product, and mobile terminal | |
CN103607758A (en) | Terminal screen power saving processing method, device thereof and terminal | |
CN109966808B (en) | Filter element detection method and device, readable storage medium and electronic equipment | |
WO2020103017A1 (en) | Power-on process control method, power-on process control apparatus and terminal device | |
CN105245718A (en) | Control method and device of breathing lamp and mobile terminal | |
CN109068456B (en) | Flashlight control method, flashlight control device, terminal and storage medium | |
TW201516648A (en) | Method and system for controlling mobile device at low battery state to boot-up | |
CN110032431A (en) | Application processing method and device, electronic equipment, computer readable storage medium | |
CN105791547B (en) | Information sending method and device and mobile terminal | |
CN106982300B (en) | Terminal device control method and device | |
CN108012027B (en) | Method and device for managing application program | |
JP2005309751A (en) | Electronic equipment, power saving control method for electronic equipment and recording medium with program recorded for executing the method | |
US20070218859A1 (en) | Method for switching operation modes of a mobile communication apparatus | |
CN111290565A (en) | Doze mode control method, device, terminal and storage medium | |
CN106791089B (en) | Method and device for prompting battery electric quantity | |
CN113258655B (en) | Electric quantity control method and device, electronic equipment and storage medium | |
CN114239309A (en) | Method, circuit, device, circuit and storage medium for determining service life of filter screen | |
CN105472110B (en) | Incoming call automatic processing system and method | |
CN112689975B (en) | Message reminding method, message reminding device and mobile terminal |
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 |