CN110471068B - Proximity detection method and mobile terminal - Google Patents

Proximity detection method and mobile terminal Download PDF

Info

Publication number
CN110471068B
CN110471068B CN201910668066.0A CN201910668066A CN110471068B CN 110471068 B CN110471068 B CN 110471068B CN 201910668066 A CN201910668066 A CN 201910668066A CN 110471068 B CN110471068 B CN 110471068B
Authority
CN
China
Prior art keywords
mobile terminal
proximity detection
detection result
touch screen
ultrasonic sensor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910668066.0A
Other languages
Chinese (zh)
Other versions
CN110471068A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201910668066.0A priority Critical patent/CN110471068B/en
Publication of CN110471068A publication Critical patent/CN110471068A/en
Application granted granted Critical
Publication of CN110471068B publication Critical patent/CN110471068B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G01S15/00Systems using the reflection or reradiation of acoustic waves, e.g. sonar systems
    • G01S15/88Sonar systems specially adapted for specific applications

Abstract

The invention discloses a proximity detection method and a mobile terminal, wherein the method comprises the following steps: starting an ultrasonic sensor of the mobile terminal for proximity detection, and starting a touch screen of the mobile terminal for proximity detection; and if the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are both that an object approaches, determining that the object approaches the mobile terminal. In the embodiment of the invention, the proximity detection function of the proximity sensor can be simulated through the cooperation of the ultrasonic sensor and the touch screen. Because the ultrasonic sensor does not need to open a window or a hole in the front glass area of the mobile terminal and occupies a small space, the mobile terminal is favorable for realizing higher screen occupation ratio; and because the ultrasonic sensor and the touch screen both have the proximity detection function, the detection results of the ultrasonic sensor and the touch screen are integrated to carry out proximity detection of the full-screen mobile terminal, so that the deviation and the defect generated when the single sensor is used for carrying out the proximity detection can be overcome, and the proximity detection accuracy of the full-screen mobile terminal is improved.

Description

