CN109254656B - Proximity detection method and device - Google Patents

Proximity detection method and device Download PDF

Info

Publication number
CN109254656B
CN109254656B CN201810962609.5A CN201810962609A CN109254656B CN 109254656 B CN109254656 B CN 109254656B CN 201810962609 A CN201810962609 A CN 201810962609A CN 109254656 B CN109254656 B CN 109254656B
Authority
CN
China
Prior art keywords
proximity
screen state
target hardware
event
proximity event
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810962609.5A
Other languages
Chinese (zh)
Other versions
CN109254656A (en
Inventor
郑灿杰
张强
莫斐
戴聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810962609.5A priority Critical patent/CN109254656B/en
Publication of CN109254656A publication Critical patent/CN109254656A/en
Application granted granted Critical
Publication of CN109254656B publication Critical patent/CN109254656B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/017Gesture based interaction, e.g. based on a set of recognized hand gestures

Abstract

The application provides a proximity detection method and a proximity detection device, wherein the method comprises the following steps: detecting the current screen state of the terminal equipment, and if the current screen state is in a preset screen state, determining a target hardware element corresponding to the current screen state in the terminal equipment, wherein the initial registration function of the target hardware element is a non-proximity event identification function; registering the target hardware element as a proximity event detection element; controlling a proximity event detection element to detect proximity data of an external object relative to a terminal equipment screen according to a preset period; and judging the approach event according to the approach data reported by the approach event detection element. Therefore, the proximity event recognition function is provided by fully utilizing the mounted elements in the terminal equipment, and the proximity event recognition function of the terminal equipment is optimized without increasing the cost.

Description

Proximity detection method and device
Technical Field
The present application relates to the field of electronic devices, and in particular, to a proximity detection method and apparatus.
Background
With the progress of the terminal device manufacturing technology, the terminal device may implement a proximity event recognition function based on a proximity sensor, and thus, an upper application of the terminal device may be supported to provide various functional services based on proximity data, for example, a game application may be supported to provide a gesture operation action recognition function based on proximity data.
In the related art, the proximity data is always acquired through a preset fixed hardware sensor, and actually, when the screen state of the terminal device is different, the acquisition conditions of the corresponding proximity data are different, so that the acquisition of the proximity data through only one fixed proximity sensor is difficult to adapt to complicated and variable acquisition conditions, and the error of the acquired proximity data is large. If the number of the proximity sensors is increased to adapt to complicated and variable acquisition conditions, the number of the holes formed in the terminal equipment is increased, and the attractiveness of the terminal equipment is damaged while the cost is increased.
Content of application
The present application is directed to solving, at least to some extent, one of the technical problems in the related art.
An embodiment of a first aspect of the present application provides a proximity detection method based on a terminal device, including: detecting a current screen state of a terminal device, and if the current screen state is in a preset screen state, determining a target hardware element corresponding to the current screen state in the terminal device, wherein an initial registration function of the target hardware element is a non-proximity event identification function; registering the target hardware element as a proximity event detection element; controlling the proximity event detection element to detect proximity data of an external object relative to a terminal equipment screen according to a preset period; and judging the proximity event according to the proximity data reported by the proximity event detection element.
An embodiment of a second aspect of the present application provides a proximity detection apparatus based on a terminal device, including: the first detection module is used for detecting the current screen state of the terminal equipment; a determining module, configured to determine, in the terminal device, a target hardware element corresponding to the current screen state when the current screen state is in a preset screen state, where an initial registration function of the target hardware element is a non-proximity event recognition function; a registration module to register the target hardware element as a proximity event detection element; the second detection module is used for controlling the proximity event detection element to detect proximity data of an external object relative to the screen of the terminal equipment according to a preset period; and the judgment module is used for judging the proximity event according to the proximity data reported by the proximity event detection element.
An embodiment of a third aspect of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the terminal device-based proximity detection method according to the foregoing embodiment of the first aspect.
A fourth aspect of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the terminal device-based proximity detection method according to the foregoing first aspect of the present application.
The technical scheme provided by the application at least comprises the following beneficial effects:
the method comprises the steps of detecting the current screen state of the terminal equipment, determining a target hardware element corresponding to the current screen state in the terminal equipment if the current screen state is in a preset screen state, wherein the initial registration function of the target hardware element is a non-proximity event recognition function, registering the target hardware element as a proximity event detection element, further controlling the proximity event detection element to detect proximity data of an external object relative to the screen of the terminal equipment according to a preset period, and judging a proximity event according to the proximity data reported by the proximity event detection element. Therefore, the proximity event recognition function is provided by fully utilizing the mounted elements in the terminal equipment, and the proximity event recognition function of the terminal equipment is optimized without increasing the cost.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flow diagram of a proximity detection method according to one embodiment of the present application;
FIG. 2 is a flow diagram of a proximity detection method according to another embodiment of the present application;
FIG. 3 is a schematic plan view of a terminal device according to some embodiments of the present application;
FIG. 4 is a schematic cross-sectional view of a terminal device according to some embodiments of the present application;
FIG. 5 is another schematic cross-sectional view of a terminal device according to some embodiments of the present application;
FIG. 6 is a schematic diagram of a proximity detection device according to one embodiment of the present application;
FIG. 7 is a schematic diagram of a proximity detection device according to another embodiment of the present application; and
fig. 8 is a schematic structural view of a proximity detection apparatus according to yet another embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
As mentioned in the background art, in the terminal device, since the detection of the proximity data is always realized by using a certain fixed proximity sensor, it is difficult to adapt to variable acquisition conditions, for example, when the fixed proximity sensor is an infrared sensor, in the state that the screen is bright, the proximity sensor excites electrons in the screen in the process of emitting infrared light to cause the light-transmitting display screen to flicker, thereby forming interference with the normal display of the light-transmitting display screen, affecting the functional service quality provided by the terminal device, and the electrons and the infrared light of the display screen affect each other, thereby reducing the accuracy of the acquisition of the proximity data.
In order to solve the contradiction between the fixed proximity sensor and the variable acquisition condition, the method for providing the proximity recognition function by using other hardware already installed in the terminal equipment is provided without increasing the hole opening and the cost of the terminal equipment.
The proximity detection method and apparatus according to the embodiments of the present application are described below with reference to the accompanying drawings, where an application main body of the proximity detection method may be a terminal device including a touch screen and other hardware with a proximity recognition function, the terminal device may be a mobile phone, a tablet computer, a personal digital assistant, a wearable device and other hardware devices with a touch screen, and the wearable device may be a smart bracelet, a smart watch, smart glasses, and the like.
Fig. 1 is a flow chart of a proximity detection method according to one embodiment of the present application, as shown in fig. 1, the method including:
step 101, detecting a current screen state of a terminal device, and if the current screen state is in a preset screen state, determining a target hardware element corresponding to the current screen state in the terminal device, wherein an initial registration function of the target hardware element is a non-proximity event recognition function.
The screen state includes a screen lighting state, a screen extinguishing state and the like, and the target hardware element includes hardware capable of judging the distance between the external object and the touch screen of the terminal device through the detected signal, for example, the target hardware element includes a touch screen (a capacitive touch screen and the like) capable of determining the distance between the external object and the touch screen according to the change of the capacitance value, a light emitting element capable of determining the distance between the external object and the touch screen according to the light brightness loss degree, and the like. It should be emphasized that the initial registration function of the target hardware component in the embodiment of the present application is not a non-proximity event recognition function, for example, the initial registration function of the touch screen is a display function, etc., in the embodiment of the present application, the function of the target hardware component is extended, so that not only the initial registration function of the target hardware component but also a proximity event detection function can be implemented, thereby, the extension of the event detection function is realized without increasing the hardware cost.
Of course, as analyzed above, when the screen is in different screen states, the accuracy of the proximity data detected by the related detection element is different, and therefore, in the embodiment of the present application, in order to ensure the accuracy of the detection data detected by the target hardware element, it is necessary to ensure that the screen state is in a state of being adapted to the target hardware element when the detection data is obtained, so-called adaptation, it can be understood that in the current screen state, the accuracy of the detection data acquired by using the target hardware element is higher, the operability is stronger, and an event that affects user experience, such as a touch screen flashing, does not occur.
Specifically, a preset screen state adapted to a target hardware element is set in advance, and when it is detected that the current screen state of the terminal device matches with the preset screen state, the target hardware element corresponding to the current screen state is determined, for example, when the screen is in a bright screen state, because the touch screen is in a working state, the change of the capacitance of the capacitive touch screen can be acquired in real time, and the full utilization of resources can be realized, so that the touch screen can be determined as the target hardware element in the current bright screen state.
In one embodiment of the present application, if the current screen state of the terminal device is in a non-preset screen state, indicating that there is no suitable target hardware element currently to detect the proximity data, in order to provide the terminal device with the proximity event detection service, a pre-registered proximity sensor element is invoked, wherein an initial registration function of the pre-registered proximity sensor element is a proximity event recognition function, that is, the proximity sensor is a hardware device, such as an infrared proximity sensor, installed and registered in the terminal device, which is dedicated to implementing the proximity event detection function.
And then, controlling the proximity sensor element to detect proximity data of an external object relative to the touch screen of the terminal device according to a preset period, for example, when the proximity sensor element is an infrared proximity sensor, acquiring an infrared signal to be fed back, and finally, judging a proximity event according to the proximity data reported by the proximity sensor element, wherein the proximity event comprises a shielding event of the touch screen of the terminal device, an external object proximity event, an external object far-away event and the like.
At step 102, the target hardware element is registered as a proximity event detection element.
In particular, since the initial registration function of the target hardware element is a non-proximity event recognition function, and thus, the target hardware element is registered as a proximity event detection element, it should be emphasized that registering the target hardware element as a proximity event detection element, is not meant to override its initial registration function, its initial registration function is retained and, in actual operation, the target hardware element may be registered as a proximity event detection element at the hardware abstraction layer, e.g., the touch screen may be registered as a proximity event detection element at the hardware abstraction layer, the registration process is to register the target hardware element as a virtual proximity sensor, and the registration process of a physical proximity sensor is omitted, for example, when the infrared proximity sensors are registered, the upper layer application is required to register the corresponding infrared proximity sensors respectively, in the present application, the upper layer application is only required to read the proximity data detected by the target hardware component.
And 103, controlling the proximity event detection element to detect the proximity data of the external object relative to the screen of the terminal equipment according to a preset period.
And step 104, judging the proximity event according to the proximity data reported by the proximity event detection element.
Specifically, the proximity event detection element is controlled to detect proximity data of an external object relative to a screen of the terminal device according to a preset period, the proximity data is related to a target hardware element, when the target hardware element is a touch screen, the proximity data is a capacitance variation, and then a proximity event is judged according to the proximity data reported by the proximity event detection element.
Taking a target hardware element as an example of a touch screen, when a detected external object approaches the touch screen, a weak change of capacitance is caused, and a proximity event between the external object and the touch screen is calculated by detecting the weak change.
It will be readily appreciated that after registering the target hardware element as a proximity event detection element, the proximity data detected by the target hardware element registration is read and uploaded to the upper layer application to service the proximity event function for the upper layer application.
Specifically, in one embodiment of the present application, as shown in fig. 2, after registering a target hardware element of a terminal device as a proximity event detection element, the method further comprises:
step 201, a proximity sensor registration request instruction of an application program in a terminal device is obtained.
It should be understood that when an application needs to provide a proximity event based function service, it is required to register a proximity sensor in advance, i.e., to transmit a proximity sensor registration request instruction.
At step 202, a proximity event detection element is invoked according to a proximity sensor registration request instruction.
In step 203, when the approach judgment request of the application program is acquired, the approach event is judged according to the approach data detected by the approach event detection element, and the approach data is reported to the application program.
Specifically, as analyzed above, since the proximity event detection element in the embodiment of the present application is virtual for the target hardware element, in the embodiment of the present application, the proximity event detection element is invoked according to the proximity sensor registration request instruction, and when a proximity determination request of an application program is acquired, a proximity event is determined according to proximity data detected by the proximity event detection element, and the proximity data is reported to the application program, that is, a corresponding proximity sensor is not actually registered for the application program in a physical layer, and only an upper layer application is required to read the proximity data detected by the target hardware element, thereby reducing the registration cost.
In an embodiment of the present application, when the pre-registered proximity sensor element corresponds to a touch screen, when it is determined that the proximity event is a touch screen shielded event, to avoid false triggering, the touch screen is controlled to be in a sleep state, and an installed proximity sensor element in the terminal device is turned on, for example, an installed infrared proximity sensor is turned on.
In order to make the structure of the terminal device in the embodiments of the present application more clearly understood by those skilled in the art, the following describes the structure of the terminal device in some possible examples with reference to specific examples, and the following description refers to:
referring to fig. 3-5, the present embodiment provides a terminal device 100. The terminal device 100 comprises a touch screen 103 (target hardware element), a proximity sensor element 16, a light sensor 5 and a processor 23, the touch screen 103 comprises a display layer 13, the display layer 13 comprises a display area 1311, the proximity sensor element 16 is arranged below the display area 1311, thereby reducing the open hole of the terminal device, and the proximity sensor element 16 is used for emitting infrared light and receiving infrared light reflected by an object to detect the distance of the object to the terminal device 100.
The embodiment of the present application will be described taking the terminal device 100 as a mobile phone as an example. The mobile phone can prevent misoperation of a user and is beneficial to saving the electric quantity of the mobile phone by arranging the proximity sensor element 16 to determine the distance between the mobile phone and the obstacle and making corresponding adjustment. When the user is answering or making a call and brings the mobile phone close to the head, the proximity sensor element 16 generates detection information by counting the time when the transmitter emits infrared light and the receiver receives reflected infrared light, and the processor 23 turns off the display layer 13 according to the detection information. When the mobile phone is far away from the head, the processor 23 turns on the display layer 13 again according to the detection information fed back by the proximity sensor element 16.
In some embodiments, the display layer 13 comprises an OLED display layer.
Specifically, the OLED display layer has good light transmittance and can better transmit visible light and infrared light. Thus, the OLED display layer may exhibit content effects without affecting the emission and reception of infrared light by the proximity sensor elements 16. The display layer 13 may also be a Micro LED display layer, which also has good transmittance to visible light and infrared light. Of course, these display layers are merely exemplary and embodiments of the present application are not limited thereto. In addition, the display layer 13 may be disposed on the case 20.
Referring to fig. 5, in some embodiments, the touch display screen 103 further includes a light-transmissive cover 11 and a touch layer 12. The light-transmitting cover plate 11 is arranged on the touch layer 12, the touch layer 12 is arranged on the display layer 13, the upper surface 131 of the display layer 13 faces the touch layer 12, and the light transmittance of the light-transmitting cover plate 11 and the touch layer 12 to visible light and infrared light is greater than 90%.
Specifically, the touch layer 12 is mainly used for receiving a user input signal and transmitting the user input signal to the circuit board for data processing, so as to obtain a specific position where the user touches the touch layer 12. It should be noted that the touch layer 12 is disposed On the display layer 13, which means that the touch layer 12 is In contact with the display layer 13, for example, In-Cell or On-Cell bonding technology can be used to bond the touch layer 12 and the display layer 13, which can effectively reduce the weight of the display layer 13 and the overall thickness of the display layer 13. The touch layer 12 being disposed on the display layer 13 may also mean that the touch layer 12 is disposed above the display layer 13 and spaced apart from the display layer 13.
In addition, the transparent cover plate 11 is disposed on the touch layer 12, so that the touch layer 12 and the internal structure thereof can be effectively protected, and the touch layer 12 and the display layer 13 are prevented from being damaged by external force. The light transmittance of the light-transmitting cover plate 11 and the light transmittance of the touch layer 12 to visible light and infrared light are both greater than 90%, which is not only beneficial for the display layer 13 to better show the content effect, but also beneficial for the proximity sensor element 16 arranged below the display layer 13 to stably emit and receive infrared light, and ensures the normal operation of the proximity sensor element 16.
In the embodiment of the present application, the touch layer 12 is composed of a capacitive plate, so in the implementation of the present application, the touch screen 103 may also be registered as a target hardware element, and when the screen is in a bright screen state, a proximity event is determined by a weak variation of the capacitance detected by the touch layer 12.
To sum up, the proximity detection method according to the embodiment of the present application detects a current screen state of a terminal device, and determines a target hardware element corresponding to the current screen state in the terminal device if the current screen state is in a preset screen state, where an initial registration function of the target hardware element is a non-proximity event recognition function, and registers the target hardware element as a proximity event detection element, and further controls the proximity event detection element to detect proximity data of an external object relative to the terminal device screen according to a preset period, and determines a proximity event according to the proximity data reported by the proximity event detection element. Therefore, the proximity event recognition function is provided by fully utilizing the mounted elements in the terminal equipment, and the proximity event recognition function of the terminal equipment is optimized without increasing the cost.
In order to implement the above embodiments, the present application further provides a proximity detection apparatus, and fig. 6 is a schematic structural diagram of the proximity detection apparatus according to an embodiment of the present application, and as shown in fig. 6, the proximity detection apparatus includes a first detection module 10, a determination module 20, a registration module 30, a second detection module 40, and a determination module 50.
The first detection module 10 is configured to detect a current screen state of the terminal device.
The determining module 20 is configured to determine, in the terminal device, a target hardware element corresponding to the current screen state when the current screen state is in the preset screen state, where an initial registration function of the target hardware element is a non-proximity event recognition function.
A registration module 30 for registering the target hardware element as a proximity event detection element.
And a second detection module 40, configured to control the proximity event detection element to detect proximity data of the external object with respect to the terminal device screen according to a preset period.
And the judging module 50 is configured to judge the proximity event according to the proximity data reported by the proximity event detecting element.
In one embodiment of the present application, as shown in fig. 7, the apparatus further comprises a first calling module 60 based on that shown in fig. 6, wherein,
a first calling module 60, configured to call a pre-registered proximity sensor element when the current screen state is in a non-preset screen state, where an initial registration function of the pre-registered proximity sensor element is a proximity event recognition function.
In this example, the second detection module 40 is further configured to control the proximity sensor element to detect proximity data of the external object relative to the screen of the terminal device according to a preset period.
The judging module 50 is further configured to judge the proximity event according to the proximity data reported by the proximity event detecting element.
In an embodiment of the present application, as shown in fig. 8, on the basis of fig. 6, the apparatus further includes an obtaining module 70, a second invoking module 80, and a reporting module 90, wherein,
an obtaining module 70, configured to obtain a proximity sensor registration request instruction of an application in the terminal device after registering a target hardware element of the terminal device as a proximity event detection element.
A second invoking module 80, configured to invoke the proximity event detecting element according to the proximity sensor registration request instruction;
and a reporting module 90, configured to, when a proximity determination request of the application program is obtained, determine a proximity event according to the proximity data detected by the proximity event detecting element, and report the proximity data to the application program.
It should be noted that the foregoing explanation of the embodiment of the proximity detection method is also applicable to the proximity detection apparatus of this embodiment, and is not repeated herein.
To sum up, the proximity detection apparatus according to the embodiment of the present application detects a current screen state of a terminal device, and determines a target hardware element corresponding to the current screen state in the terminal device if the current screen state is in a preset screen state, where an initial registration function of the target hardware element is a non-proximity event recognition function, and registers the target hardware element as a proximity event detection element, and further controls the proximity event detection element to detect proximity data of an external object relative to the terminal device screen according to a preset period, and determines a proximity event according to the proximity data reported by the proximity event detection element. Therefore, the proximity event recognition function is provided by fully utilizing the mounted elements in the terminal equipment, and the proximity event recognition function of the terminal equipment is optimized without increasing the cost.
In order to implement the foregoing embodiment, the present application further provides a terminal device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor, implement the proximity detection method as described in the previous embodiments.
In order to implement the above embodiments, the present application also proposes a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the proximity detection method as proposed by the foregoing embodiments of the present application.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (10)

1. A proximity detection method, comprising:
detecting the current screen state of the terminal equipment, wherein the screen state comprises a bright screen state and a dead screen state; the terminal equipment comprises a touch screen and a pre-registered proximity sensor element, wherein the touch screen comprises a display layer, the display layer comprises a display area, and the proximity sensor element is arranged below the display area; if the current screen state is in a preset screen state, determining a target hardware element corresponding to the current screen state in the terminal equipment, wherein the initial registration function of the target hardware element is a non-proximity event identification function;
registering the target hardware element as a proximity event detection element;
controlling the proximity event detection element to detect proximity data of an external object relative to a terminal equipment screen according to a preset period;
and judging the proximity event according to the proximity data reported by the proximity event detection element.
2. The method of claim 1, after the detecting a current screen state of the terminal device, further comprising:
when the current screen state is in a non-preset screen state, calling the proximity sensor element, wherein the initial registration function of the proximity sensor element is a proximity event recognition function;
controlling the proximity sensor element to detect proximity data of an external object relative to the touch screen of the terminal equipment according to a preset period;
and judging a proximity event according to the proximity data reported by the proximity sensor element.
3. The method of claim 1, wherein after said registering a target hardware element of the terminal device as a proximity event detection element, further comprising:
acquiring a proximity sensor registration request instruction of an application program in the terminal equipment;
invoking the proximity event detection element according to the proximity sensor registration request instruction;
and when the approach judgment request of the application program is acquired, judging an approach event according to the approach data detected by the approach event detection element, and reporting the approach data to the application program.
4. The method of claim 1, wherein the target hardware element comprises the touchscreen, and the registering the target hardware element in the terminal device as a proximity event detection element comprises:
registering the touch screen as a proximity event detection element at a hardware abstraction layer.
5. The method of claim 4, further comprising:
and when the proximity event is the touch screen shielded event, controlling the touch screen to be in a dormant state and turning on the mounted proximity sensor element in the terminal equipment.
6. A proximity detection device, comprising:
the first detection module is used for detecting the current screen state of the terminal equipment; the screen state comprises a bright screen state and a screen extinguishing state; the terminal equipment comprises a touch screen and a pre-registered proximity sensor element, wherein the touch screen comprises a display layer, the display layer comprises a display area, and the proximity sensor element is arranged below the display area;
a determining module, configured to determine, in the terminal device, a target hardware element corresponding to the current screen state when the current screen state is in a preset screen state, where an initial registration function of the target hardware element is a non-proximity event recognition function;
a registration module to register the target hardware element as a proximity event detection element;
the second detection module is used for controlling the proximity event detection element to detect proximity data of an external object relative to the screen of the terminal equipment according to a preset period;
and the judgment module is used for judging the proximity event according to the proximity data reported by the proximity event detection element.
7. The apparatus of claim 6, further comprising:
the first calling module is used for calling the proximity sensor element when the current screen state is in a non-preset screen state, wherein the initial registration function of the proximity sensor element is a proximity event recognition function;
the second detection module is further used for controlling the proximity sensor element to detect proximity data of an external object relative to the screen of the terminal device according to a preset period;
the judging module is further configured to judge the proximity event according to the proximity data reported by the proximity event detecting element.
8. The apparatus of claim 6, further comprising:
an obtaining module, configured to obtain a proximity sensor registration request instruction of an application program in the terminal device after registering a target hardware element of the terminal device as a proximity event detection element; the second calling module is used for calling the proximity event detection element according to the proximity sensor registration request instruction;
and the reporting module is used for judging a proximity event according to the proximity data detected by the proximity event detection element when the proximity judgment request of the application program is acquired, and reporting the proximity data to the application program.
9. A terminal device, comprising: memory, processor and computer program stored on the memory and executable on the processor, which when executed by the processor implements the proximity detection method according to any of claims 1-5.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the proximity detection method according to any one of claims 1 to 5.
CN201810962609.5A 2018-08-22 2018-08-22 Proximity detection method and device Active CN109254656B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810962609.5A CN109254656B (en) 2018-08-22 2018-08-22 Proximity detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810962609.5A CN109254656B (en) 2018-08-22 2018-08-22 Proximity detection method and device

Publications (2)

Publication Number Publication Date
CN109254656A CN109254656A (en) 2019-01-22
CN109254656B true CN109254656B (en) 2021-03-23

Family

ID=65049432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810962609.5A Active CN109254656B (en) 2018-08-22 2018-08-22 Proximity detection method and device

Country Status (1)

Country Link
CN (1) CN109254656B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110321879B (en) * 2019-08-20 2020-06-05 成都数据天空科技有限公司 Proximity judgment method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014003350A (en) * 2012-06-15 2014-01-09 Kyocera Corp Portable terminal device and control method of the same
CN104836922A (en) * 2015-05-29 2015-08-12 歌尔声学股份有限公司 Method and component for detecting approach/departure of external object
CN105302347A (en) * 2014-07-14 2016-02-03 宇龙计算机通信科技(深圳)有限公司 Method and apparatus for simulating distance sensor by using touch screen
CN105791515A (en) * 2014-12-22 2016-07-20 青岛海信移动通信技术股份有限公司 Screen state control method for terminal equipment and terminal equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8195220B2 (en) * 2008-02-01 2012-06-05 Lg Electronics Inc. User interface for mobile devices
US20090225043A1 (en) * 2008-03-05 2009-09-10 Plantronics, Inc. Touch Feedback With Hover
CN102855037B (en) * 2012-08-07 2016-06-29 深圳天珑无线科技有限公司 A kind of capacitance plate mobile terminal and screen control method, device
CN104007878B (en) * 2014-05-16 2017-01-25 广东欧珀移动通信有限公司 Method and device for preventing error operation on touch screen terminal
US9300781B1 (en) * 2014-12-19 2016-03-29 HTC Corpoation Portable electronic device and control method thereof
CN106060274B (en) * 2016-07-14 2019-08-30 Oppo广东移动通信有限公司 A kind of report method, device and the mobile terminal of ambient light sensor data
CN107343069A (en) * 2017-06-26 2017-11-10 北京小米移动软件有限公司 Terminal and acoustic signals transmission method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014003350A (en) * 2012-06-15 2014-01-09 Kyocera Corp Portable terminal device and control method of the same
CN105302347A (en) * 2014-07-14 2016-02-03 宇龙计算机通信科技(深圳)有限公司 Method and apparatus for simulating distance sensor by using touch screen
CN105791515A (en) * 2014-12-22 2016-07-20 青岛海信移动通信技术股份有限公司 Screen state control method for terminal equipment and terminal equipment
CN104836922A (en) * 2015-05-29 2015-08-12 歌尔声学股份有限公司 Method and component for detecting approach/departure of external object

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MagPairing: Pairing Smartphones in Close Proximity Using Magnetometers;R.Jin et al.;《IEEE Transactions on Information Forensics and Security》;20160630;第11卷(第6期);全文 *
基于电荷转移技术的触摸键原理及应用;刘可昌 等;《仪表技术》;20071015(第10期);全文 *

Also Published As

Publication number Publication date
CN109254656A (en) 2019-01-22

Similar Documents

Publication Publication Date Title
WO2018145555A1 (en) Display screen state control method and apparatus, storage medium, and electronic device
CN109144224B (en) Power consumption optimization method and device for touch screen
CN107942306B (en) Method and device for calibrating proximity sensor, storage medium and electronic equipment
EP3443446B1 (en) Electronic device comprising force sensor
CN106443639B (en) A kind of range calibration method and terminal
CN108881645B (en) Screen control method and device for mobile phone call
EP3828684B1 (en) Method and device for controlling switching of proximity-event detection elements
EP3435199B1 (en) Method, mobile terminal and non-transitory computer-readable storage medium for adjusting scanning frequency of touch screen
CN107463290B (en) Response control method and device for touch operation, storage medium and mobile terminal
CN106886766B (en) A kind of fingerprint identification method, fingerprint recognition circuit and mobile terminal
US20140354567A1 (en) Apparatus and method for operating proximity sensing function in electronic device having touch screen
WO2013188173A1 (en) Glove touch detection for touch devices
CN106598444B (en) Control method of mobile terminal and mobile terminal
CN111290794B (en) Screen awakening method and device, storage medium and mobile terminal
CN109194833B (en) Screen control method and device for mobile phone call
CN106791120A (en) Mobile terminal puts out the control method and device of screen
CN109343066A (en) Control method, device, storage medium and the mobile terminal of proximity sensor
CN104751586A (en) Terminal, information processing method and information processing device
CN103152484A (en) Method and system for turning off alarm of mobile terminal
CN109254656B (en) Proximity detection method and device
CA2897131C (en) Off-center sensor target region
CN109254689B (en) Proximity detection method and device
CN109240541B (en) Screen false touch prevention method and device of electronic equipment and electronic equipment
CN111064842B (en) Method, terminal and storage medium for recognizing special-shaped touch
CN107665081B (en) Display screen state control method and device, storage medium and terminal

Legal Events

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