WO2021057712A1 - Proximity detection method and terminal device - Google Patents

Proximity detection method and terminal device Download PDF

Info

Publication number
WO2021057712A1
WO2021057712A1 PCT/CN2020/116783 CN2020116783W WO2021057712A1 WO 2021057712 A1 WO2021057712 A1 WO 2021057712A1 CN 2020116783 W CN2020116783 W CN 2020116783W WO 2021057712 A1 WO2021057712 A1 WO 2021057712A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal device
screen
state
information
determined
Prior art date
Application number
PCT/CN2020/116783
Other languages
French (fr)
Chinese (zh)
Inventor
陈凯
Original Assignee
维沃移动通信有限公司
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 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Publication of WO2021057712A1 publication Critical patent/WO2021057712A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0267Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by controlling user interface components
    • H04W52/027Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by controlling user interface components by controlling a display operation or backlight unit
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the embodiments of the present application relate to the field of communication technologies, and in particular, to a proximity detection method and terminal equipment.
  • the surface where the screen of the terminal device is located must be reduced in openings. Therefore, it is impossible to adopt the solution of traditional infrared proximity sensors that require openings on the surface of the screen. Subsequently, a non-opening ultrasonic detection scheme appeared.
  • the specific detection process is: the receiver sends out an ultrasonic signal, and the microphone determines whether the terminal device is blocked or not based on the received ultrasonic signal.
  • the accuracy of the ultrasonic detection solution for detecting that the screen of the terminal device is blocked is low.
  • the embodiments of the present application provide a proximity detection method and terminal device to solve the problem of low accuracy of detecting that the screen of the terminal device is blocked by the traditional ultrasonic detection solution.
  • an embodiment of the present application provides a proximity detection method, which is applied to a terminal device, and the method includes: determining, according to an ultrasonic sensor of the terminal device, a situation in which a first object obstructs the terminal device within a first preset distance Under the following, the state information of the terminal device is obtained, and the state information is used to determine whether the first screen of the terminal device is blocked by the first object; in the case where the first screen is determined to be blocked by the first object, the first screen is controlled Switch from the on-screen state to the off-screen state.
  • an embodiment of the present application provides a terminal device.
  • the terminal device includes: an acquisition module and a control module; the acquisition module is configured to determine that there is a first preset distance within a first preset distance according to the ultrasonic sensor of the terminal device.
  • the state information of the terminal device is obtained, and the state information is used to determine whether the first screen of the terminal device is blocked by the first object; the control module is used to determine whether the first object blocks the first screen of the terminal device.
  • control the first screen controls the first screen to switch from the on-screen state to the off-screen state.
  • the embodiments of the present application provide a terminal device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor.
  • the computer program is executed by the processor, the following On the one hand, the steps of the approach detection method.
  • an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored.
  • the computer program is executed by a processor, the steps of the proximity detection method in the first aspect are implemented.
  • the terminal device may obtain the state information of the terminal device when it is determined according to the ultrasonic sensor of the terminal device that there is a first object in the first preset distance to block the terminal device, and the state information is used To determine whether the first screen is blocked by the first object is the first screen of the terminal device; when it is determined that the first screen is blocked by the first object, the first screen is controlled to switch from the on-screen state to the off-screen state.
  • the terminal device when the terminal device determines that the first object is blocked by the ultrasonic sensor, it can determine whether the first object is blocking the first screen based on the state information of the terminal device; when it is determined that the first object is blocking the first screen In the case of, the terminal device can control the first screen to switch from the on-screen state to the off-screen state, so that when a foreign object obstructs the first screen of the terminal device in the on-screen state, accidental touches can be avoided, and this solution combines Ultrasonic detection and state detection of terminal equipment can accurately determine that the first screen of the terminal device in the bright screen state is blocked, which improves the accuracy of the ultrasonic detection solution for detecting that the screen of the terminal device is blocked.
  • FIG. 1 is a schematic structural diagram of a possible Android operating system provided by an embodiment of the application
  • FIG. 2 is one of the flowcharts of the proximity detection method provided by an embodiment of the application
  • FIG. 3 is the second flowchart of the proximity detection method provided by an embodiment of the application.
  • FIG. 4 is the third flow chart of the proximity detection method provided by an embodiment of the application.
  • FIG. 5 is the fourth flow chart of the proximity detection method provided by an embodiment of the application.
  • FIG. 6 is a schematic structural diagram of a terminal device provided by an embodiment of the application.
  • FIG. 7 is a schematic diagram of hardware of a terminal device provided by an embodiment of the application.
  • first”, “second”, “third”, and “fourth” in the specification and claims of this application are used to distinguish different objects, rather than describing a specific order of objects.
  • first input, the second input, the third input, and the fourth input are used to distinguish different inputs, rather than to describe the specific order of the inputs.
  • words such as “exemplary” or “for example” are used as examples, illustrations, or illustrations. Any embodiment or design solution described as “exemplary” or “for example” in the embodiments of the present application should not be construed as being more preferable or advantageous than other embodiments or design solutions. To be precise, words such as “exemplary” or “for example” are used to present related concepts in a specific manner.
  • multiple refers to two or more than two, for example, multiple processing units refers to two or more processing units; multiple elements Refers to two or more elements, etc.
  • a terminal device can obtain state information of the terminal device when it is determined according to the ultrasonic sensor of the terminal device that a first object within a first preset distance obstructs the terminal device.
  • the status information is used to determine whether the first screen of the terminal device is blocked by the first object; when it is determined that the first screen is blocked by the first object, the first screen is controlled to switch from the on-screen state to the off-screen state.
  • the terminal device when the terminal device determines that the first object is blocked by the ultrasonic sensor, it can determine whether the first object is blocking the first screen based on the state information of the terminal device; when it is determined that the first object is blocking the first screen In the case of, the terminal device can control the first screen to switch from the on-screen state to the off-screen state, so that when a foreign object obstructs the first screen of the terminal device in the on-screen state, accidental touches can be avoided, and this solution combines Ultrasonic detection and state detection of terminal equipment can accurately determine that the first screen of the terminal device in the bright screen state is blocked, which improves the accuracy of the ultrasonic detection solution for detecting that the screen of the terminal device is blocked.
  • the following takes the Android operating system as an example to introduce the software environment to which the proximity detection method provided in the embodiments of the present application is applied.
  • FIG. 1 it is a schematic structural diagram of a possible Android operating system provided by an embodiment of this application.
  • the architecture of the Android operating system includes 4 layers, namely: application layer, application framework layer, system runtime library layer, and kernel layer (specifically, it may be the Linux kernel layer).
  • the application layer includes various applications (including system applications and third-party applications) in the Android operating system.
  • the application framework layer is the framework of the application. Developers can develop some applications based on the application framework layer while complying with the development principles of the application framework.
  • the system runtime library layer includes a library (also called a system library) and an Android operating system runtime environment.
  • the library mainly provides various resources needed by the Android operating system.
  • the Android operating system operating environment is used to provide a software environment for the Android operating system.
  • the kernel layer is the operating system layer of the Android operating system and belongs to the lowest level of the Android operating system software.
  • the kernel layer is based on the Linux kernel to provide core system services and hardware-related drivers for the Android operating system.
  • a developer can develop a software program that implements the proximity detection method provided by the embodiment of the application based on the system architecture of the Android operating system as shown in FIG.
  • the detection method can be run based on the Android operating system as shown in FIG. 1. That is, the processor or the terminal device can implement the proximity detection method provided in the embodiment of the present application by running the software program in the Android operating system.
  • the terminal device in the embodiment of the present application may be a mobile terminal device or a non-mobile terminal device.
  • the mobile terminal device can be a mobile phone, tablet computer, notebook computer, handheld computer, car terminal, wearable device, ultra-mobile personal computer (UMPC), netbook or personal digital assistant (personal digital assistant, PDA), etc.
  • the non-mobile terminal device may be a personal computer (PC), a television (television, TV), a teller machine, or a self-service machine, etc.; the embodiment of the application does not specifically limit it.
  • the execution subject of the proximity detection method provided in the embodiments of the present application may be the aforementioned terminal device (including mobile terminal devices and non-mobile terminal devices), or may be a functional module and/or functional entity in the terminal device that can implement the method, The details can be determined according to actual use requirements, and the embodiments of the present application do not limit it.
  • the following uses a terminal device as an example to illustrate the proximity detection method provided in the embodiment of the present application.
  • the proximity detection method based on the ultrasonic detection scheme because the ultrasonic signal has no directionality, when other objects approach the terminal device from a surface other than the surface where the screen is located (side, top, or back of the screen, etc.), the terminal device will also The screen is mistakenly turned off due to detection of being blocked, which causes inconvenience to the user's operation.
  • an embodiment of the present application provides a proximity detection method, which is applied to a terminal device, and the method may include the following steps 201 to 202.
  • Step 201 The terminal device obtains state information of the terminal device when it is determined according to the ultrasonic sensor of the terminal device that a first object within a first preset distance covers the terminal device.
  • the status information is used to determine whether the first screen of the terminal device is blocked by the first object.
  • the first preset distance is a distance preset according to actual usage requirements, which is not limited in the embodiment of the present application.
  • the terminal device may transmit an ultrasonic signal through an ultrasonic sensor, and receive the reflected ultrasonic signal through the ultrasonic sensor; if the signal strength of the reflected ultrasonic signal is greater than a preset threshold (the signal strength threshold set in advance according to actual usage requirements) , The embodiment of the present application is not limited), it is determined that there is a first object covering the terminal device within the first preset distance; otherwise, it is determined that no object is covering the terminal device.
  • a preset threshold the signal strength threshold set in advance according to actual usage requirements
  • the terminal device may send an ultrasonic signal through an ultrasonic sensor and obtain the transmission time; receive the ultrasonic signal and obtain the reception time; determine the distance of the measured object according to the difference between the reception time and the transmission time; when the measured object When the distance is less than the first preset distance, it is determined that there is a first object covering the terminal device within the first preset distance; otherwise, it is determined that no object is covering the terminal device.
  • the terminal device determines that there is a first object in the first preset distance obstructing the terminal device according to the ultrasonic sensor.
  • the detection method that the terminal device determines that there is a first object in the first preset distance obstructing the terminal device according to the ultrasonic sensor.
  • the state information includes at least one of the following: gravitational acceleration information of the terminal device, and angular velocity information of the terminal device.
  • the state information may be gravitational acceleration information of the terminal device, the state information may also be angular velocity information of the terminal device, the state information may also be gravitational acceleration information and angular velocity information of the terminal device, and the state information It may also include other feasibility information, which may be specifically determined according to actual use requirements, and is not limited in the embodiment of the present application.
  • the terminal device may obtain the gravity acceleration information through a gravity acceleration sensor, and the terminal device may also obtain the gravity acceleration information through other sensors, which is not limited in the embodiment of the present application.
  • the terminal device may obtain angular velocity information through a gyroscope sensor, and the terminal device may also obtain angular velocity information through other sensors, which is not limited in the embodiment of the present application.
  • the terminal device determines that the first screen is blocked by the first object according to the state information
  • the terminal device controls the first screen to switch from the on-screen state to the off-screen state.
  • the terminal device determines that the first object is not blocking the first screen according to the state information, it is divided into the following two situations:
  • the terminal device is a single-screen terminal device.
  • the terminal device determines that the first screen is not blocked by the first object according to the state information, the terminal device keeps the first screen in a bright screen state.
  • the terminal device is a multi-screen terminal device. If the terminal device determines that the first object is blocking the second screen according to the status information (the judgment method is similar to determining that the first object is blocking the first screen, and this embodiment does not Repeat), the terminal device controls the second screen to switch from the on-screen state to the off-screen state; if the terminal device determines that the first object does not cover any screen of the terminal device according to the state information, the terminal device controls the screen in the on-screen state Keep the screen on.
  • Step 202 The terminal device controls the first screen to switch from the on-screen state to the off-screen state in the case where it is determined that the first screen is blocked by the first object.
  • the terminal device controls the first screen to switch from the on-screen state to the off-screen state when it is determined that the first screen is blocked by the first object. Therefore, when an object obstructs the first screen that is in the bright screen state, accidental touches can be avoided.
  • the embodiment of the present application provides a proximity detection method.
  • the terminal device can obtain the state information of the terminal device when it is determined according to the ultrasonic sensor of the terminal device that a first object within a first preset distance obstructs the terminal device.
  • the state information is used to determine whether the first screen of the terminal device is blocked by the first object; when it is determined that the first screen is blocked by the first object, the first screen is controlled to switch from the on-screen state to the off-screen state .
  • the terminal device when the terminal device determines that the first object is blocked by the ultrasonic sensor, it can determine whether the first object is blocking the first screen based on the state information of the terminal device; when it is determined that the first object is blocking the first screen In the case of, the terminal device can control the first screen to switch from the on-screen state to the off-screen state, so that when a foreign object obstructs the first screen of the terminal device in the on-screen state, accidental touches can be avoided, and this solution combines Ultrasonic detection and state detection of terminal equipment can accurately determine that the first screen of the terminal device in the bright screen state is blocked, which improves the accuracy of the ultrasonic detection solution for detecting that the screen of the terminal device is blocked.
  • the terminal device needs to determine whether the first screen is blocked by the first object according to the state information.
  • the proximity detection method provided in the embodiment of the present application may further include the following steps 203 to 205.
  • Step 203 The terminal device judges whether the status information meets the target condition.
  • the target condition includes at least one of the following: the gravitational acceleration information is within a first range, and the angular velocity information is within a second range.
  • the terminal device determines that a first object obstructs the terminal device within the first preset distance
  • the gravitational acceleration information is within the first range
  • the first range may be preset or acquired in real time, which is not limited in the embodiment of the present application.
  • the gravitational acceleration information is within the first range, the state information meets the target condition.
  • the terminal device determines that a first object obstructs the terminal device within the first preset distance
  • if the angular velocity information is within the second range it can be determined that the first object obstructs the first screen.
  • the second range may be preset or acquired in real time, which is not limited in the embodiment of the present application. In the embodiment of the present application, if the angular velocity information is within the second range, the state information meets the target condition.
  • the terminal device determines that the terminal device is blocked by the first object within the first preset distance
  • the gravitational acceleration information is within the first range and the angular velocity information is within the second range
  • the first range and the second range may be preset or acquired in real time, which is not limited in the embodiment of the present application.
  • the gravitational acceleration information is in the first range and the angular velocity information is in the second range, the state information meets the target condition.
  • the terminal device can calculate the posture and gesture action of the terminal device according to the state information of the terminal device (such as the three-axis gravity acceleration data of the mobile phone collected by the acceleration sensor and the three-axis angular velocity data collected by the gyroscope).
  • the state information of the terminal device such as the three-axis gravity acceleration data of the mobile phone collected by the acceleration sensor and the three-axis angular velocity data collected by the gyroscope.
  • a gesture is defined And three gestures:
  • the ultrasonic sensor determines that an object is blocking the terminal device, only when the terminal device is in the answering gesture or vertical posture, the first screen can be determined to be blocked.
  • step 204 When the state change information meets the target condition, the following step 204 is executed; when the state change information does not meet the target condition, the following step 205 is executed.
  • Step 204 The terminal device determines that the first screen is blocked by the first object.
  • the terminal device determines that the first screen is blocked by the first object.
  • Step 205 The terminal device determines that the first screen is not blocked by the first object.
  • the terminal device determines that the first screen is not blocked by the first object.
  • the terminal device needs to turn on the ultrasonic sensor first.
  • the terminal device can quickly determine whether the first screen is blocked by the first object according to whether the state information meets the target condition.
  • the proximity detection method provided in the embodiment of the present application may further include the following steps 206-207.
  • Step 206 The terminal device determines whether the first screen is in a bright screen state, and whether the first screen displays a call interface.
  • the method for the terminal device to determine whether the first screen is in the on-screen state and the method for determining whether the first screen displays the call interface can refer to any related technology, which is not limited in the embodiment of the present application.
  • the ultrasonic sensor When the terminal device determines that the first screen is in a bright screen state and the call interface is displayed on the first screen, the ultrasonic sensor is turned on; otherwise, the ultrasonic sensor is not turned on.
  • Step 207 The terminal device turns on the ultrasonic sensor when it is determined that the first screen is in the on-screen state and the call interface is displayed on the first screen.
  • the terminal device when the terminal device is not in the on-screen state (that is, in the off-screen state), or in the on-screen state but the call interface is not displayed on the first screen, the terminal device can turn off the ultrasonic sensor, which can save energy.
  • the first screen when the first screen is in the on-screen state, it can avoid affecting the display of other content on the terminal device.
  • the terminal device turns on the infrared sensor when it is determined that the first screen is in the off-screen state and the first screen is not in the call state.
  • the proximity detection method provided in the embodiment of the present application may further include the following steps 208 to step 209.
  • Step 208 The terminal device turns on the infrared sensor when it is determined that the first screen is in the off-screen state and the first screen is not in the call state.
  • Step 209 The terminal device performs at least one of the following when it is determined according to the infrared sensor that there is an object in the second preset distance blocking the first screen: controlling the first screen to remain in the off-screen state, and prohibiting the first screen When the screen is off, the preset area is illuminated, and the preset area is used to display prompt information.
  • the second preset distance is a distance preset according to actual usage requirements, which is not limited in the embodiment of the present application.
  • the second preset distance and the first preset distance may be the same or different, which is not limited in the embodiment of the present application.
  • the method for the terminal device to determine according to the infrared sensor that there is a second object blocking the first screen within the second preset distance may refer to any related technology, which is not limited in the embodiment of the present application.
  • the prompt information can be clock information, power information, weather information, fingerprint prompt icons (used to prompt the user's fingerprint collection area), prompt information of short messages of instant social applications, etc., which can be specifically determined according to actual usage requirements. This embodiment of the application Not limited.
  • the terminal device controls the first screen to remain in the off-screen state when it is determined according to the infrared sensor that there is a second object within the second preset distance to block the first screen, which can prevent objects from blocking the first screen.
  • the screen When the screen is turned on, the screen does not turn on when a call comes in or the terminal device lights up the screen due to a user's false trigger, thereby reducing power consumption.
  • the terminal device determines according to the infrared sensor that there is a second object blocking the first screen within the second preset distance, prohibit the first screen from lighting up the preset area in the off-screen state, and the preset area is used to display prompt information .
  • the display of prompt information in the off-screen state is prohibited (including the situation that the preset area in the current off-screen state is lit and the prompt information is displayed Cancel the display of the prompt information and extinguish the preset area), which can save power.
  • the approach of detecting the proximity of the screen with the infrared sensor in the off-screen state can improve the accuracy of the occlusion detection without damaging the life of the screen.
  • the terminal device may also turn on the ultrasonic sensor when it is determined that the first screen is in the off-screen state; and when it is determined according to the ultrasonic sensor that an object within the first preset distance is blocking the first screen Execute at least one of the following: control the first screen to remain in the off-screen state, and prohibit the first screen from illuminating a preset area in the off-screen state, and the preset area is used to display prompt information.
  • the proximity detection method provided by the embodiment of the present application may further include the above-mentioned step 203 or step 204.
  • an embodiment of the present application provides a terminal device 120.
  • the terminal device 120 includes: an acquisition module 121 and a control module 122; the acquisition module 121 is configured to determine the first preset according to the ultrasonic sensor of the terminal device. If the terminal device is blocked by a first object within a distance, the state information of the terminal device is acquired, and the state information is used to determine whether the first screen of the terminal device is blocked by the first object; the control module 122, It is used for controlling the first screen to switch from the on-screen state to the off-screen state in a case where it is determined that the first screen is blocked by the first object.
  • the state information includes at least one of the following: gravitational acceleration information of the terminal device, and angular velocity information of the terminal device.
  • the terminal device 120 further includes: a determining module 123; the determining module 123 is configured to determine the first state information when the state information meets the target condition after the obtaining module 121 obtains the state information of the terminal device The first screen is blocked by an object; in the case that the state information does not meet the target condition, it is determined that the first screen is not blocked by the first object; wherein, the target condition includes at least one of the following: the gravitational acceleration The information is in the first range, and the angular velocity information is in the second range.
  • the terminal device 120 further includes: an opening module 124; the opening module 124 is configured to determine that the terminal device is blocked by a first object within a first preset distance according to the ultrasonic sensor of the terminal device When the first screen is in the on-screen state and the call interface is displayed on the first screen, the ultrasonic sensor is turned on.
  • the terminal device 120 further includes: an opening module 124; the opening module 124 is configured to turn on the infrared sensor when it is determined that the first screen is in an off-screen state and the first screen is not in a call state;
  • the control module 122 is further configured to perform at least one of the following when it is determined according to the infrared sensor that an object within a second preset distance blocks the first screen: controlling the first screen to keep the screen off, and controlling the The first screen cancels the prompt message in the off-screen state.
  • the modules that must be included in the terminal device 120 are indicated by solid lines, such as the acquisition module 121 and the control module 122; the modules that may or may not be included in the terminal device 120 are indicated by dashed boxes. , Such as the determining module 123 and the opening module 124.
  • the terminal device provided in the embodiment of the present application can implement each process shown in any one of FIG. 2 to FIG. 5 in the foregoing method embodiment. To avoid repetition, details are not described herein again.
  • the embodiment of the present application provides a terminal device.
  • the terminal device can obtain the state information of the terminal device when it is determined according to the ultrasonic sensor of the terminal device that a first object within a first preset distance obstructs the terminal device,
  • the status information is used to determine whether the first screen of the terminal device is blocked by the first object; when it is determined that the first screen is blocked by the first object, the first screen is controlled to switch from the on-screen state to the off-screen state.
  • the terminal device when the terminal device determines that the first object is blocked by the ultrasonic sensor, it can determine whether the first object is blocking the first screen based on the state information of the terminal device; when it is determined that the first object is blocking the first screen In the case of, the terminal device can control the first screen to switch from the on-screen state to the off-screen state, so that when a foreign object obstructs the first screen of the terminal device in the on-screen state, accidental touches can be avoided, and this solution combines Ultrasonic detection and state detection of terminal equipment can accurately determine that the first screen of the terminal device in the bright screen state is blocked, which improves the accuracy of the ultrasonic detection solution for detecting that the screen of the terminal device is blocked.
  • FIG. 7 is a schematic diagram of the hardware structure of a terminal device that implements each embodiment of the present application.
  • the terminal device 100 includes but is not limited to: a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, and a memory 109 , Processor 110, and power supply 111 and other components.
  • the structure of the terminal device shown in FIG. 7 does not constitute a limitation on the terminal device, and the terminal device may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. Layout.
  • terminal devices include, but are not limited to, mobile phones, tablet computers, notebook computers, palmtop computers, vehicle-mounted terminal devices, wearable devices, and pedometers.
  • the processor 110 is configured to obtain state information of the terminal device when it is determined according to the ultrasonic sensor of the terminal device that a first object within a first preset distance covers the terminal device, and the state information is used to determine whether The first screen that is blocked by the first object is the first screen of the terminal device; if it is determined that the first screen is blocked by the first object, the first screen is controlled to switch from the on-screen state to the off-screen state.
  • the terminal device can obtain the state information of the terminal device when it is determined according to the ultrasonic sensor of the terminal device that a first object within a first preset distance covers the terminal device.
  • the information is used to determine whether the first screen of the terminal device is blocked by the first object; when it is determined that the first screen is blocked by the first object, the first screen is controlled to switch from the on-screen state to the off-screen state.
  • the terminal device when the terminal device determines that the first object is blocked by the ultrasonic sensor, it can determine whether the first object is blocking the first screen based on the state information of the terminal device; when it is determined that the first object is blocking the first screen
  • the terminal device can control the first screen to switch from the on-screen state to the off-screen state, so that when a foreign object obstructs the first screen of the terminal device in the on-screen state, the occurrence of accidental touches can be avoided, and the solution combines Ultrasonic detection and state detection of terminal equipment can accurately determine that the first screen of the terminal device in the bright screen state is blocked, which improves the accuracy of the ultrasonic detection solution for detecting that the screen of the terminal device is blocked.
  • the radio frequency unit 101 can be used for receiving and sending signals in the process of sending and receiving information or talking. Specifically, the downlink data from the base station is received and processed by the processor 110; in addition, Uplink data is sent to the base station.
  • the radio frequency unit 101 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.
  • the radio frequency unit 101 can also communicate with the network and other devices through a wireless communication system.
  • the terminal device provides users with wireless broadband Internet access through the network module 102, such as helping users to send and receive emails, browse web pages, and access streaming media.
  • the audio output unit 103 can convert the audio data received by the radio frequency unit 101 or the network module 102 or stored in the memory 109 into an audio signal and output it as sound. Moreover, the audio output unit 103 may also provide audio output related to a specific function performed by the terminal device 100 (for example, call signal reception sound, message reception sound, etc.).
  • the audio output unit 103 includes a speaker, a buzzer, a receiver, and the like.
  • the input unit 104 is used to receive audio or video signals.
  • the input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042, and the graphics processor 1041 is configured to monitor images of still pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode.
  • the data is processed.
  • the processed image frame can be displayed on the display unit 106.
  • the image frame processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or sent via the radio frequency unit 101 or the network module 102.
  • the microphone 1042 can receive sound, and can process such sound into audio data.
  • the processed audio data can be converted into a format that can be sent to a mobile communication base station via the radio frequency unit 101 for output in the case of a telephone call mode.
  • the terminal device 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor includes an ambient light sensor and a proximity sensor.
  • the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light.
  • the proximity sensor can close the display panel 1061 and the display panel 1061 when the terminal device 100 is moved to the ear. / Or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three-axis), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the terminal device (such as horizontal and vertical screen switching, related games) , Magnetometer attitude calibration), vibration recognition related functions (such as pedometer, percussion), etc.; sensor 105 can also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, Infrared sensors, etc., will not be repeated here.
  • the display unit 106 is used to display information input by the user or information provided to the user.
  • the display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • the user input unit 107 can be used to receive inputted numeric or character information, and generate key signal input related to user settings and function control of the terminal device.
  • the user input unit 107 includes a touch panel 1071 and other input devices 1072.
  • the touch panel 1071 also called a touch screen, can collect the user's touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch panel 1071 or near the touch panel 1071. operating).
  • the touch panel 1071 may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the user's touch position, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 110, the command sent by the processor 110 is received and executed.
  • the touch panel 1071 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave.
  • the user input unit 107 may also include other input devices 1072.
  • other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick, which will not be repeated here.
  • the touch panel 1071 can be overlaid on the display panel 1061.
  • the touch panel 1071 detects a touch operation on or near it, it transmits it to the processor 110 to determine the type of the touch event, and then the processor 110 determines the type of the touch event according to the touch.
  • the type of event provides corresponding visual output on the display panel 1061.
  • the touch panel 1071 and the display panel 1061 are used as two independent components to implement the input and output functions of the terminal device, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated
  • the implementation of the input and output functions of the terminal device is not specifically limited here.
  • the interface unit 108 is an interface for connecting an external device with the terminal device 100.
  • the external device may include a wired or wireless headset port, an external power source (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, audio input/output (I/O) port, video I/O port, headphone port, etc.
  • the interface unit 108 can be used to receive input from an external device (for example, data information, power, etc.) and transmit the received input to one or more elements in the terminal device 100 or can be used to connect to the terminal device 100 and external devices. Transfer data between devices.
  • the memory 109 can be used to store software programs and various data.
  • the memory 109 may mainly include a program storage area and a data storage area.
  • the program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of mobile phones (such as audio data, phone book, etc.), etc.
  • the memory 109 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the processor 110 is the control center of the terminal device. It uses various interfaces and lines to connect the various parts of the entire terminal device, runs or executes software programs and/or modules stored in the memory 109, and calls data stored in the memory 109. , Perform various functions of the terminal equipment and process data, so as to monitor the terminal equipment as a whole.
  • the processor 110 may include one or more processing units; optionally, the processor 110 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, and application programs, etc.
  • the adjustment processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 110.
  • the terminal device 100 may also include a power source 111 (such as a battery) for supplying power to various components.
  • a power source 111 such as a battery
  • the power source 111 may be logically connected to the processor 110 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. Management and other functions.
  • the terminal device 100 includes some functional modules not shown, which will not be repeated here.
  • an embodiment of the present application further provides a terminal device, which may include the aforementioned processor 110 shown in FIG. 7, a memory 109, and a computer program stored in the memory 109 and running on the processor 110,
  • a terminal device which may include the aforementioned processor 110 shown in FIG. 7, a memory 109, and a computer program stored in the memory 109 and running on the processor 110,
  • the computer program is executed by the processor 110, each process of the proximity detection method shown in any one of FIG. 2 to FIG. 5 in the above method embodiment is realized, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here. .
  • the embodiment of the present application also provides a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium.
  • a computer program is stored on the computer-readable storage medium.
  • the computer program When the computer program is executed by a processor, the computer program shown in any one of FIGS. 2 to 5 in the above method embodiment is implemented.
  • the computer-readable storage medium such as read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk, or optical disk, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Telephone Function (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A proximity detection method and a terminal device, which relate to the technical field of communications, and are used to solve the problem in which ultrasonic detection solutions in related technologies detect that a screen of a terminal device has been blocked with low accuracy. The method comprises: when it is determined according to an ultrasonic sensor of the terminal device that there is a first object within a first preset distance that is blocking the terminal device, obtaining state information of the terminal device, the state information being used for determining whether what the first object is blocking is a first screen of the terminal device; when it is determined that what the first object is blocking is the first screen, then controlling the first screen to switch from a screen-on state to a screen-off state.

Description

接近检测方法及终端设备Approach detection method and terminal equipment
相关申请的交叉引用Cross-references to related applications
本申请主张在2019年09月24日在中国提交的中国专利申请号201910907360.2的优先权,其全部内容通过引用包含于此。This application claims the priority of Chinese Patent Application No. 201910907360.2 filed in China on September 24, 2019, the entire content of which is incorporated herein by reference.
技术领域Technical field
本申请实施例涉及通信技术领域,尤其涉及一种接近检测方法及终端设备。The embodiments of the present application relate to the field of communication technologies, and in particular, to a proximity detection method and terminal equipment.
背景技术Background technique
随着终端技术的不断发展,终端设备的应用越来越广泛。例如,在通话过程中,当接近传感器检测到终端设备的屏幕被遮挡时,灭屏以防误触的应用。With the continuous development of terminal technology, the application of terminal equipment becomes more and more extensive. For example, during a call, when the proximity sensor detects that the screen of the terminal device is blocked, an application that turns off the screen to prevent accidental touch.
相关技术中,为了适应大屏幕、窄边框的设计要求,终端设备的屏幕所在的表面必须要减少开孔,如此,不能采用传统红外接近传感器需要在屏幕所在的表面开孔的方案。随之出现了非开孔的超声检测方案,具体检测过程为:受话器发出超声信号,麦克风根据接收到的返回的超声信号来判断终端设备是否被遮挡。In the related art, in order to meet the design requirements of large screens and narrow bezels, the surface where the screen of the terminal device is located must be reduced in openings. Therefore, it is impossible to adopt the solution of traditional infrared proximity sensors that require openings on the surface of the screen. Subsequently, a non-opening ultrasonic detection scheme appeared. The specific detection process is: the receiver sends out an ultrasonic signal, and the microphone determines whether the terminal device is blocked or not based on the received ultrasonic signal.
然而,超声检测方案检测终端设备的屏幕被遮挡的准确性较低。However, the accuracy of the ultrasonic detection solution for detecting that the screen of the terminal device is blocked is low.
发明内容Summary of the invention
本申请实施例提供一种接近检测方法及终端设备,以解决传统技术超声检测方案检测终端设备的屏幕被遮挡的准确性较低的问题。The embodiments of the present application provide a proximity detection method and terminal device to solve the problem of low accuracy of detecting that the screen of the terminal device is blocked by the traditional ultrasonic detection solution.
为了解决上述技术问题,本申请是这样实现的:In order to solve the above technical problems, this application is implemented as follows:
第一方面,本申请实施例提供了一种接近检测方法,应用于终端设备,该方法包括:在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息,该状态信息用于确定是否第一物体遮挡的为该终端设备的第一屏;在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。In the first aspect, an embodiment of the present application provides a proximity detection method, which is applied to a terminal device, and the method includes: determining, according to an ultrasonic sensor of the terminal device, a situation in which a first object obstructs the terminal device within a first preset distance Under the following, the state information of the terminal device is obtained, and the state information is used to determine whether the first screen of the terminal device is blocked by the first object; in the case where the first screen is determined to be blocked by the first object, the first screen is controlled Switch from the on-screen state to the off-screen state.
第二方面,本申请实施例提供了一种终端设备,该终端设备包括:获取模块和控制模块;该获取模块,用于在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息,该状态信息用于确定是否第一物体遮挡的为该终端设备的第一屏;该控制模块,用于在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。In a second aspect, an embodiment of the present application provides a terminal device. The terminal device includes: an acquisition module and a control module; the acquisition module is configured to determine that there is a first preset distance within a first preset distance according to the ultrasonic sensor of the terminal device. When an object blocks the terminal device, the state information of the terminal device is obtained, and the state information is used to determine whether the first screen of the terminal device is blocked by the first object; the control module is used to determine whether the first object blocks the first screen of the terminal device. When is the first screen, control the first screen to switch from the on-screen state to the off-screen state.
第三方面,本申请实施例提供了一种终端设备,包括处理器、存储器及存储在该存储器上并可在该处理器上运行的计算机程序,该计算机程序被该处理器执行时实现如第一方面中的接近检测方法的步骤。In the third aspect, the embodiments of the present application provide a terminal device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the following On the one hand, the steps of the approach detection method.
第四方面,本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质上存储计算机程序,该计算机程序被处理器执行时实现如第一方面中的接近检测方法的步骤。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the proximity detection method in the first aspect are implemented.
在本申请实施例中,终端设备可以通过在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息,该状态信息用于确定是否第一物体遮挡的为该终端设备的第一屏;在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。通过该方案,终端设备在通过超声传感器确定有第一物体遮挡的情况下,可以结合该终端设备的状态信息,确定是否是第一物体遮挡第一屏;在确定是第一物体遮挡第一屏的情况下,终端设备可以控制该第一屏由亮屏状态切换为灭屏状态,从而可以在有异物遮挡终端设备处于亮屏状态的第一屏时,避免误触的发生,而且该方案结合超声检测和终端设备的状态检测,可以准确判断是终端设备处于亮屏状态的第一屏被遮挡,提高了超声检测方案检测终端设备的屏幕被遮挡的准确性。In the embodiment of the present application, the terminal device may obtain the state information of the terminal device when it is determined according to the ultrasonic sensor of the terminal device that there is a first object in the first preset distance to block the terminal device, and the state information is used To determine whether the first screen is blocked by the first object is the first screen of the terminal device; when it is determined that the first screen is blocked by the first object, the first screen is controlled to switch from the on-screen state to the off-screen state. With this solution, when the terminal device determines that the first object is blocked by the ultrasonic sensor, it can determine whether the first object is blocking the first screen based on the state information of the terminal device; when it is determined that the first object is blocking the first screen In the case of, the terminal device can control the first screen to switch from the on-screen state to the off-screen state, so that when a foreign object obstructs the first screen of the terminal device in the on-screen state, accidental touches can be avoided, and this solution combines Ultrasonic detection and state detection of terminal equipment can accurately determine that the first screen of the terminal device in the bright screen state is blocked, which improves the accuracy of the ultrasonic detection solution for detecting that the screen of the terminal device is blocked.
附图说明Description of the drawings
图1为本申请实施例提供的一种可能的安卓操作系统的架构示意图;FIG. 1 is a schematic structural diagram of a possible Android operating system provided by an embodiment of the application;
图2为本申请实施例提供的接近检测方法的流程图之一;FIG. 2 is one of the flowcharts of the proximity detection method provided by an embodiment of the application;
图3为本申请实施例提供的接近检测方法的流程图之二;FIG. 3 is the second flowchart of the proximity detection method provided by an embodiment of the application;
图4为本申请实施例提供的接近检测方法的流程图之三;FIG. 4 is the third flow chart of the proximity detection method provided by an embodiment of the application;
图5为本申请实施例提供的接近检测方法的流程图之四;FIG. 5 is the fourth flow chart of the proximity detection method provided by an embodiment of the application;
图6为本申请实施例提供的终端设备的结构示意图;FIG. 6 is a schematic structural diagram of a terminal device provided by an embodiment of the application;
图7为本申请实施例提供的终端设备的硬件示意图。FIG. 7 is a schematic diagram of hardware of a terminal device provided by an embodiment of the application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by a person of ordinary skill in the art without creative work shall fall within the protection scope of this application.
本文中术语“和/或”,是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。本文中符号“/”表示关联对象是或者的关系,例如A/B表示A或者B。The term "and/or" in this article refers to an association relationship that describes associated objects, which means that there can be three types of relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone These three situations. The symbol "/" in this document represents the relationship that the associated object is or, for example, A/B represents A or B.
本申请的说明书和权利要求书中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一输入、第二输入、第三输入和第四输入等是用于区别不同的输入,而不是用于描述输入的特定顺序。The terms "first", "second", "third", and "fourth" in the specification and claims of this application are used to distinguish different objects, rather than describing a specific order of objects. For example, the first input, the second input, the third input, and the fourth input are used to distinguish different inputs, rather than to describe the specific order of the inputs.
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present application, words such as "exemplary" or "for example" are used as examples, illustrations, or illustrations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferable or advantageous than other embodiments or design solutions. To be precise, words such as "exemplary" or "for example" are used to present related concepts in a specific manner.
在本申请实施例的描述中,除非另有说明,“多个”的含义是指两个或者两个以上,例如,多个处理单元是指两个或者两个以上的处理单元;多个元件是指两个或者两个以上的元件等。In the description of the embodiments of the present application, unless otherwise specified, the meaning of “multiple” refers to two or more than two, for example, multiple processing units refers to two or more processing units; multiple elements Refers to two or more elements, etc.
本申请实施例提供一种接近检测方法,终端设备可以通过在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息,该状态信息用于确定是否第一物体遮挡的为该终端设备的第一屏;在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。通过该方案,终端设备在通过超声传感器确定有第一物体遮挡的情况下,可以结合该终端设备的状态信息,确定是否是第一物体遮挡第一屏;在确定是第一物体遮挡第一屏的情况下,终端设备可以控制该第一屏由亮屏状态切换为灭屏状态,从而可以在有异物遮挡终端设备处于亮屏状态的第一屏时,避免误触的发生,而且该方案结合超声检测和终端设备的状态检测,可以准确判 断是终端设备处于亮屏状态的第一屏被遮挡,提高了超声检测方案检测终端设备的屏幕被遮挡的准确性。The embodiment of the present application provides a proximity detection method. A terminal device can obtain state information of the terminal device when it is determined according to the ultrasonic sensor of the terminal device that a first object within a first preset distance obstructs the terminal device. The status information is used to determine whether the first screen of the terminal device is blocked by the first object; when it is determined that the first screen is blocked by the first object, the first screen is controlled to switch from the on-screen state to the off-screen state. With this solution, when the terminal device determines that the first object is blocked by the ultrasonic sensor, it can determine whether the first object is blocking the first screen based on the state information of the terminal device; when it is determined that the first object is blocking the first screen In the case of, the terminal device can control the first screen to switch from the on-screen state to the off-screen state, so that when a foreign object obstructs the first screen of the terminal device in the on-screen state, accidental touches can be avoided, and this solution combines Ultrasonic detection and state detection of terminal equipment can accurately determine that the first screen of the terminal device in the bright screen state is blocked, which improves the accuracy of the ultrasonic detection solution for detecting that the screen of the terminal device is blocked.
下面以安卓操作系统为例,介绍一下本申请实施例提供的接近检测方法所应用的软件环境。The following takes the Android operating system as an example to introduce the software environment to which the proximity detection method provided in the embodiments of the present application is applied.
如图1所示,为本申请实施例提供的一种可能的安卓操作系统的架构示意图。在图1中,安卓操作系统的架构包括4层,分别为:应用程序层、应用程序框架层、系统运行库层和内核层(具体可以为Linux内核层)。As shown in FIG. 1, it is a schematic structural diagram of a possible Android operating system provided by an embodiment of this application. In Figure 1, the architecture of the Android operating system includes 4 layers, namely: application layer, application framework layer, system runtime library layer, and kernel layer (specifically, it may be the Linux kernel layer).
其中,应用程序层包括安卓操作系统中的各个应用程序(包括系统应用程序和第三方应用程序)。Among them, the application layer includes various applications (including system applications and third-party applications) in the Android operating system.
应用程序框架层是应用程序的框架,开发人员可以在遵守应用程序的框架的开发原则的情况下,基于应用程序框架层开发一些应用程序。The application framework layer is the framework of the application. Developers can develop some applications based on the application framework layer while complying with the development principles of the application framework.
系统运行库层包括库(也称为系统库)和安卓操作系统运行环境。库主要为安卓操作系统提供其所需的各类资源。安卓操作系统运行环境用于为安卓操作系统提供软件环境。The system runtime library layer includes a library (also called a system library) and an Android operating system runtime environment. The library mainly provides various resources needed by the Android operating system. The Android operating system operating environment is used to provide a software environment for the Android operating system.
内核层是安卓操作系统的操作系统层,属于安卓操作系统软件层次的最底层。内核层基于Linux内核为安卓操作系统提供核心系统服务和与硬件相关的驱动程序。The kernel layer is the operating system layer of the Android operating system and belongs to the lowest level of the Android operating system software. The kernel layer is based on the Linux kernel to provide core system services and hardware-related drivers for the Android operating system.
以安卓操作系统为例,本申请实施例中,开发人员可以基于上述如图1所示的安卓操作系统的系统架构,开发实现本申请实施例提供的接近检测方法的软件程序,从而使得该接近检测方法可以基于如图1所示的安卓操作系统运行。即处理器或者终端设备可以通过在安卓操作系统中运行该软件程序实现本申请实施例提供的接近检测方法。Taking the Android operating system as an example, in this embodiment of the application, a developer can develop a software program that implements the proximity detection method provided by the embodiment of the application based on the system architecture of the Android operating system as shown in FIG. The detection method can be run based on the Android operating system as shown in FIG. 1. That is, the processor or the terminal device can implement the proximity detection method provided in the embodiment of the present application by running the software program in the Android operating system.
本申请实施例中的终端设备可以为移动终端设备,也可以为非移动终端设备。移动终端设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等;非移动终端设备可以为个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等;本申请实施例不作具体限定。The terminal device in the embodiment of the present application may be a mobile terminal device or a non-mobile terminal device. The mobile terminal device can be a mobile phone, tablet computer, notebook computer, handheld computer, car terminal, wearable device, ultra-mobile personal computer (UMPC), netbook or personal digital assistant (personal digital assistant, PDA), etc. ; The non-mobile terminal device may be a personal computer (PC), a television (television, TV), a teller machine, or a self-service machine, etc.; the embodiment of the application does not specifically limit it.
本申请实施例提供的接近检测方法的执行主体可以为上述的终端设备(包括移动终端设备和非移动终端设备),也可以为该终端设备中能够实现该方法的功能模块和/或功能实体,具体的可以根据实际使用需求确定,本申请实施例不作限定。下面以终端设备为例, 对本申请实施例提供的接近检测方法进行示例性的说明。The execution subject of the proximity detection method provided in the embodiments of the present application may be the aforementioned terminal device (including mobile terminal devices and non-mobile terminal devices), or may be a functional module and/or functional entity in the terminal device that can implement the method, The details can be determined according to actual use requirements, and the embodiments of the present application do not limit it. The following uses a terminal device as an example to illustrate the proximity detection method provided in the embodiment of the present application.
传统技术中,基于超声检测方案的接近检测方法,由于超声信号没有方向性,其他物体从屏幕所在的表面以外的其他表面(侧面、顶部或屏幕的背面等)靠近终端设备时,终端设备也会因检测到被遮挡而误灭屏,从而导致用户的操作不便。In the traditional technology, the proximity detection method based on the ultrasonic detection scheme, because the ultrasonic signal has no directionality, when other objects approach the terminal device from a surface other than the surface where the screen is located (side, top, or back of the screen, etc.), the terminal device will also The screen is mistakenly turned off due to detection of being blocked, which causes inconvenience to the user's operation.
参考图2所示,本申请实施例提供了一种接近检测方法,应用于终端设备,该方法可以包括下述的步骤201-步骤202。As shown in FIG. 2, an embodiment of the present application provides a proximity detection method, which is applied to a terminal device, and the method may include the following steps 201 to 202.
步骤201、终端设备在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息。Step 201: The terminal device obtains state information of the terminal device when it is determined according to the ultrasonic sensor of the terminal device that a first object within a first preset distance covers the terminal device.
该状态信息用于确定是否第一物体遮挡的为该终端设备的第一屏。The status information is used to determine whether the first screen of the terminal device is blocked by the first object.
第一预设距离为根据实际使用需求预先设置的距离,本申请实施例不作限定。The first preset distance is a distance preset according to actual usage requirements, which is not limited in the embodiment of the present application.
示例性的,终端设备可以通过超声传感器发射超声波信号,并通过该超声传感器接收反射回来的超声波信号;若反射回来的超声波信号的信号强度大于预设阈值(预先根据实际使用需求设置的信号强度阈值,本申请实施例不作限定),则确定第一预设距离内有第一物体遮挡该终端设备,否则,确定没有物体遮挡该终端设备。Exemplarily, the terminal device may transmit an ultrasonic signal through an ultrasonic sensor, and receive the reflected ultrasonic signal through the ultrasonic sensor; if the signal strength of the reflected ultrasonic signal is greater than a preset threshold (the signal strength threshold set in advance according to actual usage requirements) , The embodiment of the present application is not limited), it is determined that there is a first object covering the terminal device within the first preset distance; otherwise, it is determined that no object is covering the terminal device.
示例性的,终端设备可以通过超声传感器发送超声波信号并获取发送时间;接收该超声波信号并获取接收时间;根据该接收时间和该发送时间的差值,确定被测物距离;当该被测物距离小于第一预设距离时,确定第一预设距离内有第一物体遮挡该终端设备,否则,确定没有物体遮挡该终端设备。Exemplarily, the terminal device may send an ultrasonic signal through an ultrasonic sensor and obtain the transmission time; receive the ultrasonic signal and obtain the reception time; determine the distance of the measured object according to the difference between the reception time and the transmission time; when the measured object When the distance is less than the first preset distance, it is determined that there is a first object covering the terminal device within the first preset distance; otherwise, it is determined that no object is covering the terminal device.
本申请实施例中,不限定终端设备根据超声传感器确定第一预设距离内有第一物体遮挡该终端设备的检测方法,具体可以参考任意相关技术,本申请实施例不再一一赘述。In the embodiments of this application, there is no limitation to the detection method that the terminal device determines that there is a first object in the first preset distance obstructing the terminal device according to the ultrasonic sensor. For details, reference may be made to any related technology, and the embodiments of this application will not be repeated one by one.
可选地,该状态信息包括下述至少一项:该终端设备的重力加速度信息,该终端设备的角速度信息。Optionally, the state information includes at least one of the following: gravitational acceleration information of the terminal device, and angular velocity information of the terminal device.
示例性的,该状态信息可以为该终端设备的重力加速度信息,该状态信息也可以为该终端设备的角速度信息,该状态信息还可以为该终端设备的重力加速度信息和角速度信息,该状态信息还可以包括其他可行性信息,具体可以根据实际使用需求确定,本申请实施例不作限定。Exemplarily, the state information may be gravitational acceleration information of the terminal device, the state information may also be angular velocity information of the terminal device, the state information may also be gravitational acceleration information and angular velocity information of the terminal device, and the state information It may also include other feasibility information, which may be specifically determined according to actual use requirements, and is not limited in the embodiment of the present application.
本申请实施例中,终端设备可以通过重力加速度传感器获取重力加速度信息,终端设 备还可以通过其它传感器获取重力加速度信息,本申请实施例不作限定。In the embodiment of the present application, the terminal device may obtain the gravity acceleration information through a gravity acceleration sensor, and the terminal device may also obtain the gravity acceleration information through other sensors, which is not limited in the embodiment of the present application.
本申请实施例中,终端设备可以通过陀螺仪传感器获取角速度信息,终端设备还可以通过其它传感器获取角速度信息,本申请实施例不作限定。In the embodiment of the present application, the terminal device may obtain angular velocity information through a gyroscope sensor, and the terminal device may also obtain angular velocity information through other sensors, which is not limited in the embodiment of the present application.
在终端设备根据该状态信息确定第一物体遮挡的为第一屏幕时,终端设备控制第一屏由亮屏状态切换为灭屏状态。When the terminal device determines that the first screen is blocked by the first object according to the state information, the terminal device controls the first screen to switch from the on-screen state to the off-screen state.
在终端设备根据该状态信息确定第一物体遮挡的不是第一屏幕时,分为以下两种情况:When the terminal device determines that the first object is not blocking the first screen according to the state information, it is divided into the following two situations:
第一种情况,终端设备为单面屏终端设备,则在终端设备根据该状态信息确定第一物体遮挡的不是第一屏幕时,终端设备保持第一屏处于亮屏状态。In the first case, the terminal device is a single-screen terminal device. When the terminal device determines that the first screen is not blocked by the first object according to the state information, the terminal device keeps the first screen in a bright screen state.
第二种情况,终端设备为多面屏终端设备,若终端设备根据该状态信息确定第一物体遮挡的为第二屏(判断方法与确定第一物体遮挡第一屏类似,本申请实施例不予赘述),则终端设备控制该第二屏由亮屏状态切换为灭屏状态;若终端设备根据该状态信息确定第一物体没有遮挡终端设备的任意一个屏,终端设备控制处于亮屏状态的屏保持亮屏状态。In the second case, the terminal device is a multi-screen terminal device. If the terminal device determines that the first object is blocking the second screen according to the status information (the judgment method is similar to determining that the first object is blocking the first screen, and this embodiment does not Repeat), the terminal device controls the second screen to switch from the on-screen state to the off-screen state; if the terminal device determines that the first object does not cover any screen of the terminal device according to the state information, the terminal device controls the screen in the on-screen state Keep the screen on.
步骤202、终端设备在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。Step 202: The terminal device controls the first screen to switch from the on-screen state to the off-screen state in the case where it is determined that the first screen is blocked by the first object.
本申请实施例中,终端设备在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。则可以在有物体遮挡处于亮屏状态的第一屏时,避免误触的发生。In the embodiment of the present application, the terminal device controls the first screen to switch from the on-screen state to the off-screen state when it is determined that the first screen is blocked by the first object. Therefore, when an object obstructs the first screen that is in the bright screen state, accidental touches can be avoided.
本申请实施例提供了一种接近检测方法,终端设备可以通过在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息,该状态信息用于确定是否第一物体遮挡的为该终端设备的第一屏;在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。通过该方案,终端设备在通过超声传感器确定有第一物体遮挡的情况下,可以结合该终端设备的状态信息,确定是否是第一物体遮挡第一屏;在确定是第一物体遮挡第一屏的情况下,终端设备可以控制该第一屏由亮屏状态切换为灭屏状态,从而可以在有异物遮挡终端设备处于亮屏状态的第一屏时,避免误触的发生,而且该方案结合超声检测和终端设备的状态检测,可以准确判断是终端设备处于亮屏状态的第一屏被遮挡,提高了超声检测方案检测终端设备的屏幕被遮挡的准确性。The embodiment of the present application provides a proximity detection method. The terminal device can obtain the state information of the terminal device when it is determined according to the ultrasonic sensor of the terminal device that a first object within a first preset distance obstructs the terminal device. , The state information is used to determine whether the first screen of the terminal device is blocked by the first object; when it is determined that the first screen is blocked by the first object, the first screen is controlled to switch from the on-screen state to the off-screen state . With this solution, when the terminal device determines that the first object is blocked by the ultrasonic sensor, it can determine whether the first object is blocking the first screen based on the state information of the terminal device; when it is determined that the first object is blocking the first screen In the case of, the terminal device can control the first screen to switch from the on-screen state to the off-screen state, so that when a foreign object obstructs the first screen of the terminal device in the on-screen state, accidental touches can be avoided, and this solution combines Ultrasonic detection and state detection of terminal equipment can accurately determine that the first screen of the terminal device in the bright screen state is blocked, which improves the accuracy of the ultrasonic detection solution for detecting that the screen of the terminal device is blocked.
可选地,在终端设备获取该终端设备的状态信息之后,终端设备需要根据该状态信息,确定是否第一物体遮挡的为第一屏。Optionally, after the terminal device obtains the state information of the terminal device, the terminal device needs to determine whether the first screen is blocked by the first object according to the state information.
示例性的,结合图2,如图3所示,在步骤201之后,本申请实施例提供的接近检测方法还可以包括下述的步骤203-步骤205。Exemplarily, in conjunction with FIG. 2, as shown in FIG. 3, after step 201, the proximity detection method provided in the embodiment of the present application may further include the following steps 203 to 205.
步骤203、终端设备判断该状态信息是否满足目标条件。Step 203: The terminal device judges whether the status information meets the target condition.
其中,该目标条件包括以下至少一项:该重力加速度信息在第一范围内,该角速度信息在第二范围内。The target condition includes at least one of the following: the gravitational acceleration information is within a first range, and the angular velocity information is within a second range.
在终端设备确定在第一预设距离内有第一物体遮挡终端设备的情况下,若该重力加速度信息在第一范围内,则可以确定第一物体遮挡的为第一屏。第一范围可以为预先设置的,也可以为实时获取的,本申请实施例不作限定。本申请实施例中,若该重力加速度信息在第一范围内,则该状态信息满足目标条件。In the case where the terminal device determines that a first object obstructs the terminal device within the first preset distance, if the gravitational acceleration information is within the first range, it can be determined that the first object obstructs the first screen. The first range may be preset or acquired in real time, which is not limited in the embodiment of the present application. In the embodiment of the present application, if the gravitational acceleration information is within the first range, the state information meets the target condition.
在终端设备确定在第一预设距离内有第一物体遮挡终端设备的情况下,若该角速度信息在第二范围内,则可以确定第一物体遮挡的为第一屏。第二范围可以为预先设置的,也可以为实时获取的,本申请实施例不作限定。本申请实施例中,若该角速度信息在第二范围内,则该状态信息满足目标条件。In the case where the terminal device determines that a first object obstructs the terminal device within the first preset distance, if the angular velocity information is within the second range, it can be determined that the first object obstructs the first screen. The second range may be preset or acquired in real time, which is not limited in the embodiment of the present application. In the embodiment of the present application, if the angular velocity information is within the second range, the state information meets the target condition.
在终端设备确定在第一预设距离内有第一物体遮挡终端设备的情况下,若该重力加速度信息在第一范围内,且该角速度信息在第二范围内,则可以确定第一物体遮挡的为第一屏。第一范围和第二范围可以为预先设置的,也可以为实时获取的,本申请实施例不作限定。本申请实施例中,若该重力加速度信息在第一范围内,且该角速度信息在第二范围内,则该状态信息满足目标条件。In the case where the terminal device determines that the terminal device is blocked by the first object within the first preset distance, if the gravitational acceleration information is within the first range and the angular velocity information is within the second range, it can be determined that the first object is blocking the terminal device. Is the first screen. The first range and the second range may be preset or acquired in real time, which is not limited in the embodiment of the present application. In the embodiment of the present application, if the gravitational acceleration information is in the first range and the angular velocity information is in the second range, the state information meets the target condition.
示例性的,终端设备可以根据终端设备的状态信息(如加速度传感器采集的手机三轴重力加速度数据和陀螺仪采集的三轴角速度数据)计算出终端设备的姿态和手势动作,这里定义一种手势和三种姿态:Exemplarily, the terminal device can calculate the posture and gesture action of the terminal device according to the state information of the terminal device (such as the three-axis gravity acceleration data of the mobile phone collected by the acceleration sensor and the three-axis angular velocity data collected by the gyroscope). Here, a gesture is defined And three gestures:
a)拿起终端设备靠近耳朵手势(简称为接听手势);a) Pick up the terminal device and approach the ear gesture (referred to as the answer gesture for short);
b)竖直放置姿态(即终端设备放置耳边时的姿态);b) Vertical placement posture (that is, the posture when the terminal device is placed near the ear);
c)屏幕向上平放姿态;c) The screen is up and down;
d)未知姿态。d) Unknown posture.
结合超声传感器确定第一预设距离内是否有物体遮挡终端设备(有物体遮挡则为是,没有物体遮挡则为否),以及惯性传感器(重力和陀螺仪)上报的手势姿态信息(状态信息),确定是否有物体遮挡第一屏(遮挡第一屏则为是,没有遮挡第一屏则为否),具体如下表所示。Combine the ultrasonic sensor to determine whether there is an object obstructing the terminal device within the first preset distance (yes if obstructed by an object, no obstructed by an object), and gesture posture information (status information) reported by the inertial sensor (gravity and gyroscope) , To determine whether there is an object blocking the first screen (Yes for blocking the first screen, No for not blocking the first screen), as shown in the following table.
Figure PCTCN2020116783-appb-000001
Figure PCTCN2020116783-appb-000001
根据上表可以得知:在超声传感器确定有物体遮挡终端设备的情况下,只有在终端设备处于接听手势或垂直姿态时,可以确定遮挡的为第一屏。According to the above table, it can be known that when the ultrasonic sensor determines that an object is blocking the terminal device, only when the terminal device is in the answering gesture or vertical posture, the first screen can be determined to be blocked.
在该状态变化信息满足目标条件的情况下,执行下述的步骤204;在该状态变化信息不满足该目标条件的情况下,执行下述的步骤205。When the state change information meets the target condition, the following step 204 is executed; when the state change information does not meet the target condition, the following step 205 is executed.
步骤204、终端设备确定第一物体遮挡的为第一屏。Step 204: The terminal device determines that the first screen is blocked by the first object.
终端设备在该状态信息满足目标条件的情况下,确定第一物体遮挡的为第一屏。When the state information meets the target condition, the terminal device determines that the first screen is blocked by the first object.
步骤205、终端设备确定第一物体遮挡的不是第一屏。Step 205: The terminal device determines that the first screen is not blocked by the first object.
终端设备在该状态信息未满足该目标条件的情况下,确定第一物体遮挡的不是第一屏。When the state information does not meet the target condition, the terminal device determines that the first screen is not blocked by the first object.
可选地,在终端设备根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备之前,终端设备需要先开启超声传感器。Optionally, before the terminal device determines, according to the ultrasonic sensor of the terminal device, that a first object within the first preset distance covers the terminal device, the terminal device needs to turn on the ultrasonic sensor first.
本申请实施例中,终端设备可以根据该状态信息是否满足目标条件,从而快速确定是否第一物体遮挡的为第一屏。In the embodiment of the present application, the terminal device can quickly determine whether the first screen is blocked by the first object according to whether the state information meets the target condition.
示例性的,结合图3,如图4所示,在步骤201之前,本申请实施例提供的接近检测 方法还可以包括下述的步骤206-步骤207。Exemplarily, in conjunction with Fig. 3, as shown in Fig. 4, before step 201, the proximity detection method provided in the embodiment of the present application may further include the following steps 206-207.
步骤206、终端设备确定该第一屏是否处于亮屏状态,且该第一屏是否显示通话界面。Step 206: The terminal device determines whether the first screen is in a bright screen state, and whether the first screen displays a call interface.
终端设备确定该第一屏是否处于亮屏状态的方法,以及确定第一屏是否显示通话界面的方法可以参考任意相关技术,本申请实施例不作限定。The method for the terminal device to determine whether the first screen is in the on-screen state and the method for determining whether the first screen displays the call interface can refer to any related technology, which is not limited in the embodiment of the present application.
在终端设备在确定该第一屏处于亮屏状态,且该第一屏显示通话界面的情况下,开启该超声传感器;否则不开启超声传感器。When the terminal device determines that the first screen is in a bright screen state and the call interface is displayed on the first screen, the ultrasonic sensor is turned on; otherwise, the ultrasonic sensor is not turned on.
步骤207、终端设备在确定该第一屏处于亮屏状态,且该第一屏显示通话界面的情况下,开启该超声传感器。Step 207: The terminal device turns on the ultrasonic sensor when it is determined that the first screen is in the on-screen state and the call interface is displayed on the first screen.
本申请实施例中,在终端设备未处于亮屏状态(即处于灭屏状态),或者处于亮屏状态但第一屏未显示通话界面的情况下,终端设备可以关闭超声传感器,从而可以节约耗电,而且,可以在第一屏处于亮屏状态时,避免影响终端设备对其他内容的显示。In the embodiment of this application, when the terminal device is not in the on-screen state (that is, in the off-screen state), or in the on-screen state but the call interface is not displayed on the first screen, the terminal device can turn off the ultrasonic sensor, which can save energy. In addition, when the first screen is in the on-screen state, it can avoid affecting the display of other content on the terminal device.
可选地,终端设备在确定该第一屏处于灭屏状态,且该第一屏未处于通话状态的情况下,开启红外传感器。Optionally, the terminal device turns on the infrared sensor when it is determined that the first screen is in the off-screen state and the first screen is not in the call state.
示例性的,结合图4,如图5所示,在步骤206之后,本申请实施例提供的接近检测方法还可以包括下述的步骤208-步骤209。Exemplarily, in conjunction with FIG. 4, as shown in FIG. 5, after step 206, the proximity detection method provided in the embodiment of the present application may further include the following steps 208 to step 209.
步骤208、终端设备在确定该第一屏处于灭屏状态,且该第一屏未处于通话状态的情况下,开启红外传感器。Step 208: The terminal device turns on the infrared sensor when it is determined that the first screen is in the off-screen state and the first screen is not in the call state.
步骤209、终端设备在根据该红外传感器确定第二预设距离内有物体遮挡第一屏的情况下,执行下述至少一项:控制该第一屏保持灭屏状态,禁止所述第一屏在灭屏状态下点亮预设区域,该预设区域用于显示提示信息。Step 209: The terminal device performs at least one of the following when it is determined according to the infrared sensor that there is an object in the second preset distance blocking the first screen: controlling the first screen to remain in the off-screen state, and prohibiting the first screen When the screen is off, the preset area is illuminated, and the preset area is used to display prompt information.
第二预设距离为根据实际使用需求预先设置的距离,本申请实施例不作限定。The second preset distance is a distance preset according to actual usage requirements, which is not limited in the embodiment of the present application.
第二预设距离与第一预设距离可以相同,也可以不相同,本申请实施例不作限定。The second preset distance and the first preset distance may be the same or different, which is not limited in the embodiment of the present application.
终端设备根据该红外传感器确定第二预设距离内有第二物体遮挡第一屏的方法可以参考任意相关技术,本申请实施例不作限定。The method for the terminal device to determine according to the infrared sensor that there is a second object blocking the first screen within the second preset distance may refer to any related technology, which is not limited in the embodiment of the present application.
该提示信息可以为时钟信息、电量信息、天气信息、指纹提示图标(用于提示用户指纹采集区域)、即时社交应用的短信息的提示信息等,具体可以根据实际使用需求确定,本申请实施例不作限定。The prompt information can be clock information, power information, weather information, fingerprint prompt icons (used to prompt the user's fingerprint collection area), prompt information of short messages of instant social applications, etc., which can be specifically determined according to actual usage requirements. This embodiment of the application Not limited.
本申请实施例中,终端设备在根据该红外传感器确定第二预设距离内有第二物体遮挡第一屏的情况下,控制该第一屏保持灭屏状态,可以防止在有物体遮挡第一屏时,者来电不亮屏或由于用户的误触发使得终端设备点亮屏幕,进而可以降低耗电。终端设备在根据该红外传感器确定第二预设距离内有第二物体遮挡第一屏的情况下,禁止第一屏在灭屏状态下点亮预设区域,该预设区域用于显示提示信息,可以在有物体遮挡第一屏(说明用户不需要查看该提示信息)时,禁止灭屏状态下显示提示信息(包括在当前灭屏状态下的预设区域被点亮并显示提示信息的情况下,取消显示该提示信息并熄灭该预设区域),可以节约耗电。而且通过红外传感器在灭屏状态下进行接近检测的方案,可以在不损伤屏幕寿命的前提下,提高遮挡检测准确度。In the embodiment of the present application, the terminal device controls the first screen to remain in the off-screen state when it is determined according to the infrared sensor that there is a second object within the second preset distance to block the first screen, which can prevent objects from blocking the first screen. When the screen is turned on, the screen does not turn on when a call comes in or the terminal device lights up the screen due to a user's false trigger, thereby reducing power consumption. When the terminal device determines according to the infrared sensor that there is a second object blocking the first screen within the second preset distance, prohibit the first screen from lighting up the preset area in the off-screen state, and the preset area is used to display prompt information , When there is an object obstructing the first screen (indicating that the user does not need to view the prompt information), the display of prompt information in the off-screen state is prohibited (including the situation that the preset area in the current off-screen state is lit and the prompt information is displayed Cancel the display of the prompt information and extinguish the preset area), which can save power. Moreover, the approach of detecting the proximity of the screen with the infrared sensor in the off-screen state can improve the accuracy of the occlusion detection without damaging the life of the screen.
本申请实施例中,终端设备也可在确定该第一屏处于灭屏状态的情况下,开启超声传感器;且在根据该超声传感器确定第一预设距离内有物体遮挡第一屏的情况下,执行下述至少一项:控制该第一屏保持灭屏状态,禁止第一屏在灭屏状态下点亮预设区域,该预设区域用于显示提示信息。In the embodiment of the present application, the terminal device may also turn on the ultrasonic sensor when it is determined that the first screen is in the off-screen state; and when it is determined according to the ultrasonic sensor that an object within the first preset distance is blocking the first screen Execute at least one of the following: control the first screen to remain in the off-screen state, and prohibit the first screen from illuminating a preset area in the off-screen state, and the preset area is used to display prompt information.
本申请实施例中的各个附图均是结合独权实施例附图示例的,具体实现时,各个附图还可以结合其它任意可以结合的附图实现,本申请实施例不作限定。例如,结合图2,本申请实施例提供的接近检测方法还可以包括上述的步骤203或步骤204。Each of the drawings in the embodiments of the present application is an example in combination with the drawings of the independent embodiment. In specific implementation, each of the drawings may also be implemented in combination with any other drawings that can be combined, and the embodiments of the present application are not limited. For example, with reference to FIG. 2, the proximity detection method provided by the embodiment of the present application may further include the above-mentioned step 203 or step 204.
如图6所示,本申请实施例提供一种终端设备120,该终端设备120包括:获取模块121和控制模块122;该获取模块121,用于在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息,该状态信息用于确定是否该第一物体遮挡的为该终端设备的第一屏;该控制模块122,用于在确定该第一物体遮挡的为该第一屏的情况下,控制该第一屏由亮屏状态切换为灭屏状态。As shown in FIG. 6, an embodiment of the present application provides a terminal device 120. The terminal device 120 includes: an acquisition module 121 and a control module 122; the acquisition module 121 is configured to determine the first preset according to the ultrasonic sensor of the terminal device. If the terminal device is blocked by a first object within a distance, the state information of the terminal device is acquired, and the state information is used to determine whether the first screen of the terminal device is blocked by the first object; the control module 122, It is used for controlling the first screen to switch from the on-screen state to the off-screen state in a case where it is determined that the first screen is blocked by the first object.
可选地,该状态信息包括下述至少一项:该终端设备的重力加速度信息,该终端设备的角速度信息。Optionally, the state information includes at least one of the following: gravitational acceleration information of the terminal device, and angular velocity information of the terminal device.
可选地,该终端设备120还包括:确定模块123;该确定模块123,用于在该获取模块121获取该终端设备的状态信息之后,在该状态信息满足目标条件的情况下,确定该第一物体遮挡的为该第一屏;在该状态信息未满足该目标条件的情况下,确定该 第一物体遮挡的不是该第一屏;其中,该目标条件包括以下至少一项:该重力加速度信息在第一范围内,该角速度信息在第二范围内。Optionally, the terminal device 120 further includes: a determining module 123; the determining module 123 is configured to determine the first state information when the state information meets the target condition after the obtaining module 121 obtains the state information of the terminal device The first screen is blocked by an object; in the case that the state information does not meet the target condition, it is determined that the first screen is not blocked by the first object; wherein, the target condition includes at least one of the following: the gravitational acceleration The information is in the first range, and the angular velocity information is in the second range.
可选地,该终端设备120还包括:开启模块124;该开启模块124,用于在该根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备之前,在确定该第一屏处于亮屏状态,且该第一屏显示通话界面的情况下,开启该超声传感器。Optionally, the terminal device 120 further includes: an opening module 124; the opening module 124 is configured to determine that the terminal device is blocked by a first object within a first preset distance according to the ultrasonic sensor of the terminal device When the first screen is in the on-screen state and the call interface is displayed on the first screen, the ultrasonic sensor is turned on.
可选地,该终端设备120还包括:开启模块124;该开启模块124,用于在确定该第一屏处于灭屏状态,且该第一屏未处于通话状态的情况下,开启红外传感器;该控制模块122,还用于在根据该红外传感器确定第二预设距离内有物体遮挡该第一屏的情况下,执行下述至少一项:控制该第一屏保持灭屏状态,控制该第一屏取消显示灭屏状态下的提示信息。Optionally, the terminal device 120 further includes: an opening module 124; the opening module 124 is configured to turn on the infrared sensor when it is determined that the first screen is in an off-screen state and the first screen is not in a call state; The control module 122 is further configured to perform at least one of the following when it is determined according to the infrared sensor that an object within a second preset distance blocks the first screen: controlling the first screen to keep the screen off, and controlling the The first screen cancels the prompt message in the off-screen state.
需要说明的是,如图6所示,终端设备120中一定包括的模块用实线框示意,如获取模块121和控制模块122;终端设备120中可以包括也可以不包括的模块用虚线框示意,如确定模块123和开启模块124。It should be noted that, as shown in FIG. 6, the modules that must be included in the terminal device 120 are indicated by solid lines, such as the acquisition module 121 and the control module 122; the modules that may or may not be included in the terminal device 120 are indicated by dashed boxes. , Such as the determining module 123 and the opening module 124.
本申请实施例提供的终端设备能够实现上述方法实施例中图2至图5任意之一所示的各个过程,为避免重复,此处不再赘述。The terminal device provided in the embodiment of the present application can implement each process shown in any one of FIG. 2 to FIG. 5 in the foregoing method embodiment. To avoid repetition, details are not described herein again.
本申请实施例提供了一种终端设备,终端设备可以通过在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息,该状态信息用于确定是否第一物体遮挡的为该终端设备的第一屏;在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。通过该方案,终端设备在通过超声传感器确定有第一物体遮挡的情况下,可以结合该终端设备的状态信息,确定是否是第一物体遮挡第一屏;在确定是第一物体遮挡第一屏的情况下,终端设备可以控制该第一屏由亮屏状态切换为灭屏状态,从而可以在有异物遮挡终端设备处于亮屏状态的第一屏时,避免误触的发生,而且该方案结合超声检测和终端设备的状态检测,可以准确判断是终端设备处于亮屏状态的第一屏被遮挡,提高了超声检测方案检测终端设备的屏幕被遮挡的准确性。The embodiment of the present application provides a terminal device. The terminal device can obtain the state information of the terminal device when it is determined according to the ultrasonic sensor of the terminal device that a first object within a first preset distance obstructs the terminal device, The status information is used to determine whether the first screen of the terminal device is blocked by the first object; when it is determined that the first screen is blocked by the first object, the first screen is controlled to switch from the on-screen state to the off-screen state. With this solution, when the terminal device determines that the first object is blocked by the ultrasonic sensor, it can determine whether the first object is blocking the first screen based on the state information of the terminal device; when it is determined that the first object is blocking the first screen In the case of, the terminal device can control the first screen to switch from the on-screen state to the off-screen state, so that when a foreign object obstructs the first screen of the terminal device in the on-screen state, accidental touches can be avoided, and this solution combines Ultrasonic detection and state detection of terminal equipment can accurately determine that the first screen of the terminal device in the bright screen state is blocked, which improves the accuracy of the ultrasonic detection solution for detecting that the screen of the terminal device is blocked.
图7为实现本申请各个实施例的一种终端设备的硬件结构示意图。如图7所示,该终端设备100包括但不限于:射频单元101、网络模块102、音频输出单元103、输入单元 104、传感器105、显示单元106、用户输入单元107、接口单元108、存储器109、处理器110、以及电源111等部件。本领域技术人员可以理解,图7中示出的终端设备结构并不构成对终端设备的限定,终端设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本申请实施例中,终端设备包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端设备、可穿戴设备、以及计步器等。FIG. 7 is a schematic diagram of the hardware structure of a terminal device that implements each embodiment of the present application. As shown in FIG. 7, the terminal device 100 includes but is not limited to: a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, and a memory 109 , Processor 110, and power supply 111 and other components. Those skilled in the art can understand that the structure of the terminal device shown in FIG. 7 does not constitute a limitation on the terminal device, and the terminal device may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. Layout. In the embodiments of the present application, terminal devices include, but are not limited to, mobile phones, tablet computers, notebook computers, palmtop computers, vehicle-mounted terminal devices, wearable devices, and pedometers.
其中,处理器110,用于在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息,该状态信息用于确定是否第一物体遮挡的为该终端设备的第一屏;在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。The processor 110 is configured to obtain state information of the terminal device when it is determined according to the ultrasonic sensor of the terminal device that a first object within a first preset distance covers the terminal device, and the state information is used to determine whether The first screen that is blocked by the first object is the first screen of the terminal device; if it is determined that the first screen is blocked by the first object, the first screen is controlled to switch from the on-screen state to the off-screen state.
本申请实施例提供的终端设备,终端设备可以通过在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息,该状态信息用于确定是否第一物体遮挡的为该终端设备的第一屏;在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。通过该方案,终端设备在通过超声传感器确定有第一物体遮挡的情况下,可以结合该终端设备的状态信息,确定是否是第一物体遮挡第一屏;在确定是第一物体遮挡第一屏的情况下,终端设备可以控制该第一屏由亮屏状态切换为灭屏状态,从而可以在有异物遮挡终端设备处于亮屏状态的第一屏时,避免误触的发生,而且该方案结合超声检测和终端设备的状态检测,可以准确判断是终端设备处于亮屏状态的第一屏被遮挡,提高了超声检测方案检测终端设备的屏幕被遮挡的准确性。In the terminal device provided by the embodiment of the present application, the terminal device can obtain the state information of the terminal device when it is determined according to the ultrasonic sensor of the terminal device that a first object within a first preset distance covers the terminal device. The information is used to determine whether the first screen of the terminal device is blocked by the first object; when it is determined that the first screen is blocked by the first object, the first screen is controlled to switch from the on-screen state to the off-screen state. With this solution, when the terminal device determines that the first object is blocked by the ultrasonic sensor, it can determine whether the first object is blocking the first screen based on the state information of the terminal device; when it is determined that the first object is blocking the first screen In the case of the terminal device, the terminal device can control the first screen to switch from the on-screen state to the off-screen state, so that when a foreign object obstructs the first screen of the terminal device in the on-screen state, the occurrence of accidental touches can be avoided, and the solution combines Ultrasonic detection and state detection of terminal equipment can accurately determine that the first screen of the terminal device in the bright screen state is blocked, which improves the accuracy of the ultrasonic detection solution for detecting that the screen of the terminal device is blocked.
应理解的是,本申请实施例中,射频单元101可用于收发信息或通话过程中,信号的接收和发送,具体的,将来自基站的下行数据接收后,给处理器110处理;另外,将上行的数据发送给基站。通常,射频单元101包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元101还可以通过无线通信系统与网络和其他设备通信。It should be understood that, in the embodiment of the present application, the radio frequency unit 101 can be used for receiving and sending signals in the process of sending and receiving information or talking. Specifically, the downlink data from the base station is received and processed by the processor 110; in addition, Uplink data is sent to the base station. Generally, the radio frequency unit 101 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. In addition, the radio frequency unit 101 can also communicate with the network and other devices through a wireless communication system.
终端设备通过网络模块102为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。The terminal device provides users with wireless broadband Internet access through the network module 102, such as helping users to send and receive emails, browse web pages, and access streaming media.
音频输出单元103可以将射频单元101或网络模块102接收的或者在存储器109中存 储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元103还可以提供与终端设备100执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元103包括扬声器、蜂鸣器以及受话器等。The audio output unit 103 can convert the audio data received by the radio frequency unit 101 or the network module 102 or stored in the memory 109 into an audio signal and output it as sound. Moreover, the audio output unit 103 may also provide audio output related to a specific function performed by the terminal device 100 (for example, call signal reception sound, message reception sound, etc.). The audio output unit 103 includes a speaker, a buzzer, a receiver, and the like.
输入单元104用于接收音频或视频信号。输入单元104可以包括图形处理器(Graphics Processing Unit,GPU)1041和麦克风1042,图形处理器1041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元106上。经图形处理器1041处理后的图像帧可以存储在存储器109(或其它存储介质)中或者经由射频单元101或网络模块102进行发送。麦克风1042可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元101发送到移动通信基站的格式输出。The input unit 104 is used to receive audio or video signals. The input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042, and the graphics processor 1041 is configured to monitor images of still pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The data is processed. The processed image frame can be displayed on the display unit 106. The image frame processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or sent via the radio frequency unit 101 or the network module 102. The microphone 1042 can receive sound, and can process such sound into audio data. The processed audio data can be converted into a format that can be sent to a mobile communication base station via the radio frequency unit 101 for output in the case of a telephone call mode.
终端设备100还包括至少一种传感器105,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1061的亮度,接近传感器可在终端设备100移动到耳边时,关闭显示面板1061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别终端设备姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器105还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。The terminal device 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light. The proximity sensor can close the display panel 1061 and the display panel 1061 when the terminal device 100 is moved to the ear. / Or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three-axis), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the terminal device (such as horizontal and vertical screen switching, related games) , Magnetometer attitude calibration), vibration recognition related functions (such as pedometer, percussion), etc.; sensor 105 can also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, Infrared sensors, etc., will not be repeated here.
显示单元106用于显示由用户输入的信息或提供给用户的信息。显示单元106可包括显示面板1061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1061。The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.
用户输入单元107可用于接收输入的数字或字符信息,以及产生与终端设备的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元107包括触控面板1071以及其他输入设备1072。触控面板1071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1071上或在触控面板1071附近的操作)。触控面板1071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制 器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器110,接收处理器110发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1071。除了触控面板1071,用户输入单元107还可以包括其他输入设备1072。具体地,其他输入设备1072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。The user input unit 107 can be used to receive inputted numeric or character information, and generate key signal input related to user settings and function control of the terminal device. Specifically, the user input unit 107 includes a touch panel 1071 and other input devices 1072. The touch panel 1071, also called a touch screen, can collect the user's touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch panel 1071 or near the touch panel 1071. operating). The touch panel 1071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch position, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 110, the command sent by the processor 110 is received and executed. In addition, the touch panel 1071 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may also include other input devices 1072. Specifically, other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick, which will not be repeated here.
进一步的,触控面板1071可覆盖在显示面板1061上,当触控面板1071检测到在其上或附近的触摸操作后,传送给处理器110以确定触摸事件的类型,随后处理器110根据触摸事件的类型在显示面板1061上提供相应的视觉输出。虽然在图7中,触控面板1071与显示面板1061是作为两个独立的部件来实现终端设备的输入和输出功能,但是在某些实施例中,可以将触控面板1071与显示面板1061集成而实现终端设备的输入和输出功能,具体此处不做限定。Further, the touch panel 1071 can be overlaid on the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits it to the processor 110 to determine the type of the touch event, and then the processor 110 determines the type of the touch event according to the touch. The type of event provides corresponding visual output on the display panel 1061. Although in FIG. 7, the touch panel 1071 and the display panel 1061 are used as two independent components to implement the input and output functions of the terminal device, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated The implementation of the input and output functions of the terminal device is not specifically limited here.
接口单元108为外部装置与终端设备100连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元108可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到终端设备100内的一个或多个元件或者可以用于在终端设备100和外部装置之间传输数据。The interface unit 108 is an interface for connecting an external device with the terminal device 100. For example, the external device may include a wired or wireless headset port, an external power source (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, audio input/output (I/O) port, video I/O port, headphone port, etc. The interface unit 108 can be used to receive input from an external device (for example, data information, power, etc.) and transmit the received input to one or more elements in the terminal device 100 or can be used to connect to the terminal device 100 and external devices. Transfer data between devices.
存储器109可用于存储软件程序以及各种数据。存储器109可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器109可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 109 can be used to store software programs and various data. The memory 109 may mainly include a program storage area and a data storage area. The program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of mobile phones (such as audio data, phone book, etc.), etc. In addition, the memory 109 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
处理器110是终端设备的控制中心,利用各种接口和线路连接整个终端设备的各个部分,通过运行或执行存储在存储器109内的软件程序和/或模块,以及调用存储在存储器109内的数据,执行终端设备的各种功能和处理数据,从而对终端设备进行整体监控。处理器110可包括一个或多个处理单元;可选地,处理器110可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器 主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器110中。The processor 110 is the control center of the terminal device. It uses various interfaces and lines to connect the various parts of the entire terminal device, runs or executes software programs and/or modules stored in the memory 109, and calls data stored in the memory 109. , Perform various functions of the terminal equipment and process data, so as to monitor the terminal equipment as a whole. The processor 110 may include one or more processing units; optionally, the processor 110 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, and application programs, etc. The adjustment processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 110.
终端设备100还可以包括给各个部件供电的电源111(比如电池),可选地,电源111可以通过电源管理系统与处理器110逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The terminal device 100 may also include a power source 111 (such as a battery) for supplying power to various components. Optionally, the power source 111 may be logically connected to the processor 110 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. Management and other functions.
另外,终端设备100包括一些未示出的功能模块,在此不再赘述。In addition, the terminal device 100 includes some functional modules not shown, which will not be repeated here.
可选地,本申请实施例还提供一种终端设备,可以包括上述如图7所示的处理器110,存储器109,以及存储在存储器109上并可在该处理器110上运行的计算机程序,该计算机程序被处理器110执行时实现上述方法实施例中图2至图5任意之一所示的接近检测方法的各个过程,且能达到相同的技术效果,为避免重复,此处不再赘述。Optionally, an embodiment of the present application further provides a terminal device, which may include the aforementioned processor 110 shown in FIG. 7, a memory 109, and a computer program stored in the memory 109 and running on the processor 110, When the computer program is executed by the processor 110, each process of the proximity detection method shown in any one of FIG. 2 to FIG. 5 in the above method embodiment is realized, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here. .
本申请实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述方法实施例中图2至图5任意之一所示的接近检测方法的各个过程,且能达到相同的技术效果,为避免重复,此处不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。The embodiment of the present application also provides a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the computer program shown in any one of FIGS. 2 to 5 in the above method embodiment is implemented. Each process of the approach detection method can achieve the same technical effect. In order to avoid repetition, it will not be repeated here. Wherein, the computer-readable storage medium, such as read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk, or optical disk, etc.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that in this article, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, It also includes other elements not explicitly listed, or elements inherent to the process, method, article, or device. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, article, or device that includes the element.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above implementation manners, those skilled in the art can clearly understand that the above-mentioned embodiment method can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is better.的实施方式。 Based on this understanding, the technical solution of this application essentially or the part that contributes to the related technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) ) Includes several instructions to make a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the method described in each embodiment of the present application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在 本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the application are described above with reference to the accompanying drawings, but the application is not limited to the above-mentioned specific embodiments. The above-mentioned specific embodiments are only illustrative and not restrictive. Those of ordinary skill in the art are Under the enlightenment of this application, many forms can be made without departing from the purpose of this application and the scope of protection of the claims, all of which fall within the protection of this application.

Claims (12)

  1. 一种接近检测方法,应用于终端设备,所述方法包括:A proximity detection method, applied to a terminal device, and the method includes:
    在根据所述终端设备的超声传感器确定第一预设距离内有第一物体遮挡所述终端设备的情况下,获取所述终端设备的状态信息,所述状态信息用于确定是否所述第一物体遮挡的为所述终端设备的第一屏;In the case that it is determined according to the ultrasonic sensor of the terminal device that there is a first object covering the terminal device within the first preset distance, the state information of the terminal device is acquired, and the state information is used to determine whether the first What is blocked by an object is the first screen of the terminal device;
    在确定所述第一物体遮挡的为所述第一屏的情况下,控制所述第一屏由亮屏状态切换为灭屏状态。In a case where it is determined that the first screen is blocked by the first object, the first screen is controlled to switch from the on-screen state to the off-screen state.
  2. 根据权利要求1所述的方法,其中,所述状态信息包括下述至少一项:The method according to claim 1, wherein the status information includes at least one of the following:
    所述终端设备的重力加速度信息,所述终端设备的角速度信息。The gravitational acceleration information of the terminal device, and the angular velocity information of the terminal device.
  3. 根据权利要求2所述的方法,其中,所述获取所述终端设备的状态信息之后,还包括:The method according to claim 2, wherein after said acquiring the state information of the terminal device, the method further comprises:
    在所述状态信息满足目标条件的情况下,确定所述第一物体遮挡的为所述第一屏;In a case where the state information meets the target condition, it is determined that the first screen is occluded by the first object;
    其中,所述目标条件包括以下至少一项:所述重力加速度信息在第一范围内,所述角速度信息在第二范围内。Wherein, the target condition includes at least one of the following: the gravitational acceleration information is within a first range, and the angular velocity information is within a second range.
  4. 根据权利要求1至3中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1 to 3, wherein the method further comprises:
    所述根据所述终端设备的超声传感器确定第一预设距离内有第一物体遮挡所述终端设备之前,还包括:Before the determining according to the ultrasonic sensor of the terminal device that a first object within the first preset distance blocks the terminal device, the method further includes:
    在确定所述第一屏处于亮屏状态,且所述第一屏显示通话界面的情况下,开启所述超声传感器。When it is determined that the first screen is in the on-screen state and the call interface is displayed on the first screen, the ultrasonic sensor is turned on.
  5. 根据权利要求1至3中任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1 to 3, wherein the method further comprises:
    在确定所述第一屏处于灭屏状态,且所述第一屏未处于通话状态的情况下,开启红外传感器;When it is determined that the first screen is in the off-screen state and the first screen is not in the call state, turn on the infrared sensor;
    在根据所述红外传感器确定第二预设距离内有物体遮挡所述第一屏的情况下,执行下述至少一项:控制所述第一屏保持灭屏状态,禁止所述第一屏在灭屏状态下点亮预设区域,所述预设区域用于显示提示信息。In the case where it is determined according to the infrared sensor that an object within the second preset distance blocks the first screen, at least one of the following is executed: control the first screen to remain in the off-screen state, and prohibit the first screen from being When the screen is off, the preset area is illuminated, and the preset area is used to display prompt information.
  6. 一种终端设备,所述终端设备包括:获取模块和控制模块;A terminal device, the terminal device includes: an acquisition module and a control module;
    所述获取模块,用于在根据所述终端设备的超声传感器确定第一预设距离内有第 一物体遮挡所述终端设备的情况下,获取所述终端设备的状态信息,所述状态信息用于确定是否所述第一物体遮挡的为所述终端设备的第一屏;The acquiring module is configured to acquire state information of the terminal device when it is determined according to the ultrasonic sensor of the terminal device that a first object within a first preset distance blocks the terminal device, and the state information is used To determine whether the first screen of the terminal device is blocked by the first object;
    所述控制模块,用于在确定所述第一物体遮挡的为所述第一屏的情况下,控制所述第一屏由亮屏状态切换为灭屏状态。The control module is configured to control the first screen to switch from the on-screen state to the off-screen state when it is determined that the first screen is blocked by the first object.
  7. 根据权利要求6所述的终端设备,其中,所述状态信息包括下述至少一项:The terminal device according to claim 6, wherein the status information includes at least one of the following:
    所述终端设备的重力加速度信息,所述终端设备的角速度信息。The gravitational acceleration information of the terminal device, and the angular velocity information of the terminal device.
  8. 根据权利要求7所述的终端设备,其中,所述终端设备还包括:确定模块;The terminal device according to claim 7, wherein the terminal device further comprises: a determining module;
    所述确定模块,用于在所述获取模块获取所述终端设备的状态信息之后,在所述状态信息满足目标条件的情况下,确定所述第一物体遮挡的为所述第一屏;The determining module is configured to, after the acquiring module acquires the state information of the terminal device, in a case where the state information meets a target condition, determine that the first screen is blocked by the first object;
    其中,所述目标条件包括以下至少一项:所述重力加速度信息在第一范围内,所述角速度信息在第二范围内。Wherein, the target condition includes at least one of the following: the gravitational acceleration information is within a first range, and the angular velocity information is within a second range.
  9. 根据权利要求6至8中任一项所述的终端设备,其中,所述终端设备还包括:开启模块;The terminal device according to any one of claims 6 to 8, wherein the terminal device further comprises: an opening module;
    所述开启模块,用于在所述根据所述终端设备的超声传感器确定第一预设距离内有第一物体遮挡所述终端设备之前,在确定所述第一屏处于亮屏状态,且所述第一屏显示通话界面的情况下,开启所述超声传感器。The opening module is configured to determine that the first screen is in a bright screen state before the terminal device is determined to be covered by a first object within a first preset distance according to the ultrasonic sensor of the terminal device. When the call interface is displayed on the first screen, the ultrasonic sensor is turned on.
  10. 根据权利要求6至8中任一项所述的终端设备,其中,所述终端设备还包括:开启模块;The terminal device according to any one of claims 6 to 8, wherein the terminal device further comprises: an opening module;
    所述开启模块,用于在确定所述第一屏处于灭屏状态,且所述第一屏未处于通话状态的情况下,开启红外传感器;The turning on module is configured to turn on the infrared sensor when it is determined that the first screen is in the off-screen state and the first screen is not in the call state;
    所述控制模块,还用于在根据所述红外传感器确定第二预设距离内有物体遮挡所述第一屏的情况下,执行下述至少一项:控制所述第一屏保持灭屏状态,禁止所述第一屏在灭屏状态下点亮预设区域,所述预设区域用于显示提示信息。The control module is further configured to perform at least one of the following when it is determined according to the infrared sensor that there is an object within a second preset distance blocking the first screen: controlling the first screen to remain in the off-screen state , Prohibiting the first screen from illuminating a preset area in the off-screen state, and the preset area is used to display prompt information.
  11. 一种终端设备,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1至5中任一项所述的接近检测方法的步骤。A terminal device comprising a processor, a memory, and a computer program stored on the memory and capable of running on the processor. The computer program is executed by the processor to implement any of claims 1 to 5 One of the steps of the proximity detection method.
  12. 一种计算机可读存储介质,所述计算机可读存储介质上存储计算机程序,所 述计算机程序被处理器执行时实现如权利要求1至5中任一项所述的接近检测方法的步骤。A computer-readable storage medium storing a computer program on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the proximity detection method according to any one of claims 1 to 5 are realized.
