CN111182115A - Anomaly detection method and device for proximity sensor and mobile terminal - Google Patents

Anomaly detection method and device for proximity sensor and mobile terminal Download PDF

Info

Publication number
CN111182115A
CN111182115A CN201911375969.6A CN201911375969A CN111182115A CN 111182115 A CN111182115 A CN 111182115A CN 201911375969 A CN201911375969 A CN 201911375969A CN 111182115 A CN111182115 A CN 111182115A
Authority
CN
China
Prior art keywords
proximity sensor
mobile terminal
output value
proximity
detection
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.)
Granted
Application number
CN201911375969.6A
Other languages
Chinese (zh)
Other versions
CN111182115B (en
Inventor
李经纬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201911375969.6A priority Critical patent/CN111182115B/en
Publication of CN111182115A publication Critical patent/CN111182115A/en
Priority to PCT/CN2020/125382 priority patent/WO2021129147A1/en
Application granted granted Critical
Publication of CN111182115B publication Critical patent/CN111182115B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/24Arrangements for testing
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S17/00Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
    • G01S17/02Systems using the reflection of electromagnetic waves other than radio waves
    • G01S17/06Systems determining position data of a target
    • G01S17/08Systems determining position data of a target for measuring distance only
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S7/00Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
    • G01S7/48Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S17/00
    • G01S7/497Means for monitoring or calibrating
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01VGEOPHYSICS; GRAVITATIONAL MEASUREMENTS; DETECTING MASSES OR OBJECTS; TAGS
    • G01V8/00Prospecting or detecting by optical means
    • G01V8/10Detecting, e.g. by using light barriers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/12Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Electromagnetism (AREA)
  • Human Computer Interaction (AREA)
  • Environmental & Geological Engineering (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Life Sciences & Earth Sciences (AREA)
  • Geophysics (AREA)
  • Telephone Function (AREA)

Abstract

The application provides an anomaly detection method and device of a proximity sensor and a mobile terminal, which are applicable to the technical field of sensor detection, the method is applied to the mobile terminal comprising the proximity sensor, and the method comprises the following steps: the mobile terminal samples the output value of the proximity sensor to obtain a first sample output value. The mobile terminal performs data stability analysis on the first sample output value to obtain a corresponding stability analysis result; and the mobile terminal obtains a detection result of whether the proximity sensor is abnormal or not according to the first sample output value and the stability analysis result. Whether the proximity sensor is shielded or not is firstly identified, and a final abnormal detection result is determined by using the size of the output value of the proximity sensor and the data stability under the condition of no shielding, so that the accuracy and reliability of the detection of the proximity sensor proximity abnormality are guaranteed.

Description

Anomaly detection method and device for proximity sensor and mobile terminal
Technical Field
The application belongs to the technical field of sensor detection, and particularly relates to an anomaly detection method and device for a proximity sensor and a mobile terminal.
Background
A proximity sensor is a sensor that can sense the proximity of an object. The proximity sensor may be of various types, for example, the proximity sensor may include infrared proximity sensors, ultrasonic proximity sensors, and the like. The principle is illustrated by taking an infrared proximity sensor as an example. The infrared proximity sensor continuously emits infrared light to the outside when it starts operating. The infrared light is reflected back to the proximity sensor after encountering an obstacle. A photodiode in the proximity sensor receives the reflected infrared light. The infrared proximity sensor determines whether an external object is close to or far from the proximity sensor according to the received energy of the reflected infrared light.
The proximity sensor is widely applied to various mobile terminals to detect whether a user approaches the mobile terminal, so as to flexibly control operations such as brightness adjustment and on-off state switching of a display screen of the mobile terminal. For example, in the voice call process, if the proximity sensor detects that the user is close to the mobile terminal, the display screen is turned off, and if the proximity sensor detects that the user is far away from the mobile terminal, the display screen is turned on, so that misoperation of the user on the display screen in the voice call process is prevented.
In practical applications, an abnormality may occur in a proximity sensor in a mobile terminal. When the mobile terminal is used for voice call and other operations, if the display screen is directly controlled according to the output value reported by the abnormal proximity sensor, the display screen of the mobile terminal is still extinguished when the user is far away, and the display screen is kept in the extinguished state all the time and cannot be lightened.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide a method and an apparatus for detecting an abnormality of a proximity sensor, and a mobile terminal, which can identify whether the proximity sensor in the mobile terminal is abnormal.
A first aspect of an embodiment of the present application provides a method for detecting an abnormality of a proximity sensor, which is applied to a mobile terminal including the proximity sensor, and includes:
the mobile terminal samples an output value of the proximity sensor to obtain a first sample output value;
the mobile terminal performs data stability analysis on the first sample output value to obtain a stability analysis result;
and the mobile terminal obtains a detection result of whether the proximity sensor is abnormal or not according to the first sample output value and the stability analysis result.
When the output value of the proximity sensor is sampled and the proximity anomaly is detected, the size and the data stability of the sampled output value are monitored to judge whether the proximity sensor continuously and stably outputs the anomaly data or not, and further obtain the detection result whether the proximity sensor has the proximity anomaly or not. Whether the proximity sensor is shielded or not is firstly identified, and a final abnormal detection result is determined by using the size of the output value of the proximity sensor and the data stability under the condition of no shielding, so that the accuracy and reliability of the detection of the proximity sensor proximity abnormality are guaranteed.
In a first possible implementation manner of the first aspect, before sampling the output value of the proximity sensor, the mobile terminal further includes:
the mobile terminal identifies whether the proximity sensor is shielded;
and if the proximity sensor is not shielded, the mobile terminal executes the operation of sampling the output value of the proximity sensor.
The method comprises the following steps of firstly, identifying whether a proximity sensor is shielded; and when the proximity sensor is identified not to be shielded, sampling of the output value of the proximity sensor and proximity anomaly detection are started. Therefore, the abnormal detection method and the abnormal detection device can ensure that the abnormal detection is not interfered by shielding when abnormal detection is carried out, and the reliability of an abnormal detection result is improved.
In a second possible implementation manner of the first aspect, the identifying, by the mobile terminal, whether the proximity sensor is blocked specifically includes:
the mobile terminal acquires the ambient light intensity and the gesture data of the mobile terminal, and identifies whether the proximity sensor is shielded or not based on the ambient light intensity and the gesture data.
According to the embodiment of the application, the ambient light intensity and the attitude data of the mobile terminal are simultaneously integrated to judge whether the proximity sensor is possibly in a shielded state, so that whether the proximity sensor is shielded or not is accurately identified.
In a third possible implementation manner of the first aspect, the identifying, by the mobile terminal, whether the proximity sensor is blocked specifically includes:
the method comprises the steps that the mobile terminal obtains ambient light intensity and angle data of a pitch angle and a roll angle of the mobile terminal, if the ambient light intensity is larger than an intensity threshold value, the angle data of the pitch angle belong to a preset pitch angle value range, the angle data of the roll angle belong to a preset roll angle value range, and it is judged that the proximity sensor is not shielded.
In the embodiment of the application, whether the mobile terminal is held by a user is accurately identified through the pitch angle and the roll angle of the mobile terminal, and when the mobile terminal is held by the user and the ambient light intensity is strong, the proximity sensor is determined not to be shielded, so that whether the proximity sensor is shielded is accurately identified.
In a fourth possible implementation manner of the first aspect, the obtaining, by the mobile terminal, a detection result of whether the proximity sensor is abnormal according to the first sample output value and the stability analysis result specifically includes:
if the first sample output values obtained by sampling are all larger than a first output value threshold value within a first time length after sampling is started, and the stability analysis result is in a preset value range, the mobile terminal judges that the detection result is that the proximity sensor has proximity abnormity.
If the first sample output value acquired in the first duration can meet two requirements of the value size and the data stability, the output value of the proximity sensor is stable and large at the moment and meets the judgment standard of proximity anomaly, and the detection result is judged to be the proximity anomaly of the proximity sensor at the moment, so that the proximity anomaly is accurately detected.
In a fifth possible implementation manner of the first aspect, the obtaining, by the mobile terminal, a detection result of whether the proximity sensor is abnormal according to the first sample output value and the stability analysis result specifically includes:
if the first sample output values obtained by sampling are all larger than a first output value threshold value within a first time length after sampling is started, and the stability analysis result is in a preset value range, the mobile terminal carries out statistics on the number of times of operation for sampling the output values of the proximity sensor to obtain the first sample output values;
if the operation times are less than the preset cycle times, the mobile terminal detects the on-off state of the display screen of the mobile terminal; if the on-off state of the display screen changes, the mobile terminal returns to execute the operation of sampling the output value of the proximity sensor to obtain a first sample output value;
and if the operation times are equal to the preset cycle times, the mobile terminal judges that the detection result is that the proximity sensor has proximity abnormity.
If the first sample output value acquired in the first duration can simultaneously meet two requirements of the numerical value and the data stability, the output value of the proximity sensor is stable and large. Meanwhile, if the output value of the proximity sensor is stable and large in the result of continuous multiple detections, the reliability of the detection result is very high, so that the detection result is judged to be that the proximity sensor has proximity anomaly, and the accuracy of proximity anomaly detection is improved.
In a sixth possible implementation manner of the first aspect, the analyzing, by the mobile terminal, the first sample output value and the stability analysis result to obtain a detection result of whether the proximity sensor is abnormal includes:
if the first sample output values obtained by sampling are all larger than a first output value threshold value within a first time length after sampling is started, and the stability analysis result is in a preset value range, the mobile terminal carries out statistics on the number of times of operation for sampling the output values of the proximity sensor to obtain the first sample output values;
if the operation times are smaller than the preset cycle times and the mobile terminal detects a switching instruction of on and off of a display screen of the mobile terminal, the mobile terminal returns to execute the operation of sampling the output value of the proximity sensor to obtain a first sample output value;
and if the operation times are equal to the preset cycle times, the mobile terminal judges that the detection result is that the proximity sensor has proximity abnormity.
If the first sample output value acquired in the first duration can simultaneously meet two requirements of the numerical value and the data stability, the output value of the proximity sensor is stable and large. Meanwhile, if the output value of the proximity sensor is stable and large in the result of continuous multiple detections, the reliability of the detection result is very high, so that the detection result is judged to be that the proximity sensor has proximity anomaly, and the accuracy of proximity anomaly detection is improved.
In a seventh possible implementation manner of the first aspect, before the mobile terminal identifies whether the proximity sensor is occluded, the method further includes:
the mobile terminal samples an output value of the proximity sensor to obtain a second sample output value;
and if a value greater than a second output value threshold value exists in the second sample output values sampled within a second time period, the mobile terminal executes the operation of identifying whether the proximity sensor is shielded, wherein the second output value threshold value is less than or equal to the first output value threshold value.
Whether the proximity sensor can normally detect the far state of the obstacle is judged by quickly detecting the proximity sensor before starting the detection of whether the proximity sensor is close to the abnormality. And only when it cannot be determined whether the proximity sensor can normally detect the far state of the obstacle, starting detection on whether the proximity sensor is shielded, and entering the detection steps of the embodiments of the application. Therefore, the embodiment of the application can avoid the waste of resources of the processor of the mobile terminal to a certain extent, and the detection efficiency of whether the proximity sensor is abnormal or not is improved.
In an eighth possible implementation manner of the first aspect, before the mobile terminal identifies whether the proximity sensor is occluded, the method further includes:
and if the mobile terminal detects that the mobile terminal executes the preset behavior or the preset operation, the mobile terminal executes the operation of identifying whether the proximity sensor is shielded or not.
By detecting the proximity sensor abnormity when the mobile terminal executes the preset behavior or preset operation, the reliability of the proximity sensor abnormity detection result is guaranteed, and the accuracy of the operation control of the mobile terminal is improved.
In a ninth possible implementation manner of the first aspect, on the basis of the sixth possible implementation manner, the identifying an operation on a preset behavior or a preset operation specifically includes:
and if the preset trigger instruction is detected, judging that the mobile terminal executes a preset behavior or a preset operation.
Through the detection of the preset trigger instruction, the accurate recognition of the preset behavior and the preset operation is realized.
In a tenth possible implementation manner of the first aspect, before the mobile terminal identifies whether the proximity sensor is occluded, the method further includes:
and the mobile terminal periodically executes the operation of identifying whether the proximity sensor is shielded or not by taking a preset time point as an initial time point and a third time length as a periodic value.
The proximity sensor abnormity detection is carried out periodically, so that the reliability of the proximity sensor abnormity detection result is guaranteed, and the accuracy of the operation control of the mobile terminal is improved.
In an eleventh possible implementation manner of the first aspect, on the basis of the eighth possible implementation manner, before the mobile terminal identifies whether the proximity sensor is occluded, the method further includes:
if the proximity sensor is shielded, acquiring a second time point for next execution of the operation of identifying whether the proximity sensor is shielded according to the first time point and the third time length for the current execution of the operation of identifying whether the proximity sensor is shielded;
and selecting a third time point from the first time point to the second time point, updating the starting time point to the third time point, and periodically executing the operation of identifying whether the proximity sensor is shielded.
According to the embodiment of the application, when detection fails every time, the detection time point of the proximity sensor approaching abnormity can be started in advance for the next time, and the reliability of the detection result can be prevented from being reduced due to the fact that the interval time of two times of effective detection is too long.
In a twelfth possible implementation manner of the first aspect, after obtaining the detection result of whether the proximity sensor is abnormal, the method further includes:
and the mobile terminal stores the detection result into a local nonvolatile memory.
The embodiment of the application can ensure that the mobile terminal can normally call the proximity sensor within a period from the completion of starting to the first detection result of the proximity sensor proximity abnormity after starting.
In a thirteenth possible implementation manner of the first aspect, after obtaining the detection result of whether the proximity sensor is abnormal, the method further includes:
when the terminal needs to use the data reported by the proximity sensor, if the detection result indicates that the proximity sensor has proximity abnormality, the mobile terminal ignores the data reported by the proximity sensor; or
When the terminal needs to use the data reported by the proximity sensor, if the detection result indicates that the proximity sensor has proximity abnormality, the mobile terminal sets the display screen of the mobile terminal to be normally bright.
When the proximity sensor is identified to be close to abnormal, the embodiment of the application can modify the original display screen on-off control scheme in time, set the display screen to be normally on, or ignore data reported by the proximity sensor, and refer to other parameters of the mobile terminal to control the on-off of the display screen, so that the situation that the display screen of the mobile terminal is continuously off due to the proximity sensor is close to abnormal is avoided.
A first aspect of an embodiment of the present application provides an abnormality detection device for a proximity sensor, including:
an occlusion recognition module for recognizing whether the proximity sensor is occluded;
the data analysis module is used for sampling an output value of the proximity sensor to obtain a first sample output value if the proximity sensor is not shielded, and performing data stability analysis on the first sample output value to obtain a corresponding stability analysis result;
and the abnormity detection module is used for analyzing the first sample output value and the stability analysis result to obtain a detection result of whether the proximity sensor is abnormal or not.
A third aspect of the embodiments of the present application provides a terminal device, where the terminal device includes a memory and a processor, where the memory stores a computer program that is executable on the processor, and the processor executes the computer program to enable the terminal device to implement the steps of the method for detecting an abnormality of a proximity sensor according to any one of the first aspect.
A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, including: there is stored a computer program, characterized in that the computer program, when executed by a processor, causes a terminal device to carry out the steps of the method for detecting an abnormality of a proximity sensor as defined in any one of the above-mentioned first aspects.
A fifth aspect of embodiments of the present application provides a computer program product, which, when run on a terminal device, causes the terminal device to execute the method for detecting an abnormality of a proximity sensor according to any one of the first aspect.
It is to be understood that the beneficial effects of the second to fifth aspects can be found in the related descriptions of the first aspect, and are not described herein again.
Drawings
Fig. 1 is a schematic structural diagram of a mobile phone to which an abnormality detection method for a proximity sensor according to an embodiment of the present disclosure is applied;
fig. 2A is a schematic flowchart of an anomaly detection method for a proximity sensor according to an embodiment of the present application;
fig. 2B is a schematic flowchart of an anomaly detection method for a proximity sensor according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an application scenario provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of an application scenario provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of an application scenario provided by an embodiment of the present application;
FIG. 6 is a schematic flow chart illustrating a method for detecting an anomaly of a proximity sensor according to an embodiment of the present application;
fig. 7A is a schematic flowchart of an anomaly detection method for a proximity sensor according to an embodiment of the present application;
fig. 7B is a schematic flowchart of an anomaly detection method for a proximity sensor according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an abnormality detection device of a proximity sensor according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Detailed Description
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if determined" or "if [ a described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ a described condition or event ]" or "in response to detecting [ a described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The method for detecting the abnormity of the proximity sensor provided by the embodiment of the application can be applied to mobile terminals such as mobile phones, tablet computers and wearable devices, at the moment, the mobile terminal is an execution main body of the method for detecting the abnormity of the proximity sensor provided by the embodiment of the application, and the embodiment of the application does not limit the specific type of the mobile terminal.
By way of example and not limitation, when the mobile terminal is a wearable device, the wearable device may also be a generic term for intelligently designing daily wearing by applying wearable technology and developing wearable devices. Such as gloves, watches, and apparel. A wearable device is a portable device that is worn directly on the body or integrated into the clothing or accessories of the user. The wearable device is not only a hardware device, but also realizes powerful functions through software support, data interaction and cloud interaction. The extensive wearable smart device is complete including the function, the size is big, can not rely on the smart mobile phone to realize complete or partial function, like intelligent wrist-watch or intelligent glasses etc to and only be absorbed in a certain kind of application function, need use with other equipment like the smart mobile phone cooperation, like all kinds of intelligent bracelet that carry out the sign monitoring etc..
Take the mobile terminal as a mobile phone as an example. Fig. 1 is a block diagram illustrating a partial structure of a mobile phone according to an embodiment of the present disclosure. Referring to fig. 1, the cellular phone includes: radio Frequency (RF) circuit 110, memory 120, input unit 130, display unit 140, proximity sensor 150, ambient light sensor 151, audio circuit 160, wireless fidelity (Wi-Fi) module 170, processor 180, and power supply 190. Those skilled in the art will appreciate that the handset configuration shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 1:
the RF circuit 110 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information from a base station and then processes the received downlink information to the processor 180; in addition, the data for designing uplink is transmitted to the base station. Typically, the RF circuitry includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 110 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE)), e-mail, Short Messaging Service (SMS), and the like.
The memory 120 may be used to store software programs, detection results of proximity sensor proximity anomalies, and modules, and the processor 180 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 120. The memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the cellular phone (such as audio data, a detection result of a proximity sensor proximity abnormality, and the like), and the like. Further, the memory 120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 130 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone 100. Specifically, the input unit 130 may include a touch panel 131 and other input devices 132. The touch panel 131, also referred to as a touch screen, may collect touch operations of a user on or near the touch panel 131 (e.g., operations of the user on or near the touch panel 131 using any suitable object or accessory such as a finger or a stylus pen), and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 131 may include two parts, i.e., a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 180, and can receive and execute commands sent by the processor 180. In addition, the touch panel 131 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 130 may include other input devices 132 in addition to the touch panel 131. In particular, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 140 may be used to display information input by a user or information provided to the user and various menus of the mobile phone. The display unit 140 may include a display screen 141, and optionally, the display screen 141 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 131 can cover the display screen 141, and when the touch panel 131 detects a touch operation on or near the touch panel 131, the touch operation is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 provides a corresponding visual output on the display screen 141 according to the type of the touch event. Although in fig. 1, the touch panel 131 and the display screen 141 are two separate components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 131 and the display screen 141 may be integrated to implement the input and output functions of the mobile phone.
The handset 100 also includes a proximity sensor 150 and an ambient light sensor 151. The ambient light sensor can detect the intensity of ambient light where the mobile phone is located. The proximity sensor can detect that an external object is close to or far away from the mobile phone. Other sensors such as a barometer, a hygrometer, a thermometer and an attitude sensor which can be configured on the mobile phone are not described in detail herein.
Audio circuitry 160, speaker 161, and microphone 162 may provide an audio interface between the user and the handset. The audio circuit 160 may transmit the electrical signal converted from the received audio data to the speaker 161, and convert the electrical signal into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and converted into audio data, which is then processed by the audio data output processor 180 and then transmitted to, for example, another cellular phone via the RF circuit 110, or the audio data is output to the memory 120 for further processing.
Wi-Fi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the Wi-Fi module 170, and provides wireless broadband internet access for the user. Although fig. 1 shows the Wi-Fi module 170, it is understood that it does not belong to the essential constitution of the cellular phone 100, and may be omitted entirely within the scope not changing the essence of the invention as needed.
The processor 180 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120, thereby integrally monitoring the mobile phone. Alternatively, processor 180 may include one or more processing units; preferably, the processor 180 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 180.
The handset 100 also includes a power supply 190 (e.g., a battery) for powering the various components, which may preferably be logically connected to the processor 180 via a power management system, so as to manage charging, discharging, and power consumption via the power management system.
Although not shown, the handset 100 may also include a camera. Optionally, the position of the camera on the mobile phone 100 may be front-located or rear-located, which is not limited in this embodiment of the application.
Optionally, the mobile phone 100 may include a single camera, a dual camera, or a triple camera, which is not limited in this embodiment. For example, the cell phone 100 may include three cameras, one being a main camera, one being a wide camera, and one being a tele camera.
Optionally, when the mobile phone 100 includes a plurality of cameras, the plurality of cameras may be all front-mounted, all rear-mounted, or a part of the cameras front-mounted and another part of the cameras rear-mounted, which is not limited in this embodiment of the present application.
In addition, although not shown, the mobile phone 100 may further include a bluetooth module or the like, which is not described herein.
In practical applications, in order to accurately distinguish between a user approaching state and a user departing state, two output value thresholds, one larger and one smaller, are generally set. When the output value of the proximity sensor is larger than the larger output value threshold value, it indicates that the current user is closer to the mobile terminal, and at this time, the mobile terminal can determine that the user is in a proximity state. Otherwise, when the output value of the proximity sensor is smaller than the smaller output value threshold, it indicates that the user is far away from the mobile terminal, and the mobile terminal may determine that the user is in a far away state. The proximity sensor abnormality may be classified into two types, one being a distant abnormality in which the output value output from the proximity sensor is smaller than a smaller output value threshold, and the other being a proximity abnormality in which the output value output from the proximity sensor is larger than a larger output value threshold, according to the above two states. When some operations of the mobile terminal are controlled based on the proximity sensor data, since the proximity state and the remote state correspond to different operation steps, if the proximity sensor has proximity abnormality, the operations of the mobile terminal cannot be normally controlled. For example, when the on-off state of the display screen of the mobile terminal is controlled based on the proximity sensor data, since the display screen is turned off in the proximity state, the proximity abnormality may cause the display screen to be continuously in the off state and not to be turned on. Therefore, in order to prevent the mobile terminal from operating abnormally due to the proximity sensor abnormality, such as causing the display screen to be continuously in a turned-off state, a method for recognizing the proximity sensor proximity abnormality is required.
In order to realize the identification of the proximity sensor proximity anomaly, the embodiment of the application firstly identifies whether the proximity sensor is shielded or not, and starts sampling the output value of the proximity sensor and proximity anomaly detection when the proximity sensor is identified not to be shielded. When the output value of the proximity sensor is sampled and proximity anomaly detection is carried out, the size of the sampled output value and the data stability are detected so as to judge whether the proximity sensor continuously and stably outputs anomaly data or not, further, a detection result of whether the proximity sensor has proximity anomaly or not is obtained, and the accuracy and the reliability of proximity anomaly detection of the proximity sensor are guaranteed. The type of the proximity sensor actually used in the embodiment of the present application needs to be determined according to an actual scene, which is not limited herein, and includes, but is not limited to, infrared proximity sensors and ultrasonic proximity sensors.
The embodiments of the present application are described below by taking an infrared proximity sensor as an example:
fig. 2A shows a schematic flowchart of an abnormality detection method for a proximity sensor according to an embodiment of the present application. The method can be applied to the mobile phone 100, and can also be applied to other mobile terminals including a proximity sensor. The details are as follows:
s2001, the mobile terminal samples an output value of the proximity sensor to obtain a first sample output value.
And S2002, the mobile terminal performs data stability analysis on the first sample output value to obtain a corresponding stability analysis result.
And S2003, the mobile terminal obtains the detection result of whether the proximity sensor is abnormal or not according to the first sample output value and the stability analysis result.
Because the proximity sensor with the proximity abnormality exists, the output value of the proximity sensor can be continuously larger and more stable, and therefore whether the proximity sensor has the abnormality or not can be identified according to the output value and the stability of the proximity sensor. For the description of the specific detection principle and the operation details, reference may be made to the description of the embodiment corresponding to fig. 2B, which is not repeated herein.
In practical applications, the mobile terminal may be placed in various different possible scenes along with the user's usage, such as inside a light-tight object like a pocket, a bag, and a box, or on the surface of an object like a table and a stool, or held by the user. In these different scenarios, the proximity sensor may or may not be occluded. The shielding means that an obstacle exists in a short distance from the proximity sensor, so that the energy of the waves received by the proximity sensor is continuously strong. Such as the proximity sensor being blocked by the palm of the user's hand, placing an obstacle on the proximity sensor surface, and placing the proximity sensor inside a non-transparent object, the proximity sensor is in a blocked state in these scenarios. When the proximity sensor is in a shielded state, there is no abnormality to the proximity sensor. At this time, the output value of the proximity sensor will be continuously larger because the reflected infrared ray received by the shielded proximity sensor is continuously stronger. When detecting the abnormality, the abnormality is judged based on the output value; if the output value continues to be large, it is determined to be abnormal. Therefore, if the embodiment shown in fig. 2A detects an abnormality when the proximity sensor is blocked, the output value of the final output result is continuously large regardless of whether the proximity sensor has a proximity abnormality, so that the reliability of the result of the abnormality detection is low.
In order to improve the reliability of the anomaly detection result, referring to fig. 2B, an embodiment of the present application provides an anomaly detection method for a proximity sensor. The details are as follows:
s201, the mobile terminal identifies whether the proximity sensor is shielded.
In order to guarantee the reliability of detection of proximity anomaly of the proximity sensor, the embodiment of the application starts a proximity anomaly detection process of the proximity sensor when the proximity anomaly detection of the proximity sensor is triggered. When the approach abnormity detection is carried out, whether the approach sensor is shielded or not is firstly identified, and the subsequent specific operation of the abnormity detection of the approach sensor is started only when the approach sensor is not shielded. The embodiment of the application does not limit the specific shielding detection method, and can be set by technical personnel according to actual requirements. In some embodiments, whether the mobile terminal is occluded or not may be recognized according to the intensity of ambient light in which the mobile terminal is located or the spatial posture of the mobile terminal, and the recognized result may be regarded as the occluded state of the proximity sensor. In other embodiments, whether the proximity sensor is blocked or not can be identified according to the ambient light intensity detected by the mobile terminal and the spatial posture of the mobile terminal. The specific triggering method for detecting the proximity anomaly is not limited herein, and can be set by a technician according to actual requirements. For example, in some embodiments, a timed trigger may be set, such as a fixed point in time trigger that may be set for each strip. At this time, the operation of S201 is triggered when the fixed time point is reached. In other embodiments, a sensor detection function may be provided in the mobile terminal, and the operation of S201 may be triggered when the user starts the sensor detection function.
In some scenarios, the ambient light intensity is sometimes not directly equivalent to whether the proximity sensor is occluded or not. Taking a mobile phone as an example, when the ambient light sensor and the proximity sensor are both disposed in the top area of the mobile phone (in practice, many full-screen mobile phones have a large number of sensors disposed in the top area of the mobile phone to achieve the full-screen effect of the mobile phone). At this time, if the mobile phone is placed on the desktop with the front facing downward, referring to fig. 3, since the ambient light sensor is located at the top of the mobile phone, the ambient light sensor can still normally detect strong ambient light at this time. However, for the proximity sensor, since it detects whether an obstacle approaches in the front direction of the mobile terminal, the desktop is a fixed obstacle in a close distance; i.e. the proximity sensor is in a shielded state at this time. Therefore, if the proximity sensor is judged whether to be shielded or not directly according to the intensity of the ambient light, a large number of false recognition results are inevitably generated, and therefore the recognition accuracy of the proximity sensor approaching abnormity is difficult to effectively guarantee.
As an optional embodiment of the present application, in order to accurately identify a situation that a proximity sensor is not blocked, in the embodiment of the present application, two dimensional data, namely, ambient light intensity and a spatial attitude of a mobile terminal, are simultaneously integrated to identify whether the proximity sensor is blocked, where the identification process is as follows:
the mobile terminal acquires the ambient light intensity and the gesture data of the mobile terminal, and identifies whether the proximity sensor is shielded or not based on the ambient light intensity and the gesture data.
The ambient light intensity can be detected by an ambient light sensor in the mobile terminal, and the attitude data can be detected by an attitude sensor in the mobile terminal. Meanwhile, the types of the attitude sensors which can be used include, but are not limited to, a gyroscope, a multi-axis accelerometer and a gravity sensor, and are determined according to the actual hardware configuration of the mobile terminal.
Although the detected ambient light is strong, it cannot indicate whether the proximity sensor is blocked, whereas when the ambient light is weak, it indicates that the mobile terminal is highly likely to be in a blocked scene. For example, in a user's pocket, the proximity sensor is also in a shielded state at this time, so the embodiment of the present application still retains the ambient light intensity as one of the indexes for detecting whether the proximity sensor is shielded. Meanwhile, it is considered that the mobile terminal may assume various gestures in space while being used by a user. For example, referring to fig. 4, the portrait screen posture when the user operates the portrait screen, and the landscape screen posture when the user places the desk upside down and upside down in fig. 3, and the like. Practical application shows that the possibility that the proximity sensor is shielded in different postures is greatly different, for example, when the mobile terminal is in a back transverse screen posture, a user generally places the back of the mobile terminal upwards on an object such as a table, a stool and the like, and the proximity sensor is in a shielded state at the moment. When the mobile terminal is in the vertical screen posture or the approximate vertical screen posture, generally, the user is using the mobile terminal, and the proximity sensor is in the state of not being shielded at the moment. Based on the principle, the embodiment of the application also takes the spatial attitude of the mobile terminal as one of the consideration indexes, that is, the ambient light intensity and the attitude data of the mobile terminal are simultaneously integrated to judge whether the proximity sensor is possibly in the shielded state.
Specifically, the embodiment of the present application may set a light intensity threshold as a measure of the intensity of the ambient light, or set a set of calculation rules for the light intensity threshold, so as to calculate the corresponding light intensity threshold when the ambient light intensity needs to be compared. Meanwhile, some space gestures with smaller shielding probability of the proximity sensor can be selected, and gesture data corresponding to the gestures are set, so that the space gestures when the proximity sensor is not shielded can be identified.
In the embodiment of the present application, the setting method of the light intensity threshold is not limited, and the setting method can be selected or set by a technician according to actual requirements. In some embodiments, the light intensity threshold may be set to a fixed value, and the magnitude of the specific fixed value is not limited herein, and a suitable light intensity threshold may be set by a technician according to actual needs. For example, the light intensity threshold may be set to any value between 30 lux and 70 lux, such as 50 lux or 60 lux, depending on the geographical area where the actual user is located. In other embodiments, instead of a fixed light intensity threshold, a corresponding set of light intensity threshold calculation rules may be set. Also, the specific calculation rule is not limited herein, and can be set by a skilled person according to actual needs. The setting of the calculation rules may be made, for example, depending on the geographical area where the actual user is located and the time period (e.g., day or night) in which it is located in real time, among other factors. In these embodiments, the calculation rules may be set as: presetting a reference value, setting different constant item coefficients for different geographical areas and time periods, and calculating a summation value of the reference value according to the constant item coefficients corresponding to the geographical areas and the time periods where the users are located in real time so as to obtain a finally used light intensity threshold.
Meanwhile, the selected spatial attitude and the corresponding attitude data are not limited in the embodiment of the application, and can be selected or set by technicians. In some embodiments, the portrait pose may be set to the spatial pose required in embodiments of the present application. At this time, the corresponding attitude data set in the vertical screen attitude of the mobile terminal can be used as judgment data when the proximity sensor is not shielded, namely, at this time, as long as the ambient light intensity is greater than the intensity threshold value and the attitude data of the mobile terminal belongs to the corresponding attitude data set in the vertical screen attitude, the proximity sensor can be judged not to be shielded. On the contrary, as long as the ambient light intensity is less than or equal to the intensity threshold value and the gesture data of the mobile terminal do not belong to the corresponding gesture data set in the vertical screen gesture, any one or two conditions are met, and the proximity sensor is judged to be shielded.
Referring to fig. 5, the attitude data of the mobile terminal includes three attitude angles of a pitch angle, a roll angle, and a yaw angle. The pitch angle, the roll angle and the yaw angle respectively refer to included angles generated by rotation of the mobile terminal around an x axis, a y axis and a z axis of a coordinate system of the mobile terminal.
It should be understood that, although the attitude angle of the mobile terminal includes three kinds of angle data, namely, a pitch angle, a yaw angle and a roll angle, the attitude data is different according to the actually selected spatial attitude. The attitude data acquired in the embodiments of the present application may include any one or more of a pitch angle, a yaw angle, and a roll angle. For example, when the selected spatial attitude can be identified only according to the pitch angle and the roll angle, the attitude data corresponding to the spatial attitude only needs to include angle data of the pitch angle and the roll angle. Correspondingly, the attitude data in the embodiment of the present application only includes angle data indicating a pitch angle and a roll angle at this time, and the yaw angle does not need to be considered. Therefore, the attitude data content which is actually required to be acquired in the embodiment of the application needs to be determined according to the attitude data condition corresponding to the actually selected spatial attitude.
As an alternative embodiment of the present application, it is considered that in practical applications, when a user holds the mobile terminal, the proximity sensors are all in an unobstructed state, while the spatial posture of the mobile terminal is changed during the holding process, and the pitch angle and the roll angle corresponding to the held mobile terminal have a certain floating space. Therefore, in order to accurately identify whether the proximity sensor is shielded, the gesture set corresponding to the situation that the mobile terminal is held by a user is selected as the spatial gesture set which is judged that the proximity sensor is not shielded, and the corresponding pitch angle value range and the corresponding roll angle value range are set for detection. The identification process of whether the proximity sensor is shielded or not in the embodiment of the application is as follows:
the mobile terminal obtains ambient light intensity and angle data of a pitch angle and a roll angle of the mobile terminal, if the ambient light intensity is larger than an intensity threshold value, the angle data of the pitch angle belongs to a preset pitch angle value range, the angle data of the roll angle belongs to a preset roll angle value range, and it is judged that the proximity sensor is not shielded. On the contrary, as long as the environmental light intensity is less than or equal to the intensity threshold value, the angle data of the pitch angle does not belong to the preset pitch angle value range, and the angle data of the roll angle does not belong to the preset roll angle value range, any one or more of the three conditions can determine that the proximity sensor is shielded.
In the embodiment of the application, the specifically set pitch angle range and roll angle range are not limited, and technical personnel can detect the change conditions of the corresponding pitch angle and roll angle when the actual mobile terminal is held and set according to the detection result, and in some embodiments, the pitch angle range can be set to be [ -50 degrees, 15 degrees ], and the roll angle range can be set to be [ -30 degrees, 30 degrees ].
In the embodiment of the application, whether the mobile terminal is held by a user is accurately identified through the pitch angle and the roll angle of the mobile terminal, and when the mobile terminal is held by the user and the ambient light intensity is strong, the proximity sensor is determined not to be shielded, so that whether the proximity sensor is shielded is accurately identified.
S202, if the proximity sensor is not shielded, the mobile terminal samples the output value of the proximity sensor to obtain a first sample output value, and performs data stability analysis on the first sample output value to obtain a corresponding stability analysis result.
When the proximity sensor is not shielded, if the proximity sensor is not abnormal, the reflected infrared ray received by the proximity sensor is continuously weaker or the reflected infrared ray can not be received, so that the output value of the proximity sensor is continuously smaller; however, if the proximity sensor has an approach abnormality, the output value of the proximity sensor continues to be large, and therefore, theoretically, the approach abnormality of the proximity sensor can be effectively detected without being blocked by the proximity sensor.
Based on the above principle, it is theoretically possible to recognize whether or not there is an approach abnormality in the proximity sensor by detecting whether or not the output value of the proximity sensor continues to be large when the proximity sensor is not shielded. On the one hand, in practical application, it is found that it is difficult to ensure that the detection result is absolutely accurate no matter what method is used for detecting whether the proximity sensor is shielded or not. Therefore, even if the proximity sensor is not shielded as a result of the detection in S201, there may be a small probability that the proximity sensor is actually in a shielded state, and at this time, if it is determined whether there is an abnormal proximity sensor directly from whether the output value of the proximity sensor continues to be large, the accuracy of the recognition result may be reduced. However, in practical applications, it is found that, no matter what kind of shielding condition is, due to the influence of factors such as the movement of the obstacle itself and light in the environment, the intensity of the infrared light received by the proximity sensor under the shielding condition has a certain fluctuation, and finally, the output value reflected as the proximity sensor also has a certain fluctuation. Therefore, secondary screening of the shielding situation can be achieved theoretically according to the fluctuation of the output value of the proximity sensor, and double guarantee is provided for identification of the proximity anomaly. On the other hand, in practical use, it is found that, in a proximity sensor having a proximity anomaly, the output value is generally extremely stable with a very small fluctuation value, and therefore, by analyzing the stability of the output value of the proximity sensor, it is possible to identify whether or not the proximity sensor is in the proximity anomaly.
Based on the analysis, when detecting that the proximity sensor is not shielded, the embodiment of the application starts to sample the output value of the proximity sensor, and simultaneously performs data stability analysis on the obtained first sample output value, so that a stability analysis result capable of representing output value fluctuation is obtained, and required data are provided for abnormal detection of the proximity sensor based on the size of the first sample output value and the stability analysis result.
In the embodiment of the present application, the sampling frequency of the proximity sensor output value is not limited, and can be set by a technician according to actual requirements, and in some embodiments, the sampling frequency can be set to any one of 30 times/second to 60 times/second.
In the embodiment of the present application, the data stability analysis refers to analyzing the degree of dispersion or concentration of data to obtain a quantitative result of data stability. For a group of data, the higher the dispersion degree among the data is, the larger the data fluctuation is, the worse the concentration degree among the data is, and the worse the data stability is; when the dispersion degree between the data is lower, the data fluctuation is smaller, and the higher the concentration degree between the data is, the better the data stability is.
In the embodiment of the present application, the data stability may be quantified by using any one or two of a data discrete degree analysis and a data concentration degree analysis, which may be specifically selected or set by a technician according to actual needs, and is not limited herein. Meanwhile, the embodiment of the present application does not limit the specific analysis method of data stability, and can be selected or set by a technician according to actual requirements, including but not limited to, for example, an adjacent difference method, a worst difference method, a statistical method (e.g., calculating a variance and a standard deviation), a percentage scale method, and the like. According to different selected data stability analysis methods, the data types corresponding to the stability analysis results can have certain differences. For example, in some embodiments, an adjacent difference method may be used to perform data stability analysis, where each time an output value of the proximity sensor is sampled, the sampled output value is subtracted from an output value of a previous sample, and a calculated difference is used as a stability analysis result. In these embodiments, the stability analysis result is therefore a value that changes in real time with each sampling of the output value. In other embodiments, the variance in the statistical method may also be used as the stability analysis result, and at this time, after sampling for a period of time, the variance calculation is performed on the sampled output value, and the obtained variance value is used as the corresponding stability analysis result. In some embodiments, a stability level may be determined according to the value of the value that can characterize the stability of the data, and the stability level may be used as the stability analysis result. For example, the data stability is divided into a first level, a second level and a third level, and after a value representing the data stability is calculated, a corresponding level is determined according to the value. Thus, in these embodiments, the stability analysis results are a specific scale rather than a numerical value.
And S203, the mobile terminal obtains a detection result of whether the proximity sensor is abnormal or not according to the first sample output value and the stability analysis result.
On the basis of obtaining the first sample output value and the corresponding stability analysis result, the embodiment of the application can detect whether the first sample output value is continuously large, and can detect whether the first sample output value is stable according to the stability analysis result, and comprehensively judge whether the proximity sensor has proximity anomaly according to the two detection results.
In order to measure whether the first sample output value is larger, in the embodiment of the present application, a first output value threshold is preset, and when the first sample output value is larger than the first output value threshold, it is determined that the first sample output value is larger; and when the output value is not larger than the first output value threshold value, judging that the first sample output value is smaller. The specific threshold value of the first output value is not limited herein, and may be set by a technician according to the actual proximity sensor. For example, after determining the type of proximity sensor to be analyzed and detected, a technician may perform output value detection on some proximity sensors of the same type having proximity anomaly in advance, and set the first output threshold required in the embodiment of the present application according to the actual detection result. In some embodiments, when the proximity sensor is an infrared proximity sensor, the first output value threshold may be set to any one of 1600-2000, such as 1800 or 1900.
Meanwhile, in order to measure whether the output value output by the proximity sensor is stable, namely whether the fluctuation is large, a preset value range is preset in the embodiment of the application, when the stability analysis result is in the preset value range, the embodiment of the application judges that the output value output by the proximity sensor is stable, otherwise, if the output value output by the proximity sensor is not in the preset value range, the output value is considered to be large and unstable in fluctuation. Similarly, the embodiment of the present application does not limit the specific preset value range, and the skilled person can set the value according to the used data stability analysis method and the actual requirement for the stability of the output value. It should be noted that, since the discrete degree of the data is negatively correlated with the stability of the data, and the concentration degree is positively correlated with the stability of the data, the setting manner of the preset value range may also have a certain difference according to the different quantization manners of the stability of the data in practical applications. For example, when the data stability is quantified only by analyzing the discrete degree, an upper threshold is often set, and when the stability analysis result is smaller than the upper threshold, it is determined that the output value is stable. When the data stability is quantified only by selecting the concentration degree, a lower threshold is often set, and when the stability analysis result is higher than the lower threshold, the output value is judged to be stable. And when the two modes are simultaneously selected, respectively setting an upper threshold and a lower threshold, and judging that the output value is stable when the result obtained by the discrete degree analysis mode is smaller than the upper threshold and the result obtained by the concentrated degree analysis mode is larger than the lower threshold.
In the embodiment of the application, only when the proximity sensor is identified not to be shielded, the sampling and the abnormal detection of the output value of the proximity sensor are started. When sampling and abnormality detecting are performed on the output value of the proximity sensor, the size of the sampled output value and the data stability are detected to judge whether the proximity sensor continuously and stably outputs abnormal data. Through the identification of whether being sheltered from and the data stability analysis, both realized approaching the stable characteristic detection of output value when unusual to the proximity sensor, realized the secondary screening to the condition of sheltering from again, provide dual assurance for approaching unusual detection, and then realized whether having the accurate reliable detection of approaching unusually to the proximity sensor.
As a specific implementation manner of S203 in the embodiment corresponding to fig. 2B, referring to fig. 6, S203 may be replaced with S601. The anomaly detection method provided by the embodiment of the application comprises the following steps:
s201, the mobile terminal identifies whether the proximity sensor is shielded.
S202, if the proximity sensor is not shielded, the mobile terminal samples the output value of the proximity sensor to obtain a first sample output value, and performs data stability analysis on the first sample output value to obtain a corresponding stability analysis result.
The descriptions of S201 and S202 can refer to the description of the embodiment corresponding to fig. 2B, which is not repeated herein.
S601, if the output values of the samples obtained by sampling are all larger than a first output value threshold value within a first time length after the sampling is started, and the stability analysis result is in a preset value range, the mobile terminal judges that the detection result is that the proximity sensor has proximity anomaly.
Whether the first sample output value continues to be large and whether the first sample output value is stable are the results of analyzing the first sample output value over a period of time. Therefore, on the basis of setting the first output value threshold and the preset value range, the embodiment of the application also sets a first time length as the corresponding duration detection time length, and analyzes the value and the data stability of the first sample output value sampled in the first time length to judge whether the proximity sensor is abnormal. In theory, the longer the first duration is, the higher the reliability of the detection result is, but the longer the first duration is, the lower the detection efficiency is, and the increase of the power consumption of the mobile terminal is caused, so that the specific value of the first duration can be set by a technician according to actual needs, which is not limited herein. In some embodiments, the first time period may be set to any one of 0 to 60 minutes.
On the basis of setting the first time duration, the embodiment of the application compares the first output value threshold value with the first sample output value sampled every time in the first time duration after the sampling is started. Meanwhile, whether the stability analysis result of the first sample output value sampled in the first time length is within a preset value range or not can be judged, if the first sample output value collected in the first time length can meet two requirements of numerical value and data stability, the output value of the proximity sensor is stable and large at the moment, the judgment standard of proximity anomaly is met, and the embodiment of the application can judge that the detection result is that the proximity sensor has proximity anomaly. On the contrary, if the first sample output value is not greater than the first output value threshold, or the stability analysis result is not within the preset value range, the embodiment of the application can determine that the proximity sensor is not in proximity anomaly, and end the detection operation of the proximity sensor in proximity anomaly.
As an alternative embodiment of the present application, a way of analyzing the degree of dispersion is selected to quantify the stability of the data. At this time, the stability analysis result output in S202 is the data fluctuation value obtained by analyzing the discrete degree of the output value. As can be seen from the above description of S203, the preset value range may be replaced by an upper threshold, and in the embodiment of the present application, a preset fluctuation threshold is set as the upper threshold.
On this basis, the "stability analysis result is in the preset value range" in S601, and in the embodiment of the present application, the "data fluctuation value is smaller than the preset fluctuation threshold value" may be replaced.
The specific size of the preset fluctuation threshold may be set by a technician according to actual needs, and is not limited herein. For example, when the proximity sensor is an infrared proximity sensor, in some embodiments where the data stability analysis is performed by using the adjacent difference method, the preset fluctuation threshold may be set to any one of values from 50 to 200.
It should be understood that, in the embodiments of the present application, a data stability analysis method used specifically is not limited. As can be seen from the foregoing description in the embodiments of the present application, the stability analysis result output in S202 may be data that changes with the change of the sampling condition of the output value, depending on the data stability analysis method used. For example, in the adjacent difference method, the stability analysis result may change in real time with each output value sampling. For another example, the statistical method analyzes all the first sample output values in a period of time to obtain the corresponding stability analysis result. However, if the end time of the analysis time period is set to be the time from the current sampling to the first sample output value in some embodiments, for example, assuming that variance calculation is performed on the first sample output value obtained by the last 20 seconds of sampling, the corresponding stability analysis result will also be changed when a new first sample output value is sampled each time before the first time period sampling is finished. Meanwhile, the output stability analysis result may also be a fixed data obtained by analyzing all the first sample output values in the first duration after the first duration sampling is completed, for example, performing variance calculation on all the first sample output values in the first duration, and taking the variance as a corresponding stability analysis result, so that the detection process of the stability analysis result in the embodiment of the present application may also have a certain difference corresponding to different stability analysis result output situations. Specifically, the method comprises the following steps:
in some embodiments, if the data stability analysis method is selected, the correspondingly generated stability analysis result is data that changes with the change of the sampling condition of the output value. At this time, in the embodiment of the present application, after a new stability analysis result is generated each time, it is also determined whether the new stability analysis result is within the corresponding preset value range. Before the sampling of the first duration is finished, as long as the stability analysis result does not belong to the preset value range, the output value of the proximity sensor is judged to be unstable. For example, when the adjacent difference method is used for analysis, each time the first sample output value is sampled in S202, the first sample output value sampled this time is subtracted from the first sample output value sampled last time, and the difference value is used as the stability analysis result. At this moment, after the difference is calculated each time, the embodiment of the application determines whether the difference belongs to the preset value range, and if not, determines that the output value of the proximity sensor is unstable.
In other embodiments, the selected data stability analysis method is a fixed stability analysis result obtained by analyzing all the first sample output values in the first time period after the first time period sampling is completed. At this time, S202 analyzes the sampled first sample output value in the first duration after the sampling of the first duration is completed, and obtains a corresponding stability analysis result. Correspondingly, in the embodiment of the application, after the first time period sampling is finished, whether the stability analysis result finally calculated belongs to the preset value range is judged, and if not, the output value of the proximity sensor is judged to be unstable.
When mobile terminal operation control is performed based on proximity sensor data, in order to prevent mobile terminal operation abnormality caused by proximity abnormality, a common processing strategy is to directly fix a control state of the mobile terminal, and the fixed control state may affect indexes such as efficiency or power consumption of the mobile terminal. For example, in order to prevent the mobile terminal display from being continuously turned off due to an approach anomaly, a common processing strategy is to directly set the mobile terminal display to be normally on, and at this time, the probability of misoperation of a user and the power consumption of the mobile terminal are increased. Therefore, the influence on the use of the mobile terminal by the user is often large due to the accuracy of the actual proximity anomaly, and although the embodiment of the application can realize the detection of the proximity anomaly of the proximity sensor, a certain accidental error exists in single detection, and meanwhile, different grade requirements on the accuracy of the proximity anomaly detection in different scenes cannot be met.
Therefore, in order to meet the requirements of different levels of accuracy of detection of the proximity anomaly in different scenes, the accuracy of detection of the proximity anomaly is further improved. Referring to fig. 7A, on the basis of the embodiment corresponding to fig. 2B, in another embodiment of the present application, a method for detecting an approaching anomaly includes:
s701, the mobile terminal judges whether the proximity sensor is shielded. If the proximity sensor is not blocked, the operation of S702 is performed.
S702, the mobile terminal samples the output value of the proximity sensor to obtain a first sample output value, and performs data stability analysis on the first sample output value to obtain a corresponding stability analysis result.
The descriptions of S701 and S702 refer to the descriptions of S201 and S202 in the embodiment corresponding to fig. 2B, and are not repeated here.
And S703, if the first sample output values obtained by sampling are all larger than the first output value threshold value within the first time length after the sampling is started, and the stability analysis result is in a preset value range, counting and executing by the mobile terminal to sample the output values of the proximity sensor, so as to obtain the operation times of the first sample output values.
The operation principle of S701 is substantially the same as that of S601, and therefore, the description of the first duration, the size of the first sample output value, and the principle and the step of detecting the data stability can refer to the description in the embodiment corresponding to fig. 6, which is not repeated herein.
The difference from S601 is that after detecting that the output value of the proximity sensor is stable and large, the embodiment of the present application merely ends the detection flow of the first sample output value size and data stability at this time, and does not determine whether there is a reception abnormality in the proximity sensor. Meanwhile, after the detection process is finished each time, the embodiment of the application also counts the total times of executing the detection process after the proximity sensor is identified not to be shielded, and because the operation of returning to the step S702 is required to execute the detection process each time, the corresponding total times of detecting the proximity anomaly can be obtained only by counting the times of executing the operation. And ending the detection process means that the detection of the output value and the stability analysis result of the current sample is finished, and the detection result is that the output value is stable and larger.
As an alternative embodiment of the present application, in order to facilitate statistics of the total number of times of proximity abnormality detections, a variable may be set for recording the number of times of proximity abnormality detections. Namely, each time the approach abnormity detection of the proximity sensor is completed, the variable is subjected to self-adding operation, at the moment, the output value of the proximity sensor is sampled by the mobile terminal, the statistics of the operation times of the first sample output value is obtained, and only the real-time value of the variable needs to be subtracted from the initial value of the variable.
S704, the mobile terminal compares the operation number with a preset cycle number, and then executes S705 or S707.
S705, if the operation times are less than the preset cycle times, the mobile terminal detects the on-off state of the display screen of the mobile terminal.
Wherein the preset number of cycles is used to limit the total number of detection of the proximity anomaly. Because a certain accidental error often exists in single approach anomaly detection, in order to improve the accuracy of approach anomaly detection, a mechanism capable of selecting the number of approach anomaly detection times is provided in the embodiment of the application. The probability of accidental errors is adjusted through different times of proximity anomaly detection, so that the accuracy level of proximity anomaly detection can be adjusted. The preset cycle number is a control parameter for different accurate levels. Theoretically, the larger the preset cycle number is, the higher the accuracy of the approximate anomaly detection is, but the lower the detection efficiency and the higher the power consumption are, so that the specific preset cycle number value can be set by a technician according to the actual scene requirements or set the generation rule of the preset cycle number, which is not limited here. For example, in some embodiments, the value can be set to any one of 1 to 10, such as 2 or 4. In other embodiments, a preset cycle generation rule may be preset, and when the preset cycle needs to be used, the preset cycle may be processed according to the rule, so as to obtain the corresponding preset cycle in real time.
When the total number of times of the proximity anomaly detection does not reach the requirement of the preset cycle number, the embodiment of the application can continue to perform the next proximity anomaly detection. However, in practical application, it is found that if the next detection is started directly after one approach anomaly detection is completed, because the interval time between the two detections is too short, the difference of the environment conditions corresponding to the mobile terminal is generally very small or even possibly no difference, and the results of the two detections are often the same, so that the actual meaning of the next detection is small, and the improvement of the detection accuracy is small. Therefore, in order to ensure that the environmental conditions of two adjacent proximity anomaly detections have certain difference, after the total number of times of the proximity anomaly detection is detected to not reach the requirement of the preset cycle number, the embodiment of the application also can identify the on-off state change of the display screen, and judge whether the environment where the mobile terminal is located changes according to the on-off state change of the display screen, so as to determine whether to start the next proximity anomaly detection.
It should be noted that, because the timing of the change of the on-off state of the display screen cannot be predicted, in practical application, the identification of the change of the on-off state of the display screen includes two optional implementations of active identification and passive identification:
for active identification, the mobile terminal actively detects whether the display screen has a change of the on/off state, and returns to perform the operation of S702 when detecting that the change of the on/off state has occurred, which may specifically refer to the descriptions of S705 and S706, and is not described herein. When the on/off change is not detected, the operation of S702 is not executed, and the next detection is started according to a certain rule. The specific detection start rule is not limited herein, and may be set by a technician, for example, it may be set as periodic detection.
For passive identification, at the moment, the mobile terminal does not actively detect whether the on-off state of the display screen changes, but determines that the on-off state of the display screen changes when passively detecting an on-off switching instruction of the display screen. Since the state of the display screen cannot be actively detected, in this embodiment, the situation that the on-off state of the display screen is not changed does not occur, but the on-off switching instruction is continuously waited until the result that the on-off state of the display screen is changed is obtained. Now referring to fig. 7B, in the embodiment corresponding to fig. 7A, in this embodiment, the two steps S705 and S706 are replaced by "S7001, if the number of operations is less than the preset number of cycles, and the mobile terminal detects the on/off switching instruction for its display screen, the mobile terminal returns to a step of executing the operation of S702". The corresponding S704 will not perform S705 thereafter but S7001. The triggering manner of the on/off switching command is not limited herein, and needs to be determined according to the actual scene, including but not limited to: user active input, third party device transmission or active generation by mobile terminal internal program.
S706, the mobile terminal judges whether the on-off state of the display screen changes. If the on-off state of the display screen changes, the mobile terminal returns to execute the operation of S702.
The display screen is changed from a bright screen to a dark screen or from the dark screen to the bright screen. When the display screen is changed in the on-off state, the user is indicated to operate the mobile terminal, or the mobile terminal detects changes of some environmental parameters. Namely, the environment of the mobile terminal is changed to some extent. Therefore, when detecting that the on-off state of the display screen changes, the embodiment of the present application returns to execute the operation of S702, thereby starting a new round of proximity sensor proximity anomaly detection.
When the brightness state change is detected, the number of times of the brightness state change is not limited. If the change of the on-off state of the display screen is detected once, a new round of approach abnormity detection is triggered and started; or a plurality of on-off state changes need to be detected to trigger and start a new round of proximity anomaly detection. When a user needs to use the mobile terminal, the user needs to take the mobile terminal to a hand for operation, so that effective switching of the on-off screen can be realized, and the space environment where the mobile terminal is located is changed. Therefore, theoretically, the more the number of times of the change of the on-off state of the display screen is, the greater the probability of the change of the space environment where the corresponding mobile terminal is located is. In practice, the time interval between the on/off state changes of the display screen two adjacent times is difficult to predict, so that the larger the change number is set, the lower the corresponding detection efficiency is. Therefore, the specific set value of the number of changes can be set by a technician according to actual needs. In some embodiments, the number of changes may be set to 2. At this time, it is required to detect that the display screen is changed from the on state to the off state once and the display screen is changed from the on state to the off state once (the detection sequence of the two is not limited), and then it is determined that the change of the on state and the off state of the display screen meets the requirement, and the operation of sampling the output value of the proximity sensor to obtain the first sample output value is executed.
And S707, if the operation times are equal to the preset cycle times, the mobile terminal judges that the detection result is that the proximity sensor has proximity anomaly.
In the embodiment of the application, in the process of detecting the proximity anomaly of the proximity sensor every time, as long as the size of the first output value sample or the data stability requirement does not meet the requirement, it is determined that the proximity anomaly does not exist in the proximity sensor, and the proximity anomaly detection of the proximity sensor is terminated. Therefore, when the counted operation times is equal to the preset cycle times, it is indicated that the detection results of the continuous preset cycle times of the embodiment of the present application all indicate that the proximity sensor has proximity abnormality, and therefore, the embodiment of the present application may determine that the proximity sensor has proximity abnormality at this time.
In the embodiment of the application, the proximity sensor is subjected to proximity anomaly detection with selectable times by setting a mechanism for selecting the proximity anomaly detection times, so that a technician can select and set a proper preset cycle time according to the requirement of an actual scene on the accuracy of the proximity anomaly detection, and perform detection corresponding to the preset cycle time, thereby meeting the requirements of different actual scenes on different levels of detection accuracy as much as possible. Meanwhile, when the preset cycle number is greater than 1, the embodiment of the application also determines whether the environment of the mobile terminal is changed or not based on the change condition of the on-off state of the display screen of the mobile terminal, and further determines the starting time of each approach to the abnormal detection, so that the effectiveness of each approach to the abnormal detection is guaranteed, and the accuracy of the multiple approach to the abnormal detection is further improved.
As an alternative embodiment of the present application, on the basis of the foregoing embodiments of the present application, the embodiments of the present application control the on/off state of the display screen of the mobile terminal based on the detection result of the proximity anomaly obtained in S2003, S203, S601, or S709, that is, after S2003, S203, S601, or S709, the embodiments of the present application include:
when the terminal needs to use the data reported by the proximity sensor, if the detection result shows that the proximity sensor has proximity abnormality, the mobile terminal ignores the data reported by the proximity sensor. Or
When the terminal needs to use the data reported by the proximity sensor, if the detection result shows that the proximity sensor has proximity abnormity, the mobile terminal sets the screen of the mobile terminal to be normally bright.
In a scene where the output value of the proximity sensor needs to be called to control the on-off state of the display screen of the mobile terminal, the on-off state control scheme of the display screen generally includes two types. The first is to perform the display on/off state control according to only the output value of the proximity sensor, and the second is to perform the display on/off state control according to both the output value of the proximity sensor and other parameters of the mobile terminal. The other parameters used can be selected and set by the technical personnel according to the actual mobile terminal condition. In some embodiments, the other parameters may be set to any one or more of ultrasonic data of the mobile terminal, a received user touch instruction, and a recognized user gesture instruction. Corresponding to the above two control schemes, when the detection result of each embodiment of the present application is that the proximity sensor has proximity anomaly, the embodiment of the present application may adopt any one of the following two schemes to control the on-off state of the display screen of the mobile terminal:
1. when the original display screen on-off state control scheme of the mobile terminal is the first-class scheme, the display screen is set to be normally on according to the embodiment of the application.
2. When the original display screen on-off state control scheme of the mobile terminal is the second-class scheme, the embodiment of the application ignores data reported by the proximity sensor, and controls the on-off state of the display screen according to other originally selected parameters.
When recognizing that the proximity sensor is close to abnormal, the embodiment of the application can modify the original display screen on-off control scheme in time, set the display screen to be normally on, or control the display screen on-off by referring to other parameters of the mobile terminal, thereby avoiding the occurrence of the situation that the display screen of the mobile terminal is continuously off due to the proximity sensor being close to abnormal.
As an alternative embodiment of the present application, it is considered that the essence of the above two schemes is to perform the control of the on-off state of the display screen without referring to the output value of the proximity sensor, so in the embodiment of the present application, when it is recognized that the proximity sensor has a proximity anomaly, the proximity sensor may be directly turned off to reduce the power consumption of the mobile terminal.
In practical application, the process of approaching the abnormal detection needs a certain time, and meanwhile, certain mobile terminal processor resources need to be occupied. Therefore, when the proximity sensor itself has no proximity anomaly, if the detection method of the embodiments of the present application is directly adopted for processing, certain processor resources are definitely wasted.
In order to improve the detection efficiency of whether the proximity sensor has proximity anomaly or not and save the processor resource of the mobile terminal, the embodiment of the application can perform rapid detection on the output value of the proximity sensor before the proximity sensor is shielded and identified. And then determining whether the detection steps of the embodiments of the present application need to be executed based on the result of the rapid detection. Before S201 or S701, the step of quickly detecting the proximity sensor in the embodiment of the present application includes:
and the mobile terminal samples the output value of the proximity sensor to obtain a second sample output value.
Before whether the proximity sensor is shielded or not is identified, sampling is carried out on the output value of the proximity sensor in advance to obtain a second sample output value for rapid detection.
And if the output values of the second samples sampled within the second time length are all smaller than or equal to the threshold value of the second output value, the mobile terminal judges that the proximity sensor has no proximity abnormity.
And if a value larger than a second output value threshold value exists in second sample output values sampled in a second time length, the mobile terminal executes the operation of identifying whether the proximity sensor is shielded, wherein the second output value threshold value is smaller than or equal to the first output value threshold value. When the embodiment of the present application is applied in combination with the embodiment corresponding to fig. 7A or fig. 7B, the operation of S701 is performed.
If the proximity sensor can continuously output a small value, it indicates that the proximity sensor can normally detect that the obstacle and the proximity sensor are in a distant state, i.e., it indicates that the proximity sensor does not have a proximity abnormality. Therefore, when it is detected that the second sample output values output by the proximity sensor in the second time period are all smaller than or equal to the second output value threshold, the embodiment of the present application may determine that the proximity sensor is not in proximity anomaly, and may not start the detection steps of the embodiments of the present application, so as to avoid waste of the processor resources of the mobile terminal.
In theory, the longer the second time period, the higher the reliability of the detection result, but the lower the detection efficiency. Therefore, the specific value of the second time period can be set by the technician according to the actual requirement, which is not limited herein. In some embodiments, the second time period may be set to 2 seconds to 10 seconds, for example, may be set to 3 seconds or 5 seconds. The second output value threshold is used to determine whether the second sample output value is small, and the specific size of the second output value threshold is not limited herein and can be set by a technician according to the actual proximity sensor. Specifically, the setting of the second output value threshold may be performed with reference to the setting description of the first output value threshold in the embodiment corresponding to fig. 2B, but it should be ensured that the second output value threshold is less than or equal to the first output value threshold, so as to ensure consistency of the front and back detections and ensure reliability of the detections.
When the proximity sensor cannot continuously output a small value, it is described that whether the proximity sensor can normally detect the distance state between the obstacle and the proximity sensor cannot be determined, and at this time, the detection steps of the embodiments of the present application may be started to accurately detect whether the proximity sensor is in an abnormal proximity state.
In the embodiment of the application, the approach sensor is rapidly detected before the detection of whether the approach sensor is in the abnormal approach state is started, so that whether the approach sensor can normally detect the away state of the obstacle is judged. And only when it cannot be determined whether the proximity sensor can normally detect the far state of the obstacle, starting the detection of whether the proximity sensor is shielded, and entering the detection steps of the embodiments of the present application. Therefore, the embodiment of the application can avoid the waste of the mobile terminal processor resources to a certain extent, and improve the detection efficiency of whether the proximity sensor has proximity abnormity.
In practical applications, if some operations of the mobile terminal need to be controlled based on data of the proximity sensor, for example, controlling the on/off of the display screen or controlling the brightness adjustment of the display screen, the starting timing of the proximity sensor proximity anomaly detection scheme is very important. If the starting time is not reasonable, the reliability of the detection result may be directly reduced, and the control of the mobile terminal may be inaccurate. For example, assume that the start timing is set to 1 month 1 morning 00 per year: 00. the time interval between two approach anomaly detections at this time is as long as 1 year. In one year, no matter what kind of change occurs to the proximity sensor, the actual proximity sensor condition can not be timely updated and detected at the moment, so that the reliability of the detection result is greatly reduced, and the operation control of the mobile terminal is carried out based on the detection result with low reliability, so that the accuracy of the control is certainly greatly reduced.
Therefore, in order to guarantee the reliability of the proximity sensor proximity anomaly detection result as much as possible and improve the accuracy of the operation control of the mobile terminal, on the basis of the above embodiments of the present application, as an optional embodiment of the present application, a trigger procedure for proximity anomaly detection of the proximity sensor includes:
when the mobile terminal detects that the mobile terminal executes the preset behavior or the preset operation, the approach anomaly detection operation of the approach sensor is started, and the approach anomaly detection operation of the approach sensor is periodically started by taking the preset time point as an initial time point and taking the third time length as a periodic value.
As another optional embodiment of the present application, the trigger procedure for detecting the proximity anomaly of the proximity sensor may be further configured to:
after the mobile terminal is started or after a detection function that a user clicks the proximity sensor to approach abnormity is detected, the proximity sensor is started to approach abnormity detection operation.
As still another alternative embodiment of the present application, the triggering process for detecting the proximity sensor proximity anomaly may also be set as follows:
and the mobile terminal periodically starts the operation of identifying whether the proximity sensor is shielded or not by taking the preset time point as an initial time point and the third duration as a periodic value.
When the proximity sensor needs to be quickly detected before S201 or S701 in practical application, the "starting of the detection of the proximity anomaly of the proximity sensor" in the embodiment of the present application refers to a step of quickly detecting the proximity sensor. However, when rapid detection is not required in practical applications, the "starting of detection of proximity anomaly of the proximity sensor" in the embodiment of the present application refers to the operation of S201 or S701. The specific detected preset behavior and the preset operation type are not limited herein, and can be set by the technician according to the needs, including but not limited to, e.g., a power-on behavior, and a function of detecting proximity anomaly of the proximity sensor by a user click.
For an alternative embodiment: when the mobile terminal detects that the mobile terminal executes the preset behavior or the preset operation, starting an approaching abnormity detection operation of the approaching sensor, and periodically starting the approaching abnormity detection operation of the approaching sensor by taking the preset time point as an initial time point and taking the third time length as a periodic value.
As a specific implementation manner of recognizing the preset behavior or the preset operation, in the embodiment of the present application, the recognized operation may be as follows: and if the preset trigger instruction is detected, judging that the mobile terminal executes the preset behavior or operation.
It is considered that the actual mobile terminal receives some corresponding control commands before starting to perform various actions and operations, or generates corresponding data or commands after performing various actions and operations. For example, after the user clicks the function of detecting the proximity anomaly of the proximity sensor, the mobile terminal generates a corresponding detection starting instruction. Therefore, in the embodiment of the present application, a preset behavior and operation to be detected may be analyzed in advance, a control instruction that may be received by the mobile terminal before the preset behavior and operation are executed and data or an instruction that may be generated after the preset behavior and operation are executed are determined, and then the data and the instruction are unified as a preset trigger instruction in the embodiment of the present application. In the normal operation process of the mobile terminal, if the existence of the preset trigger instructions is detected, the embodiment of the application judges that the mobile terminal executes the corresponding preset behavior or preset operation.
Meanwhile, the preset time point specifically used as the starting time point and the third time length of the specific starting period value are not limited in the embodiment of the application, and can be selected or set by technical personnel according to actual requirements. For the preset time point, in some embodiments, the preset time point may be a fixed time point, such as 00 a morning: 00. in other embodiments, the preset time point may also be a time point associated with some behavior or operation, for example, a time point when the booting is completed may be set; at the moment, the corresponding approach abnormity detection can be started as long as the startup is completed, and meanwhile, the corresponding approach abnormity detection is started periodically by taking the time point as a starting point. For the third duration, in order to avoid a situation that the detection result is low in reliability due to non-detection for too long time, in this embodiment of the present application, the third duration may be set to any value less than 1 month, for example, in some embodiments, the third duration may be set to be one week, and at this time, the proximity sensor may be subjected to proximity anomaly detection every other week, and in other embodiments, the third duration may also be set to be 1 hour, and at this time, the proximity sensor may be subjected to proximity anomaly detection every other hour.
For an alternative embodiment: after the mobile terminal is started or after a user clicks a detection function of proximity anomaly of the proximity sensor, the mobile terminal starts proximity anomaly detection operation of the proximity sensor.
In the embodiment of the application, a user can actively click the function for detecting the proximity anomaly of the proximity sensor when needed, or the mobile terminal is powered off and powered on again, and the mobile terminal starts the proximity anomaly detection operation of the proximity sensor after being powered on or after the user actively triggers the detection function. Therefore, the mobile terminal can not automatically start the detection operation of the proximity sensor for the proximity abnormity in the process of normal use of the user, and can not cause interference to the normal use of the mobile terminal by the user.
Generally, the time interval between the user and the mobile terminal to perform the power-on and power-off is not controllable. And it is unpredictable when the user will initiate the detection function for proximity sensor proximity anomalies. When the proximity sensor is not detected for a long time, the state of the proximity sensor may change during the period of non-detection. For example, the proximity sensor may be damaged due to a collision or the like, at which time the proximity sensor changes from normal to abnormal. For another example, the user takes the originally damaged proximity sensor to maintenance, and the proximity sensor is changed from abnormal proximity to normal. Therefore, if the presence or absence of the proximity abnormality in the proximity sensor is not detected for a long time, the reliability of the detection result may be lowered.
For an alternative embodiment: and the mobile terminal periodically executes the operation of identifying whether the proximity sensor is shielded or not by taking the preset time point as an initial time point and the third duration as a periodic value.
The setting of the starting time point and the third duration can refer to the above description, and is not repeated herein. The embodiment of the application realizes the timely updating of the state of the proximity sensor by periodically detecting whether the proximity sensor has proximity anomaly, and guarantees the reliability of the detection result of the proximity anomaly of the proximity sensor.
As can be seen from the description of the embodiment corresponding to fig. 2B, whether or not the proximity sensor is blocked greatly affects detection of proximity abnormality of the proximity sensor. When the proximity sensor is in a shielded state, the reliability of the result of the proximity sensor abnormality detection is low. Therefore, in order to guarantee the reliability of the abnormal detection result of the proximity sensor, while the operation of performing the abnormal proximity detection on the proximity sensor in the embodiments of the present application is executed, the embodiments of the present application may also continuously detect whether the proximity sensor is shielded; and when it is detected that the proximity sensor is blocked, the operation of detecting the proximity abnormality of the proximity sensor is terminated. At this time, no matter which operation is performed in the embodiments of the present application, the embodiments of the present application forcibly terminate the flow, determine that the detection of the proximity anomaly of the proximity sensor fails, and may not output the detection result related to the presence or absence of the proximity anomaly.
The detection frequency of whether the proximity sensor is shielded or not is not limited in the embodiment of the application, and can be specifically set by technical personnel according to actual requirements. In some alternative embodiments, any frequency of 10 times/min to 60 times/min may be set.
As can be seen from the above description of the embodiments of the present application, if the proximity sensor is changed from the non-shielded state to the shielded state during the detection of the proximity sensor for proximity anomaly, the mobile terminal will forcibly terminate the operation of detecting the proximity anomaly of the proximity sensor, so that the current detection fails. Meanwhile, as can be seen from the above description of the embodiments of the present application, the flow of triggering the detection of the proximity anomaly of the proximity sensor may be: and taking the preset time point as an initial time point and the third duration as a period value, and periodically starting the approaching anomaly detection operation of the approaching sensor. If the time interval between two effective detections is too long, the reliability of the detection result will be reduced. Therefore, in order to ensure the reliability of the detection result, on the basis of the foregoing embodiments of the present application, the process of triggering detection of proximity anomaly of the proximity sensor in the embodiments of the present application may be:
and the mobile terminal periodically starts the operation of identifying whether the proximity sensor is shielded or not by taking the preset time point as an initial time point and the third duration as a periodic value. If the proximity sensor is detected to be shielded, acquiring a second time point for next execution of the operation of identifying whether the proximity sensor is shielded according to a first time point and a third time length for the current execution of the operation of identifying whether the proximity sensor is shielded; and selecting a third time point from the first time point to the second time point, updating the starting time point to the third time point, and periodically starting the operation of identifying whether the proximity sensor is shielded or not.
As in the above-described embodiments, when it is necessary to perform rapid detection on the proximity sensor before S201 or S701 in practical applications, the "start of detection of proximity abnormality of the proximity sensor" in the embodiments of the present application refers to a step of performing rapid detection on the proximity sensor. However, when the rapid detection is not required in the practical application, the "starting of the proximity anomaly detection on the proximity sensor" in the embodiment of the present application refers to the operation of S201 or S701.
In the embodiment of the application, when it is detected that the proximity sensor is blocked, that is, the detection of the proximity sensor proximity anomaly is failed, the time point of the theoretical next starting is calculated according to the starting time point of the current detection and the set third duration of the period value. On the basis, a new starting time point is selected from the current starting time point to the next calculated starting time point. And finally, updating the original starting time point to the selected new starting time point, so as to lead the starting time of the next detection to be advanced. The specific method for selecting the new starting time point is not limited herein, and can be set by a technician. To illustrate by way of example, assume that the third time period is set to 1 day, while assuming that the last boot time is 1 month, 1 day, 00: 00, when the starting time point of the detection is 1 month, 2 days 00: 00. at this time, the next starting time point can be calculated to be 1 month, 3 days 00: 00. if the detection is normally started according to the third duration, 1 month and 1 day 00 will result: 00-1 month, 3 days 00: 00, one effective detection cannot be performed, so that the reliability of the detection result in the period is reduced. To prevent this, the embodiment of the present application selects a time point between the two time points as a new starting time point, for example, 1 month, 1 day, 12: 00. so that the next actual starting point in time becomes 1 month, 1 day, 12: 00, 2 days 00 before theoretical 1 month: 00.
according to the embodiment of the application, when detection fails every time, the detection time point of the proximity sensor approaching abnormity can be started in advance for the next time, and the reliability of the detection result can be prevented from being reduced due to the fact that the separation time of two effective detections is too long.
As an optional embodiment of the present application, it is considered that after the mobile terminal is turned on, according to different actual requirements of a user, the mobile terminal may need to call an output value of the proximity sensor and perform an operation, for example, the on-off state of the display screen of the mobile terminal is controlled according to the output value of the proximity sensor. In the method, the proximity sensor is detected by detecting the proximity anomaly of the proximity sensor, and the proximity anomaly of the proximity sensor is detected by detecting the proximity anomaly of the proximity sensor. On the other hand, as can be seen from theoretical analysis, the damage or abnormality of the optical device is not abrupt, i.e., the state of the proximity sensor should be consistent before and after the start-up.
Therefore, on the basis of the theory, the normal calling of the proximity sensor by the mobile terminal is ensured in a period from the completion of the startup to the time before the first detection result of the proximity sensor proximity abnormity comes out after the startup. After the detection result of the proximity sensor proximity abnormality is obtained in the embodiments of the present application described above. The embodiment of the application also can locally store the detection result. Meanwhile, in order to prevent the mobile terminal from losing detection result data after power failure, the embodiment of the application stores the detection result in a local nonvolatile memory. The stored detection result data may be updated based on the latest detection result of the proximity sensor proximity abnormality. Therefore, the mobile terminal can directly read the latest detection result from the nonvolatile memory after being started every time, and the read detection result is used as the actual state of the proximity sensor before the first detection result of the proximity sensor which is abnormal after being started is obtained. For example, the brightness and/or the on/off state of the display screen of the mobile terminal may be controlled according to the latest detection result read from the non-volatile memory. When the read detection result indicates that the proximity sensor is in proximity anomaly, the brightness and/or the on-off state of the display screen of the mobile terminal can be controlled by using other parameters of the output value of the non-proximity sensor according to the embodiment of the application, so that the interference of the anomalous proximity sensor on the control of the brightness and the on-off state of the display screen is avoided.
It should be understood that although the above embodiments are described by taking an infrared proximity sensor as an example, the embodiments of the present application can be applied to detection of proximity anomaly of other proximity sensors, such as detection of proximity anomaly of an ultrasonic proximity sensor, and the detection of proximity anomaly of other proximity sensors is included in the scope of the present application.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 8 shows a block diagram of a structure of an abnormality detection device of a proximity sensor according to an embodiment of the present application, which corresponds to the abnormality detection method of the proximity sensor according to the above embodiment, and only a part related to the embodiment of the present application is shown for convenience of explanation.
Referring to fig. 8, the abnormality detection device of the proximity sensor includes:
and an occlusion recognition module 81 for recognizing whether the proximity sensor is occluded.
And the data analysis module 82 is used for sampling the output value of the proximity sensor to obtain a first sample output value if the proximity sensor is not shielded, and performing data stability analysis on the first sample output value to obtain a corresponding stability analysis result.
And the anomaly detection module 83 is configured to analyze the first sample output value and the stability analysis result to obtain a detection result of whether the proximity sensor is anomalous.
Further, the occlusion recognition module 81 includes:
and acquiring the ambient light intensity and the attitude angle data of the proximity sensor, and identifying whether the proximity sensor is shielded or not based on the ambient light intensity and the attitude angle data.
Further, the abnormality detection module 83 includes:
and the first abnormity judgment module is used for judging that the detection result is that the proximity sensor has proximity abnormity if the first sample output value obtained by sampling is greater than the first output value threshold value within the first time length after the sampling is started and the stability analysis result is in a preset value range.
Further, the abnormality detection module 83 includes:
and the operation counting module is used for counting the operation times of sampling the output value of the proximity sensor to obtain the first sample output value if the first sample output value obtained by sampling is greater than the first output value threshold value within the first time length after the sampling is started and the stability analysis result is in a preset value range.
And the on-off detection module is used for detecting the on-off state of the display screen if the operation times are less than the preset cycle times. And if the on-off state of the display screen changes, the mobile terminal returns to execute the operation of sampling the output value of the proximity sensor to obtain the first sample output value.
And the second abnormity determining module is used for determining that the detection result is that the proximity sensor has proximity abnormity if the operation times are equal to the preset cycle times.
Further, the abnormality detection device of the proximity sensor further includes:
and the sampling module is used for sampling the output value of the proximity sensor to obtain a second sample output value.
And the pre-detection module is used for executing the operation of identifying whether the proximity sensor is shielded or not if a value larger than a second output value threshold value exists in a second sample output value obtained by sampling within a second time length, wherein the second output value threshold value is smaller than or equal to the first output value threshold value.
Further, the abnormality detection device of the proximity sensor further includes:
the first trigger module is used for executing the operation of identifying whether the proximity sensor is shielded or not if the first trigger module detects that the first trigger module executes the preset behavior or the preset operation.
Further, the abnormality detection device of the proximity sensor further includes:
and the second trigger module is used for periodically executing the operation of identifying whether the proximity sensor is shielded or not by taking the preset time point as an initial time point and the third duration as a period value.
Further, the second triggering module includes:
and the time point acquisition module is used for acquiring a second time point for executing the operation of identifying whether the proximity sensor is shielded next time according to the first time point and the third time length for executing the operation of identifying whether the proximity sensor is shielded next time if the proximity sensor is shielded.
And the time point updating module is used for selecting a third time point from the first time point to the second time point, updating the starting time point to the third time point and periodically executing the operation of identifying whether the proximity sensor is shielded or not.
Further, the abnormality detection device of the proximity sensor further includes:
and the storage module is used for storing the detection result into the local nonvolatile memory.
The process of implementing each function by each module in the anomaly detection device of the proximity sensor provided in the embodiment of the present application may specifically refer to the description of the embodiment shown in fig. 2B to 7 and other related method embodiments, and will not be described herein again.
It should be noted that, because the contents of information interaction, execution process, and the like between the above-mentioned apparatuses/units are based on the same concept as that of the method embodiment of the present application, specific functions and technical effects thereof can be referred to specifically in the method embodiment section, and are not described herein again.
Fig. 9 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application. The mobile terminal 9 of this embodiment includes: at least one processor 90 (only one shown in fig. 9), a memory 91, a proximity sensor 92, and a computer program 93 stored in the memory 91 and executable on the at least one processor 90, the processor 90 implementing the steps in any of the above-described respective proximity sensor anomaly detection method embodiments when executing the computer program 93.
The mobile terminal 9 may be a mobile computing device such as a mobile phone, a tablet computer, and a wearable device. The mobile terminal may include, but is not limited to, a processor 90, a memory 91, and a proximity sensor 92. Those skilled in the art will appreciate that fig. 9 is only an example of the mobile terminal 9, and does not constitute a limitation of the mobile terminal 9, and may include more or less components than those shown, or combine some components, or different components, such as an input-output device, a network access device, etc.
The Processor 90 may be a Central Processing Unit (CPU), and the Processor 90 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 91 may in some embodiments be an internal storage unit of the mobile terminal 9, such as a hard disk or a memory of the mobile terminal 9. The memory 91 may also be an external storage device of the mobile terminal 9 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the mobile terminal 9. Further, the memory 91 may also include both an internal storage unit and an external storage device of the mobile terminal 9. The memory 91 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 91 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function allocation may be performed by different functional units and modules according to requirements, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps that can be implemented in the above method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method implemented by the present application may be implemented by a computer program, which may be stored in a computer-readable storage medium and can implement the steps of the above-mentioned method embodiments when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing device/mobile terminal, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, and software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/mobile terminal and method may be implemented in other ways. For example, the above-described apparatus/mobile terminal embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In another aspect, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
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, 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.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (14)

1. An abnormality detection method for a proximity sensor, applied to a mobile terminal including the proximity sensor, comprising:
the mobile terminal samples an output value of the proximity sensor to obtain a first sample output value;
the mobile terminal performs data stability analysis on the first sample output value to obtain a stability analysis result;
and the mobile terminal obtains a detection result of whether the proximity sensor is abnormal or not according to the first sample output value and the stability analysis result.
2. The method of claim 1, wherein the mobile terminal, prior to sampling the output value of the proximity sensor, further comprises:
the mobile terminal identifies whether the proximity sensor is shielded;
and if the proximity sensor is not shielded, the mobile terminal executes the operation of sampling the output value of the proximity sensor.
3. The method of claim 2, wherein the mobile terminal identifying whether the proximity sensor is occluded comprises:
the mobile terminal acquires the ambient light intensity and the gesture data of the mobile terminal, and identifies whether the proximity sensor is shielded or not based on the ambient light intensity and the gesture data.
4. The method according to any one of claims 1 to 3, wherein the obtaining, by the mobile terminal, a detection result of whether the proximity sensor is abnormal according to the first sample output value and the stability analysis result includes:
if the first sample output values obtained by sampling are all larger than a first output value threshold value within a first time length after sampling is started, and the stability analysis result is in a preset value range, the mobile terminal judges that the detection result is that the proximity sensor has proximity anomaly.
5. The method of claim 4, wherein the stability analysis results include data fluctuation values; the stability analysis result is in a preset value range, and the stability analysis result comprises the following steps: the data fluctuation value is smaller than a preset fluctuation threshold value.
6. The method according to any one of claims 1 to 3, wherein the obtaining, by the mobile terminal, a detection result of whether the proximity sensor is abnormal according to the first sample output value and the stability analysis result includes:
if the first sample output values obtained by sampling are all larger than a first output value threshold value within a first time length after sampling is started, and the stability analysis result is in a preset value range, the mobile terminal carries out statistics on the number of times of operation for sampling the output values of the proximity sensor to obtain the first sample output values;
if the operation times are less than the preset cycle times and the on-off state of the display screen of the mobile terminal changes, the mobile terminal returns to execute the operation of sampling the output value of the proximity sensor to obtain a first sample output value;
and if the operation times are equal to the preset cycle times, the mobile terminal judges that the detection result is that the proximity sensor has proximity abnormity.
7. The method of any of claims 2 to 6, further comprising, before the mobile terminal identifies whether the proximity sensor is occluded:
the mobile terminal samples an output value of the proximity sensor to obtain a second sample output value;
and if a value greater than a second output value threshold value exists in the second sample output values sampled within a second time period, the mobile terminal executes the operation of identifying whether the proximity sensor is shielded, wherein the second output value threshold value is less than or equal to the first output value threshold value.
8. The method of any of claims 2 to 7, further comprising, before the mobile terminal identifies whether the proximity sensor is occluded:
and if the mobile terminal detects that the mobile terminal executes a preset behavior or a preset operation, executing the operation of identifying whether the proximity sensor is shielded or not.
9. The method of any of claims 2 to 8, before the mobile terminal identifies whether the proximity sensor is occluded, further comprising:
and the mobile terminal periodically executes the operation of identifying whether the proximity sensor is shielded or not by taking a preset time point as an initial time point and a third duration as a periodic value.
10. The method of claim 9, further comprising:
if the proximity sensor is shielded, acquiring a second time point for next execution of the operation of identifying whether the proximity sensor is shielded according to the first time point and the third time length for the current execution of the operation of identifying whether the proximity sensor is shielded;
and selecting a third time point from the first time point to the second time point, updating the starting time point to the third time point, and periodically executing the operation of identifying whether the proximity sensor is shielded.
11. The method according to any one of claims 1 to 10, further comprising, after said obtaining a detection result of whether the proximity sensor is abnormal:
and the mobile terminal stores the detection result into a local nonvolatile memory.
12. The method according to any one of claims 1 to 11, further comprising, after said obtaining a detection result of whether the proximity sensor is abnormal:
when the terminal needs to use the data reported by the proximity sensor, if the detection result indicates that the proximity sensor has proximity abnormality, the mobile terminal ignores the data reported by the proximity sensor; or
When the terminal needs to use the data reported by the proximity sensor, if the detection result indicates that the proximity sensor has proximity abnormality, the mobile terminal sets the display screen of the mobile terminal to be normally bright.
13. A mobile terminal comprising a proximity sensor, a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the mobile terminal implements the method according to any of claims 1 to 12 when the processor executes the computer program.
14. A computer-readable storage medium, storing a computer program, characterized in that the computer program, when executed, implements the method according to any of claims 1 to 12.
CN201911375969.6A 2019-12-27 2019-12-27 Method and device for detecting abnormity of proximity sensor and mobile terminal Active CN111182115B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911375969.6A CN111182115B (en) 2019-12-27 2019-12-27 Method and device for detecting abnormity of proximity sensor and mobile terminal
PCT/CN2020/125382 WO2021129147A1 (en) 2019-12-27 2020-10-30 Proximity sensor anomaly detection method and apparatus and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911375969.6A CN111182115B (en) 2019-12-27 2019-12-27 Method and device for detecting abnormity of proximity sensor and mobile terminal

Publications (2)

Publication Number Publication Date
CN111182115A true CN111182115A (en) 2020-05-19
CN111182115B CN111182115B (en) 2022-06-10

Family

ID=70654145

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911375969.6A Active CN111182115B (en) 2019-12-27 2019-12-27 Method and device for detecting abnormity of proximity sensor and mobile terminal

Country Status (2)

Country Link
CN (1) CN111182115B (en)
WO (1) WO2021129147A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021129147A1 (en) * 2019-12-27 2021-07-01 荣耀终端有限公司 Proximity sensor anomaly detection method and apparatus and mobile terminal
CN115314590A (en) * 2022-06-21 2022-11-08 华为技术有限公司 Proximity event determination method and electronic device
CN116879222A (en) * 2023-06-09 2023-10-13 钛玛科(北京)工业科技有限公司 Method and device for detecting self-adhesive

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114518133A (en) * 2022-01-13 2022-05-20 首钢京唐钢铁联合有限责任公司 Sensor value jump detection method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102265252A (en) * 2011-06-24 2011-11-30 华为终端有限公司 A method and a device for adjusting a sensing threshold value of an infrared proximity sensor
US20130260834A1 (en) * 2012-04-03 2013-10-03 Voxer Ip Llc Proximity detection system for operating a mobile communication device in either a handset mode or speakerphone mode
CN105519086A (en) * 2014-09-30 2016-04-20 华为技术有限公司 Method and device for controlling proximity optical sensor, and mobile terminal
CN106486127A (en) * 2015-08-25 2017-03-08 中兴通讯股份有限公司 A kind of method of speech recognition parameter adjust automatically, device and mobile terminal

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106443639B (en) * 2016-09-26 2019-05-17 深圳市金立通信设备有限公司 A kind of range calibration method and terminal
CN106547638B (en) * 2016-11-08 2019-09-03 Oppo广东移动通信有限公司 Prevent the method, device and mobile terminal of proximity state exception
CN109343066B (en) * 2018-09-18 2020-07-21 Oppo广东移动通信有限公司 Control method and device of proximity sensor, storage medium and mobile terminal
CN111182115B (en) * 2019-12-27 2022-06-10 荣耀终端有限公司 Method and device for detecting abnormity of proximity sensor and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102265252A (en) * 2011-06-24 2011-11-30 华为终端有限公司 A method and a device for adjusting a sensing threshold value of an infrared proximity sensor
US20130260834A1 (en) * 2012-04-03 2013-10-03 Voxer Ip Llc Proximity detection system for operating a mobile communication device in either a handset mode or speakerphone mode
CN105519086A (en) * 2014-09-30 2016-04-20 华为技术有限公司 Method and device for controlling proximity optical sensor, and mobile terminal
CN106486127A (en) * 2015-08-25 2017-03-08 中兴通讯股份有限公司 A kind of method of speech recognition parameter adjust automatically, device and mobile terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021129147A1 (en) * 2019-12-27 2021-07-01 荣耀终端有限公司 Proximity sensor anomaly detection method and apparatus and mobile terminal
CN115314590A (en) * 2022-06-21 2022-11-08 华为技术有限公司 Proximity event determination method and electronic device
CN116879222A (en) * 2023-06-09 2023-10-13 钛玛科(北京)工业科技有限公司 Method and device for detecting self-adhesive

Also Published As

Publication number Publication date
CN111182115B (en) 2022-06-10
WO2021129147A1 (en) 2021-07-01

Similar Documents

Publication Publication Date Title
CN111182115B (en) Method and device for detecting abnormity of proximity sensor and mobile terminal
US11169703B2 (en) Method for displaying graphical user interface and mobile terminal
CN106293445B (en) Method and device for acquiring application program use data and terminal equipment
CN106778707B (en) Fingerprint identification method, display screen and mobile terminal
CN108701043B (en) Display processing method and device
US10674452B2 (en) Terminal management method and apparatus
CN107942306B (en) Method and device for calibrating proximity sensor, storage medium and electronic equipment
CN110140342B (en) Screen locking interface processing method and terminal
CN103400108A (en) Face identification method and device as well as mobile terminal
CN102833419B (en) Method and terminal for controlling screen state
CN103823626A (en) Method and device for regulating display contents and electronic equipment
CN103399705A (en) Method, device and equipment for remotely controlling terminal equipment
CN110798511B (en) Method for predicting number of daily active users of target APP and computer equipment
CN110413497B (en) Abnormality monitoring method, abnormality monitoring device, terminal device and computer-readable storage medium
CN111064842B (en) Method, terminal and storage medium for recognizing special-shaped touch
CN110851014B (en) Touch recognition method and device, storage medium and terminal equipment
CN109309755B (en) Mobile terminal and APP display method and device
CN106484141A (en) The method to set up of threshold value and mobile terminal
CN110830658A (en) Mobile terminal control method and device, mobile terminal and storage medium
CN109902484B (en) Processing method of associated application and terminal
CN104765441B (en) A kind of method and apparatus that renewal of the page is realized based on eye movement
CN105094869A (en) Target program determination method and apparatus
CN111132282B (en) Application processor awakening method and device applied to mobile terminal
CN107239221B (en) Method and equipment for identifying mistaken contact and mobile terminal
CN104850557B (en) A kind of method, apparatus that multi-page same browser window is shown and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210425

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Applicant after: Honor Device Co.,Ltd.

Address before: 100085, No. 3, information road, Haidian District, Beijing

Applicant before: Beijing Huawei Digital Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant