[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN108650411B - Flash lamp control method, terminal and computer storage medium - Google Patents

Flash lamp control method, terminal and computer storage medium Download PDF

Info

Publication number
CN108650411B
CN108650411B CN201810368571.9A CN201810368571A CN108650411B CN 108650411 B CN108650411 B CN 108650411B CN 201810368571 A CN201810368571 A CN 201810368571A CN 108650411 B CN108650411 B CN 108650411B
Authority
CN
China
Prior art keywords
flash lamp
state
terminal
environmental
flash
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
CN201810368571.9A
Other languages
Chinese (zh)
Other versions
CN108650411A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810368571.9A priority Critical patent/CN108650411B/en
Publication of CN108650411A publication Critical patent/CN108650411A/en
Application granted granted Critical
Publication of CN108650411B publication Critical patent/CN108650411B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/74Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Environmental & Geological Engineering (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

The embodiment of the application discloses a control method of a flash lamp, which is applied to a terminal and comprises the following steps: the method comprises the steps of acquiring the state of a flash lamp when a starting instruction of the flash lamp of a terminal is received, updating the state of the flash lamp with a fault state to a normal state when the state of the flash lamp is determined to be the fault state, and responding to the starting instruction to control the starting of the flash lamp in the normal state. The embodiment of the application also provides a terminal and a computer storage medium.

Description

Flash lamp control method, terminal and computer storage medium
Technical Field
The present disclosure relates to a flash reset technology, and in particular, to a flash control method, a terminal and a computer storage medium.
Background
With the rapid development of the terminal, people often use the camera function of the terminal to take pictures, when a user takes pictures in a scene with weak light or at night, a flash lamp in the terminal needs to be turned on, but the user can meet various environments in the process of using the terminal, and some abnormalities can occur in the use process of the terminal in some environments.
For example, a short Circuit phenomenon may occur in a flash lamp in an environment with heavy moisture, in order to avoid the short Circuit phenomenon of the flash lamp, a short Circuit protection mechanism of a trigger Integrated Circuit (IC) is adopted to stop the flash lamp, however, in order to resume normal operation of the flash lamp, the terminal is usually required to be restarted to release the state, and resume the function of using the flash lamp, if the terminal is not restarted, the function of using the flash lamp cannot be resumed, and a user mistakenly assumes that the flash lamp is damaged.
However, the above-mentioned process of recovering the state of the flash lamp is cumbersome, and the success rate of turning on the flash lamp is reduced, thereby affecting the working efficiency of the flash lamp.
Disclosure of Invention
The embodiment of the application is expected to provide a control method of a flash lamp, a terminal and a computer storage medium, which can simplify the process of recovering the state of the flash lamp, improve the success rate of starting the flash lamp and further improve the working efficiency of the flash lamp.
The technical scheme of the application is realized as follows:
the embodiment of the application provides a control method of a flash lamp, which comprises the following steps:
acquiring the state of a flash lamp when a starting instruction of the flash lamp of the terminal is received;
when the state of the flash lamp is determined to be a fault state, updating the state of the flash lamp from the fault state to a normal state, wherein the fault state is used for indicating that the flash lamp is prohibited to be started, and the normal state is used for indicating that the flash lamp is started;
and in the normal state, responding to the starting instruction and controlling the starting of the flash lamp.
In the above method, the updating the state of the flash from the fault state to a normal state includes:
detecting an environment index of an environment where the flash lamp is located;
judging whether the environmental index meets a preset environmental condition;
and updating the state of the flash lamp from the fault state to the normal state when the environmental index is determined to meet the preset environmental condition.
In the above method, the determining that the environmental indicator satisfies the preset environmental condition includes:
when the environmental index is determined to meet a preset environmental humidity condition, determining that the environmental index meets the preset environmental condition; and/or the presence of a gas in the gas,
and when the environmental index is determined to meet the preset environmental temperature condition, determining that the environmental index meets the preset environmental condition.
In the above method, after determining whether the environmental indicator satisfies a preset environmental condition, the method further includes:
and when the environmental index is determined not to meet the preset environmental condition, maintaining the state of the flash lamp as the fault state.
In the above method, after maintaining the state of the flash lamp in the failure state when it is determined that the environmental index does not satisfy the preset environmental condition, the method further includes:
and generating first notification information to remind that the environmental index is unqualified and the flash lamp cannot be recovered temporarily.
In the above method, after controlling the activation of the flash in response to the on command in the normal state, the method further includes:
updating the state of the flash lamp to the fault state when it is determined that the flash lamp fails to be turned on;
and generating second notification information to remind that the flash lamp is damaged and cannot be recovered.
In the above method, after the first notification message is generated to remind that the environmental indicator is not qualified and the flash lamp cannot be recovered temporarily, or after the second notification message is generated to remind that the flash lamp is damaged and cannot be recovered, the method further includes:
starting a display window of a current application interface;
and displaying the first notification information in the display window to remind that the environmental index is unqualified and the flash lamp cannot be recovered temporarily, or displaying the second notification information in the display window to remind that the flash lamp is damaged and cannot be recovered.
An embodiment of the present application provides a terminal, including:
the terminal comprises an acquisition unit, a processing unit and a control unit, wherein the acquisition unit is used for acquiring the state of a flash lamp when receiving a starting instruction of the flash lamp of the terminal;
the updating unit is used for updating the state of the flash lamp from the fault state to a normal state when the state of the flash lamp is determined to be the fault state, wherein the fault state is used for indicating that the flash lamp is prohibited to be started, and the normal state is used for indicating that the flash lamp is started;
and the control unit is used for responding to the starting instruction and controlling the starting of the flash lamp in the normal state.
In the above terminal, the update unit updates the state of the flash from the failure state to a normal state, and the update unit further includes: the device comprises a detection subunit, a judgment subunit and an updating subunit;
the detection subunit is used for detecting an environment index of an environment where the flash lamp is located;
the judging subunit is configured to judge whether the environmental index meets a preset environmental condition;
and the updating subunit is used for updating the state of the flash lamp from the fault state to the normal state when the environmental index is determined to meet the preset environmental condition.
In the above terminal, when the updating subunit determines that the environmental indicator satisfies the preset environmental condition, the updating subunit is specifically configured to:
when the environmental index is determined to meet a preset environmental humidity condition, determining that the environmental index meets the preset environmental condition; and/or the presence of a gas in the gas,
and when the environmental index is determined to meet the preset environmental temperature condition, determining that the environmental index meets the preset environmental condition.
In the above terminal, the terminal further includes: a maintaining unit;
the maintaining unit is used for maintaining the state of the flash lamp to be the fault state when the updating unit determines that the environmental index does not meet the preset environmental condition after judging whether the environmental index meets the preset environmental condition.
In the above terminal, the terminal further includes: a first notification unit;
the first notification unit is configured to, after the maintaining unit determines that the environmental indicator does not meet the preset environmental condition and maintains the state of the flash lamp as the fault state, generate first notification information to remind that the environmental indicator is unqualified and that the flash lamp cannot be recovered temporarily.
In the above terminal, the terminal further includes: a second notification unit;
the updating unit is further used for responding to the starting instruction when the control unit is in the normal state, controlling the starting of the flash lamp, and updating the state of the flash lamp to be the fault state when the flash lamp is determined to fail to be started;
and the second notification unit is used for generating second notification information to remind that the flash lamp is damaged and cannot be recovered.
In the above terminal, the terminal further includes: a starting unit and a display unit;
the starting unit is used for starting a display window of a current application interface after the first notification unit generates the first notification information to remind that the environmental index is unqualified and the flash lamp cannot be recovered temporarily, or the second notification unit generates the second notification information to remind that the flash lamp is damaged and cannot be recovered;
the display unit is used for displaying the first notification information in the display window to remind that the environmental index is unqualified and the flash lamp cannot be recovered temporarily, or displaying the second notification information in the display window to remind that the flash lamp is damaged and cannot be recovered.
The embodiment of the application also provides a terminal, a processor and a storage medium storing the executable instructions of the processor, wherein the storage medium depends on the processor to execute operation through a communication bus, and when the instructions are executed by the processor, the control method of the flash lamp is executed.
Embodiments of the present application provide a computer storage medium storing executable instructions that, when executed by one or more processors, perform a method of controlling a flash.
The embodiment of the application provides a flash lamp control method, a terminal and a computer storage medium, wherein the method is applied to the terminal and comprises the following steps: firstly, when a starting instruction of a flash lamp of a terminal is received, acquiring a flash state, and when the flash lamp state is determined to be a fault state, which indicates that the flash lamp is in fault and cannot respond to the starting instruction, updating the flash lamp state from the fault state to a normal state so as to respond to the received starting instruction of the flash lamp, so that the terminal can respond to the starting instruction and then start the flash lamp in the normal state; that is to say, in the embodiment of the present application, the state of the flash lamp can be timely updated from the fault state to the normal state by updating the state of the flash lamp, so that the process of recovering the state of the flash lamp is simplified, the success rate of turning on the flash lamp is improved, and the working efficiency of the flash lamp is improved.
Drawings
Fig. 1 is a schematic flowchart of an alternative control method for a flash lamp according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of another alternative control method for a flash lamp according to an embodiment of the present disclosure;
fig. 3 is a schematic layout diagram of an optional display interface displaying first notification information according to an embodiment of the present disclosure;
fig. 4 is a schematic layout view of another optional display interface displaying first notification information according to an embodiment of the present application;
fig. 5 is a first schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
Example one
Fig. 1 is a schematic flow diagram of a method for controlling an optional flash lamp provided in an embodiment of the present application, and referring to fig. 1, the method for controlling a flash lamp may include:
s101: acquiring the state of a flash lamp when a flash lamp starting instruction of a terminal is received;
in practical application, a user opens a camera application in a terminal, and when entering a photographing function, the user can select to turn on a flash or not turn on the flash, and the user can turn on the flash under the following conditions: when the light is insufficient, a flash lamp is used for supplementing light, or the color can be corrected by the flash lamp when the color is deviated, or the contrast can be reduced by the flash lamp when the contrast is large, so that the visual effect of the picture shot by the camera is compensated; in addition, the flash lamp of the terminal can be used as a flashlight, so that the flash lamp can play a role in illumination.
In particular, whether the flash lamp is used in a camera application or used as a flashlight, the flash lamp has certain requirements on environmental indexes during use, and in an actual environment, when the environment in which the flash lamp is located is relatively heavy in moisture or relatively high in temperature, normal operation of the flash lamp is affected, for example, when the environment in which the flash lamp is located is relatively heavy in moisture or relatively high in temperature, a phenomenon of short circuit of the flash lamp occurs.
In practical application, in order to avoid short circuit of the flash lamp, the short circuit of the flash lamp can be prevented by changing a physical structure, and the short circuit of the flash lamp can also be prevented by changing a circuit structure, for example, a transparent cover body is added and covers the flash lamp element and a flash lamp bonding pad, so that external water vapor or liquid and the like can be prevented from contacting with the flash lamp bonding pad and the flash lamp element, and the short circuit of a positive electrode and a negative electrode of the flash lamp element and the short circuit of a circuit board can be avoided; and an IC short-circuit protection mechanism can be realized by connecting the flash lamp into an IC short-circuit protection circuit.
For short circuit of a flash lamp, firstly, whether the flash lamp is short-circuited is judged, for example, when a terminal detects that the current of the flash lamp is greater than a certain set threshold value, it is determined that the short circuit phenomenon of the flash lamp occurs at the moment, an IC short circuit protection mechanism needs to be started for the flash lamp, specifically, for different use scenes of the flash lamp, methods for judging whether the short circuit of the flash lamp occurs are different, for example, when the flash lamp is used in a camera application, when the current of the flash lamp is greater than 1.5A, the IC short circuit protection mechanism is started, when the flash lamp is used as a flashlight, when the current of the flash lamp is greater than 500mA, the IC short circuit protection mechanism is started, so that the phenomenon that the flash lamp is short.
That is to say, permanent damage to the flash lamp can be avoided by starting the IC short-circuit protection mechanism, but after the IC short-circuit protection mechanism is started, the state of the flash lamp is updated to a fault state, so that when a user wants to use the flash lamp again, the terminal needs to be restarted to update the state of the flash lamp from the fault state to a normal state, only the flash lamp in the normal state can respond to the start instruction to start the flash lamp, and thus, the user needs to recover the use function of the flash lamp through tedious operations, thereby affecting the use efficiency of the flash lamp by the user, and in order to avoid inconvenience brought to the user by the tedious operation steps, after the start instruction of the flash lamp of the terminal is received, the state of the flash lamp is acquired.
The received command for turning on the flash of the terminal may be an operation of turning on the flash in a camera application by a user, a command for turning on a flashlight by the user, or a photographing operation of a selfie stick connected to the terminal by the user, which is not specifically limited in this embodiment of the present application.
In addition, it should be noted that the state of the flash may include a fault state and a normal state, and the state of the flash may be implemented by a register in the terminal, where a fault flag bit of the flash is set in the register, for example, when the fault flag bit of the flash is set, it indicates that the flash is in the fault state, when the fault flag bit of the flash is reset, it indicates that the flash is in the normal state, in another example, when the fault flag bit of the flash is set, it indicates that the flash is in the normal state, and when the fault flag bit of the flash is reset, it indicates that the flash is in the fault state.
The control method of the flash lamp provided by the embodiment of the application can be realized in the kernel, the driver in the kernel is used for controlling hardware equipment, namely, the flash lamp is turned on and off, and belongs to a bottom service, and the system is used for issuing commands and belongs to an upper service.
The terminal may be an electronic device such as a smart phone, a tablet computer, and a camera, and the embodiment of the present application is not limited to this.
S102: when the state of the flash lamp is determined to be a fault state, updating the state of the flash lamp from the fault state to a normal state, wherein the fault state is used for indicating that the flash lamp is forbidden to be started, and the normal state is used for indicating that the flash lamp is started;
in S102, it is first determined whether the flash status is a fault status, and in the specific implementation process, the following may be implemented by a fault flag bit of a register in the terminal: and when the fault flag bit in the register is set, determining that the state of the flash lamp is a fault state, and when the fault flag bit in the register is reset, determining that the state of the flash lamp is a normal state.
Here, when the state of the flash is determined to be a failure state, the failure cause of the flash may be: the fault state caused by starting the IC short-circuit protection mechanism by preventing the flash lamp from short-circuiting can also be as follows: the failure state caused by damaging the flash lamp is not particularly limited in the embodiments of the present application.
In practical application, when the flash lamp is in a working state, if the environment humidity of the flash lamp is heavy or the environment temperature is high, the terminal starts an IC short-circuit protection mechanism and sets a fault flag bit in the register, so that the flash lamp stops working temporarily, and the flash lamp can be prevented from being burnt out to cause permanent damage to the flash lamp.
Then, when the flash lamp is in the suspended working state, after the terminal receives a turn-on instruction of turning off the flash lamp, the terminal reads the value of the fault flag bit of the flash lamp from the register, and if the fault flag bit of the flash lamp in the register is determined, the state of the flash lamp is determined to be the fault state.
Because the fault state of the flash lamp caused by starting the IC short-circuit protection mechanism belongs to a temporary failure state, and the flash lamp is not damaged and can be recovered, in order to avoid that the flash lamp is in the fault state for a long time caused by starting the IC short-circuit protection mechanism of the flash lamp, the normal operation of the flash lamp needs to be recovered as soon as possible, in practical application, the terminal can reset the fault flag bit in the register so as to update the state of the flash lamp to the normal state, and thus, the inconvenience brought to a user by the temporary invalidation of the flash lamp can be eliminated in time.
It can be understood that, a user has a certain requirement on an environment index when using a flash lamp, if the terminal determines that the environment index of the flash lamp does not meet a condition for requesting to turn on the flash lamp by detecting the environment index of an environment where the flash lamp is located, if the terminal also turns on the flash lamp, a flash of the flash lamp may be caused, so that the flash lamp may be completely flashed, and based on this, to avoid a bad use of the flash lamp, in an alternative embodiment, fig. 2 is a schematic flow chart of another alternative flash lamp control method provided in this embodiment of the present application, referring to fig. 2, in S102, after determining that the state of the flash lamp is a fault state, updating the state of the flash lamp from the fault state to a normal state, which may include:
s201: detecting an environment index of an environment where a flash lamp is located;
s202: judging whether the environmental index meets a preset environmental condition;
s203: and updating the state of the flash lamp from the fault state to the normal state when the environmental index meets the preset environmental condition.
That is to say, when the state of acquiring the flash lamp is the fault state, the environment index of the environment where the flash lamp is located is detected first, for example, the terminal control humidity sensor detects the environment humidity, and/or the terminal control temperature sensor detects the environment temperature, then whether the environment index meets the preset environment condition is judged based on the detected environment humidity and/or environment temperature, if the environment index meets the requirement, the flash lamp can be turned on, and the flash lamp can be in the stable state after the flash lamp is turned on.
It can be understood that, in the terminal, the user may set a preset environmental condition according to an influence of an environmental indicator on the flash lamp in an actual application environment, and in a specific implementation process, determining that the environmental indicator satisfies the preset environmental condition in S203 may include:
when the environmental index is determined to meet the preset environmental humidity condition, determining that the environmental index meets the preset environmental condition; and/or the presence of a gas in the gas,
and when the environmental index is determined to meet the preset environmental temperature condition, determining that the environmental index meets the preset environmental condition.
Specifically, since the short circuit of the flash lamp is caused by the excessive environmental moisture or the excessive environmental temperature of the environment where the flash lamp is located, the terminal may be preset with an environmental humidity condition and/or an environmental temperature condition, for example, an environmental humidity range and an environmental temperature range may be preset, where the environmental humidity range and the environmental temperature range belong to an environmental index range in which the flash lamp can stably operate, the environmental humidity range and the environmental temperature range may be determined according to the results of multiple tests, and the environmental humidity ranges set for the flash lamps of different materials are different, and the environmental temperature ranges set for the flash lamps of different materials are different; and when the environmental humidity in the environmental index falls into a preset environmental humidity range and/or the environmental temperature in the environmental index falls into a preset environmental temperature range, determining that the environmental index meets a preset environmental condition.
In this embodiment of the present application, if an ambient humidity range and an ambient temperature range are set, determining that the environmental index meets the preset environmental condition may be implemented by one or more of the following ways:
one is to determine that the environmental humidity in the environmental index falls into a preset environmental humidity range, which indicates that the environmental humidity at the moment belongs to the normal working range of the flash lamp, and determine that the environmental index meets the preset environmental condition; the other is that the environmental temperature in the environmental index falls into a preset environmental temperature range, which indicates that the environmental temperature at the moment belongs to the normal working range of the flash lamp, and the environmental index is determined to meet the preset environmental condition; the other method is that the environment humidity in the environment index is determined to fall into a preset environment humidity range, and the environment temperature in the environment index falls into a preset environment temperature range, which indicates that the environment humidity and the environment temperature at the moment both belong to the normal working range of the flash lamp, and the environment index is determined to meet the preset environment condition; here, it should be noted that the present embodiment is not particularly limited to this.
The environmental index in the embodiment of the present application may further include a dust content in an environment around the flash lamp, and the like, and is not limited to the above-mentioned ambient humidity and ambient temperature.
In S202, in determining whether the environmental indicator satisfies the preset environmental condition, the determination result may be that the environmental indicator satisfies the preset environmental condition, and the determination result may also be that the environmental indicator does not satisfy the preset environmental condition, in an optional embodiment, the method may further include:
and when the environmental index is determined not to meet the preset environmental condition, maintaining the state of the flash lamp as a fault state.
That is, the terminal determines that the environmental index does not meet the preset environmental condition through judgment, which indicates that the environmental index of the flash lamp does not meet the requirement, at this time, if the fault flag bit of the flash lamp is reset, the flash lamp is successfully turned on in response to the turn-on instruction, when the flash lamp is in the working state, the terminal detects that the environmental index does not meet the preset environmental condition, the fault flag bit of the flash lamp in the register is set, the state of the flash lamp is updated to the fault state again, and the terminal turns off the flash lamp, so that the flash lamp is caused to be instantly flashed, and the flash lamp is possibly completely flashed; therefore, in order to avoid the poor use of the flash lamp, the service life of the flash lamp is prolonged, and the state of the flash lamp is maintained to be a fault state.
The fault state is used for forbidding response to the starting instruction, and the flash lamp in the fault state is controlled to be forbidden to be started, so that transient flash caused by the fact that environmental indexes do not meet requirements is avoided, and the flash lamp is protected.
When a user needs to use the flash lamp, a start instruction is sent to the flash lamp, the terminal receives the start instruction, and responds to the start instruction, at this time, the terminal may successfully start the flash lamp or may not start the flash lamp, and the user cannot know the reason why the flash lamp is not successfully started under the condition that the flash lamp is not successfully started, so that in order to enable the user to know the state fault reason of the flash lamp, in an optional embodiment, after the state of the flash lamp is maintained as a fault state when it is determined that an environmental index does not meet a preset environmental condition, the method may further include:
and generating first notification information to remind that the environmental index is unqualified and the flash lamp cannot be recovered temporarily.
It can be seen that when it is determined that the environmental index does not meet the preset environmental condition, the state of the flash lamp is maintained to be a fault state, that is, the environmental index does not meet the requirement, the response to the start instruction is forbidden, and the flash lamp in the fault state is controlled to be forbidden to be started;
here, the generated first notification information can be used for notifying that the environment index of the user of the terminal is unqualified, and the flash lamp cannot be recovered temporarily, so that the user can know the reason why the flash lamp cannot be started in time, and the flash lamp can be reasonably used by the user.
S103: and in a normal state, responding to the starting command and controlling the starting of the flash lamp.
After the state of the flash lamp is updated to the normal state in the step S102, the flash lamp can be normally turned on, so that the flash lamp is controlled to be turned on in response to the received turn-on instruction of the flash lamp, and thus, the function of the flash lamp can be timely restored by controlling the state of the flash lamp, the function of the flash lamp can be restored without restarting the terminal, for a user, the operation step of restoring the function of the flash lamp is simplified, and the user experience is improved.
In S103, the result of turning on the flash may be that the flash was successfully turned on, or may be that the flash was failed to be turned on, and in order to timely notify the user of the reason for the failed turn on when the flash was failed to be turned on, in an optional embodiment, after S103, the method may further include:
and when the failure of starting the flash lamp is determined, updating the state of the flash lamp to be a fault state, and generating second notification information to remind that the flash lamp is damaged and cannot be recovered.
Specifically, in the case where it is determined that the flash lamp has failed to be turned on, since the state of the flash lamp has been updated to the normal state in S102, if the flash lamp has not been temporarily disabled, the flash lamp can be successfully turned on, and therefore, if the flash lamp cannot be successfully turned on at this time, it is described that the reason why the flash lamp has failed is not that the IC short-circuit protection mechanism is activated, and the failure of the flash lamp is not temporarily disabled, and the state of the flash lamp is updated to the failure state.
In order to inform the user of the failure reason of the flash lamp, the user of the terminal can be informed that the flash lamp is damaged and cannot be recovered through the generated second informing information, so that the user can replace or repair the flash lamp part in the terminal in time under the condition that the user knows that the flash lamp is damaged.
It should be noted that, in order to enable a user of the terminal to timely know a cause of a failure of the flash, the first notification information or the second notification information generated by the terminal may be implemented in various ways, the terminal may display the first notification information or the second notification information through a display interface, or broadcast the first notification information or the second notification information through a voice prompt, specifically, the implementation may be implemented in a form of text information, a form of a specific symbol or a specific icon, or a form of a voice prompt, where the embodiment of the present application is not limited specifically.
First, as for the generated first notification information or second notification information, if the user of the terminal is notified in the form of text information, a specific symbol, or a specific icon, there are various implementations, and generally, the first notification information or the second notification information may be transmitted to a status bar of a display unit of the terminal by displaying a status bar of an interface, and the text information corresponding to the first notification information or the second notification information, or the corresponding specific symbol, or the corresponding specific icon, may be displayed in the status bar of the display interface of the terminal.
That is, in the mode of displaying the first notification information or the second notification information through the status bar, the existence form of the first notification information or the second notification information in the status bar may be text information, a preset specific symbol, or a preset specific icon, and the embodiment of the present application is not particularly limited herein.
Specifically, the status bar of the display interface of the terminal generally displays some icons representing the current status of the terminal, for example, for a smart phone, the current time, the current signal strength, the remaining power, the name of the operator, and an application icon to which the current information to be processed belongs are generally displayed in the status bar of the display interface, and here, text information corresponding to the first notification information or the second notification information, or a corresponding specific symbol, or a corresponding specific icon, is sent to the status bar of the display unit of the terminal, so that the first notification information or the second notification information can be displayed in the status bar.
The display mode of the status bar may be a normal mode or a scroll mode, and the embodiment of the present application is not particularly limited herein.
For example, when the user sets the status bar to the normal mode, the first notification information may be set as a first specific symbol or a first specific icon, the second notification information may be set as a second specific symbol or a second specific icon, the terminal displays the first specific symbol or the first specific icon in the status bar of the display interface after the first notification information is generated, and the terminal displays the second specific symbol or the second specific icon in the status bar of the display interface after the second notification information is generated to notify the user of the terminal of the reason why the flash in the terminal has failed.
In another embodiment, when the user sets the status bar to the scroll mode, the first notification information or the second notification information may be set as text information, for example, the first notification information may be "environmental indicator is not qualified, flash cannot be recovered temporarily", and the second notification information may be "flash is broken, flash cannot be recovered"; after the first notification information or the second notification information is generated, the first notification information or the second notification information in the form of text information is displayed in a status bar of a display interface in a rolling manner to prompt a user of the terminal of a reason why a flash lamp in the terminal has a fault, and the user of the terminal can also preset the display duration of the first notification information or the second notification information in the status bar, for example, 5 minutes, and if the display duration is reached, the display of the first notification information or the second notification information in the status bar of the terminal is stopped.
Taking the first notification information as an example, fig. 3 is a schematic layout diagram of a selectable display interface displaying the first notification information provided in the embodiment of the present application, and referring to fig. 3, a user of a terminal is using a camera application, and a status bar of the display interface displays a name of an operator, a communication network system where the terminal is located, a remaining power of the terminal, and a current time; wherein, the camera needs to turn on the flash lamp to supplement the light in the picture, therefore, the user sends an opening instruction to the flash lamp, the terminal receives the opening instruction to the flash lamp, firstly reads the state of the flash lamp, if the state of the flash lamp is a fault state, detects the environmental humidity of the environment where the flash lamp is positioned, when it is determined that the environmental humidity does not fall within the preset environmental humidity range, determining that the environmental index does not satisfy the preset environmental condition, maintaining the state of the flash lamp as a failure state, generating first notification information, in this instance, a specific icon corresponding to the first notification information, which is an icon of a flash malfunction, therefore, in fig. 3, an icon indicating that the flash has failed is displayed in the status bar of the display interface, and this icon is used to notify the user of the terminal that the environmental indicator is not acceptable and that the flash cannot be recovered temporarily.
If the user of the terminal is notified in the form that the first notification information or the second notification information is text information, in the implementation process, after the first notification information is generated or after the second notification information is generated, the method may further include:
starting a display window of a current application interface;
and displaying first notification information in the display window to remind that the environmental index is unqualified and the flash lamp cannot be recovered temporarily, or displaying second notification information in the display window to remind that the flash lamp is damaged and cannot be recovered.
Specifically, in order to display the first notification information or the second notification information on the display interface of the terminal in the form of text information, after the first notification information or the second notification information is generated, a display window of a current application interface of the terminal is started, wherein the position of the display window may be located at a specific position of the display interface, such as above or below the display interface, or may be suspended above the display interface, and wherein a user of the terminal may set the position of the display window on the display interface according to his or her preference.
For example, when the display window is set to suspend above the display interface, the display mode of the display window may be adjusted to a transparent mode, or may be set to a normal mode, where the display window in the normal mode blocks the display content of the current display interface under the display window, and the display window in the transparent mode may clearly see the display content of the current display interface under the display window, for example, when a user of the terminal opens the camera application, if the user sends an instruction to turn on the flash, but the flash cannot be turned on, a display window pops up on the display interface of the terminal, and if the display mode of the display window is the transparent mode, the user of the terminal may see the display content of the current display interface under the display window, for example, a current picture taken by the camera.
In the specific implementation process, the user of the terminal can also adjust the size of the display window suspended on the display interface and the position of the display window on the display interface, so that the size of the display window and the position of the display window on the interface are flexibly set, and the experience degree of the user is improved.
Still taking the first notification information as an example, after a user sends an instruction to turn on a flash lamp, and a terminal receives the instruction to turn off the flash lamp, the terminal first reads a state of the flash lamp, and if the state is a fault state, detects an ambient humidity of an environment where the flash lamp is located, and when it is determined that the ambient humidity does not fall within a preset ambient humidity range, determines that an environmental index does not satisfy a preset ambient condition, maintains the state of the flash lamp as the fault state, and generates the first notification information, in this example, the first notification information is sent to a display window of a display unit as text information, fig. 4 is a schematic configuration diagram of another optional display interface provided by the embodiment of the present application, referring to fig. 4, a floating display window is popped up on the display interface, and a display mode of the display window is set as a transparent mode, so, referring to fig. 4, the user can see the text information of the first notification information through the display window: "the environmental index is not good, and the flash cannot be recovered temporarily", and since the user sets the display mode of the display window to the transparent mode, the user can see the picture taken by the camera function under the display window, thus reducing the influence of the user on the use of the camera application.
Besides informing the user of the terminal of the fault reason of the flash lamp by means of text information, in an optional embodiment, the method may further include:
generating corresponding audio data according to the first notification information or the second notification information;
broadcasting the audio data corresponding to the first notification information to remind that the environmental index is unqualified and the flash lamp cannot be recovered temporarily;
or the audio data corresponding to the second notification information is broadcasted to remind that the flash lamp is damaged and cannot be recovered.
Specifically, for example, if the first notification information is taken as an example, in the corresponding audio data generated according to the first notification information, if the generated first notification information is text information, the text information may be converted into the audio data through an interface provided by a system of the terminal, and the text information may also be converted into the audio data through a third-party application in the terminal.
If the generated first notification information is a specific symbol or a specific icon, corresponding audio data may be set for the specific symbol or the specific icon, and when the specific symbol or the specific icon is generated, the found corresponding audio data is the audio data corresponding to the first notification information.
After the audio data corresponding to the first notification information is generated, the audio data is sent to a broadcasting unit of the terminal, so that a user of the terminal can know the reason why the flash off lamp in the terminal fails through the audio data broadcasted by broadcasting.
The user of the terminal may preset the number of times of broadcasting the audio data, may be set to a limited number of times, and may also be set to an unlimited number of times.
The embodiment of the application provides a control method of a flash lamp, which is applied to a terminal and comprises the following steps: firstly, when a starting instruction of a flash lamp of a terminal is received, acquiring a flash state, and when the flash lamp state is determined to be a fault state, which indicates that the flash lamp is in fault and cannot respond to the starting instruction, updating the flash lamp state from the fault state to a normal state so as to respond to the received starting instruction of the flash lamp, so that the terminal can respond to the starting instruction and then start the flash lamp in the normal state; that is to say, in the embodiment of the present application, the state of the flash lamp can be timely updated from the fault state to the normal state by updating the state of the flash lamp, so that the process of recovering the state of the flash lamp is simplified, the success rate of turning on the flash lamp is improved, and the working efficiency of the flash lamp is improved.
Example two
Fig. 5 is a first structural diagram of a terminal according to an embodiment of the present application, and as shown in fig. 5, a terminal 500 according to an embodiment of the present application is provided, where the terminal 500 may include:
an acquisition unit 51 configured to acquire a state of a flash when receiving a turn-on instruction of the flash of the terminal;
an updating unit 52 configured to update the status of the flash from a failure status indicating that the flash is prohibited from being turned on to a normal status indicating that the flash is turned on, when it is determined that the status of the flash is the failure status;
and a control unit 53 for controlling the start of the flash lamp in response to the start instruction in the normal state.
Optionally, the updating unit 52 updates the state of the flash from the fault state to the normal state, and the updating unit 52 may further include: the device comprises a detection subunit, a judgment subunit and an updating subunit;
the detection subunit is used for detecting the environment index of the environment where the flash lamp is located;
the judging subunit is used for judging whether the environmental index meets a preset environmental condition;
and the updating subunit is used for updating the state of the flash lamp from the fault state to the normal state when the environmental index is determined to meet the preset environmental condition.
Optionally, in the case that the update subunit determines that the environmental index meets the preset environmental condition, the update subunit is specifically configured to:
when the environmental index is determined to meet the preset environmental humidity condition, determining that the environmental index meets the preset environmental condition; and/or the presence of a gas in the gas,
and when the environmental index is determined to meet the preset environmental temperature condition, determining that the environmental index meets the preset environmental condition.
Optionally, the terminal may further include: a maintaining unit;
a maintaining unit for maintaining the state of the flash lamp as a failure state when it is determined that the environmental index does not satisfy the preset environmental condition after determining whether the environmental index satisfies the preset environmental condition.
Optionally, the terminal further includes: a first notification unit;
and the first notification unit is used for generating first notification information after the maintenance unit maintains the state of the flash lamp as a fault state when the environmental index is determined not to meet the preset environmental condition, and reminding that the environmental index is unqualified and the flash lamp cannot be recovered temporarily.
Optionally, the terminal may further include: a second notification unit;
an updating unit, further configured to respond to the start instruction when the control unit 53 is in the normal state, control the start of the flash lamp, and update the state of the flash lamp to the fault state when it is determined that the flash lamp fails to be started;
and the second notification unit is used for generating second notification information to remind that the flash lamp is damaged and cannot be recovered.
Optionally, the terminal may further include: a starting unit and a display unit;
the starting unit is used for starting a display window of the current application interface after the first notification unit generates first notification information to remind that the environmental index is unqualified and the flash lamp cannot be recovered temporarily, or after the second notification unit generates second notification information to remind that the flash lamp is damaged and cannot be recovered;
and the display unit is used for displaying the first notification information in the display window to remind that the environmental index is unqualified and the flash lamp cannot be recovered temporarily, or displaying the second notification information in the display window to remind that the flash lamp is damaged and cannot be recovered.
In practical applications, the acquiring Unit 51, the updating Unit 52, the control Unit 53, the detecting sub-Unit, the determining sub-Unit, the updating sub-Unit, the maintaining Unit, the first notifying Unit, the second notifying Unit, the starting Unit and the display Unit may be implemented by a processor located on the terminal 500, specifically, a Central Processing Unit (CPU), a Microprocessor Unit (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like.
Fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application, and as shown in fig. 6, an embodiment of the present application provides a terminal 600, including:
a processor 61 and a storage medium 62 storing instructions executable by the processor 61, wherein the storage medium 62 depends on the processor 61 to perform operations through a communication bus 63, and when the instructions are executed by the processor 61, the method for controlling a flash according to the first embodiment is performed.
It should be noted that, in practical applications, the various components in the terminal are coupled together by a communication bus 63. It will be appreciated that the communication bus 63 is used to enable communications among the components. The communication bus 63 includes a power bus, a control bus, and a status signal bus, in addition to a data bus. But for clarity of illustration the various buses are labeled in figure 6 as communication bus 63.
It can be understood that the state of the flash lamp can be timely updated from the fault state to the normal state by updating the state of the flash lamp, so that the step of recovering the state of the flash lamp is simplified, the success rate of starting the flash lamp is improved, and the working efficiency of the flash lamp is improved.
Embodiments of the present application provide a computer storage medium storing executable instructions that, when executed by one or more processors, perform a method for controlling a flash lamp according to the first embodiment.
The computer-readable storage medium may be a magnetic random access Memory (FRAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM), among others.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application.

Claims (10)

1. A method for controlling a flash lamp is applied to a terminal and comprises the following steps:
acquiring the state of a flash lamp when a starting instruction of the flash lamp of the terminal is received;
when the flash lamp state is determined to be a fault state, updating the flash lamp state from the fault state to a normal state, wherein the flash lamp state is updated from the fault state to the normal state to represent that a fault identification bit of the flash lamp is reset, the fault state is used for indicating that the flash lamp is prohibited to be started, and the normal state is used for indicating that the flash lamp is started;
and in the normal state, responding to the starting instruction and controlling the starting of the flash lamp.
2. The method of claim 1, wherein the updating the state of the flash from the fault state to a normal state comprises:
detecting an environment index of an environment where the flash lamp is located;
judging whether the environmental index meets a preset environmental condition;
and updating the state of the flash lamp from the fault state to the normal state when the environmental index is determined to meet the preset environmental condition.
3. The method of claim 2, wherein the determining that the environmental indicator satisfies the preset environmental condition comprises:
when the environmental index is determined to meet a preset environmental humidity condition, determining that the environmental index meets the preset environmental condition; and/or the presence of a gas in the gas,
and when the environmental index is determined to meet the preset environmental temperature condition, determining that the environmental index meets the preset environmental condition.
4. The method of claim 2, wherein after determining whether the environmental indicator satisfies a preset environmental condition, the method further comprises:
and when the environmental index is determined not to meet the preset environmental condition, maintaining the state of the flash lamp as the fault state.
5. The method of claim 4, wherein after maintaining the state of the flash to the fault state when it is determined that the environmental indicator does not satisfy the preset environmental condition, the method further comprises:
and generating first notification information to remind that the environmental index is unqualified and the flash lamp cannot be recovered temporarily.
6. The method according to claim 5, wherein in the normal state, after controlling activation of the flash in response to the on command, the method further comprises:
and when the failure of starting the flash lamp is determined, updating the state of the flash lamp to be the fault state, and generating second notification information to remind that the flash lamp is damaged and cannot be recovered.
7. The method of claim 6, wherein after generating the first notification message alerting the environmental indicator to be off-specification and the flashlight is temporarily unable to be recovered, or after generating the second notification message alerting the flashlight to be bad and unable to be recovered, the method further comprises:
starting a display window of a current application interface;
and displaying the first notification information in the display window to remind that the environmental index is unqualified and the flash lamp cannot be recovered temporarily, or displaying the second notification information in the display window to remind that the flash lamp is damaged and cannot be recovered.
8. A terminal, comprising:
the terminal comprises an acquisition unit, a processing unit and a control unit, wherein the acquisition unit is used for acquiring the state of a flash lamp when receiving a starting instruction of the flash lamp of the terminal;
the updating unit is used for updating the state of the flash lamp from the fault state to a normal state when the state of the flash lamp is determined to be the fault state, wherein the updating of the state of the flash lamp from the fault state to the normal state represents that a fault identification bit of the flash lamp is reset, the fault state is used for indicating that the flash lamp is prohibited to be started, and the normal state is used for indicating that the flash lamp is started;
and the control unit is used for responding to the starting instruction and controlling the starting of the flash lamp in the normal state.
9. A terminal, comprising:
a processor and a storage medium storing instructions executable by the processor to perform operations in dependence on the processor via a communication bus, the instructions, when executed by the processor, performing the method of controlling a flash as claimed in any one of claims 1 to 7 above.
10. A computer storage medium having stored thereon executable instructions which, when executed by one or more processors, perform the method of controlling a flash of any one of claims 1 to 7.
CN201810368571.9A 2018-04-23 2018-04-23 Flash lamp control method, terminal and computer storage medium Active CN108650411B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810368571.9A CN108650411B (en) 2018-04-23 2018-04-23 Flash lamp control method, terminal and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810368571.9A CN108650411B (en) 2018-04-23 2018-04-23 Flash lamp control method, terminal and computer storage medium

Publications (2)

Publication Number Publication Date
CN108650411A CN108650411A (en) 2018-10-12
CN108650411B true CN108650411B (en) 2020-11-06

Family

ID=63747383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810368571.9A Active CN108650411B (en) 2018-04-23 2018-04-23 Flash lamp control method, terminal and computer storage medium

Country Status (1)

Country Link
CN (1) CN108650411B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140001902U (en) * 2012-09-24 2014-04-02 레나 게엠베하 Device for the wet chemical treatment and protection of flat substrates
CN103957363A (en) * 2014-05-16 2014-07-30 深圳市中兴移动通信有限公司 Flash camera shooting method and camera shooting device
CN106161938A (en) * 2016-07-22 2016-11-23 深圳天珑无线科技有限公司 A kind of flash lamp deployment method and device
CN106332410A (en) * 2016-08-16 2017-01-11 深圳天珑无线科技有限公司 Flash lamp driving circuit
CN106535434A (en) * 2016-11-29 2017-03-22 维沃移动通信有限公司 Method for controlling flash lamp of mobile terminal and mobile terminal
CN106713780A (en) * 2017-01-16 2017-05-24 维沃移动通信有限公司 Control method for flash lamp and mobile terminal
CN106961516A (en) * 2017-02-27 2017-07-18 维沃移动通信有限公司 A kind of flash lamp control method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140001902U (en) * 2012-09-24 2014-04-02 레나 게엠베하 Device for the wet chemical treatment and protection of flat substrates
CN103957363A (en) * 2014-05-16 2014-07-30 深圳市中兴移动通信有限公司 Flash camera shooting method and camera shooting device
CN106161938A (en) * 2016-07-22 2016-11-23 深圳天珑无线科技有限公司 A kind of flash lamp deployment method and device
CN106332410A (en) * 2016-08-16 2017-01-11 深圳天珑无线科技有限公司 Flash lamp driving circuit
CN106535434A (en) * 2016-11-29 2017-03-22 维沃移动通信有限公司 Method for controlling flash lamp of mobile terminal and mobile terminal
CN106713780A (en) * 2017-01-16 2017-05-24 维沃移动通信有限公司 Control method for flash lamp and mobile terminal
CN106961516A (en) * 2017-02-27 2017-07-18 维沃移动通信有限公司 A kind of flash lamp control method and device

Also Published As

Publication number Publication date
CN108650411A (en) 2018-10-12

Similar Documents

Publication Publication Date Title
US10652828B2 (en) Electronic device for providing mode switching and a method thereof
KR102379479B1 (en) A method and an electronic device for determination of battery condition based on the pressure
US8041977B2 (en) Notebook battery replacement time-saving method and battery detector thereof
KR20180080938A (en) A circuit for controlling power outputt from a battery pack and a battery pack
EP3477924A1 (en) Alert control method, alert control apparatus, and flexible display apparatus
WO2020103017A1 (en) Power-on process control method, power-on process control apparatus and terminal device
CN105704328A (en) Message reminding method, message reminding apparatus and mobile terminal
CN105245718A (en) Control method and device of breathing lamp and mobile terminal
WO2017121023A1 (en) Method and device for low power power-on processing
CN111526289A (en) Shooting method and device, electronic equipment and readable storage medium
JP2008193784A (en) Electronic equipment, its control method, and program
US10599199B1 (en) Systems and methods for power management at device shutdown
CN108650411B (en) Flash lamp control method, terminal and computer storage medium
US11054483B2 (en) Terminal device, method for leakage detection therefor
KR20180130684A (en) Method for preventing electric shock and electronic device for the same
US20190324518A1 (en) Method for operating a device having a switchable power saving mode for reducing its power consumption
CN104778040A (en) Photographing device
JP6215283B2 (en) Electronics
CN114624569A (en) Sensor circuit abnormality detection method, circuit, device, intelligent device, and medium
CN115460344A (en) Method for processing abnormality of imaging device, server, and medium
CN108600512A (en) Information prompting method, electronic device, terminal equipment and storage medium
CN108879589B (en) Overcurrent protection method and device, terminal equipment and storage medium
CN111209143A (en) Embedded system recovery method and device, embedded equipment and storage medium
CN104333692A (en) Camera monitoring system and method
KR20130136169A (en) Usb power management apparatus and method

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