PCT/CN2020/116783 2019-09-24 2020-09-22 Proximity detection method and terminal device WO2021057712A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910907360.2A CN110753155A (en) 2019-09-24 2019-09-24 Proximity detection method and terminal equipment
CN201910907360.2 2019-09-24

Publications (1)

Publication Number Publication Date
WO2021057712A1 true WO2021057712A1 (en) 2021-04-01

Family

ID=69276946

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/116783 WO2021057712A1 (en) 2019-09-24 2020-09-22 Proximity detection method and terminal device

Country Status (2)

Country Link
CN (1) CN110753155A (en)
WO (1) WO2021057712A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115079804A (en) * 2021-12-09 2022-09-20 荣耀终端有限公司 Control processing method of electronic equipment

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110753155A (en) * 2019-09-24 2020-02-04 维沃移动通信有限公司 Proximity detection method and terminal equipment
CN113596248B (en) * 2020-04-30 2022-11-11 华为技术有限公司 Display screen control method and device
CN111638522B (en) * 2020-04-30 2022-11-18 维沃移动通信有限公司 Proximity detection method and electronic device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102520852A (en) * 2011-11-29 2012-06-27 华为终端有限公司 Control method of mobile equipment screen status and associated mobile equipment
WO2014208667A1 (en) * 2013-06-26 2014-12-31 京セラ株式会社 Portable terminal device
CN107896272A (en) * 2017-08-11 2018-04-10 广东欧珀移动通信有限公司 A kind of call control method and device
CN108965583A (en) * 2018-06-15 2018-12-07 Oppo广东移动通信有限公司 Proximity test method and relevant device
CN108966323A (en) * 2017-05-17 2018-12-07 上海中兴软件有限责任公司 A kind of bright screen control method and device, terminal
CN110753155A (en) * 2019-09-24 2020-02-04 维沃移动通信有限公司 Proximity detection method and terminal equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106413060B (en) * 2016-10-24 2019-11-08 北京小米移动软件有限公司 Screen state control method and device
CN108391001A (en) * 2018-02-05 2018-08-10 广东欧珀移动通信有限公司 The screen control method and device of terminal, readable storage medium storing program for executing, terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102520852A (en) * 2011-11-29 2012-06-27 华为终端有限公司 Control method of mobile equipment screen status and associated mobile equipment
WO2014208667A1 (en) * 2013-06-26 2014-12-31 京セラ株式会社 Portable terminal device
CN108966323A (en) * 2017-05-17 2018-12-07 上海中兴软件有限责任公司 A kind of bright screen control method and device, terminal
CN107896272A (en) * 2017-08-11 2018-04-10 广东欧珀移动通信有限公司 A kind of call control method and device
CN108965583A (en) * 2018-06-15 2018-12-07 Oppo广东移动通信有限公司 Proximity test method and relevant device
CN110753155A (en) * 2019-09-24 2020-02-04 维沃移动通信有限公司 Proximity detection method and terminal equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115079804A (en) * 2021-12-09 2022-09-20 荣耀终端有限公司 Control processing method of electronic equipment
CN115079804B (en) * 2021-12-09 2023-11-07 荣耀终端有限公司 Control processing method of electronic equipment