Proximity detection method and mobile terminal
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a proximity detection method and a mobile terminal.
Background
The proximity sensor is an indispensable part in the mobile terminal and is used for detecting the distance between the mobile terminal and a user, when the user answers a call, the mobile terminal is close to the head, so that the proximity sensor can measure the distance between the mobile terminal and the user, the screen is informed to be extinguished when the proximity sensor is too close to the mobile terminal, the screen is lightened again after the user answers the call and takes away the mobile terminal, and more electricity is saved while the user is prevented from mistakenly touching the mobile terminal.
With the continuous development of terminal technology, full-screen mobile terminals have become the trend of mobile terminal hardware configuration. However, the conventional proximity sensor is a sensor composed of an infrared light diode and a photodiode, and a window or an opening needs to be formed in a front glass area of the mobile terminal to ensure that infrared light can be received or transmitted, so that an ultra-high screen occupation ratio cannot be achieved, and therefore the conventional proximity sensor is not suitable for a full-screen mobile terminal. Under the circumstances, technical personnel in the field of cost need to solve the technical problem of how to realize the proximity detection of the full-screen mobile terminal.
Disclosure of Invention
The embodiment of the invention provides a proximity detection method and a mobile terminal, and aims to solve the technical problem that the proximity detection of a full-screen mobile terminal cannot be realized in the prior art.
To solve the above technical problem, the embodiment of the present invention is implemented as follows:
in a first aspect, an embodiment of the present invention provides a proximity detection method, where the method includes:
starting an ultrasonic sensor of a mobile terminal for proximity detection, and starting a touch screen of the mobile terminal for proximity detection;
and if the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are both that an object approaches, determining that the object approaches the mobile terminal.
Optionally, as an embodiment, the method further includes:
and if the proximity detection result of the ultrasonic sensor indicates that no object is close or the proximity detection result of the touch screen indicates that no object is close, determining that no object is close to the mobile terminal.
Optionally, as an embodiment, the method further includes:
starting an attitude sensor of the mobile terminal to detect the attitude of the mobile terminal;
if the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are both that an object approaches, determining that the object approaches the mobile terminal includes:
and if the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are both the object approaching state and the gesture detection result of the gesture sensor is the gesture of the mobile terminal out of the upward square gesture of the screen, determining that the object approaches the mobile terminal.
Optionally, as an embodiment, the determining that no object is close to the mobile terminal if the proximity detection result of the ultrasonic sensor is that no object is close or the proximity detection result of the touch screen is that no object is close includes:
and if the proximity detection result of the ultrasonic sensor indicates that no object is close, or the proximity detection result of the touch screen indicates that no object is close, or the gesture detection result of the gesture sensor indicates that the mobile terminal is in a screen-up square gesture, determining that no object is close to the mobile terminal.
Optionally, as an embodiment, the starting the touch screen for proximity detection includes:
and starting a preset area on the touch screen for proximity detection, wherein the preset area comprises at least one edge area of the touch screen.
In a second aspect, an embodiment of the present invention further provides a mobile terminal, where the mobile terminal includes:
the first starting unit is used for starting the ultrasonic sensor of the mobile terminal to carry out proximity detection;
the second starting unit is used for starting the touch screen of the mobile terminal to carry out proximity detection;
and the first determining unit is used for determining that an object approaches the mobile terminal under the condition that the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are both that the object approaches.
Optionally, as an embodiment, the mobile terminal further includes:
a second determination unit configured to determine that no object is approaching the mobile terminal when the proximity detection result of the ultrasonic sensor is that no object is approaching or the proximity detection result of the touch screen is that no object is approaching.
Optionally, as an embodiment, the mobile terminal further includes:
the third starting unit is used for starting the attitude sensor of the mobile terminal to detect the attitude of the mobile terminal;
the first determination unit includes:
the first determining subunit is configured to determine that an object approaches the mobile terminal when both the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are that the object approaches and the gesture detection result of the gesture sensor is a gesture of the mobile terminal other than a square gesture on a screen.
Optionally, as an embodiment, the second determining unit includes:
a second determining subunit, configured to determine that no object is approaching the mobile terminal when a proximity detection result of the ultrasonic sensor is that no object is approaching, or a proximity detection result of the touch screen is that no object is approaching, or a posture detection result of the posture sensor is that the mobile terminal is in a screen-up square posture.
Optionally, as an embodiment, the second starting unit includes:
the touch screen starting unit is used for starting a preset area on the touch screen to carry out proximity detection, wherein the preset area comprises at least one edge area of the touch screen.
In a third aspect, an embodiment of the present invention further provides a mobile terminal, including a processor, a memory, and a computer program stored on the memory and operable on the processor, where the computer program, when executed by the processor, implements the steps of the proximity detection method.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the steps of the proximity detection method.
In the embodiment of the invention, the proximity detection function of the proximity sensor can be simulated through the cooperation of the ultrasonic sensor and the touch screen, and the proximity detection is carried out on the mobile terminal with the full screen. Compared with the prior art, in the embodiment of the invention, when the ultrasonic sensor is arranged in the mobile terminal, the window opening or the hole opening is not needed in the front glass area of the mobile terminal, and the occupied space is small, so that the ultrahigh screen ratio of the mobile terminal is favorably realized; and because the ultrasonic sensor and the touch screen both have the proximity detection function, the detection results of the ultrasonic sensor and the touch screen are synthesized to carry out proximity detection of the full-screen mobile terminal, so that the deviation and the defect generated when the single sensor is used for carrying out the proximity detection can be overcome, and the proximity detection accuracy of the full-screen mobile terminal can be improved.
Drawings
FIG. 1 is a flow diagram of a proximity detection method of one embodiment of the present invention;
FIG. 2 is a flow chart of a proximity detection method of another embodiment of the present invention;
fig. 3 is a block diagram of a mobile terminal according to an embodiment of the present invention;
fig. 4 is a schematic hardware structure diagram of a mobile terminal implementing various embodiments of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The proximity sensor is an indispensable part of the mobile terminal, and the main function of the proximity sensor is to control the screen of the mobile terminal to be turned on or off when a user performs voice-type communication, for example, during a call or a WeChat voice, the screen of the mobile terminal is turned off when the mobile terminal is close to an ear, and the screen of the mobile terminal is turned on when the mobile terminal is far away from the ear, so that the purposes of saving power and preventing false touch are achieved.
With the screen occupation ratio of mobile terminals becoming higher and higher, full-screen mobile terminals have become the trend of mobile terminal hardware configuration. However, conventional proximity sensors are no longer suitable for full-screen mobile terminals. Under the circumstances, technical personnel in the field of cost need to solve the technical problem of how to realize the proximity detection of the full-screen mobile terminal. At present, the skilled person proposes two approaches for detecting the proximity of a full-screen mobile terminal: an ultrasound protocol and a touch screen protocol.
The detection principle of the ultrasonic scheme is as follows: the receiver sends out an ultrasonic signal, and whether an object is close to the mobile terminal is detected according to the ultrasonic signal returned by the microphone, however, the ultrasonic signal has no directivity, and the object is also detected to be close to the mobile terminal from the back or the top of the mobile terminal, so that the screen of the mobile terminal is mistakenly turned off.
The detection principle of the touch screen scheme is as follows: whether an object is close to the mobile terminal is detected through the change of the capacitance value of the touch screen, however, the detection distance of the touch screen is short, so that the mobile terminal does not extinguish the screen when the screen is supposed to be extinguished, and the function of preventing mistaken touch cannot be realized.
In order to solve the above technical problem, embodiments of the present invention provide a proximity detection method and a mobile terminal.
The approach detection method provided by the embodiment of the present invention is first described below.
It should be noted that the method provided by the embodiment of the present invention is applicable to a mobile terminal, and in practical application, the mobile terminal may include: smart phones, tablet computers, personal digital assistants, and the like, which are not limited in the embodiments of the present invention.
Fig. 1 is a flowchart of a proximity detection method according to an embodiment of the present invention, in which a proximity sensor is formed by an ultrasonic sensor and a touch screen in a mobile terminal, as shown in fig. 1, the method may include the following steps: step 101 and step 102, wherein,
in step 101, an ultrasonic sensor of the mobile terminal is started for proximity detection, and a touch screen of the mobile terminal is started for proximity detection.
In the embodiment of the invention, the problem that inaccurate detection is easy to generate when the mobile terminal is only subjected to proximity detection by the ultrasonic sensor of the mobile terminal is considered, the problem that screen should not be extinguished but is extinguished is easy to generate when the mobile terminal is only subjected to proximity detection by the touch screen of the mobile terminal, and the problem that screen should be extinguished but is not extinguished is easy to generate when the mobile terminal is subjected to proximity detection by the ultrasonic sensor of the mobile terminal.
For the situation, the embodiment of the invention can perform proximity detection on the mobile terminal through the ultrasonic sensor of the mobile terminal, and also perform proximity detection on the mobile terminal through the touch screen of the mobile terminal, and integrate the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen to determine the proximity detection state of the mobile terminal, so as to solve the problems of 'screen should not be turned off but turned off' caused by only using the ultrasonic sensor and 'screen should be turned off but not turned off' caused by only using the touch screen at present, thereby improving the accuracy of the proximity detection of the mobile terminal.
Since the proximity detection principle of the ultrasonic sensor in the embodiment of the present invention is the same as that of the ultrasonic sensor in the prior art, and the proximity detection principle of the touch screen in the embodiment of the present invention is the same as that of the touch screen in the prior art, details thereof are not repeated herein.
In the embodiment of the invention, the proximity detection result of the ultrasonic sensor can be divided into the proximity with an object and the proximity without an object, and the proximity detection result of the touch screen can also be divided into the proximity with an object and the proximity without an object. In practical applications, the approach detection result "with an object approaching" may be simply referred to as "approaching", and the approach detection result "without an object approaching" may be simply referred to as "departing".
In the embodiment of the invention, the touch screen of the mobile terminal can be started for proximity detection while the ultrasonic sensor of the mobile terminal is started for proximity detection; or in consideration of the power consumption of the mobile terminal, the ultrasonic sensor of the mobile terminal may be started to perform proximity detection, and when the proximity detection result of the ultrasonic sensor indicates that an object is approaching, the touch screen of the mobile terminal may be started to perform proximity detection.
In the embodiment of the invention, the approach detection result of the ultrasonic sensor can be stored in real time in the process of carrying out the approach detection on the ultrasonic sensor of the mobile terminal; in the process of proximity detection of the touch screen of the mobile terminal, the proximity detection result of the touch screen can be stored in real time, so that the real proximity state of the mobile terminal can be determined in real time by combining the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen.
In the embodiment of the present invention, when proximity detection is performed through a touch screen of a mobile terminal, considering that inaccurate detection results are easily caused if the entire touch screen is used for proximity detection, a partial area on the touch screen may be defined for proximity detection, and at this time, the step of starting the touch screen for proximity detection may specifically include: and starting a preset area on the touch screen for proximity detection, wherein the preset area comprises at least one edge area of the touch screen. For example, the preset area is an 1/5 area on the touch screen.
In step 102, if both the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are that an object is approaching, it is determined that an object is approaching the mobile terminal.
In the embodiment of the invention, if the proximity detection result of the ultrasonic sensor indicates that no object is close or the proximity detection result of the touch screen indicates that no object is close, it is determined that no object is close to the mobile terminal.
Specifically, if the proximity detection result of the ultrasonic sensor is that no object is close and the proximity detection result of the touch screen is that no object is close, it is determined that no object is close to the mobile terminal; if the proximity detection result of the ultrasonic sensor is that no object is close and the proximity detection result of the touch screen is that an object is close, determining that no object is close to the mobile terminal; if the proximity detection result of the ultrasonic sensor is that an object approaches and the proximity detection result of the touch screen is that no object approaches, determining that no object approaches the mobile terminal; and if the proximity detection result of the ultrasonic sensor is that an object approaches and the proximity detection result of the touch screen is that the object approaches, determining that the object approaches the mobile terminal.
For the convenience of visual understanding, the above several cases are described by using a table, which is specifically shown in the following table 1:
Figure BDA0002140760380000071
Figure BDA0002140760380000081
TABLE 1
Therefore, in the embodiment of the invention, only when the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are both that an object approaches, the object is determined to approach the mobile terminal, and no object approaches the mobile terminal under other conditions, so that the problems that the screen should not be turned off but turned off and the screen should be turned off but not turned off, which are generated by only using the ultrasonic sensor and the touch screen in the prior art, are solved, and the accuracy of the proximity detection of the mobile terminal is improved.
In the embodiment of the invention, in a telephone conversation or voice chat scene, if an object is determined to be close to the mobile terminal, the mobile terminal is indicated to be turned off, so that the purposes of preventing mistaken touch and saving electricity are achieved. When the phone call is over or the voice chat is over, the ultrasonic sensor may be turned off.
It can be seen from the above embodiments that, in this embodiment, the proximity detection function of the proximity sensor can be simulated through the cooperation of the ultrasonic sensor and the touch screen, and proximity detection is performed on the full-screen mobile terminal. Compared with the prior art, in the embodiment of the invention, when the ultrasonic sensor is arranged in the mobile terminal, the window opening or the hole opening is not needed in the front glass area of the mobile terminal, and the occupied space is small, so that the ultrahigh screen ratio of the mobile terminal is favorably realized; and because the ultrasonic sensor and the touch screen both have the proximity detection function, the detection results of the ultrasonic sensor and the touch screen are synthesized to carry out proximity detection of the full-screen mobile terminal, so that the deviation and the defect generated when the single sensor is used for carrying out the proximity detection can be overcome, and the proximity detection accuracy of the full-screen mobile terminal can be improved.
Fig. 2 is a flowchart of a proximity detection method according to another embodiment of the present invention, in order to further improve the accuracy of proximity detection, in an embodiment of the present invention, gesture detection on a mobile terminal may be added on the basis of the embodiment shown in fig. 1, in this case, a proximity sensor may be formed by an ultrasonic sensor, a touch screen, and a gesture sensor in the mobile terminal, as shown in fig. 2, and the method may include the following steps: step 201 and step 202, wherein,
in step 201, an ultrasonic sensor of the mobile terminal is started for proximity detection, a touch screen of the mobile terminal is started for proximity detection, and a gesture sensor of the mobile terminal is started for gesture detection of the mobile terminal.
In the embodiment of the invention, the problem that the screen should not be turned off but turned off is probably caused when the mobile terminal is in a flat-up screen posture and if a user contacts the upper part of the touch screen of the mobile terminal, the ultrasonic sensor of the mobile terminal and the touch screen perform proximity detection. Therefore, in order to improve the accuracy of the proximity detection of the mobile terminal in the scene of the flat-top screen posture of the mobile terminal, the posture detection of the mobile terminal can be increased.
In the embodiment of the invention, the gesture of the mobile terminal can be detected through the gesture sensor of the mobile terminal, the gesture sensor can be composed of an acceleration sensor and a gyroscope, wherein the acceleration sensor can acquire triaxial gravity acceleration data of the mobile terminal, the gyroscope can acquire triaxial angular velocity data of the mobile terminal, and the gesture of the mobile terminal is determined based on the acquired triaxial gravity acceleration data and triaxial angular velocity data. In practical application, the gesture of the mobile terminal may include: square, rotated, tilted, etc.
In combination with the application scenario (i.e. improving the accuracy of the proximity detection of the mobile terminal when the mobile terminal is in the posture of being laid flat with the screen facing upwards) of the embodiment of the present invention, the posture of the mobile terminal can be divided into two types: a screen-up lie attitude and an attitude other than a screen-up lie attitude (for ease of description, referred to as an unknown attitude).
In the embodiment of the invention, the ultrasonic sensor of the mobile terminal can be started for proximity detection, the touch screen of the mobile terminal can be started for proximity detection, and the attitude sensor of the mobile terminal can be started for attitude detection of the mobile terminal; or in consideration of the power consumption problem of the mobile terminal, the ultrasonic sensor of the mobile terminal may be started to perform proximity detection, when the proximity detection result of the ultrasonic sensor indicates that an object is approaching, the touch screen of the mobile terminal is started to perform proximity detection, and when the proximity detection result of the touch screen indicates that an object is approaching, the attitude sensor of the mobile terminal is started to perform attitude detection on the mobile terminal.
In the embodiment of the invention, the approach detection result of the ultrasonic sensor can be stored in real time in the process of carrying out the approach detection on the ultrasonic sensor of the mobile terminal; in the process of proximity detection of the touch screen of the mobile terminal, the proximity detection result of the touch screen can be stored in real time; in the process of detecting the gesture of the mobile terminal by the gesture sensor of the mobile terminal, the approach detection result of the gesture sensor can be stored in real time, so that the real approach state of the mobile terminal can be determined in real time by combining the approach detection result of the ultrasonic sensor, the approach detection result of the touch screen and the gesture detection result of the gesture sensor.
In step 202, if the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are both the object approaching posture and the posture detection result of the posture sensor is the posture of the mobile terminal outside the upward square posture of the screen, it is determined that the object approaches the mobile terminal.
In the embodiment of the invention, if the proximity detection result of the ultrasonic sensor indicates that no object is close, or the proximity detection result of the touch screen indicates that no object is close, or the gesture detection result of the gesture sensor indicates that the mobile terminal is in a screen-up square gesture, it is determined that no object is close to the mobile terminal.
Specifically, if the proximity detection result of the ultrasonic sensor is that an object is approaching, the proximity detection result of the touch screen is that an object is approaching, and the detection result of the attitude sensor is that the screen is horizontally placed upwards, it is determined that no object is approaching the mobile terminal;
if the proximity detection result of the ultrasonic sensor is that an object approaches, the proximity detection result of the touch screen is that no object approaches, and the detection result of the attitude sensor is that the screen is horizontally placed upwards, determining that no object approaches the mobile terminal;
if the proximity detection result of the ultrasonic sensor is that an object approaches, the proximity detection result of the touch screen is that no object approaches, and the detection result of the attitude sensor is an unknown attitude, determining that no object approaches the mobile terminal;
and if the proximity detection result of the ultrasonic sensor is that no object approaches, the proximity detection result of the touch screen is that no object approaches, and the detection result of the attitude sensor is that the unknown attitude/the attitude of the screen which is horizontally placed upwards exists, determining that no object approaches the mobile terminal.
For the convenience of visual understanding, the above several cases are described by using a table, which is specifically shown in the following table 2:
Figure BDA0002140760380000111
TABLE 2
Therefore, in the embodiment of the invention, only when the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are that the object approaches and the detection result of the attitude sensor is that the mobile terminal is in an attitude (namely unknown attitude) other than the attitude in which the screen is horizontally placed upwards, the object is determined to approach the mobile terminal, and no object is determined to approach the mobile terminal under other conditions, so that the accuracy of the proximity detection of the mobile terminal is improved.
In the embodiment of the invention, in a telephone conversation or voice chat scene, if an object is determined to be close to the mobile terminal, the mobile terminal is indicated to be turned off, so that the purposes of preventing mistaken touch and saving electricity are achieved. When the phone call is over or the voice chat is over, the ultrasonic sensor may be turned off.
It can be seen from the above embodiments that, in this embodiment, the proximity detection function of the proximity sensor can be simulated through the cooperative work of the ultrasonic sensor, the touch screen and the attitude sensor, and the proximity detection is performed on the full-screen mobile terminal. Compared with the prior art, in the embodiment of the invention, when the ultrasonic sensor is arranged in the mobile terminal, the window opening or the hole opening is not needed in the front glass area of the mobile terminal, and the occupied space is small, so that the ultrahigh screen ratio of the mobile terminal is favorably realized; and because the ultrasonic sensor and the touch screen both have the proximity detection function, the attitude sensor can detect the attitude of the mobile terminal, and the proximity detection result of the ultrasonic sensor, the proximity detection result of the touch screen and the detection result of the attitude sensor are integrated to carry out proximity detection of the full-screen mobile terminal, so that the deviation and the defect generated when the single sensor is used for carrying out the proximity detection can be overcome, and the proximity detection accuracy of the full-screen mobile terminal can be improved.
Fig. 3 is a block diagram of a mobile terminal according to an embodiment of the present invention, and as shown in fig. 3, the mobile terminal 300 may include: a first activation unit 301, a second activation unit 302, and a first determination unit 303, wherein,
a first starting unit 301, configured to start an ultrasonic sensor of the mobile terminal to perform proximity detection;
a second starting unit 302, configured to start a touch screen of the mobile terminal to perform proximity detection;
a first determining unit 303, configured to determine that an object approaches the mobile terminal when both the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are that the object approaches.
It can be seen from the above embodiments that, in this embodiment, the proximity detection function of the proximity sensor can be simulated through the cooperation of the ultrasonic sensor and the touch screen, and proximity detection is performed on the full-screen mobile terminal. Compared with the prior art, in the embodiment of the invention, when the ultrasonic sensor is arranged in the mobile terminal, the window opening or the hole opening is not needed in the front glass area of the mobile terminal, and the occupied space is small, so that the ultrahigh screen ratio of the mobile terminal is favorably realized; and because the ultrasonic sensor and the touch screen both have the proximity detection function, the detection results of the ultrasonic sensor and the touch screen are synthesized to carry out proximity detection of the full-screen mobile terminal, so that the deviation and the defect generated when the single sensor is used for carrying out the proximity detection can be overcome, and the proximity detection accuracy of the full-screen mobile terminal can be improved.
Optionally, as an embodiment, the mobile terminal 300 may further include:
a second determination unit configured to determine that no object is approaching the mobile terminal when the proximity detection result of the ultrasonic sensor is that no object is approaching or the proximity detection result of the touch screen is that no object is approaching.
Optionally, as an embodiment, the mobile terminal 300 may further include:
the third starting unit is used for starting the attitude sensor of the mobile terminal to detect the attitude of the mobile terminal;
the first determining unit 303 may include:
the first determining subunit is configured to determine that an object approaches the mobile terminal when both the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are that the object approaches and the gesture detection result of the gesture sensor is a gesture of the mobile terminal other than a square gesture on a screen.
Optionally, as an embodiment, the second determining unit may include:
a second determining subunit, configured to determine that no object is approaching the mobile terminal when a proximity detection result of the ultrasonic sensor is that no object is approaching, or a proximity detection result of the touch screen is that no object is approaching, or a posture detection result of the posture sensor is that the mobile terminal is in a screen-up square posture.
Optionally, as an embodiment, the second starting unit 302 may include:
the touch screen starting unit is used for starting a preset area on the touch screen to carry out proximity detection, wherein the preset area comprises at least one edge area of the touch screen.
Fig. 4 is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, and as shown in fig. 4, the mobile terminal 400 includes, but is not limited to: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, processor 410, and power supply 411. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 4 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 410 is configured to start an ultrasonic sensor of the mobile terminal to perform proximity detection, and start a touch screen of the mobile terminal to perform proximity detection; and if the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are both that an object approaches, determining that the object approaches the mobile terminal.
In the embodiment of the invention, the proximity detection function of the proximity sensor can be simulated through the cooperation of the ultrasonic sensor and the touch screen, and the proximity detection is carried out on the mobile terminal with the full screen. Compared with the prior art, in the embodiment of the invention, when the ultrasonic sensor is arranged in the mobile terminal, the window opening or the hole opening is not needed in the front glass area of the mobile terminal, and the occupied space is small, so that the ultrahigh screen ratio of the mobile terminal is favorably realized; and because the ultrasonic sensor and the touch screen both have the proximity detection function, the detection results of the ultrasonic sensor and the touch screen are synthesized to carry out proximity detection of the full-screen mobile terminal, so that the deviation and the defect generated when the single sensor is used for carrying out the proximity detection can be overcome, and the proximity detection accuracy of the full-screen mobile terminal can be improved.
Optionally, as an embodiment, the method further includes:
and if the proximity detection result of the ultrasonic sensor indicates that no object is close or the proximity detection result of the touch screen indicates that no object is close, determining that no object is close to the mobile terminal.
Optionally, as an embodiment, the method further includes:
starting an attitude sensor of the mobile terminal to detect the attitude of the mobile terminal;
if the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are both that an object approaches, determining that the object approaches the mobile terminal includes:
and if the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are both the object approaching state and the gesture detection result of the gesture sensor is the gesture of the mobile terminal out of the upward square gesture of the screen, determining that the object approaches the mobile terminal.
Optionally, as an embodiment, the determining that no object is close to the mobile terminal if the proximity detection result of the ultrasonic sensor is that no object is close or the proximity detection result of the touch screen is that no object is close includes:
and if the proximity detection result of the ultrasonic sensor indicates that no object is close, or the proximity detection result of the touch screen indicates that no object is close, or the gesture detection result of the gesture sensor indicates that the mobile terminal is in a screen-up square gesture, determining that no object is close to the mobile terminal.
Optionally, as an embodiment, the starting the touch screen for proximity detection includes:
and starting a preset area on the touch screen for proximity detection, wherein the preset area comprises at least one edge area of the touch screen.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 401 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 410; in addition, the uplink data is transmitted to the base station. Typically, radio unit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio unit 401 can also communicate with a network and other devices through a wireless communication system.
The mobile terminal provides the user with wireless broadband internet access through the network module 402, such as helping the user send and receive e-mails, browse web pages, and access streaming media.
The audio output unit 403 may convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output as sound. Also, the audio output unit 403 may also provide audio output related to a specific function performed by the mobile terminal 400 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.
The input unit 404 is used to receive audio or video signals. The input Unit 404 may include a Graphics Processing Unit (GPU) 4041 and a microphone 4042, and the Graphics processor 4041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The processed image may be displayed on the display unit 406. The image processed by the graphic processor 4041 may be stored in the memory 409 (or other storage medium) or transmitted via the radio frequency unit 401 or the network module 402. The microphone 4042 may receive sound, and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 401 in case of the phone call mode.
The mobile terminal 400 also includes at least one sensor 405, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 4061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 4061 and/or the backlight when the mobile terminal 400 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 405 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be described in detail herein.
The display unit 406 is used to display information input by the user or information provided to the user. The Display unit 406 may include a Display panel 4061, and the Display panel 4061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 407 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072. Touch panel 4071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 4071 using a finger, a stylus, or any suitable object or attachment). The touch panel 4071 may include two parts, 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 410, receives a command from the processor 410, and executes the command. In addition, the touch panel 4071 can be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 4071, the user input unit 407 may include other input devices 4072. Specifically, the other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 4071 can be overlaid on the display panel 4061, and when the touch panel 4071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 410 to determine the type of the touch event, and then the processor 410 provides a corresponding visual output on the display panel 4061 according to the type of the touch event. Although in fig. 4, the touch panel 4071 and the display panel 4061 are two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 4071 and the display panel 4061 may be integrated to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 408 is an interface through which an external device is connected to the mobile terminal 400. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 408 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 400 or may be used to transmit data between the mobile terminal 400 and external devices.
The memory 409 may be used to store software programs as well as various data. The memory 409 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 (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 409 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 processor 410 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 409 and calling data stored in the memory 409, thereby integrally monitoring the mobile terminal. Processor 410 may include one or more processing units; preferably, the processor 410 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 410.
The mobile terminal 400 may further include a power supply 411 (e.g., a battery) for supplying power to various components, and preferably, the power supply 411 may be logically connected to the processor 410 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the mobile terminal 400 includes some functional modules that are not shown, and thus, are not described in detail herein.
Preferably, an embodiment of the present invention further provides a mobile terminal, which includes a processor 410, a memory 409, and a computer program that is stored in the memory 409 and can be run on the processor 410, and when being executed by the processor 410, the computer program implements each process of the proximity detection method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the proximity detection method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in the present specification, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (9)

1. A proximity detection method, the method comprising:
starting an ultrasonic sensor of a mobile terminal to perform proximity detection, and starting a preset area on a touch screen of the mobile terminal to perform proximity detection, wherein the preset area comprises at least one edge area of the touch screen;
and if the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are both that an object approaches, determining that the object approaches the mobile terminal.
2. The method of claim 1, further comprising:
and if the proximity detection result of the ultrasonic sensor indicates that no object is close or the proximity detection result of the touch screen indicates that no object is close, determining that no object is close to the mobile terminal.
3. The method of claim 2, further comprising:
starting an attitude sensor of the mobile terminal to detect the attitude of the mobile terminal;
if the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are both that an object approaches, determining that the object approaches the mobile terminal includes:
and if the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are both the object approaching state and the gesture detection result of the gesture sensor is the gesture of the mobile terminal out of the upward square gesture of the screen, determining that the object approaches the mobile terminal.
4. The method according to claim 3, wherein determining that no object is close to the mobile terminal if the proximity detection result of the ultrasonic sensor is that no object is close or the proximity detection result of the touch screen is that no object is close comprises:
and if the proximity detection result of the ultrasonic sensor indicates that no object is close, or the proximity detection result of the touch screen indicates that no object is close, or the gesture detection result of the gesture sensor indicates that the mobile terminal is in a screen-up square gesture, determining that no object is close to the mobile terminal.
5. A mobile terminal, characterized in that the mobile terminal comprises:
the first starting unit is used for starting the ultrasonic sensor of the mobile terminal to carry out proximity detection;
the second starting unit is used for starting a preset area on a touch screen of the mobile terminal to carry out proximity detection; wherein the preset area comprises at least one edge area of the touch screen;
and the first determining unit is used for determining that an object approaches the mobile terminal under the condition that the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are both that the object approaches.
6. The mobile terminal of claim 5, wherein the mobile terminal further comprises:
a second determination unit configured to determine that no object is approaching the mobile terminal when the proximity detection result of the ultrasonic sensor is that no object is approaching or the proximity detection result of the touch screen is that no object is approaching.
7. The mobile terminal of claim 6, wherein the mobile terminal further comprises:
the third starting unit is used for starting the attitude sensor of the mobile terminal to detect the attitude of the mobile terminal;
the first determination unit includes:
the first determining subunit is configured to determine that an object approaches the mobile terminal when both the proximity detection result of the ultrasonic sensor and the proximity detection result of the touch screen are that the object approaches and the gesture detection result of the gesture sensor is a gesture of the mobile terminal other than a square gesture on a screen.
8. The mobile terminal according to claim 7, wherein the second determining unit comprises:
a second determining subunit, configured to determine that no object is approaching the mobile terminal when a proximity detection result of the ultrasonic sensor is that no object is approaching, or a proximity detection result of the touch screen is that no object is approaching, or a posture detection result of the posture sensor is that the mobile terminal is in a screen-up square posture.
9. A mobile terminal, characterized in that it comprises a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the proximity detection method according to any one of claims 1 to 4.
CN201910668066.0A 2019-07-23 2019-07-23 Proximity detection method and mobile terminal Active CN110471068B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910668066.0A CN110471068B (en) 2019-07-23 2019-07-23 Proximity detection method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910668066.0A CN110471068B (en) 2019-07-23 2019-07-23 Proximity detection method and mobile terminal

Publications (2)

Publication Number Publication Date
CN110471068A CN110471068A (en) 2019-11-19
CN110471068B true CN110471068B (en) 2021-09-14

Family

ID=68509755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910668066.0A Active CN110471068B (en) 2019-07-23 2019-07-23 Proximity detection method and mobile terminal

Country Status (1)

Country Link
CN (1) CN110471068B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110989860B (en) * 2019-11-26 2021-10-01 华为技术有限公司 Electronic equipment and display screen control method thereof

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106817497A (en) * 2017-03-31 2017-06-09 努比亚技术有限公司 A kind of screen processing method and mobile terminal
CN107682558A (en) * 2017-10-26 2018-02-09 维沃移动通信有限公司 A kind of screen control method and mobile terminal
CN108196778A (en) * 2017-12-29 2018-06-22 努比亚技术有限公司 Control method, mobile terminal and the computer readable storage medium of screen state
CN108603931A (en) * 2016-02-09 2018-09-28 椭圆实验室股份有限公司 Proximity detection
CN108881645A (en) * 2018-09-26 2018-11-23 Oppo广东移动通信有限公司 The screen control method and device of mobile phone communication
CN109218538A (en) * 2018-11-29 2019-01-15 努比亚技术有限公司 Mobile terminal screen control method, mobile terminal and computer readable storage medium
CN109257505A (en) * 2018-11-07 2019-01-22 维沃移动通信有限公司 A kind of screen control method and mobile terminal
CN109298805A (en) * 2018-09-26 2019-02-01 Oppo广东移动通信有限公司 Proximity state recognition methods, device, terminal device and storage medium
CN109710142A (en) * 2017-10-25 2019-05-03 华为技术有限公司 A kind of method and terminal for controlling terminal screen light on and off
CN109738004A (en) * 2019-01-24 2019-05-10 Oppo广东移动通信有限公司 The calibration method and device, electronic equipment and storage medium of proximity sensor

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8381135B2 (en) * 2004-07-30 2013-02-19 Apple Inc. Proximity detector in handheld device
CN106878563B (en) * 2017-03-07 2020-07-24 Oppo广东移动通信有限公司 Mobile terminal
CN108494460B (en) * 2018-03-13 2021-09-28 Oppo广东移动通信有限公司 Electronic device and antenna switching method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108603931A (en) * 2016-02-09 2018-09-28 椭圆实验室股份有限公司 Proximity detection
CN106817497A (en) * 2017-03-31 2017-06-09 努比亚技术有限公司 A kind of screen processing method and mobile terminal
CN109710142A (en) * 2017-10-25 2019-05-03 华为技术有限公司 A kind of method and terminal for controlling terminal screen light on and off
CN107682558A (en) * 2017-10-26 2018-02-09 维沃移动通信有限公司 A kind of screen control method and mobile terminal
CN108196778A (en) * 2017-12-29 2018-06-22 努比亚技术有限公司 Control method, mobile terminal and the computer readable storage medium of screen state
CN108881645A (en) * 2018-09-26 2018-11-23 Oppo广东移动通信有限公司 The screen control method and device of mobile phone communication
CN109298805A (en) * 2018-09-26 2019-02-01 Oppo广东移动通信有限公司 Proximity state recognition methods, device, terminal device and storage medium
CN109257505A (en) * 2018-11-07 2019-01-22 维沃移动通信有限公司 A kind of screen control method and mobile terminal
CN109218538A (en) * 2018-11-29 2019-01-15 努比亚技术有限公司 Mobile terminal screen control method, mobile terminal and computer readable storage medium
CN109738004A (en) * 2019-01-24 2019-05-10 Oppo广东移动通信有限公司 The calibration method and device, electronic equipment and storage medium of proximity sensor

Also Published As

Publication number Publication date
CN110471068A (en) 2019-11-19

Similar Documents

Publication Publication Date Title
CN108255378B (en) Display control method and mobile terminal
CN108459797B (en) Control method of folding screen and mobile terminal
CN107734175B (en) Notification message prompting method and mobile terminal
CN108319390B (en) Control method of flexible screen and mobile terminal
CN109078319B (en) Game interface display method and terminal
EP3691235A1 (en) Display method and mobile terminal
CN108628565B (en) Mobile terminal operation method and mobile terminal
CN110062105B (en) Interface display method and terminal equipment
CN107835286B (en) Method for preventing mistaken unlocking and mobile terminal
CN109710349B (en) Screen capturing method and mobile terminal
CN109343788B (en) Operation control method of mobile terminal and mobile terminal
CN108196815B (en) Method for adjusting call sound and mobile terminal
CN109257505B (en) Screen control method and mobile terminal
CN109407948B (en) Interface display method and mobile terminal
CN108958593B (en) Method for determining communication object and mobile terminal
CN109889757B (en) Video call method and terminal equipment
WO2019154360A1 (en) Interface switching method and mobile terminal
CN109710130B (en) Display method and terminal
CN112596625A (en) Electronic equipment, display control method and device
CN109523253B (en) Payment method and device
CN109144393B (en) Image display method and mobile terminal
CN111651387B (en) Interface circuit and electronic equipment
CN107728923B (en) Operation processing method and mobile terminal
CN110471559B (en) False touch prevention method and mobile terminal
CN110096203B (en) Screenshot method and mobile terminal

Legal Events

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