CN105100496A - Information processing method and mobile terminal - Google Patents

Information processing method and mobile terminal Download PDF

Info

Publication number
CN105100496A
CN105100496A CN201510522462.4A CN201510522462A CN105100496A CN 105100496 A CN105100496 A CN 105100496A CN 201510522462 A CN201510522462 A CN 201510522462A CN 105100496 A CN105100496 A CN 105100496A
Authority
CN
China
Prior art keywords
level parameter
ambient light
preset
mobile terminal
light data
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.)
Pending
Application number
CN201510522462.4A
Other languages
Chinese (zh)
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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201510522462.4A priority Critical patent/CN105100496A/en
Publication of CN105100496A publication Critical patent/CN105100496A/en
Pending legal-status Critical Current

Links

Landscapes

  • Telephone Function (AREA)

Abstract

An embodiment of the present invention discloses an information processing method and a mobile terminal. The mobile terminal includes: an optical sensing unit, an information processing unit and a control unit. The optical sensing unit is used to collect environment optical data when a pre-set condition is satisfied. The information processing unit compares the environment optical data collected by the optical sensing unit with at least one pre-set threshold. Each threshold range corresponds to one lever parameter. The lever parameter corresponding to the range of a first threshold is acquired when the environment optical data is in the range of the first threshold. The lever parameter is judged whether matches with a first pre-set lever parameter. The control unit generates a first command when a judging result acquired by the information processing unit matches with the first pre-set lever parameter, and the first command is executed for activating a flashlight function.

Description

Information processing method and mobile terminal
Technical Field
The present invention relates to information processing technologies, and in particular, to an information processing method and a mobile terminal.
Background
At present, a smart phone usually has a flashlight function, and a flashlight beside a rear camera of the smart phone is controlled by software to serve as a flashlight to provide a lighting function.
According to the control method, a user needs to operate a software interface, particularly when the smart phone is in a screen-off and screen-locking state, the screen needs to be awakened firstly, then the screen needs to be unlocked by means of unlocking patterns or fingerprint unlocking, password unlocking and the like, and then a flashlight tool is further activated.
Disclosure of Invention
In order to solve the existing technical problem, embodiments of the present invention provide an information processing method and a mobile terminal, which can automatically turn on a flashlight tool, thereby improving user experience.
In order to achieve the above purpose, the technical solution of the embodiment of the present invention is realized as follows:
an embodiment of the present invention provides a mobile terminal, including: the device comprises a light sensing unit, an information processing unit and a control unit; wherein,
the light sensing unit is used for collecting ambient light data when a preset condition is met;
the information processing unit is used for comparing the ambient light data collected by the light sensing unit with at least one preset threshold range; wherein each threshold range corresponds to a level parameter; when the ambient light data is in a first threshold range, obtaining a level parameter corresponding to the first threshold range; judging whether the level parameter is matched with a first preset level parameter or not;
and the control unit is used for generating a first instruction and executing the first instruction to activate the flashlight function when the judgment result obtained by the information processing unit is that the level parameter is matched with a first preset level parameter.
In the above scheme, the light sensing unit is further configured to collect ambient light data according to a preset time period when the flashlight function is in an activated state;
the information processing unit is further configured to determine a threshold range corresponding to the ambient light data, and based on a level parameter corresponding to the threshold range;
the control unit is further configured to generate a second instruction when the information processing unit determines that the level parameter matches a second preset level parameter, and execute the second instruction to turn off the flashlight function.
In the above scheme, the light sensing unit is configured to collect first ambient light data including infrared light and visible light, and collect second ambient light data including infrared light; and performing difference processing on the first ambient light data and the second ambient light to obtain ambient light data containing visible light.
In the above scheme, the mobile terminal further includes a first detecting unit, configured to detect a distance between the mobile terminal and the blocking object, and determine whether the distance is smaller than a preset threshold; when the judgment result is that the distance is smaller than a preset threshold value, determining that the preset condition is not met; and when the judgment result is that the distance is not less than the preset threshold, determining that the preset condition is met.
In the above scheme, the mobile terminal further includes a second detecting unit, configured to detect whether a protective cover of the mobile terminal is in an open state; when the judgment result is that the protective sleeve is in an open state, determining that a preset condition is met; and when the judgment result is that the protective sleeve is in a closed state, determining that the preset condition is not met.
The embodiment of the invention also provides an information processing method, which comprises the following steps:
when a preset condition is met, collecting ambient light data;
comparing the ambient light data with at least one preset threshold range; wherein each threshold range corresponds to a level parameter;
when the ambient light data is in a first threshold range, obtaining a level parameter corresponding to the first threshold range;
judging whether the level parameter is matched with a first preset level parameter or not;
and when the judgment result is that the level parameter is matched with a first preset level parameter, generating a first instruction, and executing the first instruction to activate the flashlight function.
In the above solution, when the flashlight function is in an activated state, the method further includes: acquiring ambient light data according to a preset time period, determining a threshold range corresponding to the ambient light data, and based on a level parameter corresponding to the threshold range;
and when the level parameter is matched with a second preset level parameter, generating a second instruction, and executing the second instruction to close the flashlight function.
In the above scheme, the acquiring ambient light data includes:
collecting first ambient light data including infrared light and visible light, and collecting second ambient light data including infrared light;
and performing difference processing on the first ambient light data and the second ambient light to obtain ambient light data containing visible light.
In the foregoing solution, the meeting the preset condition includes: detecting the distance between the shielding object and the shielding object, and judging whether the distance is smaller than a preset threshold value or not; when the judgment result is that the distance is smaller than a preset threshold value, determining that the preset condition is not met;
and when the judgment result is that the distance is not less than the preset threshold, determining that the preset condition is met.
In the foregoing solution, the meeting the preset condition includes:
judging whether a protective sleeve of the mobile terminal is in an open state; when the judgment result is that the protective sleeve is in an open state, determining that a preset condition is met;
and when the judgment result is that the protective sleeve is in a closed state, determining that the preset condition is not met.
The information processing method and the mobile terminal of the embodiment of the invention comprise the following steps: the device comprises a light sensing unit, an information processing unit and a control unit; the light sensing unit is used for collecting ambient light data when a preset condition is met; the information processing unit is used for comparing the ambient light data collected by the light sensing unit with at least one preset threshold range; wherein each threshold range corresponds to a level parameter; when the ambient light data is in a first threshold range, obtaining a level parameter corresponding to the first threshold range; judging whether the level parameter is matched with a first preset level parameter or not; and the control unit is used for generating a first instruction and executing the first instruction to activate the flashlight function when the judgment result obtained by the information processing unit is that the level parameter is matched with a first preset level parameter. Therefore, by adopting the technical scheme of the embodiment of the invention, through detecting the external environment light data, whether the external environment is in a dark environment or not is judged based on the environment light data, and then the flashlight tool is automatically turned on. Therefore, the operation steps of the user are greatly simplified, and the operation experience of the user is improved.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention;
FIG. 2 is a diagram of a wireless communication system for the mobile terminal shown in FIG. 1;
fig. 3 is a schematic structural diagram of a mobile terminal according to a first embodiment of the present invention;
fig. 4 is a schematic structural diagram of a mobile terminal according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of a mobile terminal according to a third embodiment of the present invention;
fig. 6 is a schematic application diagram of a mobile terminal according to an embodiment of the present invention;
FIG. 7 is a flowchart illustrating an information processing method according to a fourth embodiment of the present invention;
FIG. 8 is a flowchart illustrating an information processing method according to a fifth embodiment of the present invention;
FIG. 9 is a flowchart illustrating an information processing method according to a sixth embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
A mobile terminal implementing various embodiments of the present invention will now be described with reference to the accompanying drawings. In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
The mobile terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a navigation device, and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. In the following, it is assumed that the terminal is a mobile terminal. However, it will be understood by those skilled in the art that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for moving purposes.
Fig. 1 is a schematic hardware configuration of a mobile terminal implementing various embodiments of the present invention.
The mobile terminal 100 may include a wireless communication unit 110, an a/V (audio/video) input unit 120, a user input unit 130, a sensing unit 140, an output unit 150, a memory 160, an interface unit 170, a controller 180, and a power supply unit 190, etc. Fig. 1 illustrates a mobile terminal having various components, but it is to be understood that not all illustrated components are required to be implemented. More or fewer components may alternatively be implemented. Elements of the mobile terminal will be described in detail below.
The wireless communication unit 110 typically includes one or more components that allow radio communication between the mobile terminal 100 and a wireless communication system or network. For example, the wireless communication unit may include at least one of a broadcast receiving module 111, a mobile communication module 112, a wireless internet module 113, a short-range communication module 114, and a location information module 115.
The broadcast receiving module 111 receives a broadcast signal and/or broadcast associated information from an external broadcast management server via a broadcast channel. The broadcast channel may include a satellite channel and/or a terrestrial channel. The broadcast management server may be a server that generates and transmits a broadcast signal and/or broadcast associated information or a server that receives a previously generated broadcast signal and/or broadcast associated information and transmits it to a terminal. The broadcast signal may include a TV broadcast signal, a radio broadcast signal, a data broadcast signal, and the like. Also, the broadcast signal may further include a broadcast signal combined with a TV or radio broadcast signal. The broadcast associated information may also be provided via a mobile communication network, and in this case, the broadcast associated information may be received by the mobile communication module 112. The broadcast signal may exist in various forms, for example, it may exist in the form of an Electronic Program Guide (EPG) of Digital Multimedia Broadcasting (DMB), an Electronic Service Guide (ESG) of digital video broadcasting-handheld (DVB-H), and the like. The broadcast receiving module 111 may receive a signal broadcast by using various types of broadcasting systems. In particular, the broadcast receiving module 111 may receive digital broadcasting by using a digital broadcasting system such as a digital broadcasting-terrestrial (DMB-T), digital multimedia broadcasting-satellite (DMB-S), digital video broadcasting-handheld (DVB-H), a data broadcasting system of forward link media (MediaFLO), a terrestrial digital broadcasting integrated service (ISDB-T), and the like. The broadcast receiving module 111 may be constructed to be suitable for various broadcasting systems that provide broadcast signals as well as the above-mentioned digital broadcasting systems. The broadcast signal and/or broadcast associated information received via the broadcast receiving module 111 may be stored in the memory 160 (or other type of storage medium).
The mobile communication module 112 transmits and/or receives radio signals to and/or from at least one of a base station (e.g., access point, node B, etc.), an external terminal, and a server. Such radio signals may include voice call signals, video call signals, or various types of data transmitted and/or received according to text and/or multimedia messages.
The wireless internet module 113 supports wireless internet access of the mobile terminal. The module may be internally or externally coupled to the terminal. The wireless internet access technology to which the module relates may include WLAN (wireless LAN) (Wi-Fi), Wibro (wireless broadband), Wimax (worldwide interoperability for microwave access), HSDPA (high speed downlink packet access), and the like.
The short-range communication module 114 is a module for supporting short-range communication. Some examples of short-range communication technologies include bluetooth (TM), Radio Frequency Identification (RFID), infrared data association (IrDA), Ultra Wideband (UWB), zigbee (TM), and the like.
The location information module 115 is a module for checking or acquiring location information of the mobile terminal. A typical example of the location information module is a GPS (global positioning system). According to the current technology, the GPS module 115 calculates distance information and accurate time information from three or more satellites and applies triangulation to the calculated information, thereby accurately calculating three-dimensional current location information according to longitude, latitude, and altitude. Currently, a method for calculating position and time information uses three satellites and corrects an error of the calculated position and time information by using another satellite. In addition, the GPS module 115 can calculate speed information by continuously calculating current position information in real time.
The a/V input unit 120 is used to receive an audio or video signal. The a/V input unit 120 may include a camera 121 and a microphone 122, and the camera 121 processes image data of still pictures or video obtained by an image capturing apparatus in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 151. The image frames processed by the cameras 121 may be stored in the memory 160 (or other storage medium) or transmitted via the wireless communication unit 110, and two or more cameras 121 may be provided according to the construction of the mobile terminal. The microphone 122 may receive sounds (audio data) via the microphone in a phone call mode, a recording mode, a voice recognition mode, or the like, and can process such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the mobile communication module 112 in case of a phone call mode. The microphone 122 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The user input unit 130 may generate key input data according to a command input by a user to control various operations of the mobile terminal. The user input unit 130 allows a user to input various types of information, and may include a keyboard, dome sheet, touch pad (e.g., a touch-sensitive member that detects changes in resistance, pressure, capacitance, and the like due to being touched), scroll wheel, joystick, and the like. In particular, when the touch pad is superimposed on the display unit 151 in the form of a layer, a touch screen may be formed.
The sensing unit 140 detects a current state of the mobile terminal 100 (e.g., an open or closed state of the mobile terminal 100), a position of the mobile terminal 100, presence or absence of contact (i.e., touch input) by a user with the mobile terminal 100, an orientation of the mobile terminal 100, acceleration or deceleration movement and direction of the mobile terminal 100, and the like, and generates a command or signal for controlling an operation of the mobile terminal 100. For example, when the mobile terminal 100 is implemented as a slide-type mobile phone, the sensing unit 140 may sense whether the slide-type phone is opened or closed. In addition, the sensing unit 140 can detect whether the power supply unit 190 supplies power or whether the interface unit 170 is coupled with an external device. The sensing unit 140 may include a proximity sensor 141 as will be described below in connection with a touch screen.
The interface unit 170 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The identification module may store various information for authenticating a user using the mobile terminal 100 and may include a User Identity Module (UIM), a Subscriber Identity Module (SIM), a Universal Subscriber Identity Module (USIM), and the like. In addition, a device having an identification module (hereinafter, referred to as an "identification device") may take the form of a smart card, and thus, the identification device may be connected with the mobile terminal 100 via a port or other connection means. The interface unit 170 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal and the external device.
In addition, when the mobile terminal 100 is connected with an external cradle, the interface unit 170 may serve as a path through which power is supplied from the cradle to the mobile terminal 100 or may serve as a path through which various command signals input from the cradle are transmitted to the mobile terminal. Various command signals or power input from the cradle may be used as signals for recognizing whether the mobile terminal is accurately mounted on the cradle. The output unit 150 is configured to provide output signals (e.g., audio signals, video signals, alarm signals, vibration signals, etc.) in a visual, audio, and/or tactile manner. The output unit 150 may include a display unit 151, an audio output module 152, an alarm unit 153, and the like.
The display unit 151 may display information processed in the mobile terminal 100. For example, when the mobile terminal 100 is in a phone call mode, the display unit 151 may display a User Interface (UI) or a Graphical User Interface (GUI) related to a call or other communication (e.g., text messaging, multimedia file downloading, etc.). When the mobile terminal 100 is in a video call mode or an image capturing mode, the display unit 151 may display a captured image and/or a received image, a UI or GUI showing a video or an image and related functions, and the like.
Meanwhile, when the display unit 151 and the touch pad are overlapped with each other in the form of a layer to form a touch screen, the display unit 151 may serve as an input device and an output device. The display unit 151 may include at least one of a Liquid Crystal Display (LCD), a thin film transistor LCD (TFT-LCD), an Organic Light Emitting Diode (OLED) display, a flexible display, a three-dimensional (3D) display, and the like. Some of these displays may be configured to be transparent to allow a user to view from the outside, which may be referred to as transparent displays, and a typical transparent display may be, for example, a TOLED (transparent organic light emitting diode) display or the like. Depending on the particular desired implementation, the mobile terminal 100 may include two or more display units (or other display devices), for example, the mobile terminal may include an external display unit (not shown) and an internal display unit (not shown). The touch screen may be used to detect a touch input pressure as well as a touch input position and a touch input area.
The audio output module 152 may convert audio data received by the wireless communication unit 110 or stored in the memory 160 into an audio signal and output as sound when the mobile terminal is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output module 152 may provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output module 152 may include a speaker, a buzzer, and the like.
The alarm unit 153 may provide an output to notify the mobile terminal 100 of the occurrence of an event. Typical events may include call reception, message reception, key signal input, touch input, and the like. In addition to audio or video output, the alarm unit 153 may provide output in different ways to notify the occurrence of an event. For example, the alarm unit 153 may provide an output in the form of vibration, and when a call, a message, or some other incoming communication (incomingmunication) is received, the alarm unit 153 may provide a tactile output (i.e., vibration) to inform the user thereof. By providing such a tactile output, the user can recognize the occurrence of various events even when the user's mobile phone is in the user's pocket. The alarm unit 153 may also provide an output notifying the occurrence of an event via the display unit 151 or the audio output module 152.
The memory 160 may store software programs and the like for processing and controlling operations performed by the controller 180, or may temporarily store data (e.g., a phonebook, messages, still images, videos, and the like) that has been or will be output. Also, the memory 160 may store data regarding various ways of vibration and audio signals output when a touch is applied to the touch screen.
The memory 160 may include at least one type of storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. Also, the mobile terminal 100 may cooperate with a network storage device that performs a storage function of the memory 160 through a network connection.
The controller 180 generally controls the overall operation of the mobile terminal. For example, the controller 180 performs control and processing related to voice calls, data communications, video calls, and the like. In addition, the controller 180 may include a multimedia module 181 for reproducing (or playing back) multimedia data, and the multimedia module 181 may be constructed within the controller 180 or may be constructed separately from the controller 180. The controller 180 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as a character or an image.
The power supply unit 190 receives external power or internal power and provides appropriate power required to operate various elements and components under the control of the controller 180.
The various embodiments described herein may be implemented in a computer-readable medium using, for example, computer software, hardware, or any combination thereof. For a hardware implementation, the embodiments described herein may be implemented using at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a processor, a controller, a microcontroller, a microprocessor, an electronic unit designed to perform the functions described herein, and in some cases, such embodiments may be implemented in the controller 180. For a software implementation, the implementation such as a process or a function may be implemented with a separate software module that allows performing at least one function or operation. The software codes may be implemented by software applications (or programs) written in any suitable programming language, which may be stored in the memory 160 and executed by the controller 180.
Up to this point, mobile terminals have been described in terms of their functionality. Hereinafter, a slide-type mobile terminal among various types of mobile terminals, such as a folder-type, bar-type, swing-type, slide-type mobile terminal, and the like, will be described as an example for the sake of brevity. Accordingly, the present invention can be applied to any type of mobile terminal, and is not limited to a slide type mobile terminal.
The mobile terminal 100 as shown in fig. 1 may be configured to operate with communication systems such as wired and wireless communication systems and satellite-based communication systems that transmit data via frames or packets.
A communication system in which a mobile terminal according to the present invention is operable will now be described with reference to fig. 2.
Such communication systems may use different air interfaces and/or physical layers. For example, the air interface used by the communication system includes, for example, Frequency Division Multiple Access (FDMA), Time Division Multiple Access (TDMA), Code Division Multiple Access (CDMA), and Universal Mobile Telecommunications System (UMTS) (in particular, Long Term Evolution (LTE)), global system for mobile communications (GSM), and the like. By way of non-limiting example, the following description relates to a CDMA communication system, but such teachings are equally applicable to other types of systems.
Referring to fig. 2, the CDMA wireless communication system may include a plurality of mobile terminals 100, a plurality of Base Stations (BSs) 270, Base Station Controllers (BSCs) 275, and a Mobile Switching Center (MSC) 280. The MSC280 is configured to interface with a Public Switched Telephone Network (PSTN) 290. The MSC280 is also configured to interface with a BSC275, which may be coupled to the base station 270 via a backhaul. The backhaul may be constructed according to any of several known interfaces including, for example, E1/T1, ATM, IP, PPP, frame Relay, HDSL, ADSL, or xDSL. It will be understood that a system as shown in fig. 2 may include multiple BSCs 275.
Each BS270 may serve one or more sectors (or regions), each sector covered by a multi-directional antenna or an antenna pointing in a particular direction being radially distant from the BS 270. Alternatively, each partition may be covered by two or more antennas for diversity reception. Each BS270 may be configured to support multiple frequency allocations, with each frequency allocation having a particular frequency spectrum (e.g., 1.25MHz,5MHz, etc.).
The intersection of partitions with frequency allocations may be referred to as a CDMA channel. The BS270 may also be referred to as a Base Transceiver Subsystem (BTS) or other equivalent terminology. In such a case, the term "base station" may be used to generically refer to a single BSC275 and at least one BS 270. The base stations may also be referred to as "cells". Alternatively, each sector of a particular BS270 may be referred to as a plurality of cell sites.
As shown in fig. 2, a Broadcast Transmitter (BT)295 transmits a broadcast signal to the mobile terminal 100 operating within the system. A broadcast receiving module 111 as shown in fig. 1 is provided at the mobile terminal 100 to receive a broadcast signal transmitted by the BT 295. In fig. 2, several Global Positioning System (GPS) satellites 300 are shown. The satellite 300 assists in locating at least one of the plurality of mobile terminals 100.
In fig. 2, a plurality of satellites 300 are depicted, but it is understood that useful positioning information may be obtained with any number of satellites. The GPS module 115 as shown in fig. 1 is generally configured to cooperate with satellites 300 to obtain desired positioning information. Other techniques that can track the location of the mobile terminal may be used instead of or in addition to GPS tracking techniques. In addition, at least one GPS satellite 300 may selectively or additionally process satellite DMB transmission.
As a typical operation of the wireless communication system, the BS270 receives reverse link signals from various mobile terminals 100. The mobile terminal 100 is generally engaged in conversations, messaging, and other types of communications. Each reverse link signal received by a particular base station 270 is processed within the particular BS 270. The obtained data is forwarded to the associated BSC 275. The BSC provides call resource allocation and mobility management functions including coordination of soft handoff procedures between BSs 270. The BSCs 275 also route the received data to the MSC280, which provides additional routing services for interfacing with the PSTN 290. Similarly, the PSTN290 interfaces with the MSC280, the MSC interfaces with the BSCs 275, and the BSCs 275 accordingly control the BS270 to transmit forward link signals to the mobile terminal 100.
Based on the above mobile terminal hardware structure and communication system, the present invention provides various embodiments of the method.
Example one
The embodiment of the invention provides a mobile terminal. Fig. 3 is a schematic structural diagram of a mobile terminal according to a first embodiment of the present invention; as shown in fig. 3, the mobile terminal includes: a light sensing unit 31, an information processing unit 32, and a control unit 33; wherein,
the light sensing unit 31 is configured to collect ambient light data when a preset condition is met;
the information processing unit 32 is configured to compare the ambient light data collected by the light sensing unit 31 with at least one preset threshold range; wherein each threshold range corresponds to a level parameter; when the ambient light data is in a first threshold range, obtaining a level parameter corresponding to the first threshold range; judging whether the level parameter is matched with a first preset level parameter or not;
the control unit 33 is configured to generate a first instruction when the determination result obtained by the information processing unit 32 is that the level parameter matches a first preset level parameter, and execute the first instruction to activate the flashlight function.
Specifically, the light sensing unit 31 is configured to collect first ambient light data including infrared light and visible light, and collect second ambient light data including infrared light; and performing difference processing on the first ambient light data and the second ambient light to obtain ambient light data containing visible light.
In this embodiment, the photo sensor unit 31 generally has two photo sensor devices, a first photo sensor device is sensitive to both visible light and infrared light, and a second photo sensor device is sensitive to only infrared light; and acquiring first ambient light data through the first light sensitive component, acquiring second ambient light data through the second light sensitive component, and subtracting the second light sensitive component from the first ambient light data, so that the interference of infrared light is reduced to the minimum, and the accurate ambient light parameter for representing visible light is obtained. The ambient light parameter may specifically be light intensity or brightness of visible light.
Further, the acquiring of the ambient light data by the light sensing unit 31 includes acquiring the ambient light data multiple times (for example, three times) according to a preset time period (for example, 100 milliseconds), averaging the multiple acquired ambient light data, and taking the average value as the finally determined ambient light data.
In this embodiment, before the ambient light data is collected, the mobile terminal obtains a third instruction, and after the third instruction is obtained and when a preset condition is met, the ambient light data is collected. As an implementation manner, the third instruction is a wake-up instruction, that is, when the mobile terminal is in a black screen sleep state, a preset key operation (such as a power key operation or a Home key operation) is detected, or a preset gesture operation (a screen wake-up gesture in the black screen state) is detected, or a preset voice instruction is detected, the third instruction is generated. Or generating a third instruction when the mobile terminal is detected to be switched from the first state to the second state; for example, when the mobile terminal is switched from a vertical downward state to a horizontal state, the third instruction is generated.
In this embodiment, the meeting of the preset condition includes: and when the mobile terminal is detected to be not shielded by a shielding object within the preset distance, determining that the preset condition is met. Here, the flashlight application can be prevented from being triggered by mistake in the following two scenarios: one scenario is that the mobile terminal is in an enclosed environment (e.g., a user's clothing pocket, backpack), which may cause the flashlight application to turn on due to false trigger operations; the other scenario is that when the mobile terminal is provided with a protective sleeve, the protective sleeve usually covers the surface of the display screen of the mobile terminal when the mobile terminal is not used; and light optical sensor sets up in the top of display screen usually, when the protective sheath shelters from mobile terminal's display screen place surface, even when the user does not use mobile terminal, thereby also can be because open the flashlight application of false triggering.
In this embodiment, at least one threshold range is preset in the mobile terminal, where the at least one threshold range may specifically be at least one threshold range representing light intensity or brightness, and a unit of the at least one threshold range is the same as a unit of the aforementioned ambient light data. Specifically, each threshold range corresponds to a level parameter, and the level parameter may be, according to the intensity or brightness, as follows: bright, brighter, darker, dark, extremely dark; of course, the level parameter can be set to other levels representing the light intensity or brightness, and is not limited to the illustration in the embodiment. Each level parameter corresponds to a threshold range, the corresponding threshold range can be preset according to an empirical value, and of course, the mobile terminal also supports manual adjustment of the threshold range corresponding to the level parameter.
Here, the information processing unit 32 matches the acquired ambient light data with the at least one threshold range, and determines in which threshold range the ambient light data falls; when the ambient light data is determined to be in a first threshold range, obtaining a level parameter corresponding to the first threshold range; the first threshold range is any one of the at least one threshold range.
Furthermore, a first preset level parameter is set in the mobile terminal to correspondingly turn on the flashlight function; the first preset level parameter is not limited to one level parameter, and may be at least two level parameters. Taking the level parameters as: for example, the first preset level parameter can be preset to be bright and bright, and after the level parameter is determined to be matched with bright or bright, the level parameter is determined to be matched with the first preset level parameter.
Further, when the level parameter matches the first preset level parameter (e.g. bright or brighter), the control unit 33 generates and executes a first instruction, activates the flashlight function based on the first instruction, i.e. without activating the flashlight function by manually triggering the flashlight application, and automatically generates the first instruction to activate the flashlight function when the level parameter corresponding to the detected ambient light data reaches the first preset level parameter.
As another embodiment, the light sensing unit 31 is further configured to collect ambient light data according to a preset time period when the flashlight function is in an activated state;
the information processing unit 32 is further configured to determine a threshold range corresponding to the ambient light data, and based on a level parameter corresponding to the threshold range;
the control unit 33 is further configured to generate a second instruction when the information processing unit 32 determines that the level parameter matches a second preset level parameter, and execute the second instruction to turn off the flashlight function.
In this embodiment, the mobile terminal is further provided with a second preset level parameter, and the second preset level parameter corresponds to a function of turning off the flashlight. Similarly to the first preset level parameter, the second preset level parameter is not limited to one level parameter, and may be at least two level parameters. Taking the level parameters as: for example, the second preset level parameter may be preset to be dark or very dark, and after the level parameter is determined to be matched with the dark or very dark, the level parameter is determined to be matched with the second preset level parameter.
When the level parameter matches the second preset level parameter (e.g., dark or extremely dark), the control unit 33 generates and executes a second instruction, and turns off the flashlight function based on the second instruction, that is, the flashlight function does not need to be turned off by manually triggering the flashlight application, and when the level parameter corresponding to the detected ambient light data reaches the second preset level parameter, the second instruction is automatically generated to turn off the flashlight function.
By adopting the technical scheme of the embodiment of the invention, through detecting the external environment light data, whether the external environment is in a dark environment or not is judged based on the environment light data, and then the flashlight tool is automatically turned on. In addition, whether the external environment is in a bright environment or not is judged through detection of external environment light data, and then the flashlight tool is turned off. Therefore, the operation steps of the user are greatly simplified, and the operation experience of the user is improved.
Example two
Based on the first embodiment, the embodiment of the invention also provides a mobile terminal. Fig. 4 is a schematic structural diagram of a mobile terminal according to a second embodiment of the present invention; as shown in fig. 4, the mobile terminal includes: a first detection unit 34, a light sensing unit 31, an information processing unit 32, and a control unit 33; wherein,
the first detection unit 34 is configured to detect a distance between the first detection unit and the blocking object, and determine whether the distance is smaller than a preset threshold; when the judgment result is that the distance is smaller than a preset threshold value, determining that the preset condition is not met; when the judgment result is that the distance is not smaller than a preset threshold value, determining that a preset condition is met;
the light sensing unit 31 is configured to collect ambient light data when the first detecting unit 34 determines that a preset condition is met;
the information processing unit 32 is configured to compare the ambient light data collected by the light sensing unit 31 with at least one preset threshold range; wherein each threshold range corresponds to a level parameter; when the ambient light data is in a first threshold range, obtaining a level parameter corresponding to the first threshold range; judging whether the level parameter is matched with a first preset level parameter or not;
the control unit 33 is configured to generate a first instruction when the determination result obtained by the information processing unit 32 is that the level parameter matches a first preset level parameter, and execute the first instruction to activate the flashlight function.
The present embodiment is different from the first embodiment in that a first detection unit 34 is disposed in the mobile terminal, and the first detection unit 34 may be a distance sensor for detecting a distance to a shelter. Specifically, the first detection unit 34 may be an infrared distance sensor that performs distance measurement by emitting infrared light. The first detecting unit 34 is used to avoid that the mobile terminal is in a closed environment (such as a pocket of clothes of a user, a backpack), which may cause a flashlight application to be turned on due to a false triggering operation, so as to distinguish whether the mobile terminal is actually in the pocket of clothes or in an open dark environment, thereby avoiding a false judgment.
By adopting the technical scheme of the embodiment of the invention, through detecting the external environment light data, whether the external environment is in a dark environment or not is judged based on the environment light data, and then the flashlight tool is automatically turned on. In addition, whether the external environment is in a bright environment or not is judged through detection of external environment light data, and then the flashlight tool is turned off. Therefore, the operation steps of the user are greatly simplified, and the operation experience of the user is improved.
EXAMPLE III
The embodiment of the invention also provides the mobile terminal. Fig. 5 is a schematic structural diagram of a mobile terminal according to a third embodiment of the present invention; as shown in fig. 5, the mobile terminal includes: a first detection unit 35, a light sensing unit 31, an information processing unit 32, and a control unit 33; wherein,
the first detecting unit 35 is configured to detect whether a protective cover of the mobile terminal is in an open state; when the judgment result is that the protective sleeve is in an open state, determining that a preset condition is met; when the judgment result is that the protective sleeve is in a closed state, determining that the preset condition is not met;
the light sensing unit 31 is configured to collect ambient light data when the first detecting unit 35 determines that a preset condition is met;
the information processing unit 32 is configured to compare the ambient light data collected by the light sensing unit 31 with at least one preset threshold range; wherein each threshold range corresponds to a level parameter; when the ambient light data is in a first threshold range, obtaining a level parameter corresponding to the first threshold range; judging whether the level parameter is matched with a first preset level parameter or not;
the control unit 33 is configured to generate a first instruction when the determination result obtained by the information processing unit 32 is that the level parameter matches a first preset level parameter, and execute the first instruction to activate the flashlight function.
The difference between this embodiment and the first embodiment is that a first detection unit 35 is disposed in the mobile terminal, where the first detection unit 35 is specifically a magnetic induction sensor, and the magnetic induction sensor detects the magnetic field generated by the magnet in the protective cover, so as to determine whether the protective cover is in an open state. When the mobile terminal is provided with the protective sleeve, the protective sleeve usually covers the surface of the display screen of the mobile terminal when the mobile terminal is not used; and the light sensor for detecting the ambient light data is usually arranged above the display screen, and when the protective sleeve shields the surface of the display screen of the mobile terminal, the light sensor can be shielded, so that the ambient light data representation detected by the light sensor is a dark environment, and the misjudgment is generated.
By adopting the technical scheme of the embodiment of the invention, through detecting the external environment light data, whether the external environment is in a dark environment or not is judged based on the environment light data, and then the flashlight tool is automatically turned on. In addition, whether the external environment is in a bright environment or not is judged through detection of external environment light data, and then the flashlight tool is turned off. Therefore, the operation steps of the user are greatly simplified, and the operation experience of the user is improved.
In the first to third embodiments of the present invention, the information processing unit 32 and the control unit 33 in the mobile terminal may be implemented by a Central Processing Unit (CPU), a Digital Signal Processor (DSP), or a programmable gate array (FPGA) in the mobile terminal in practical application; the light sensing unit 31 in the mobile terminal may be implemented by a light sensor in the mobile terminal in practical applications.
Fig. 6 is a schematic application diagram of a mobile terminal according to an embodiment of the present invention; the mobile terminal according to the first to third embodiments may be as shown in fig. 6, where the information processing unit 32 and the control unit 33 may be implemented by a CPU, a DSP, or an FPGA in the mobile terminal, which is not shown in the figure; the optical sensing unit 31 is disposed on a plane where a display screen of the mobile terminal is located, and is generally disposed near a front camera and a receiver of the mobile terminal.
Example four
The embodiment of the invention also provides an information processing method. FIG. 7 is a flowchart illustrating an information processing method according to a fourth embodiment of the present invention; as shown in fig. 7, the method includes:
step 601: and when a preset condition is met, acquiring ambient light data, wherein the ambient light data represents visible light data.
In this embodiment, the information processing method is applied to a mobile terminal, and the mobile terminal may specifically be an intelligent terminal such as a smart phone and a tablet computer. The mobile terminal is provided with an optical sensor, and the optical sensor is used for collecting ambient light parameters.
Here, the acquiring ambient light data includes: collecting first ambient light data including infrared light and visible light, and collecting second ambient light data including infrared light; and performing difference processing on the first ambient light data and the second ambient light to obtain ambient light data containing visible light.
Specifically, the light sensor generally has two light-sensitive components, a first light-sensitive component has sensitivity to visible light and infrared light, and a second light-sensitive component has sensitivity to infrared light only; and acquiring first ambient light data through the first light sensitive component, acquiring second ambient light data through the second light sensitive component, and subtracting the second light sensitive component from the first ambient light data, so that the interference of infrared light is reduced to the minimum, and the accurate ambient light parameter for representing visible light is obtained. The ambient light parameter may specifically be light intensity or brightness of visible light.
Further, the acquiring the ambient light data includes acquiring the ambient light data multiple times (for example, three times) according to a preset time period (for example, 100 milliseconds), averaging the multiple acquired ambient light data, and taking the average value as the finally determined ambient light data.
In this embodiment, before the ambient light data is collected, the mobile terminal obtains a third instruction, and after the third instruction is obtained and when a preset condition is met, the ambient light data is collected. As an implementation manner, the third instruction is a wake-up instruction, that is, when the mobile terminal is in a black screen sleep state, a preset key operation (such as a power key operation or a Home key operation) is detected, or a preset gesture operation (a screen wake-up gesture in the black screen state) is detected, or a preset voice instruction is detected, the third instruction is generated. Or generating a third instruction when the mobile terminal is detected to be switched from the first state to the second state; for example, when the mobile terminal is switched from a vertical downward state to a horizontal state, the third instruction is generated.
In this embodiment, the meeting of the preset condition includes: and when the mobile terminal is detected to be not shielded by a shielding object within the preset distance, determining that the preset condition is met. Here, the flashlight application can be prevented from being triggered by mistake in the following two scenarios: one scenario is that the mobile terminal is in an enclosed environment (e.g., a user's clothing pocket, backpack), which may cause the flashlight application to turn on due to false trigger operations; the other scenario is that when the mobile terminal is provided with a protective sleeve, the protective sleeve usually covers the surface of the display screen of the mobile terminal when the mobile terminal is not used; and light sensor sets up in the top of display screen usually, when the protective sheath shelters from mobile terminal's display screen place surface, even when the user does not use mobile terminal, thereby also can open the flashlight application because of the false triggering.
Step 602, comparing the ambient light data with at least one preset threshold range; wherein each threshold range corresponds to a level parameter.
In this embodiment, at least one threshold range is preset in the mobile terminal, where the at least one threshold range may specifically be at least one threshold range representing light intensity or brightness, and a unit of the at least one threshold range is the same as a unit of the aforementioned ambient light data. Specifically, each threshold range corresponds to a level parameter, and the level parameter may be, according to the intensity or brightness, as follows: bright, brighter, darker, dark, extremely dark; of course, the level parameter can be set to other levels representing the light intensity or brightness, and is not limited to the illustration in the embodiment. Each level parameter corresponds to a threshold range, the corresponding threshold range can be preset according to an empirical value, and of course, the mobile terminal also supports manual adjustment of the threshold range corresponding to the level parameter.
Step 603: when the ambient light data is in a first threshold range, obtaining a level parameter corresponding to the first threshold range.
Here, matching the acquired ambient light data with the at least one threshold range, determining in which threshold range the ambient light data falls; when the ambient light data is determined to be in a first threshold range, obtaining a level parameter corresponding to the first threshold range; the first threshold range is any one of the at least one threshold range.
Step 604: and judging whether the level parameter is matched with a first preset level parameter.
In this embodiment, the mobile terminal is provided with a function of turning on the flashlight corresponding to a first preset level parameter; the first preset level parameter is not limited to one level parameter, and may be at least two level parameters. Taking the level parameters as: for example, the first preset level parameter can be preset to be bright and bright, and after the level parameter is determined to be matched with bright or bright, the level parameter is determined to be matched with the first preset level parameter.
Step 605: and when the judgment result is that the level parameter is matched with a first preset level parameter, generating a first instruction, and executing the first instruction to activate the flashlight function.
In this embodiment, when the level parameter matches the first preset level parameter (e.g., bright or bright), a first instruction is generated and executed, the flashlight function is activated based on the first instruction, that is, the flashlight function is activated without being manually triggered by a flashlight application, and when the level parameter corresponding to the detected ambient light data reaches the first preset level parameter, the first instruction is automatically generated to activate the flashlight function.
As another embodiment, when the flashlight function is active, the method further comprises: acquiring ambient light data according to a preset time period, determining a threshold range corresponding to the ambient light data, and based on a level parameter corresponding to the threshold range;
and when the level parameter is matched with a second preset level parameter, generating a second instruction, and executing the second instruction to close the flashlight function.
In this embodiment, the mobile terminal is further provided with a second preset level parameter, and the second preset level parameter corresponds to a function of turning off the flashlight. Similarly to the first preset level parameter, the second preset level parameter is not limited to one level parameter, and may be at least two level parameters. Taking the level parameters as: for example, the second preset level parameter may be preset to be dark or very dark, and after the level parameter is determined to be matched with the dark or very dark, the level parameter is determined to be matched with the second preset level parameter.
When the level parameter is matched with a second preset level parameter (such as darkness and extreme darkness), a second instruction is generated and executed, the flashlight function is turned off based on the second instruction, namely the flashlight function is turned off without manually triggering a flashlight application, and when the level parameter corresponding to the detected ambient light data reaches the second preset level parameter, the second instruction is automatically generated, and the flashlight function is turned off.
By adopting the technical scheme of the embodiment of the invention, through detecting the external environment light data, whether the external environment is in a dark environment or not is judged based on the environment light data, and then the flashlight tool is automatically turned on. In addition, whether the external environment is in a bright environment or not is judged through detection of external environment light data, and then the flashlight tool is turned off. Therefore, the operation steps of the user are greatly simplified, and the operation experience of the user is improved.
EXAMPLE five
Based on the fourth embodiment, the embodiment of the invention also provides an information processing method which is applied to the mobile terminal. FIG. 8 is a flowchart illustrating an information processing method according to a fifth embodiment of the present invention; as shown in fig. 8, the method includes:
step 701: the distance to the shade is detected.
In this embodiment, a distance sensor is disposed in the mobile terminal, and the distance between the mobile terminal and the blocking object can be detected by the distance sensor. Specifically, the distance sensor may be an infrared distance sensor that performs distance measurement by emitting infrared light. This step is to avoid that the flashlight application may be turned on due to a false trigger operation in a closed environment (such as a clothes pocket or a backpack of a user) to distinguish that the mobile terminal is actually in the clothes pocket or in an open dark environment, thereby avoiding a false judgment.
Step 702: judging whether the distance is smaller than a preset threshold value, if so, determining that the preset condition is not met, and executing step 703: no operation is performed; when the judgment result is negative, it is determined that the preset condition is satisfied, and step 704 is performed.
Step 704: collecting ambient light data, and comparing the ambient light data with at least one preset threshold range; wherein each threshold range corresponds to a level parameter.
Here, the acquiring ambient light data includes: collecting first ambient light data including infrared light and visible light, and collecting second ambient light data including infrared light; and performing difference processing on the first ambient light data and the second ambient light to obtain ambient light data containing visible light.
Specifically, the light sensor generally has two light-sensitive components, a first light-sensitive component has sensitivity to visible light and infrared light, and a second light-sensitive component has sensitivity to infrared light only; and acquiring first ambient light data through the first light sensitive component, acquiring second ambient light data through the second light sensitive component, and subtracting the second light sensitive component from the first ambient light data, so that the interference of infrared light is reduced to the minimum, and the accurate ambient light parameter for representing visible light is obtained. The ambient light parameter may specifically be light intensity or brightness of visible light.
Further, the acquiring the ambient light data includes acquiring the ambient light data multiple times (for example, three times) according to a preset time period (for example, 100 milliseconds), averaging the multiple acquired ambient light data, and taking the average value as the finally determined ambient light data.
In this embodiment, before the ambient light data is collected, the mobile terminal obtains a third instruction, and after the third instruction is obtained and when a preset condition is met, the ambient light data is collected. As an implementation manner, the third instruction is a wake-up instruction, that is, when the mobile terminal is in a black screen sleep state, a preset key operation (such as a power key operation or a Home key operation) is detected, or a preset gesture operation (a screen wake-up gesture in the black screen state) is detected, or a preset voice instruction is detected, the third instruction is generated. Or generating a third instruction when the mobile terminal is detected to be switched from the first state to the second state; for example, when the mobile terminal is switched from a vertical downward state to a horizontal state, the third instruction is generated.
Step 705: when the ambient light data is in a first threshold range, obtaining a level parameter corresponding to the first threshold range.
In this embodiment, at least one threshold range is preset in the mobile terminal, where the at least one threshold range may specifically be at least one threshold range representing light intensity or brightness, and a unit of the at least one threshold range is the same as a unit of the aforementioned ambient light data. Specifically, each threshold range corresponds to a level parameter, and the level parameter may be, according to the intensity or brightness, as follows: bright, brighter, darker, dark, extremely dark; of course, the level parameter can be set to other levels representing the light intensity or brightness, and is not limited to the illustration in the embodiment. Each level parameter corresponds to a threshold range, the corresponding threshold range can be preset according to an empirical value, and of course, the mobile terminal also supports manual adjustment of the threshold range corresponding to the level parameter.
Here, matching the acquired ambient light data with the at least one threshold range, determining in which threshold range the ambient light data falls; when the ambient light data is determined to be in a first threshold range, obtaining a level parameter corresponding to the first threshold range; the first threshold range is any one of the at least one threshold range.
The mobile terminal is provided with a first preset level parameter corresponding to the function of starting the flashlight; the first preset level parameter is not limited to one level parameter, and may be at least two level parameters. Taking the level parameters as: for example, the first preset level parameter can be preset to be bright and bright, and after the level parameter is determined to be matched with bright or bright, the level parameter is determined to be matched with the first preset level parameter.
Step 706: judging whether the level parameter is matched with a first preset level parameter, and if so, executing step 707; if the result of the determination is negative, step 703 is executed: no operation is performed.
Step 707: and generating a first instruction, and executing the first instruction to activate the flashlight function.
In this embodiment, when the level parameter matches the first preset level parameter (e.g., bright or bright), a first instruction is generated and executed, the flashlight function is activated based on the first instruction, that is, the flashlight function is activated without being manually triggered by a flashlight application, and when the level parameter corresponding to the detected ambient light data reaches the first preset level parameter, the first instruction is automatically generated to activate the flashlight function.
Step 708: further obtaining an ambient light parameter when the flashlight function is active, comparing the ambient light data to at least one preset threshold range.
Step 709: when the ambient light data is in a second threshold range, obtaining a level parameter corresponding to the second threshold range.
Step 710: judging whether the level parameter is matched with a second preset level parameter, and if so, executing a step 711; if the result of the determination is negative, step 703 is executed: no operation is performed.
In this embodiment, the mobile terminal is further provided with a second preset level parameter, and the second preset level parameter corresponds to a function of turning off the flashlight. Similarly to the first preset level parameter, the second preset level parameter is not limited to one level parameter, and may be at least two level parameters. Taking the level parameters as: for example, the second preset level parameter may be preset to be dark or very dark, and after the level parameter is determined to be matched with the dark or very dark, the level parameter is determined to be matched with the second preset level parameter.
Step 711: and generating a second instruction, and executing the second instruction to close the flashlight function.
Here, when the level parameter matches the second preset level parameter (e.g., dark or extremely dark), a second instruction is generated and executed, the flashlight function is turned off based on the second instruction, that is, the flashlight function is turned off without manually triggering the flashlight application, and when the level parameter corresponding to the detected ambient light data reaches the second preset level parameter, the second instruction is automatically generated, and the flashlight function is turned off.
By adopting the technical scheme of the embodiment of the invention, through detecting the external environment light data, whether the external environment is in a dark environment or not is judged based on the environment light data, and then the flashlight tool is automatically turned on. In addition, whether the external environment is in a bright environment or not is judged through detection of external environment light data, and then the flashlight tool is turned off. Therefore, the operation steps of the user are greatly simplified, and the operation experience of the user is improved.
EXAMPLE six
Based on the fourth embodiment, the embodiment of the invention also provides an information processing method which is applied to the mobile terminal. FIG. 9 is a flowchart illustrating an information processing method according to a sixth embodiment of the present invention; as shown in fig. 9, the method includes:
step 801: detecting whether a protective sleeve of the mobile terminal is in an open state, determining that a preset condition is not met when the judgment result is no, and executing the step 802: no operation is performed; when the judgment result is yes, it is determined that the preset condition is satisfied, and step 803 is executed.
In this embodiment, when the mobile terminal is provided with the protective cover, the protective cover usually covers the surface of the display screen of the mobile terminal when the mobile terminal is not used; and the light sensor for detecting the ambient light data is usually arranged above the display screen, and when the protective sleeve shields the surface of the display screen of the mobile terminal, the light sensor can be shielded, so that the ambient light data representation detected by the light sensor is a dark environment, and the misjudgment is generated. Specifically, can set up magnetic induction sensor among the mobile terminal, through magnetic induction sensor detect with effect between the magnet in the protective sheath, thereby learn whether the protective sheath is in the open mode.
Step 803: collecting ambient light data, and comparing the ambient light data with at least one preset threshold range; wherein each threshold range corresponds to a level parameter.
Here, the acquiring ambient light data includes: collecting first ambient light data including infrared light and visible light, and collecting second ambient light data including infrared light; and performing difference processing on the first ambient light data and the second ambient light to obtain ambient light data containing visible light.
Specifically, the light sensor generally has two light-sensitive components, a first light-sensitive component has sensitivity to visible light and infrared light, and a second light-sensitive component has sensitivity to infrared light only; and acquiring first ambient light data through the first light sensitive component, acquiring second ambient light data through the second light sensitive component, and subtracting the second light sensitive component from the first ambient light data, so that the interference of infrared light is reduced to the minimum, and the accurate ambient light parameter for representing visible light is obtained. The ambient light parameter may specifically be light intensity or brightness of visible light.
Further, the acquiring the ambient light data includes acquiring the ambient light data multiple times (for example, three times) according to a preset time period (for example, 100 milliseconds), averaging the multiple acquired ambient light data, and taking the average value as the finally determined ambient light data.
In this embodiment, before the ambient light data is collected, the mobile terminal obtains a third instruction, and after the third instruction is obtained and when a preset condition is met, the ambient light data is collected. As an implementation manner, the third instruction is a wake-up instruction, that is, when the mobile terminal is in a black screen sleep state, a preset key operation (such as a power key operation or a Home key operation) is detected, or a preset gesture operation (a screen wake-up gesture in the black screen state) is detected, or a preset voice instruction is detected, the third instruction is generated. Or generating a third instruction when the mobile terminal is detected to be switched from the first state to the second state; for example, when the mobile terminal is switched from a vertical downward state to a horizontal state, the third instruction is generated.
Step 804: when the ambient light data is in a first threshold range, obtaining a level parameter corresponding to the first threshold range.
In this embodiment, at least one threshold range is preset in the mobile terminal, where the at least one threshold range may specifically be at least one threshold range representing light intensity or brightness, and a unit of the at least one threshold range is the same as a unit of the aforementioned ambient light data. Specifically, each threshold range corresponds to a level parameter, and the level parameter may be, according to the intensity or brightness, as follows: bright, brighter, darker, dark, extremely dark; of course, the level parameter can be set to other levels representing the light intensity or brightness, and is not limited to the illustration in the embodiment. Each level parameter corresponds to a threshold range, the corresponding threshold range can be preset according to an empirical value, and of course, the mobile terminal also supports manual adjustment of the threshold range corresponding to the level parameter.
Here, matching the acquired ambient light data with the at least one threshold range, determining in which threshold range the ambient light data falls; when the ambient light data is determined to be in a first threshold range, obtaining a level parameter corresponding to the first threshold range; the first threshold range is any one of the at least one threshold range.
The mobile terminal is provided with a first preset level parameter corresponding to the function of starting the flashlight; the first preset level parameter is not limited to one level parameter, and may be at least two level parameters. Taking the level parameters as: for example, the first preset level parameter can be preset to be bright and bright, and after the level parameter is determined to be matched with bright or bright, the level parameter is determined to be matched with the first preset level parameter.
Step 805: judging whether the level parameter is matched with a first preset level parameter, and if so, executing step 806; when the result of the judgment is negative, no operation is performed.
Step 806: and generating a first instruction, and executing the first instruction to activate the flashlight function.
In this embodiment, when the level parameter matches the first preset level parameter (e.g., bright or bright), a first instruction is generated and executed, the flashlight function is activated based on the first instruction, that is, the flashlight function is activated without being manually triggered by a flashlight application, and when the level parameter corresponding to the detected ambient light data reaches the first preset level parameter, the first instruction is automatically generated to activate the flashlight function.
Step 807: further obtaining an ambient light parameter when the flashlight function is active, comparing the ambient light data to at least one preset threshold range.
Step 808: when the ambient light data is in a second threshold range, obtaining a level parameter corresponding to the second threshold range.
Step 809: judging whether the level parameter is matched with a second preset level parameter, and if so, executing step 810; when the result of the judgment is negative, no operation is performed.
In this embodiment, the mobile terminal is further provided with a second preset level parameter, and the second preset level parameter corresponds to a function of turning off the flashlight. Similarly to the first preset level parameter, the second preset level parameter is not limited to one level parameter, and may be at least two level parameters. Taking the level parameters as: for example, the second preset level parameter may be preset to be dark or very dark, and after the level parameter is determined to be matched with the dark or very dark, the level parameter is determined to be matched with the second preset level parameter.
Step 810: and generating a second instruction, and executing the second instruction to close the flashlight function.
Here, when the level parameter matches the second preset level parameter (e.g., dark or extremely dark), a second instruction is generated and executed, the flashlight function is turned off based on the second instruction, that is, the flashlight function is turned off without manually triggering the flashlight application, and when the level parameter corresponding to the detected ambient light data reaches the second preset level parameter, the second instruction is automatically generated, and the flashlight function is turned off.
By adopting the technical scheme of the embodiment of the invention, through detecting the external environment light data, whether the external environment is in a dark environment or not is judged based on the environment light data, and then the flashlight tool is automatically turned on. In addition, whether the external environment is in a bright environment or not is judged through detection of external environment light data, and then the flashlight tool is turned off. Therefore, the operation steps of the user are greatly simplified, and the operation experience of the user is improved.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a removable memory device, a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A mobile terminal, characterized in that the mobile terminal comprises: the device comprises a light sensing unit, an information processing unit and a control unit; wherein,
the light sensing unit is used for collecting ambient light data when a preset condition is met;
the information processing unit is used for comparing the ambient light data collected by the light sensing unit with at least one preset threshold range; wherein each threshold range corresponds to a level parameter; when the ambient light data is in a first threshold range, obtaining a level parameter corresponding to the first threshold range; judging whether the level parameter is matched with a first preset level parameter or not;
and the control unit is used for generating a first instruction and executing the first instruction to activate the flashlight function when the judgment result obtained by the information processing unit is that the level parameter is matched with a first preset level parameter.
2. The mobile terminal of claim 1, wherein the light sensing unit is further configured to collect ambient light data according to a preset time period when the flashlight function is activated;
the information processing unit is further configured to determine a threshold range corresponding to the ambient light data, and based on a level parameter corresponding to the threshold range;
the control unit is further configured to generate a second instruction when the information processing unit determines that the level parameter matches a second preset level parameter, and execute the second instruction to turn off the flashlight function.
3. The mobile terminal of claim 1, wherein the light sensing unit is configured to collect first ambient light data including infrared light and visible light, and collect second ambient light data including infrared light; and performing difference processing on the first ambient light data and the second ambient light to obtain ambient light data containing visible light.
4. The mobile terminal according to claim 1, further comprising a first detecting unit, configured to detect a distance from a shielding object, and determine whether the distance is smaller than a preset threshold; when the judgment result is that the distance is smaller than a preset threshold value, determining that the preset condition is not met; and when the judgment result is that the distance is not less than the preset threshold, determining that the preset condition is met.
5. The mobile terminal according to claim 1, wherein the mobile terminal further comprises a second detecting unit for detecting whether a protective cover of the mobile terminal is in an open state; when the judgment result is that the protective sleeve is in an open state, determining that a preset condition is met; and when the judgment result is that the protective sleeve is in a closed state, determining that the preset condition is not met.
6. An information processing method, characterized in that the method comprises:
when a preset condition is met, collecting ambient light data;
comparing the ambient light data with at least one preset threshold range; wherein each threshold range corresponds to a level parameter;
when the ambient light data is in a first threshold range, obtaining a level parameter corresponding to the first threshold range;
judging whether the level parameter is matched with a first preset level parameter or not;
and when the judgment result is that the level parameter is matched with a first preset level parameter, generating a first instruction, and executing the first instruction to activate the flashlight function.
7. The method of claim 6, wherein when the flashlight function is in an active state, the method further comprises: acquiring ambient light data according to a preset time period, determining a threshold range corresponding to the ambient light data, and based on a level parameter corresponding to the threshold range;
and when the level parameter is matched with a second preset level parameter, generating a second instruction, and executing the second instruction to close the flashlight function.
8. The method of claim 6, wherein the acquiring ambient light data comprises:
collecting first ambient light data including infrared light and visible light, and collecting second ambient light data including infrared light;
and performing difference processing on the first ambient light data and the second ambient light to obtain ambient light data containing visible light.
9. The method according to claim 6, wherein the meeting of the preset condition comprises: detecting the distance between the shielding object and the shielding object, and judging whether the distance is smaller than a preset threshold value or not; when the judgment result is that the distance is smaller than a preset threshold value, determining that the preset condition is not met;
and when the judgment result is that the distance is not less than the preset threshold, determining that the preset condition is met.
10. The method according to claim 6, wherein the meeting of the preset condition comprises:
judging whether a protective sleeve of the mobile terminal is in an open state; when the judgment result is that the protective sleeve is in an open state, determining that a preset condition is met;
and when the judgment result is that the protective sleeve is in a closed state, determining that the preset condition is not met.
CN201510522462.4A 2015-08-24 2015-08-24 Information processing method and mobile terminal Pending CN105100496A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510522462.4A CN105100496A (en) 2015-08-24 2015-08-24 Information processing method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510522462.4A CN105100496A (en) 2015-08-24 2015-08-24 Information processing method and mobile terminal

Publications (1)

Publication Number Publication Date
CN105100496A true CN105100496A (en) 2015-11-25

Family

ID=54579990

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510522462.4A Pending CN105100496A (en) 2015-08-24 2015-08-24 Information processing method and mobile terminal

Country Status (1)

Country Link
CN (1) CN105100496A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105744067A (en) * 2016-02-24 2016-07-06 广东欧珀移动通信有限公司 Mobile terminal flashlight brightness adjustment method and device, mobile terminal
CN106068052A (en) * 2016-05-26 2016-11-02 广东小天才科技有限公司 Illumination control method, illumination control equipment and mobile equipment
CN106303023A (en) * 2016-08-12 2017-01-04 青岛海信移动通信技术股份有限公司 Screen state control method and device
CN107592418A (en) * 2017-09-05 2018-01-16 广东小天才科技有限公司 Method for turning on flashlight of mobile terminal and mobile terminal

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103067604A (en) * 2013-01-17 2013-04-24 广东欧珀移动通信有限公司 Method for enabling cell phone to be in flashlight mode
CN103345355A (en) * 2013-07-18 2013-10-09 北京小米科技有限责任公司 Screen-locking interface display control method, device and terminal device
CN103677565A (en) * 2013-11-22 2014-03-26 小米科技有限责任公司 Screen unlocking method and device and terminal
CN103791473A (en) * 2012-10-31 2014-05-14 深圳富泰宏精密工业有限公司 System and method for starting flashlight application
CN104333651A (en) * 2014-09-22 2015-02-04 北京金山安全软件有限公司 Control method and device of terminal device and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103791473A (en) * 2012-10-31 2014-05-14 深圳富泰宏精密工业有限公司 System and method for starting flashlight application
CN103067604A (en) * 2013-01-17 2013-04-24 广东欧珀移动通信有限公司 Method for enabling cell phone to be in flashlight mode
CN103345355A (en) * 2013-07-18 2013-10-09 北京小米科技有限责任公司 Screen-locking interface display control method, device and terminal device
CN103677565A (en) * 2013-11-22 2014-03-26 小米科技有限责任公司 Screen unlocking method and device and terminal
CN104333651A (en) * 2014-09-22 2015-02-04 北京金山安全软件有限公司 Control method and device of terminal device and mobile terminal

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105744067A (en) * 2016-02-24 2016-07-06 广东欧珀移动通信有限公司 Mobile terminal flashlight brightness adjustment method and device, mobile terminal
CN106068052A (en) * 2016-05-26 2016-11-02 广东小天才科技有限公司 Illumination control method, illumination control equipment and mobile equipment
CN106303023A (en) * 2016-08-12 2017-01-04 青岛海信移动通信技术股份有限公司 Screen state control method and device
CN106303023B (en) * 2016-08-12 2020-01-10 青岛海信移动通信技术股份有限公司 Screen state adjusting method and device
CN107592418A (en) * 2017-09-05 2018-01-16 广东小天才科技有限公司 Method for turning on flashlight of mobile terminal and mobile terminal
CN107592418B (en) * 2017-09-05 2020-04-07 广东小天才科技有限公司 Method for turning on flashlight of mobile terminal and mobile terminal

Similar Documents

Publication Publication Date Title
CN105468153B (en) A kind of mobile terminal and its method for realizing control
CN105430168A (en) Mobile terminal and file sharing method
CN106550126B (en) Mobile terminal and screen brightness control device and method thereof
CN104980588B (en) A kind of method and apparatus for detecting mobile terminal state
CN106533928B (en) Method and device for updating unread message reminding identification
CN106982273B (en) Mobile terminal and control method thereof
CN106130734A (en) The control method of mobile terminal and control device
CN106778176B (en) Information processing method and mobile terminal
CN104951229B (en) Screenshot method and device
CN106572246B (en) Camera opening device, terminal and camera opening method
CN104898978A (en) Method and device for selecting application menu
CN106412243A (en) Method for monitoring abnormity of distance sensor, and terminal
CN105100496A (en) Information processing method and mobile terminal
CN105049612A (en) Method of realizing recording and device of realizing recording
CN106161790B (en) Mobile terminal and control method thereof
CN106484534A (en) Control method for the mobile terminal of displaying and control device
CN106569690B (en) Device and method for preventing mistaken touch
CN106951350B (en) Method and device for checking mobile terminal disk
CN106228043B (en) Application icon hidden method and terminal
CN105573563B (en) Mobile terminal and method for realizing touch operation on mobile terminal
CN105094598A (en) Device and method for processing operational objects
CN106412877B (en) Activation method and activation device for mobile terminal SIM card
CN105045508B (en) The setting device and method of system model
CN104978140B (en) A kind of information processing method and mobile terminal
CN109063623B (en) Fingerprint identification method, equipment and computer storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20151125