Also Published As

Publication number Publication date
CN110753155A (en) 2020-02-04

Similar Documents

Publication Publication Date Title
WO2021083052A1 (en) Object sharing method and electronic device
WO2021057712A1 (en) Proximity detection method and terminal device
WO2021098697A1 (en) Screen display control method and electronic device
WO2021057267A1 (en) Image processing method and terminal device
US11604567B2 (en) Information processing method and terminal
WO2019080775A1 (en) Notification message prompting method and mobile terminal
WO2021121265A1 (en) Camera starting method and electronic device
WO2020211612A1 (en) Information display method and terminal device
WO2020215950A1 (en) Interface display method and terminal device
WO2021218748A1 (en) Screen mirroring method and electronic device
WO2019228296A1 (en) Display processing method and terminal device
WO2020192282A1 (en) Notification message display method and terminal device
WO2021057290A1 (en) Information control method and electronic device
WO2020181954A1 (en) Application program control method and terminal device
WO2021004306A1 (en) Operation control method and terminal
WO2021129537A1 (en) Method for controlling electronic device and electronic device
US11930297B2 (en) Video call method and terminal device
WO2021164716A1 (en) Display method and electronic device
WO2020192297A1 (en) Screen interface switching method and terminal device
WO2021031717A1 (en) Screen capturing method and terminal device
WO2021164739A1 (en) Control method for electronic device and electronic device
CN110830713A (en) Zooming method and electronic equipment
WO2020238372A1 (en) Method for displaying unread message, and terminal device
WO2020151490A1 (en) Application control method and terminal device
CN110058686B (en) Control method and terminal equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20869166

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20869166

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20869166

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 13.10.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20869166

Country of ref document: EP

Kind code of ref document: A1